1 #ifndef _IMAGES_DUPLICATES_H
2 #define _IMAGES_DUPLICATES_H
4 #ifdef CONFIG_UCW_CLEAN_ABI
5 #define image_dup_compare ucw_image_dup_compare
6 #define image_dup_context_cleanup ucw_image_dup_context_cleanup
7 #define image_dup_context_init ucw_image_dup_context_init
8 #define image_dup_estimate_size ucw_image_dup_estimate_size
9 #define image_dup_new ucw_image_dup_new
12 enum image_dup_flags {
13 IMAGE_DUP_TRANS_ID = 0x0001,
14 IMAGE_DUP_FLIP_X = 0x0002,
15 IMAGE_DUP_FLIP_Y = 0x0004,
16 IMAGE_DUP_ROT_180 = 0x0008,
17 IMAGE_DUP_FLIP_BACK = 0x0010,
18 IMAGE_DUP_ROT_CCW = 0x0020,
19 IMAGE_DUP_ROT_CW = 0x0040,
20 IMAGE_DUP_FLIP_SLASH = 0x0080,
21 IMAGE_DUP_TRANS_ALL = 0x00ff,
22 IMAGE_DUP_SCALE = 0x0100,
23 IMAGE_DUP_WANT_ALL = 0x0200,
26 struct image_dup_context {
27 struct image_context *ic;
48 void image_dup_context_init(struct image_context *ic, struct image_dup_context *ctx);
49 void image_dup_context_cleanup(struct image_dup_context *ctx);
51 uint image_dup_estimate_size(uint cols, uint rows, uint same_size_compare, uint qtree_limit);
52 uint image_dup_new(struct image_dup_context *ctx, struct image *image, void *buffer, uint same_size_compare);
56 uint image_dup_compare(struct image_dup_context *ctx, struct image_dup *dup1, struct image_dup *dup2);
60 static inline byte *image_dup_block(struct image_dup *dup, uint tab_col, uint tab_row)
62 return dup->tab_pixels + (dup->tab_row_size << tab_row) + (3 << (tab_row + tab_col));