Bug fix. the specific height can't rotate as 90 or 270 47/308847/2 accepted/tizen/8.0/unified/20240404.155035
authorJiyong <jiyong.min@samsung.com>
Tue, 2 Apr 2024 02:10:58 +0000 (11:10 +0900)
committerJiyong <jiyong.min@samsung.com>
Wed, 3 Apr 2024 01:45:08 +0000 (10:45 +0900)
Change-Id: I5d0d678a6c2ba584005d4e57a65125a27418395c

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

index 0cc7b4440deb36a5883e85a0616ebfc7b969872d..bb2c990a05565480afd8027215b5628fc50c0751 100644 (file)
@@ -293,7 +293,8 @@ static GstCaps* _mm_get_capabilities(mm_util_color_format_e color_format, unsign
        return caps;
 }
 
-static void _mm_get_round_up_width_height(mm_util_color_format_e color_format, unsigned int width, unsigned int height, unsigned int *stride, unsigned int *elevation)
+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)
 {
        switch (color_format) {
        case MM_UTIL_COLOR_YUV420:
@@ -308,7 +309,10 @@ 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);
-               *elevation = MM_UTIL_ROUND_UP_2(height);
+               if (elevation_round_up_4)
+                       *elevation = MM_UTIL_ROUND_UP_4(height);
+               else
+                       *elevation = MM_UTIL_ROUND_UP_2(height);
                break;
        case MM_UTIL_COLOR_ARGB:
        case MM_UTIL_COLOR_BGRA:
@@ -463,8 +467,10 @@ static int _mm_imgp_gstcs_processing(gstreamer_s* pGstreamer_s, unsigned char *s
        gst_bus_add_watch(bus, (GstBusFunc) _mm_on_src_message, pGstreamer_s);
        gst_object_unref(bus);
 
-       _mm_get_round_up_width_height(pImgp_info->src_format, pImgp_info->src_width, pImgp_info->src_height, &src_stride, &src_elevation);
-       _mm_get_round_up_width_height(pImgp_info->dst_format, pImgp_info->dst_width, pImgp_info->dst_height, &pImgp_info->output_stride, &pImgp_info->output_elevation);
+       _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);
+       _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);
 
        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 6b8f12605aa2271982a1e48ee78ca03b9f417036..22c63c1184d66ab126ffdfdf890b8935934d618f 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-imgp-gstcs
 Summary:    Multimedia Framework Utility Library
-Version:    0.26
+Version:    0.27
 Release:    16
 Group:      System/Libraries
 License:    Apache-2.0