From: Haejeong Kim Date: Fri, 16 Jun 2017 01:59:49 +0000 (+0900) Subject: [RQ170614-00158] fix invalid format argument types for dlog X-Git-Tag: submit/tizen/20170616.053948^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4b99e177e16a915d7822b7edc1de12eeb130d32b;p=platform%2Fcore%2Fmultimedia%2Flibmm-utility.git [RQ170614-00158] fix invalid format argument types for dlog Change-Id: I326496eddf8a95b9aecdc959df02a1f213990107 --- diff --git a/imgp/mm_util_imgp.c b/imgp/mm_util_imgp.c index e41308b..bf5bf90 100755 --- a/imgp/mm_util_imgp.c +++ b/imgp/mm_util_imgp.c @@ -344,7 +344,7 @@ static int __mm_confirm_dst_width_height(unsigned int src_width, unsigned int sr int ret = MM_UTIL_ERROR_NONE; if (!dst_width || !dst_height) { - mm_util_error("[%s][%05d] dst_width || dst_height Buffer is NULL"); + mm_util_error("dst_width || dst_height is NULL"); return MM_UTIL_ERROR_INVALID_PARAMETER; } @@ -391,8 +391,9 @@ static int __mm_set_format_label(imgp_info_s *_imgp_info_s, mm_util_img_format s int ret = MM_UTIL_ERROR_NONE; char *src_fmt_lable = NULL; char *dst_fmt_lable = NULL; + if (_imgp_info_s == NULL) { - mm_util_error("_imgp_info_s: 0x%2x", _imgp_info_s); + mm_util_error("Invalid _imgp_info_s"); return MM_UTIL_ERROR_INVALID_PARAMETER; } @@ -610,8 +611,6 @@ unsigned int crop_start_x, unsigned int crop_start_y, unsigned int crop_dest_wid int src_bytesperline = src_width * 4; int dst_bytesperline = crop_dest_width * 4; - mm_util_debug("[Input] src: 0x%2x src, src_width: %d src_height: %d src_format: %d crop_start_x: %d crop_start_y: %d crop_dest_width: %d crop_dest_height: %d\n", - src, src_width, src_height, src_format, crop_start_x, crop_start_y, crop_dest_width, crop_dest_height); src += crop_start_y * src_bytesperline + 4 * crop_start_x; for (idx = 0; idx < crop_dest_height; idx++) { @@ -631,8 +630,6 @@ unsigned int crop_start_x, unsigned int crop_start_y, unsigned int crop_dest_wid int src_bytesperline = src_width * 3; int dst_bytesperline = crop_dest_width * 3; - mm_util_debug("[Input] src: 0x%2x src, src_width: %d src_height: %d src_format: %d crop_start_x: %d crop_start_y: %d crop_dest_width: %d crop_dest_height: %d\n", - src, src_width, src_height, src_format, crop_start_x, crop_start_y, crop_dest_width, crop_dest_height); src += crop_start_y * src_bytesperline + 3 * crop_start_x; for (idx = 0; idx < crop_dest_height; idx++) { @@ -652,8 +649,6 @@ unsigned int crop_start_x, unsigned int crop_start_y, unsigned int crop_dest_wid int src_bytesperline = src_width * 2; int dst_bytesperline = crop_dest_width * 2; - mm_util_debug("[Input] src: 0x%2x src, src_width: %d src_height: %d src_format: %d crop_start_x: %d crop_start_y: %d crop_dest_width: %d crop_dest_height: %d\n", - src, src_width, src_height, src_format, crop_start_x, crop_start_y, crop_dest_width, crop_dest_height); src += crop_start_y * src_bytesperline + 2 * crop_start_x; for (idx = 0; idx < crop_dest_height; idx++) { @@ -672,8 +667,7 @@ unsigned int crop_start_x, unsigned int crop_start_y, unsigned int crop_dest_wid unsigned int idx = 0; int start_x = crop_start_x; int start_y = crop_start_y; - mm_util_debug("[Input] src: 0x%2x src, src_width: %d src_height: %d src_format: %d crop_start_x: %d crop_start_y: %d crop_dest_width: %d crop_dest_height: %d\n", - src, src_width, src_height, src_format, crop_start_x, crop_start_y, crop_dest_width, crop_dest_height); + const unsigned char *_src = src + start_y * src_width + start_x; /* Y */ @@ -1137,7 +1131,9 @@ static int __mm_util_transform_exec(mm_util_s *handle, media_packet_h src_packet if (__mm_util_check_resolution(src_width, src_height)) { /* src */ handle->src_packet = src_packet; - mm_util_debug("src_packet: %p handle->src_packet: %p 0x%2x [W X H] %d X %d", src_packet, handle->src_packet, src_fmt, src_width, src_height); + + mm_util_debug("[W X H] %d X %d", src_width, src_height); + if (handle->src_packet) { handle->src_format = __mm_util_mapping_mime_format_to_imgp(src_mimetype); handle->src_width = src_width; @@ -1597,7 +1593,7 @@ EXPORT_API int mm_util_convert_colorspace(const unsigned char *src, unsigned int return MM_UTIL_ERROR_NOT_SUPPORTED_FORMAT; } - mm_util_debug("[src] 0x%2x (%d x %d) [dst] 0x%2x", src, src_width, src_height, dst); + mm_util_debug("(%d x %d)", src_width, src_height); imgp_info_s *_imgp_info_s = (imgp_info_s *) g_malloc0(sizeof(imgp_info_s)); if (_imgp_info_s == NULL) { @@ -1743,7 +1739,7 @@ EXPORT_API int mm_util_resize_image(const unsigned char *src, unsigned int src_w return MM_UTIL_ERROR_INVALID_PARAMETER; } - mm_util_debug("[src] 0x%2x (%d x %d) [dst] 0x%2x", src, src_width, src_height, dst); + mm_util_debug("(%d x %d)", src_width, src_height); imgp_info_s *_imgp_info_s = (imgp_info_s *) g_malloc0(sizeof(imgp_info_s)); if (_imgp_info_s == NULL) { @@ -1786,7 +1782,7 @@ EXPORT_API int mm_util_resize_image(const unsigned char *src, unsigned int src_w if (g_strrstr(g_module_name(_module), GST)) { if (__mm_gst_can_resize_format(_imgp_info_s->input_format_label) == FALSE) { - mm_util_error("[%s][%05d] #RESIZE ERROR# IMAGE_NOT_SUPPORT_FORMAT"); + mm_util_error("#RESIZE ERROR# IMAGE_NOT_SUPPORT_FORMAT"); __mm_util_imgp_finalize(_module, _imgp_info_s); TTRACE_END(); return MM_UTIL_ERROR_NOT_SUPPORTED_FORMAT; @@ -1904,7 +1900,7 @@ EXPORT_API int mm_util_rotate_image(const unsigned char *src, unsigned int src_w return MM_UTIL_ERROR_INVALID_PARAMETER; } - mm_util_debug("[src] 0x%2x (%d x %d) [dst] 0x%2x", src, src_width, src_height, dst); + mm_util_debug("(%d x %d)", src_width, src_height); imgp_info_s *_imgp_info_s = (imgp_info_s *) g_malloc0(sizeof(imgp_info_s)); if (_imgp_info_s == NULL) { @@ -1953,7 +1949,7 @@ EXPORT_API int mm_util_rotate_image(const unsigned char *src, unsigned int src_w if (g_strrstr(g_module_name(_module), GST)) { if (__mm_gst_can_rotate_format(_imgp_info_s->input_format_label) == FALSE) { - mm_util_error("[%s][%05d] #gstreamer ROTATE ERROR# IMAGE_NOT_SUPPORT_FORMAT"); + mm_util_error("#gstreamer ROTATE ERROR# IMAGE_NOT_SUPPORT_FORMAT"); __mm_util_imgp_finalize(_module, _imgp_info_s); TTRACE_END(); return MM_UTIL_ERROR_NOT_SUPPORTED_FORMAT; @@ -2067,6 +2063,9 @@ unsigned int crop_start_x, unsigned int crop_start_y, unsigned int *crop_dest_wi return MM_UTIL_ERROR_INVALID_PARAMETER; } + mm_util_debug("[Input] src: [%p] src_width: [%ui] src_height: [%ui] src_format: [%d] crop_start_x: [%ui] crop_start_y: [%ui] crop_dest_width: [%ui] crop_dest_height: [%ui]\n", + src, src_width, src_height, src_format, crop_start_x, crop_start_y, *crop_dest_width, *crop_dest_height); + switch (src_format) { case MM_UTIL_IMG_FMT_RGB888: { ret = __mm_util_crop_rgb888(src, src_width, src_height, src_format, crop_start_x, crop_start_y, *crop_dest_width, *crop_dest_height, dst); diff --git a/packaging/libmm-utility.spec b/packaging/libmm-utility.spec index f75ed80..3555305 100755 --- a/packaging/libmm-utility.spec +++ b/packaging/libmm-utility.spec @@ -1,6 +1,6 @@ Name: libmm-utility Summary: Multimedia Framework Utility Library -Version: 0.30 +Version: 0.31 Release: 0 Group: System/Libraries License: Apache-2.0