L_YUV

typedef enum 
{ 
   L_YUV_YV12, 
   L_YUV_NV12, 
   L_YUV_NV21, 
   L_YUV_YUY2, 
   L_YUV_420_888 
} L_YUV; 

This data type is used with L_SetBitmapYUVData and L_GetBitmapYUVData to specify the YUV data format.

Value Meaning
L_YUV_YV12

Planar Y, U, V data using 4:1:1 (aka 4:2:0) subsampling. The U and V planes are half the width and height of the Y plane. The Y plane is followed immediately by the U (Cb) plane, which is followed immediately by the V (Cr) plane. The YUV data is 12 bits/pixel (each 2x2 pixels are described by 6 bytes).

The image width and height must be multiple of 2.

The size of the YUV data is width * height * 3 / 2.

L_YUV_NV12

A Y plane followed by interleaved plane of UV data. There are half as many U and V samples as Y samples in both width and height. In other words, for each 2x2 square of Y pixels, there is only one corresponding U, V pair. The YUV data is 12 bits/pixel (each 2x2 pixels are described by 6 bytes).

The image width and height must be multiple of 2.

The size of the YUV data is width * height * 3 / 2.

L_YUV_NV21

A Y plane followed by interleaved plane of VU data. Similar to NV12 data, except that the order of UV samples is reversed. The YUV data is 12 bits/pixel (each 2x2 pixels are described by 6 bytes).

The image width and height must be multiple of 2.

The size of the YUV data is width * height * 3 / 2.

L_YUV_YUY2

Interleaved 4:2:2 YUYV data. Each two horizontal pixels have the same U and V values. The YUV data is 16 bits/pixel (each 2 pixels are described by 4 bytes).

The image width must be a multiple of 2.

The size of the YUV data is width * height * 2.

L_YUV_420_888

Multi-plane YUV 4:2:0 data. Images in this format are represented by three distinct data buffers for Y, U, and V. U and V planes may be interleaved in memory. If so, those planes will have a pixel stride greater than 1. Used on the Android platform API level 21+ (android.hardware.camera2)

The image width must be a multiple of 2.

The size of the Y plane is width * height * yPixelStride. The size of the U and V planes are (width * height * uvPixelStride) / 4

Comments

This structure is used by the following functions:

L_SetBitmapYUVData

L_GetBitmapYUVData

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C API Help