- Description:
- Performs a color conversion operation from YUYV or UYVY to RGBX.
- Method:
- Uses Q14 fixed point approximation of BT.709 and BT.601 coefficients
BT.709
R'= Y' + 0.0000*U + 1.5748*V
G'= Y' - 0.1873*U - 0.4681*V
B'= Y' + 1.8556*U + 0.0000*V
BT.601
R'= Y' + 0.000*U + 1.403*V
G'= Y' - 0.344*U - 0.714*V
B'= Y' + 1.773*U + 0.000*V
- Parameters
-
[in] | src[] | Pointer to array containing input YUVX image (UQ8.0) |
[in] | src_addr[] | Pointer to structure containing dimensional information of src |
[out] | dst[] | Pointer to array containing output RGBX image (UQ8.0) |
[in] | dst_addr[] | Pointer to structure containing dimensional information of dst |
[in] | x_value | Parameter indicating whether to convert from YUYV (x_value = 0) or UYVY (x_value = 1) |
[in] | src_space | Parameter indicating the color space of src |
- Assumptions:
- I/O buffer pointers are assumed to be not aliased.
- YUVX Input (1 plane): src_addr
- 'dim_x' refers to the number of luma pixel units per line
- 'dim_y' refers to the number of lines in the image
- 'stride_y' should be at least ('dim_x' * 2 * 1) bytes
- RGBX (1 plane): dst_addr
- 'dim_x' refers to the number of RGBX pixel units per line
- 'dim_y' refers to the number of lines in the image
- 'stride_y' should be at least ('dim_x' * 4 * 1) bytes
- 'src_space' valid values:
- VXLIB_COLOR_SPACE_NONE
- VXLIB_COLOR_SPACE_BT601_525
- VXLIB_COLOR_SPACE_BT601_625
- VXLIB_COLOR_SPACE_BT709
- VXLIB_COLOR_SPACE_DEFAULT
- Performance Considerations:
- For best performance, the following parameter settings are recommended:
- Set widths equal to strides
- Align all pointers to 8 byte boundaries
- Set all stride and width values to a multiple of 8