]> mj.ucw.cz Git - libucw.git/commitdiff
more MJ's corrections... to be continue
authorPavel Charvat <pavel.charvat@netcentrum.cz>
Mon, 2 Oct 2006 14:34:57 +0000 (16:34 +0200)
committerPavel Charvat <pavel.charvat@netcentrum.cz>
Mon, 2 Oct 2006 14:34:57 +0000 (16:34 +0200)
images/io-libjpeg.c
images/io-main.c
images/object.c
images/sig-cmp.c
images/signature.h

index 52edd03bf79603155fbd824a8d4d85e8bed6b8c4..1d3d37c5029e046212bee97f484179b50bea9391 100644 (file)
@@ -221,7 +221,8 @@ libjpeg_app1_preprocessor(j_decompress_ptr cinfo)
 {
   struct libjpeg_read_internals *i = (struct libjpeg_read_internals *)cinfo;
   struct image_io *io = i->err.io;
 {
   struct libjpeg_read_internals *i = (struct libjpeg_read_internals *)cinfo;
   struct image_io *io = i->err.io;
-  uns len = (libjpeg_read_byte(i) << 8) + libjpeg_read_byte(i);
+  uns len = libjpeg_read_byte(i) << 8;
+  len += libjpeg_read_byte(i);
   DBG("Found APP1 marker, len=%u", len);
   if (len < 2)
     return TRUE;
   DBG("Found APP1 marker, len=%u", len);
   if (len < 2)
     return TRUE;
index 230a7cfd8f025f73db7b498bcfdbea899f4514eb..7b176b70a187e4944bfa8af6966e4a3a3f6b96a3 100644 (file)
@@ -344,7 +344,7 @@ image_io_read_data_finish(struct image_io_read_data_internals *rdi, struct image
       /* Merge with background */
       if ((io->flags ^ rdi->image->flags) & IMAGE_ALPHA)
         {
       /* Merge with background */
       if ((io->flags ^ rdi->image->flags) & IMAGE_ALPHA)
         {
-         DBG("Aplying background");
+         DBG("Applying background");
          uns flags = rdi->image->flags & ~IMAGE_ALPHA;
          if (!(rdi->need_transformations = (flags ^ io->flags) & (IMAGE_NEW_FLAGS & ~IMAGE_PIXELS_ALIGNED)))
            flags = io->flags;
          uns flags = rdi->image->flags & ~IMAGE_ALPHA;
          if (!(rdi->need_transformations = (flags ^ io->flags) & (IMAGE_NEW_FLAGS & ~IMAGE_PIXELS_ALIGNED)))
            flags = io->flags;
index d817e1c92f10c519d087073e316c2f10fc5fd242..0375fdd906e9fb503fb96a68707d2ce7f5dea963 100644 (file)
@@ -87,7 +87,7 @@ error:
 void
 put_image_obj_signature(struct odes *o, struct image_signature *sig)
 {
 void
 put_image_obj_signature(struct odes *o, struct image_signature *sig)
 {
-  /* signatures should be short enough to fit one attribute */
+  /* signatures should be short enough to in a single attribute */
   byte buf[MAX_ATTR_SIZE];
   uns size = image_signature_size(sig->len);
   ASSERT(MAX_ATTR_SIZE > BASE224_ENC_LENGTH(size));
   byte buf[MAX_ATTR_SIZE];
   uns size = image_signature_size(sig->len);
   ASSERT(MAX_ATTR_SIZE > BASE224_ENC_LENGTH(size));
index 0e9454e385a4c7f0124beb1c7622c94226726316..b420f0673ce95d39fb9132be2a7508947d81eaab 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- *     Image Library -- Comparitions of image signatures
+ *     Image Library -- Comparisions of image signatures
  *
  *     (c) 2006 Pavel Charvat <pchar@ucw.cz>
  *
  *
  *     (c) 2006 Pavel Charvat <pchar@ucw.cz>
  *
index de6edaaa3d3c7d159768d2d7493f60460e977ea9..204174768a83c3e0ed22a276691afe5e9d22ccb2 100644 (file)
@@ -22,7 +22,7 @@ struct image_vector {
   byte f[IMAGE_VEC_F];         /* texture features */
 } PACKED;
 
   byte f[IMAGE_VEC_F];         /* texture features */
 } PACKED;
 
-/* Fetures for image regions (16 bytes) */
+/* Features for image regions (16 bytes) */
 struct image_region {
   byte f[IMAGE_VEC_F];         /* texture features - L, u, v, LH, HL, HH */
   byte h[IMAGE_REG_H];         /* shape/pos features - I1, I2, I3, X, Y */
 struct image_region {
   byte f[IMAGE_VEC_F];         /* texture features - L, u, v, LH, HL, HH */
   byte h[IMAGE_REG_H];         /* shape/pos features - I1, I2, I3, X, Y */
@@ -34,24 +34,24 @@ struct image_region {
 
 /* Image signature (usually 16 + len * 16 bytes) */
 struct image_signature {
 
 /* Image signature (usually 16 + len * 16 bytes) */
 struct image_signature {
-  byte len;                    /* Number of regions */
+  byte len;                    /* number of regions */
   byte flags;                  /* IMAGE_SIG_xxx */
   byte flags;                  /* IMAGE_SIG_xxx */
-  u16 cols;                    /* Image width */
-  u16 rows;                    /* Image height */
-  u16 df;                      /* Average weighted f dist */
-  u16 dh;                      /* Average weighted h dist */
-  struct image_vector vec;     /* Average features of all regions... simple signature */
-  struct image_region reg[IMAGE_REG_MAX];/* Feature vector for every region */
+  u16 cols;                    /* image width */
+  u16 rows;                    /* image height */
+  u16 df;                      /* average weighted f dist */
+  u16 dh;                      /* average weighted h dist */
+  struct image_vector vec;     /* average features of all regions... simple signature */
+  struct image_region reg[IMAGE_REG_MAX];/* feature vector for every region */
 };
 
 struct image_cluster {
   union {
     struct {
 };
 
 struct image_cluster {
   union {
     struct {
-      s32 dot;                 /* Dot product of the splitting plane */
-      s8 vec[IMAGE_VEC_F];     /* Normal vector of the splitting plane */
+      s32 dot;                 /* dot product of the splitting plane */
+      s8 vec[IMAGE_VEC_F];     /* normal vector of the splitting plane */
     };
     struct {
     };
     struct {
-      u64 pos;                 /* Cluster size in bytes */
+      u64 pos;                 /* cluster size in bytes */
     };
   };
 };
     };
   };
 };