gralloc: 8960: handle YCbCr 420SP format in lock_ycbcr
Bug: 17906609 Change-Id: I28476291908f564477bb1d7a34196aed3e811f0d
This commit is contained in:
parent
adc3f5944f
commit
41b4b6aab2
|
@ -265,6 +265,17 @@ int gralloc_lock_ycbcr(gralloc_module_t const* module,
|
|||
ycbcr->chroma_step = 2;
|
||||
memset(ycbcr->reserved, 0, sizeof(ycbcr->reserved));
|
||||
break;
|
||||
// YCbCr_420_SP
|
||||
case HAL_PIXEL_FORMAT_NV12:
|
||||
ystride = ALIGN(hnd->width, 16);
|
||||
ycbcr->y = (void*)hnd->base;
|
||||
ycbcr->cb = (void*)(hnd->base + ystride * hnd->height);
|
||||
ycbcr->cr = (void*)(hnd->base + ystride * hnd->height + 1);
|
||||
ycbcr->ystride = ystride;
|
||||
ycbcr->cstride = ystride;
|
||||
ycbcr->chroma_step = 2;
|
||||
memset(ycbcr->reserved, 0, sizeof(ycbcr->reserved));
|
||||
break;
|
||||
default:
|
||||
ALOGD("%s: Invalid format passed: 0x%x", __FUNCTION__,
|
||||
hnd->format);
|
||||
|
|
Loading…
Reference in New Issue