}
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:
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:
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);