L_YUV

Summary

This data type specifies the YUV data format. It is used indirectly by the L_BitmapFromYUV method.

Syntax

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

Members

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.

Usage

Data Types

Functions

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.