YUV_PARAMS

Summary

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.

Syntax

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; 
   L_UINT uOffsetCount; 
} YUV_PARAMS, *LPYUV_PARAMS; 

Members

uStructSize

Size of this structure

nMask

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

nUh

Integer that represents the horizontal subsampling period of U

nUv

Integer that represents the vertical subsampling period of U.

nVh

Integer that represents the horizontal subsampling period of V.

nVv

Integer that represents the vertical subsampling period of V.

pOffsets

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

If bPlanar is FALSE, uOffsetCount indicates the number of items in the pOffsets array.

nMacroPixel

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

nRange

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

bPlanar

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.

uOffsetCount

Value that indicates the number of values in the pOffsets array.

Comments

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.

Usage

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

LEADTOOLS Color Conversion C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.