From: jiyong.min Date: Tue, 15 Nov 2022 01:54:10 +0000 (+0900) Subject: Bug fix: Modify missing typecast X-Git-Tag: accepted/tizen/7.0/unified/20221124.171206^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f471e7f10429a98c82867b5bdba008111a7ecfd;p=platform%2Fcore%2Fmultimedia%2Flibmm-utility.git Bug fix: Modify missing typecast Change-Id: I54e91cfab2131bf9e6ead3369cfb340a25879361 --- diff --git a/imgp/mm_util_imgp.c b/imgp/mm_util_imgp.c index 1dbcb1a..b8ab524 100644 --- a/imgp/mm_util_imgp.c +++ b/imgp/mm_util_imgp.c @@ -95,6 +95,7 @@ static int __mm_util_get_image_size(mm_util_color_format_e format, unsigned int size_t w2, h2, stride, stride2; size_t size, size2; size_t _width = (size_t)width; + size_t _height = (size_t)height; mm_util_fenter(); @@ -108,11 +109,11 @@ static int __mm_util_get_image_size(mm_util_color_format_e format, unsigned int x_chroma_shift = 1; y_chroma_shift = 1; stride = MM_UTIL_ROUND_UP_4(_width); - h2 = ROUND_UP_X(height, x_chroma_shift); + h2 = ROUND_UP_X(_height, x_chroma_shift); size = stride * h2; w2 = DIV_ROUND_UP_X(_width, x_chroma_shift); stride2 = MM_UTIL_ROUND_UP_4(w2); - h2 = DIV_ROUND_UP_X(height, y_chroma_shift); + h2 = DIV_ROUND_UP_X(_height, y_chroma_shift); size2 = stride2 * h2; *imgsize = size + 2 * size2; break; @@ -122,19 +123,19 @@ static int __mm_util_get_image_size(mm_util_color_format_e format, unsigned int case MM_UTIL_COLOR_NV16: case MM_UTIL_COLOR_NV61: stride = MM_UTIL_ROUND_UP_4(_width) * 2; - size = stride * height; + size = stride * _height; *imgsize = size; break; case MM_UTIL_COLOR_RGB16: stride = 2 * (is_crop ? _width : MM_UTIL_ROUND_UP_4(_width)); - size = stride * height; + size = stride * _height; *imgsize = size; break; case MM_UTIL_COLOR_RGB24: stride = 3 * (is_crop ? _width : MM_UTIL_ROUND_UP_4(_width)); - size = stride * height; + size = stride * _height; *imgsize = size; break; @@ -143,7 +144,7 @@ static int __mm_util_get_image_size(mm_util_color_format_e format, unsigned int case MM_UTIL_COLOR_RGBA: case MM_UTIL_COLOR_BGRX: stride = _width * 4; - size = stride * height; + size = stride * _height; *imgsize = size; break; @@ -153,11 +154,11 @@ static int __mm_util_get_image_size(mm_util_color_format_e format, unsigned int x_chroma_shift = 1; y_chroma_shift = 1; stride = MM_UTIL_ROUND_UP_4(_width); - h2 = ROUND_UP_X(height, y_chroma_shift); + h2 = ROUND_UP_X(_height, y_chroma_shift); size = stride * h2; w2 = 2 * DIV_ROUND_UP_X(_width, x_chroma_shift); stride2 = MM_UTIL_ROUND_UP_4(w2); - h2 = DIV_ROUND_UP_X(height, y_chroma_shift); + h2 = DIV_ROUND_UP_X(_height, y_chroma_shift); size2 = stride2 * h2; *imgsize = size + size2; break;