summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiyong <jiyong.min@samsung.com>2024-04-02 11:04:33 +0900
committerJiyong <jiyong.min@samsung.com>2024-04-03 10:44:09 +0900
commitccfd9a8bc53197076da6c88af4344891489a3797 (patch)
treeb2a443a74215c52591b49e2c6641fff9a1cfde7c
parent88d1e7a4515ecf02418724821efbc28c8c2ff494 (diff)
downloadlibmm-imgp-gstcs-tizen_7.0.tar.gz
libmm-imgp-gstcs-tizen_7.0.tar.bz2
libmm-imgp-gstcs-tizen_7.0.zip
- When it is source and 90/270 rotation Change-Id: I47a4621d97edc837f6ba29843753e03b1c45e994
-rw-r--r--gstcs/mm_util_gstcs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gstcs/mm_util_gstcs.c b/gstcs/mm_util_gstcs.c
index 03a9136..bb2c990 100644
--- a/gstcs/mm_util_gstcs.c
+++ b/gstcs/mm_util_gstcs.c
@@ -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,
- mm_util_img_rotate_type_e rotate, bool is_src, unsigned int *stride, unsigned int *elevation)
+ bool elevation_round_up_4, unsigned int *stride, unsigned int *elevation)
{
switch (color_format) {
case MM_UTIL_COLOR_YUV420:
@@ -308,8 +308,8 @@ 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);
- if (is_src && (rotate == MM_UTIL_ROTATE_90 || rotate == MM_UTIL_ROTATE_270))
+ *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);
@@ -467,10 +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, 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);
+ _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);