Bug fix. the specific src_width can't rotate as 90 or 270 40/316640/2 accepted/tizen_9.0_unified accepted/tizen_unified accepted/tizen_unified_dev accepted/tizen_unified_toolchain accepted/tizen_unified_x accepted/tizen_unified_x_asan tizen tizen_9.0 accepted/tizen/9.0/unified/20241030.232655 accepted/tizen/unified/20240828.082345 accepted/tizen/unified/dev/20240829.043825 accepted/tizen/unified/toolchain/20241004.101921 accepted/tizen/unified/x/20240829.020357 accepted/tizen/unified/x/asan/20241014.000302 tizen_9.0_m2_release
authorJiyong <jiyong.min@samsung.com>
Mon, 26 Aug 2024 06:23:17 +0000 (15:23 +0900)
committerJiyong <jiyong.min@samsung.com>
Tue, 27 Aug 2024 08:18:29 +0000 (17:18 +0900)
Change-Id: Ifdf21ef8a92754fbbc1d4d0c389af0a6bf4b7bb6

gstcs/mm_util_gstcs.c
packaging/libmm-imgp-gstcs.spec

index 1720223..9060632 100644 (file)
@@ -294,7 +294,7 @@ static GstCaps* _mm_get_capabilities(mm_util_color_format_e color_format, unsign
 }
 
 static void _mm_get_round_up_width_height(mm_util_color_format_e color_format, unsigned int width, unsigned int height,
-               bool elevation_round_up_4, unsigned int *stride, unsigned int *elevation)
+               unsigned int *stride, unsigned int *elevation)
 {
        switch (color_format) {
        case MM_UTIL_COLOR_YUV420:
@@ -309,10 +309,8 @@ static void _mm_get_round_up_width_height(mm_util_color_format_e color_format, u
        case MM_UTIL_COLOR_RGB16:
        case MM_UTIL_COLOR_RGB24:
                *stride = MM_UTIL_ROUND_UP_4(width);
-               if (elevation_round_up_4)
-                       *elevation = MM_UTIL_ROUND_UP_4(height);
-               else
-                       *elevation = MM_UTIL_ROUND_UP_2(height);
+               /* Rounding the src_width affects rounding the dst_height when rotating */
+               *elevation = MM_UTIL_ROUND_UP_4(height);
                break;
        case MM_UTIL_COLOR_ARGB:
        case MM_UTIL_COLOR_BGRA:
@@ -468,9 +466,9 @@ static int _mm_imgp_gstcs_processing(gstreamer_s* pGstreamer_s, unsigned char *s
        gst_object_unref(bus);
 
        _mm_get_round_up_width_height(pImgp_info->src_format, pImgp_info->src_width, pImgp_info->src_height,
-                       (pImgp_info->angle == MM_UTIL_ROTATE_90 || pImgp_info->angle == MM_UTIL_ROTATE_270), &src_stride, &src_elevation);
+                       &src_stride, &src_elevation);
        _mm_get_round_up_width_height(pImgp_info->dst_format, pImgp_info->dst_width, pImgp_info->dst_height,
-                       false, &pImgp_info->output_stride, &pImgp_info->output_elevation);
+                       &pImgp_info->output_stride, &pImgp_info->output_elevation);
 
        src_caps = _mm_get_capabilities(pImgp_info->src_format, src_stride, src_elevation);
        dst_caps = _mm_get_capabilities(pImgp_info->dst_format, pImgp_info->output_stride, pImgp_info->output_elevation);
index 22c63c1..df0dc79 100644 (file)
@@ -1,7 +1,7 @@
 Name:       libmm-imgp-gstcs
 Summary:    Multimedia Framework Utility Library
-Version:    0.27
-Release:    16
+Version:    0.28
+Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz