Merge "msm: vidc: Amend calculation of buffer sizes in VENUS_BUFFER_SIZE"
diff --git a/include/media/msm_media_info.h b/include/media/msm_media_info.h
index ddf9c8e..663809e 100644
--- a/include/media/msm_media_info.h
+++ b/include/media/msm_media_info.h
@@ -158,8 +158,8 @@
static inline unsigned int VENUS_BUFFER_SIZE(
int color_fmt, int width, int height)
{
- unsigned int uv_alignment;
- unsigned int size = 0;
+ const unsigned int extra_size = 8*1024;
+ unsigned int uv_alignment = 0, size = 0;
unsigned int y_plane, uv_plane, y_stride,
uv_stride, y_sclines, uv_sclines;
if (!width || !height)
@@ -175,7 +175,7 @@
uv_alignment = 4096;
y_plane = y_stride * y_sclines;
uv_plane = uv_stride * uv_sclines + uv_alignment;
- size = y_plane + uv_plane;
+ size = y_plane + uv_plane + extra_size;
size = MSM_MEDIA_ALIGN(size, 4096);
break;
default: