remove unused YUV formats
Change-Id: Ia590a9cb9a02bf62f35da344f29775d1256e3da7
This commit is contained in:
parent
d3c18d4938
commit
6c2bc88a03
@ -124,10 +124,8 @@ static int get_format(int format) {
|
||||
case COPYBIT_FORMAT_RGB_888: return MDP_RGB_888;
|
||||
case COPYBIT_FORMAT_RGBA_8888: return MDP_RGBA_8888;
|
||||
case COPYBIT_FORMAT_BGRA_8888: return MDP_BGRA_8888;
|
||||
case COPYBIT_FORMAT_YCrCb_422_SP: return MDP_Y_CBCR_H2V1;
|
||||
case COPYBIT_FORMAT_YCrCb_420_SP: return MDP_Y_CBCR_H2V2;
|
||||
case COPYBIT_FORMAT_YCbCr_422_SP: return MDP_Y_CRCB_H2V1;
|
||||
case COPYBIT_FORMAT_YCbCr_420_SP: return MDP_Y_CRCB_H2V2;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
@ -373,18 +373,27 @@ static int gralloc_alloc(alloc_device_t* dev,
|
||||
size = ALIGN(alignedw*alignedh, 4096);
|
||||
size += ALIGN(2 * ALIGN(w/2, 32) * ALIGN(h/2, 32), 4096);
|
||||
break;
|
||||
case HAL_PIXEL_FORMAT_YCbCr_422_I: // YUYV
|
||||
case HAL_PIXEL_FORMAT_CbYCrY_422_I: // UYVY
|
||||
size = ALIGN(alignedw*alignedh*2, 4096);
|
||||
break;
|
||||
case HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED: // NV12
|
||||
// The chroma plane is subsampled,
|
||||
// but the pitch in bytes is unchanged
|
||||
// The GPU needs 4K alignment, but the video decoder needs 8K
|
||||
alignedw = ALIGN(w, 128);
|
||||
size = ALIGN( ALIGN(w, 128) * alignedh, 8192);
|
||||
size += ALIGN( ALIGN(w, 128) * ALIGN(h/2, 32), 4096);
|
||||
break;
|
||||
|
||||
case HAL_PIXEL_FORMAT_YV12:
|
||||
alignedw = ALIGN(w, 16);
|
||||
alignedh = ALIGN(h, 16);
|
||||
size = alignedw * alignedh;
|
||||
size += size / 2;
|
||||
break;
|
||||
|
||||
case HAL_PIXEL_FORMAT_YV16:
|
||||
alignedh = ALIGN(h, 16);
|
||||
size = alignedw * alignedh * 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user