Remove useless code. only RGB format can be round up in current gstreamer code 58/170358/1
authorhj kim <backto.kim@samsung.com>
Mon, 19 Feb 2018 09:56:30 +0000 (18:56 +0900)
committerhj kim <backto.kim@samsung.com>
Mon, 19 Feb 2018 09:56:30 +0000 (18:56 +0900)
Change-Id: Ibfe95c1e38edc14bd601f1d02bc60c4ff3842213

imgp/mm_util_imgp.c

index fd269b9..7c97ebe 100755 (executable)
@@ -205,22 +205,6 @@ static gboolean __mm_select_rotate_plugin(mm_util_color_format_e _format)
        return FALSE;
 }
 
-static gboolean __mm_is_rgb_format(mm_util_color_format_e format)
-{
-       mm_util_debug("format: %d", format);
-
-       if ((format == MM_UTIL_COLOR_RGB16) ||
-               (format == MM_UTIL_COLOR_RGB24) ||
-               (format == MM_UTIL_COLOR_ARGB) ||
-               (format == MM_UTIL_COLOR_BGRA) ||
-               (format == MM_UTIL_COLOR_RGBA) ||
-               (format == MM_UTIL_COLOR_BGRX)) {
-               return TRUE;
-       }
-
-       return FALSE;
-}
-
 static int __mm_util_get_crop_image_size(mm_util_color_format_e format, unsigned int width, unsigned int height, unsigned int *imgsize)
 {
        int ret = MM_UTIL_ERROR_NONE;
@@ -1013,7 +997,7 @@ int mm_util_convert_colorspace(const unsigned char *src, unsigned int src_width,
                goto ERROR;
        }
 
-       if ((_imgp_info_s->dst_width != _imgp_info_s->output_stride || _imgp_info_s->dst_height != _imgp_info_s->output_elevation) && __mm_is_rgb_format(src_format)) {
+       if ((_imgp_info_s->dst_width != _imgp_info_s->output_stride || _imgp_info_s->dst_height != _imgp_info_s->output_elevation)) {
                ret = mm_util_crop_image(output_buffer, _imgp_info_s->output_stride, _imgp_info_s->output_elevation, dst_format, 0, 0, _imgp_info_s->dst_width, _imgp_info_s->dst_height, &res_buffer, &res_w, &res_h, &res_buffer_size);
                if (ret != MM_UTIL_ERROR_NONE) {
                        mm_util_error("mm_util_crop_image failed");
@@ -1096,7 +1080,7 @@ int mm_util_resize_image(const unsigned char *src, unsigned int src_width, unsig
                goto ERROR;
        }
 
-       if ((_imgp_info_s->dst_width != _imgp_info_s->output_stride || _imgp_info_s->dst_height != _imgp_info_s->output_elevation) && __mm_is_rgb_format(src_format)) {
+       if ((_imgp_info_s->dst_width != _imgp_info_s->output_stride || _imgp_info_s->dst_height != _imgp_info_s->output_elevation)) {
                ret = mm_util_crop_image(output_buffer, _imgp_info_s->output_stride, _imgp_info_s->output_elevation, src_format, 0, 0, _imgp_info_s->dst_width, _imgp_info_s->dst_height, &res_buffer, &res_w, &res_h, &res_buffer_size);
                if (ret != MM_UTIL_ERROR_NONE) {
                        mm_util_error("mm_util_crop_image failed");
@@ -1193,7 +1177,7 @@ int mm_util_rotate_image(const unsigned char *src, unsigned int src_width, unsig
                goto ERROR;
        }
 
-       if ((_imgp_info_s->dst_width != _imgp_info_s->output_stride || _imgp_info_s->dst_height != _imgp_info_s->output_elevation) && __mm_is_rgb_format(src_format)) {
+       if ((_imgp_info_s->dst_width != _imgp_info_s->output_stride || _imgp_info_s->dst_height != _imgp_info_s->output_elevation)) {
                unsigned int start_x = 0;
                unsigned int start_y = 0;
                if (angle == MM_UTIL_ROTATE_90) {