From caa88a0e3b694ddb2a518b9b620355c2631735d2 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 3 Jan 2014 16:36:39 +0100 Subject: [PATCH] ABI: Symbol renames for libimages --- images/color.h | 40 ++++++++++++++ images/duplicates.h | 8 +++ images/error.h | 4 ++ images/images.h | 31 +++++++++++ images/io-main.h | 19 +++++++ images/math.h | 5 ++ images/object.h | 8 +++ images/sig-cmp-gen.h | 5 ++ images/signature.h | 26 +++++++++ tools/libucw.api | 128 +++++++++++++++++++++++++++++++++++++++++++ tools/map-symbols | 4 +- 11 files changed, 277 insertions(+), 1 deletion(-) diff --git a/images/color.h b/images/color.h index dca4ed65..3a2c1654 100644 --- a/images/color.h +++ b/images/color.h @@ -27,6 +27,46 @@ #include +#ifdef CONFIG_UCW_CLEAN_ABI +#define cmyk_to_rgb_exact ucw_cmyk_to_rgb_exact +#define color_adobe_rgb_info ucw_color_adobe_rgb_info +#define color_apple_rgb_info ucw_color_apple_rgb_info +#define color_black ucw_color_black +#define color_cie_rgb_info ucw_color_cie_rgb_info +#define color_color_match_rgb_info ucw_color_color_match_rgb_info +#define color_compute_bradford_matrix ucw_color_compute_bradford_matrix +#define color_compute_color_space_to_xyz_matrix ucw_color_compute_color_space_to_xyz_matrix +#define color_compute_color_spaces_conversion_matrix ucw_color_compute_color_spaces_conversion_matrix +#define color_conv_init ucw_color_conv_init +#define color_conv_pixels ucw_color_conv_pixels +#define color_get ucw_color_get +#define color_illuminant_d50 ucw_color_illuminant_d50 +#define color_illuminant_d65 ucw_color_illuminant_d65 +#define color_illuminant_e ucw_color_illuminant_e +#define color_interpolation_table ucw_color_interpolation_table +#define color_invert_matrix ucw_color_invert_matrix +#define color_put ucw_color_put +#define color_space_channels ucw_color_space_channels +#define color_space_id_to_name ucw_color_space_id_to_name +#define color_space_name ucw_color_space_name +#define color_space_name_to_id ucw_color_space_name_to_id +#define color_srgb_info ucw_color_srgb_info +#define color_white ucw_color_white +#define image_conv ucw_image_conv +#define image_conv_defaults ucw_image_conv_defaults +#define luv_to_xyz_exact ucw_luv_to_xyz_exact +#define rgb_to_cmyk_exact ucw_rgb_to_cmyk_exact +#define srgb_to_luv_grid ucw_srgb_to_luv_grid +#define srgb_to_luv_init ucw_srgb_to_luv_init +#define srgb_to_luv_pixels ucw_srgb_to_luv_pixels +#define srgb_to_luv_tab1 ucw_srgb_to_luv_tab1 +#define srgb_to_luv_tab2 ucw_srgb_to_luv_tab2 +#define srgb_to_luv_tab3 ucw_srgb_to_luv_tab3 +#define srgb_to_xyz_exact ucw_srgb_to_xyz_exact +#define xyz_to_luv_exact ucw_xyz_to_luv_exact +#define xyz_to_srgb_exact ucw_xyz_to_srgb_exact +#endif + /* Basic color spaces */ enum { COLOR_SPACE_UNKNOWN = 0, diff --git a/images/duplicates.h b/images/duplicates.h index 9c243c37..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, diff --git a/images/error.h b/images/error.h index 92f3766f..0057ff8a 100644 --- a/images/error.h +++ b/images/error.h @@ -1,6 +1,10 @@ #ifndef _IMAGES_ERROR_H #define _IMAGES_ERROR_H +#ifdef CONFIG_UCW_CLEAN_ABI +#define image_trace ucw_image_trace +#endif + extern uns image_trace; /* ImageLib.Trace */ /* Error codes */ diff --git a/images/images.h b/images/images.h index 19ecf47e..fbe7e072 100644 --- a/images/images.h +++ b/images/images.h @@ -12,6 +12,37 @@ #include +#ifdef CONFIG_UCW_CLEAN_ABI +#define image_channels_format_to_name ucw_image_channels_format_to_name +#define image_clear ucw_image_clear +#define image_clone ucw_image_clone +#define image_context_cleanup ucw_image_context_cleanup +#define image_context_init ucw_image_context_init +#define image_context_msg ucw_image_context_msg +#define image_context_msg_default ucw_image_context_msg_default +#define image_context_msg_silent ucw_image_context_msg_silent +#define image_context_vmsg ucw_image_context_vmsg +#define image_destroy ucw_image_destroy +#define image_dimensions_fit_to_box ucw_image_dimensions_fit_to_box +#define image_extension_to_format ucw_image_extension_to_format +#define image_file_name_to_format ucw_image_file_name_to_format +#define image_format_to_extension ucw_image_format_to_extension +#define image_init_matrix ucw_image_init_matrix +#define image_init_subimage ucw_image_init_subimage +#define image_io_cleanup ucw_image_io_cleanup +#define image_io_init ucw_image_io_init +#define image_io_read ucw_image_io_read +#define image_io_read_data ucw_image_io_read_data +#define image_io_read_header ucw_image_io_read_header +#define image_io_reset ucw_image_io_reset +#define image_io_write ucw_image_io_write +#define image_max_bytes ucw_image_max_bytes +#define image_max_dim ucw_image_max_dim +#define image_name_to_channels_format ucw_image_name_to_channels_format +#define image_new ucw_image_new +#define image_scale ucw_image_scale +#endif + struct mempool; struct fastbuf; diff --git a/images/io-main.h b/images/io-main.h index 477c5dd2..8d084a33 100644 --- a/images/io-main.h +++ b/images/io-main.h @@ -1,6 +1,25 @@ #ifndef _IMAGES_IO_MAIN_H #define _IMAGES_IO_MAIN_H +#ifdef CONFIG_UCW_CLEAN_ABI +#define image_io_read_data_break ucw_image_io_read_data_break +#define image_io_read_data_finish ucw_image_io_read_data_finish +#define image_io_read_data_prepare ucw_image_io_read_data_prepare +#define libjpeg_read_data ucw_libjpeg_read_data +#define libjpeg_read_header ucw_libjpeg_read_header +#define libjpeg_write ucw_libjpeg_write +#define libmagick_cleanup ucw_libmagick_cleanup +#define libmagick_init ucw_libmagick_init +#define libmagick_read_data ucw_libmagick_read_data +#define libmagick_read_header ucw_libmagick_read_header +#define libmagick_write ucw_libmagick_write +#define libpng_read_data ucw_libpng_read_data +#define libpng_read_header ucw_libpng_read_header +#define libpng_write ucw_libpng_write +#define libungif_read_data ucw_libungif_read_data +#define libungif_read_header ucw_libungif_read_header +#endif + static inline int libjpeg_init(struct image_io *io UNUSED) { return 1; } static inline void libjpeg_cleanup(struct image_io *io UNUSED) {} int libjpeg_read_header(struct image_io *io); diff --git a/images/math.h b/images/math.h index 58a884ef..ecbecbf5 100644 --- a/images/math.h +++ b/images/math.h @@ -1,6 +1,11 @@ #ifndef _IMAGES_MATH_H #define _IMAGES_MATH_H +#ifdef CONFIG_UCW_CLEAN_ABI +#define fast_div_tab ucw_fast_div_tab +#define fast_sqrt_tab ucw_fast_sqrt_tab +#endif + extern const u32 fast_div_tab[]; extern const byte fast_sqrt_tab[]; diff --git a/images/object.h b/images/object.h index 9da98eec..26d850ba 100644 --- a/images/object.h +++ b/images/object.h @@ -3,6 +3,14 @@ #include +#ifdef CONFIG_UCW_CLEAN_ABI +#define get_image_obj_info ucw_get_image_obj_info +#define get_image_obj_signature ucw_get_image_obj_signature +#define get_image_obj_thumb ucw_get_image_obj_thumb +#define put_image_obj_signature ucw_put_image_obj_signature +#define read_image_obj_thumb ucw_read_image_obj_thumb +#endif + struct image_obj_info { uns cols; uns rows; diff --git a/images/sig-cmp-gen.h b/images/sig-cmp-gen.h index 9e736817..e7fb4e7f 100644 --- a/images/sig-cmp-gen.h +++ b/images/sig-cmp-gen.h @@ -1,3 +1,8 @@ +#ifdef CONFIG_UCW_CLEAN_ABI +#define image_signatures_dist ucw_image_signatures_dist +#define image_signatures_dist_explain ucw_image_signatures_dist_explain +#endif + #ifdef EXPLAIN # define MSG(x...) do{ line += sprintf(line, x); }while(0) # define LINE do{ line = buf; msg(line, param); }while(0) diff --git a/images/signature.h b/images/signature.h index 198d7ca9..63d806cd 100644 --- a/images/signature.h +++ b/images/signature.h @@ -1,6 +1,32 @@ #ifndef _IMAGES_SIGNATURE_H #define _IMAGES_SIGNATURE_H +#ifdef CONFIG_UCW_CLEAN_ABI +#define compute_image_signature ucw_compute_image_signature +#define image_region_dump ucw_image_region_dump +#define image_sig_border_bonus ucw_image_sig_border_bonus +#define image_sig_border_size ucw_image_sig_border_size +#define image_sig_cleanup ucw_image_sig_cleanup +#define image_sig_cmp_features_weights ucw_image_sig_cmp_features_weights +#define image_sig_compare_method ucw_image_sig_compare_method +#define image_sig_detect_textured ucw_image_sig_detect_textured +#define image_sig_finish ucw_image_sig_finish +#define image_sig_inertia_scale ucw_image_sig_inertia_scale +#define image_sig_init ucw_image_sig_init +#define image_sig_min_height ucw_image_sig_min_height +#define image_sig_min_width ucw_image_sig_min_width +#define image_sig_postquant_max_steps ucw_image_sig_postquant_max_steps +#define image_sig_postquant_min_steps ucw_image_sig_postquant_min_steps +#define image_sig_postquant_threshold ucw_image_sig_postquant_threshold +#define image_sig_preprocess ucw_image_sig_preprocess +#define image_sig_prequant_thresholds ucw_image_sig_prequant_thresholds +#define image_sig_segmentation ucw_image_sig_segmentation +#define image_sig_textured_threshold ucw_image_sig_textured_threshold +#define image_signatures_dist ucw_image_signatures_dist +#define image_signatures_dist_explain ucw_image_signatures_dist_explain +#define image_vector_dump ucw_image_vector_dump +#endif + /* Configuration */ extern uns image_sig_min_width, image_sig_min_height; extern uns *image_sig_prequant_thresholds; diff --git a/tools/libucw.api b/tools/libucw.api index 6f1b4efb..b32f89c2 100644 --- a/tools/libucw.api +++ b/tools/libucw.api @@ -596,3 +596,131 @@ _U_upper _U_lower _U_unaccent Uexpand_lig +# images/color.h +color_space_channels +color_space_name +color_space_id_to_name +color_space_name_to_id +color_get +color_put +color_black +color_white +image_conv_defaults +image_conv +color_illuminant_d50 +color_illuminant_d65 +color_illuminant_e +color_adobe_rgb_info +color_apple_rgb_info +color_cie_rgb_info +color_color_match_rgb_info +color_srgb_info +color_compute_color_space_to_xyz_matrix +color_compute_bradford_matrix +color_compute_color_spaces_conversion_matrix +color_invert_matrix +srgb_to_xyz_exact +xyz_to_srgb_exact +xyz_to_luv_exact +luv_to_xyz_exact +rgb_to_cmyk_exact +cmyk_to_rgb_exact +srgb_to_luv_tab1 +srgb_to_luv_tab2 +srgb_to_luv_tab3 +srgb_to_luv_init +srgb_to_luv_pixels +srgb_to_luv_grid +color_interpolation_table +color_conv_init +color_conv_pixels +# images/duplicates.h +image_dup_context_init +image_dup_context_cleanup +image_dup_estimate_size +image_dup_new +image_dup_compare +# images/error.h +image_trace +# images/images.h +image_context_init +image_context_cleanup +image_context_msg +image_context_vmsg +image_context_msg_default +image_context_msg_silent +image_max_dim +image_max_bytes +image_channels_format_to_name +image_name_to_channels_format +image_new +image_clone +image_destroy +image_clear +image_init_matrix +image_init_subimage +image_scale +image_dimensions_fit_to_box +image_io_init +image_io_cleanup +image_io_reset +image_io_read_header +image_io_read_data +image_io_read +image_io_write +image_format_to_extension +image_extension_to_format +image_file_name_to_format +# images/io-main.h +libjpeg_read_header +libjpeg_read_data +libjpeg_write +libpng_read_header +libpng_read_data +libpng_write +libungif_read_header +libungif_read_data +libmagick_init +libmagick_cleanup +libmagick_read_header +libmagick_read_data +libmagick_write +image_io_read_data_prepare +image_io_read_data_finish +image_io_read_data_break +# images/math.h +fast_div_tab +fast_sqrt_tab +# images/object.h +get_image_obj_info +get_image_obj_thumb +read_image_obj_thumb +put_image_obj_signature +get_image_obj_signature +# images/sig-cmp-gen.h +image_signatures_dist +image_signatures_dist_explain +# images/signature.h +image_sig_min_width +image_sig_min_height +image_sig_prequant_thresholds +image_sig_postquant_min_steps +image_sig_postquant_max_steps +image_sig_postquant_threshold +image_sig_border_size +image_sig_border_bonus +image_sig_inertia_scale +image_sig_textured_threshold +image_sig_compare_method +image_sig_cmp_features_weights +image_vector_dump +image_region_dump +compute_image_signature +image_sig_init +image_sig_preprocess +image_sig_finish +image_sig_cleanup +image_sig_segmentation +image_sig_detect_textured +image_signatures_dist +image_signatures_dist_explain diff --git a/tools/map-symbols b/tools/map-symbols index 5e193b8f..bb82a946 100755 --- a/tools/map-symbols +++ b/tools/map-symbols @@ -63,9 +63,11 @@ my %blacklist = map { $_ => 1 } qw( charset/U-lower.h charset/U-unacc.h charset/U-upper.h + images/image-walk.h + images/scale-gen.h ); -for my $f (, , ) { +for my $f (, , , ) { next if $blacklist{$f}; parse($f); } -- 2.39.5