yv12 constant
int
const yv12
Android YUV format.
This format is exposed to software decoders and applications.
YV12 is a 4:2:0 YCrCb planar format comprised of a WxH Y plane followed by (W/2) x (H/2) Cr and Cb planes.
This format assumes:
- an even width
- an even height
- a horizontal stride multiple of 16 pixels
- a vertical stride equal to the height
y_size = stride * height
c_stride = ALIGN(stride/2, 16)
c_size = c_stride * height/2
size = y_size + c_size * 2
cr_offset = y_size
cb_offset = y_size + c_size
``
This format is guaranteed to be supported for Camera preview images; for
earlier API versions.
Note that for camera preview callback use (see
[Camera.setPreviewCallback]), the stride value is the smallest possible;
that is, it is equal to:
`stride = ALIGN(width, 16)`
See:
https://developer.android.com/reference/android/graphics/ImageFormat#YV12
Implementation
static const int yv12 = 0x32315659;