uint8_t *yv12_u0 = yv12_v0 + cSize;
// switchUV allows this function to take care of
- // cases where the U/V plans need to be switched,
+ // cases where the U/V planes need to be switched,
// such as with YUV_420_888.
if (switchUV) {
yv12_u0 = yv12_y0 + yStride * height;
uint8_t *yv12_u0 = yv12_v0 + cSize;
// switchUV allows this function to take care of
- // cases where the U/V plans need to be switched,
+ // cases where the U/V planes need to be switched,
// such as with YUV_420_888.
if (switchUV) {
yv12_u0 = yv12_y0 + yStride * height;
cSize = cStride * cb->height/2;
vOffset = yStride * cb->height;
uOffset = vOffset + cSize;
+ cStep = 1;
// 420_888 format will have the U/V switched.
if (cb->format == HAL_PIXEL_FORMAT_YCbCr_420_888) {
uOffset = yStride * cb->height;
vOffset = uOffset + cSize;
}
- cStep = 1;
break;
default:
ALOGE("gralloc_lock_ycbcr unexpected internal format %x",