X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=images%2Fduplicates.h;h=934d02ded4af4752ebeae726d9f1327911681437;hb=6de1e8ff2085b921dfd2dd05ab4a6bdb22ed3048;hp=fda8953fb776706ddbeee2799077c993fd573a4d;hpb=2f678dc9ccd4cd88531c97ad48375074db3ad8be;p=libucw.git diff --git a/images/duplicates.h b/images/duplicates.h index fda8953f..934d02de 100644 --- a/images/duplicates.h +++ b/images/duplicates.h @@ -1,6 +1,14 @@ #ifndef _IMAGES_DUPLICATES_H #define _IMAGES_DUPLICATES_H +#ifdef CONFIG_UCW_CLEAN_ABI +#define image_dup_compare ucw_image_dup_compare +#define image_dup_context_cleanup ucw_image_dup_context_cleanup +#define image_dup_context_init ucw_image_dup_context_init +#define image_dup_estimate_size ucw_image_dup_estimate_size +#define image_dup_new ucw_image_dup_new +#endif + enum image_dup_flags { IMAGE_DUP_TRANS_ID = 0x0001, IMAGE_DUP_FLIP_X = 0x0002, @@ -20,6 +28,10 @@ struct image_dup_context { uns flags; uns ratio_threshold; uns error_threshold; + uns qtree_limit; + u64 sum_depth; + u64 sum_pixels; + uns error; }; struct image_dup { @@ -35,8 +47,9 @@ struct image_dup { void image_dup_context_init(struct image_context *ic, struct image_dup_context *ctx); void image_dup_context_cleanup(struct image_dup_context *ctx); -uns image_dup_estimate_size(uns cols, uns rows); -uns image_dup_new(struct image_context *ctx, struct image *image, void *buffer); + +uns image_dup_estimate_size(uns cols, uns rows, uns same_size_compare, uns qtree_limit); +uns image_dup_new(struct image_dup_context *ctx, struct image *image, void *buffer, uns same_size_compare); /* dup-cmp.c */ @@ -44,11 +57,9 @@ uns image_dup_compare(struct image_dup_context *ctx, struct image_dup *dup1, str /* internals */ -static inline byte * -image_dup_block(struct image_dup *dup, uns tab_col, uns tab_row) +static inline byte *image_dup_block(struct image_dup *dup, uns tab_col, uns tab_row) { return dup->tab_pixels + (dup->tab_row_size << tab_row) + (3 << (tab_row + tab_col)); } - #endif