diff options
author | Jiyong <jiyong.min@samsung.com> | 2024-03-29 16:43:06 +0900 |
---|---|---|
committer | Jiyong <jiyong.min@samsung.com> | 2024-03-29 16:43:29 +0900 |
commit | 88d1e7a4515ecf02418724821efbc28c8c2ff494 (patch) | |
tree | 5acc4d13f94276cdea2336e4c70de9b78d468e14 | |
parent | 0aec91e2916f3c3fb2fc120257c02f6c67cde0dd (diff) | |
download | libmm-imgp-gstcs-88d1e7a4515ecf02418724821efbc28c8c2ff494.tar.gz libmm-imgp-gstcs-88d1e7a4515ecf02418724821efbc28c8c2ff494.tar.bz2 libmm-imgp-gstcs-88d1e7a4515ecf02418724821efbc28c8c2ff494.zip |
Bug fix. the specific height can't rotate as 90 or 270accepted/tizen/7.0/unified/20240330.125512
Change-Id: I74ea7621efd10d1aaeaacf0cf3f9aa028151ac02
-rw-r--r-- | gstcs/mm_util_gstcs.c | 16 | ||||
-rw-r--r-- | packaging/libmm-imgp-gstcs.spec | 2 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gstcs/mm_util_gstcs.c b/gstcs/mm_util_gstcs.c index 0cc7b44..03a9136 100644 --- a/gstcs/mm_util_gstcs.c +++ b/gstcs/mm_util_gstcs.c @@ -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, + mm_util_img_rotate_type_e rotate, bool is_src, unsigned int *stride, unsigned int *elevation) { switch (color_format) { case MM_UTIL_COLOR_YUV420: @@ -307,8 +308,11 @@ static void _mm_get_round_up_width_height(mm_util_color_format_e color_format, u break; case MM_UTIL_COLOR_RGB16: case MM_UTIL_COLOR_RGB24: - *stride = MM_UTIL_ROUND_UP_4(width); - *elevation = MM_UTIL_ROUND_UP_2(height); + *stride = MM_UTIL_ROUND_UP_4(width); + if (is_src && (rotate == MM_UTIL_ROTATE_90 || rotate == MM_UTIL_ROTATE_270)) + *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, true, + &src_stride, &src_elevation); + _mm_get_round_up_width_height(pImgp_info->dst_format, pImgp_info->dst_width, pImgp_info->dst_height, pImgp_info->angle, 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); diff --git a/packaging/libmm-imgp-gstcs.spec b/packaging/libmm-imgp-gstcs.spec index 6b8f126..22c63c1 100644 --- a/packaging/libmm-imgp-gstcs.spec +++ b/packaging/libmm-imgp-gstcs.spec @@ -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 |