[RQ170614-00158] fix invalid format argument types for dlog 01/134301/2 accepted/tizen/unified/20170630.083040 submit/tizen/20170616.053948
authorHaejeong Kim <backto.kim@samsung.com>
Fri, 16 Jun 2017 01:59:49 +0000 (10:59 +0900)
committerHaejeong Kim <backto.kim@samsung.com>
Fri, 16 Jun 2017 02:32:57 +0000 (11:32 +0900)
Change-Id: I326496eddf8a95b9aecdc959df02a1f213990107

imgp/mm_util_imgp.c
packaging/libmm-utility.spec

index e41308bcc9656de482bf92681fcb197be02e5941..bf5bf9013e6052d3a10d3fd58c977356c79ef13c 100755 (executable)
@@ -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);
index f75ed80799bb5847ccb007e54073f691a8325805..355530547d0e20f05f083743cafd06b9ea41da04 100755 (executable)
@@ -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