typedef struct _YUV_PARAMS 
   L_UINT uStructSize; 
   L_INT nMask; 
   L_INT nUh; 
   L_INT nUv; 
   L_INT nVh; 
   L_INT nVv; 
   L_INT *pOffsets; 
   L_INT nMacroPixel; 
   L_INT nRange; 
   L_BOOL bPlanar; 

The YUV_PARAMS structure provides information about YUV conversion properties. It is used to describe some YUV format to be converted to another color conversion. For more information see Generic YUV Conversion.



Size of this structure


Masking value. This can be any combination of the following values:

Value Meaning
YUV_UH Change the nUh value
YUV_UV Change the nUv value
YUV_VH Change the nVh value
YUV_VV Change the nvV value
YUV_OFFSETS Change the pOffsets value
YUV_MACROPIXEL Change the nMacroPixel value
YUV_RANGE Change the nRange value


Integer that represents the horizontal subsampling period of U


Integer that represents the vertical subsampling period of U.


Integer that represents the horizontal subsampling period of V.


Integer that represents the vertical subsampling period of V.


Pointer to integer array that represents offsets of the byte ordering for the proposed YUV format. When bPlanar is TRUE, the only useful data is pOffsets[0] which will indicate what is the arrangement of the YUV buffer. Possible values are:

Value Meaning
PLANAR_YUV Planes order, Y, U, V
PLANAR_YVU Planes order, Y, V, U
PLANAR_UYV Planes order, U, Y, V
PLANAR_UVY Planes order, U, V, Y
PLANAR_VYU Planes order, V, Y, U
PLANAR_VUY Planes order, V, U, Y


Macropixel size, which is the number of pixels in the unit pixels group.


Integer represents the range of values in the input buffer; full range, or 16-240 (YUVRANGE_FULL, and YUVRANGE_16_240).


Value that indicates whether the buffer consists of the Y plane, V plane and U plane. Possible values are:

Value Meaning
TRUE The buffer consists of the Y, U, and V planes.
FALSE The buffer does not consist of the Y, U, and V planes.


LPYUV_PARAMS is a pointer to a YUV_PARAMS structure. Where the function parameter type is LPYUV_PARAMS, you can declare a YUV_PARAMS variable, update the structure's fields, and pass the variable's address. Declaring a LPYUV_PARAMS variable is necessary only if your program requires a pointer.

YUV_PARAMS is used with the CONVERSION_PARAMS structure.

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

LEADTOOLS Color Conversion C API Help