Bug fix. the specific src_width can't rotate as 90 or 270 44/316644/2 accepted/tizen_8.0_unified tizen_8.0 accepted/tizen/8.0/unified/20240828.164205
authorJiyong <jiyong.min@samsung.com>
Mon, 26 Aug 2024 06:23:17 +0000 (15:23 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Tue, 27 Aug 2024 08:17:57 +0000 (08:17 +0000)
Change-Id: Ifdf21ef8a92754fbbc1d4d0c389af0a6bf4b7bb6

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

index bb2c990a05565480afd8027215b5628fc50c0751..d63c50eea9162d72023a48eaf439f0c529e47bf8 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 22c63c1184d66ab126ffdfdf890b8935934d618f..df0dc79c46fe4023a7bd43d675519dcaff5c5dbb 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