Allocate enough memory for HAL_PIXL_FORMAT_YV12
authorRebecca Schultz Zavin <rebecca@android.com>
Thu, 1 Nov 2012 00:05:48 +0000 (17:05 -0700)
committerRebecca Schultz Zavin <rebecca@android.com>
Thu, 1 Nov 2012 04:37:01 +0000 (21:37 -0700)
commitd881a0ce901d839282ba2d4d724b9ae25c9d4e89
tree84363855e22bd883dea8b56ac8418fb73017d96b
parent34d2b94a1d314524aa47d1c9071d9b5027332d65
Allocate enough memory for HAL_PIXL_FORMAT_YV12

Previously we were not allocating enough memory to align
the uv planes to 16 pixels.
We were allocating:
h * align(w,16) * 3 / 2 bytes
This should be:
h * align(w,16) + h * align(align(w,16)/2, 16)

Bug: 7431048
Change-Id: Iaba969795e8d20c29ee0b703af5dd884a4c88d2e
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
gralloc/gralloc.cpp