gralloc: 8084/8226: align cstride for YV12 buffers in gralloc_lock_ycbcr
Bug: 17906609 Change-Id: I2c29a14e2de5a678427a92559d94660d9c815553
This commit is contained in:
parent
3a738bea21
commit
d535e59815
|
@ -596,7 +596,7 @@ int getYUVPlaneInfo(private_handle_t* hnd, struct android_ycbcr* ycbcr)
|
|||
//Planar
|
||||
case HAL_PIXEL_FORMAT_YV12:
|
||||
ystride = hnd->width;
|
||||
cstride = hnd->width/2;
|
||||
cstride = ALIGN(hnd->width/2, 16);
|
||||
ycbcr->y = (void*)hnd->base;
|
||||
ycbcr->cr = (void*)(hnd->base + ystride * hnd->height);
|
||||
ycbcr->cb = (void*)(hnd->base + ystride * hnd->height +
|
||||
|
|
|
@ -592,7 +592,7 @@ int getYUVPlaneInfo(private_handle_t* hnd, struct android_ycbcr* ycbcr)
|
|||
//Planar
|
||||
case HAL_PIXEL_FORMAT_YV12:
|
||||
ystride = hnd->width;
|
||||
cstride = hnd->width/2;
|
||||
cstride = ALIGN(hnd->width/2, 16);
|
||||
ycbcr->y = (void*)hnd->base;
|
||||
ycbcr->cr = (void*)(hnd->base + ystride * hnd->height);
|
||||
ycbcr->cb = (void*)(hnd->base + ystride * hnd->height +
|
||||
|
|
Loading…
Reference in New Issue