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();
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;
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;
case MM_UTIL_COLOR_RGBA:
case MM_UTIL_COLOR_BGRX:
stride = _width * 4;
- size = stride * height;
+ size = stride * _height;
*imgsize = size;
break;
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;