Add missing modification for imagesize replacement 75/170575/1
authorJiyong Min <jiyong.min@samsung.com>
Wed, 21 Feb 2018 01:07:28 +0000 (10:07 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Wed, 21 Feb 2018 01:09:59 +0000 (10:09 +0900)
Change-Id: I4179839c22ba116d3b18fdfa607fd34e0251ed5a
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
imgp/test/mm_util_imgp_testsuite.c
jpeg/mm_util_jpeg.c

index fed08feffe1bb7b351885272ea551c27df4a00d5..6b3577a5ad7dcb5a83881caa0e09dc7ca7f60947 100755 (executable)
@@ -132,8 +132,6 @@ int main(int argc, char *argv[])
        /* async mode */
        mm_util_color_image_h orig_image = NULL;
 
-       unsigned int size = 0;
-
        fprintf(stderr, "command: %s src_width: %d, src_height: %d, src_format: %d, dst_width: %d, dst_height: %d, dst_format:%d, rotation:%d\n", command, src_width, src_height, src_format, dst_width, dst_height, dst_format, rotation);
 
        if (strcmp(command, "convert") == 0) {
@@ -144,10 +142,8 @@ int main(int argc, char *argv[])
        }
 
        /* mem allocation for src dst buffer */
-       mm_util_get_image_size(src_format, src_width, src_height, &size);
-       src_size = (size_t)size;
-       mm_util_get_image_size(dst_format, dst_width, dst_height, &size);
-       dst_size = (size_t)size;
+       mm_util_get_image_size(src_format, src_width, src_height, &src_size);
+       mm_util_get_image_size(dst_format, dst_width, dst_height, &dst_size);
        src = calloc(1, src_size);
        dst = calloc(1, dst_size);
 
index a31a41b861c2148e1038bf5ad648ca6048330535..6fda82a27ceb5948b24d5edb4a29ed4d6f2dff77 100755 (executable)
@@ -1524,7 +1524,7 @@ int mm_util_decode_from_jpeg_file_with_downscale(mm_util_jpeg_yuv_data *decoded,
 #else
                mm_util_debug("#START# libjpeg");
                if (fmt == MM_UTIL_COLOR_NV12) {
-                       unsigned int dst_size = 0;
+                       size_t dst_size = 0;
                        ret = __mm_image_decode_from_jpeg_file_with_libjpeg(decoded, filename, MM_UTIL_COLOR_YUV420, downscale);
                        if (ret == MM_UTIL_ERROR_NONE) {
                                int err = MM_UTIL_ERROR_NONE;