From: Pavel Charvat Date: Wed, 30 Aug 2006 07:16:40 +0000 (+0200) Subject: some small bugfixes about image signatures X-Git-Tag: holmes-import~578 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b9e5b4ebf5e4cbff0f32a193fc2f6051f3ea195c;p=libucw.git some small bugfixes about image signatures --- diff --git a/images/sig-seg.c b/images/sig-seg.c index dc445bd9..cdcb71c8 100644 --- a/images/sig-seg.c +++ b/images/sig-seg.c @@ -7,7 +7,7 @@ * of the GNU Lesser General Public License. */ -#define LOCAL_DEBUG +#undef LOCAL_DEBUG #include "sherlock/sherlock.h" #include "lib/conf.h" diff --git a/images/sig-txt.c b/images/sig-txt.c index 0429b739..31887cf2 100644 --- a/images/sig-txt.c +++ b/images/sig-txt.c @@ -31,6 +31,12 @@ image_sig_detect_textured(struct image_sig_data *data) uns i, j; u32 cnt[IMAGE_REG_MAX]; + if (cell_cols * cell_rows < 4) + { + DBG("Image is not textured."); + return; + } + DBG("Detecting textured image... cols=%u rows=%u cell_cols=%u cell_rows=%u", cols, rows, cell_cols, cell_rows); /* Compute cells boundaries */ diff --git a/images/signature.h b/images/signature.h index 5f8009a1..4f53f24f 100644 --- a/images/signature.h +++ b/images/signature.h @@ -43,11 +43,11 @@ struct image_cluster { struct { s32 dot; /* Dot product of the splitting plane */ s8 vec[IMAGE_VEC_F]; /* Normal vector of the splitting plane */ - }; + } PACKED; struct { u64 pos; /* Cluster size in bytes */ - }; - }; + } PACKED; + } PACKED; } PACKED; static inline uns