Functions
VXLIB_colorConvert_IYUVtoRGBX_i8u_o8u

Functions

VXLIB_STATUS VXLIB_colorConvert_IYUVtoRGBX_i8u_o8u (const uint8_t src0[restrict], const VXLIB_bufParams2D_t *src0_addr, const uint8_t src1[restrict], const VXLIB_bufParams2D_t *src1_addr, const uint8_t src2[restrict], const VXLIB_bufParams2D_t *src2_addr, uint8_t dst[restrict], const VXLIB_bufParams2D_t *dst_addr, uint8_t src_space)
 
VXLIB_STATUS VXLIB_colorConvert_IYUVtoRGBX_i8u_o8u_checkParams (const uint8_t src0[], const VXLIB_bufParams2D_t *src0_addr, const uint8_t src1[], const VXLIB_bufParams2D_t *src1_addr, const uint8_t src2[], const VXLIB_bufParams2D_t *src2_addr, const uint8_t dst[], const VXLIB_bufParams2D_t *dst_addr, uint8_t src_space)
 

Detailed Description

Function Documentation

◆ VXLIB_colorConvert_IYUVtoRGBX_i8u_o8u()

VXLIB_STATUS VXLIB_colorConvert_IYUVtoRGBX_i8u_o8u ( const uint8_t  src0[restrict],
const VXLIB_bufParams2D_t *  src0_addr,
const uint8_t  src1[restrict],
const VXLIB_bufParams2D_t *  src1_addr,
const uint8_t  src2[restrict],
const VXLIB_bufParams2D_t *  src2_addr,
uint8_t  dst[restrict],
const VXLIB_bufParams2D_t *  dst_addr,
uint8_t  src_space 
)
Description:
Performs a color conversion operation from IYUV 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]src0[]Pointer to array containing input luma plane (UQ8.0)
[in]src0_addr[]Pointer to structure containing dimensional information of src0
[in]src1[]Pointer to array containing input U plane (UQ8.0)
[in]src1_addr[]Pointer to structure containing dimensional information of src1
[in]src2[]Pointer to array containing input V plane (UQ8.0)
[in]src2_addr[]Pointer to structure containing dimensional information of src2
[out]dst[]Pointer to array containing output RGBX image (UQ8.0)
[in]dst_addr[]Pointer to structure containing dimensional information of dst
[in]src_spaceParameter indicating the color space of src
Assumptions:
  • I/O buffer pointers are assumed to be not aliased.
  • IYUV (3 planes)
    • src0_addr
      • 'dim_x' refers to the number of luma pixel units per line
      • 'dim_y' refers to the number of lines in the luma plane
      • 'stride_y' refers to the stride of the luma plane, and should be at least ('dim_x' * 1) bytes
    • src1_addr
      • 'dim_x' refers to the number of chroma pixel units per line (should be equal to src0_addr.dim_x / 2)
      • 'dim_y' refers to the number of lines in the chroma plane (should be equal to src0_addr.dim_y / 2)
      • 'stride_y' refers to the stride of the chroma plane, and should be at least ('dim_x' * 1) bytes
    • src2_addr
      • 'dim_x' refers to the number of chroma pixel units per line (should be equal to src0_addr.dim_x / 2)
      • 'dim_y' refers to the number of lines in the chroma plane (should be equal to src0_addr.dim_y / 2)
      • 'stride_y' refers to the stride of the chroma plane, and should be at least ('dim_x' * 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 src width and stride values to a multiple of 8

◆ VXLIB_colorConvert_IYUVtoRGBX_i8u_o8u_checkParams()

VXLIB_STATUS VXLIB_colorConvert_IYUVtoRGBX_i8u_o8u_checkParams ( const uint8_t  src0[],
const VXLIB_bufParams2D_t *  src0_addr,
const uint8_t  src1[],
const VXLIB_bufParams2D_t *  src1_addr,
const uint8_t  src2[],
const VXLIB_bufParams2D_t *  src2_addr,
const uint8_t  dst[],
const VXLIB_bufParams2D_t *  dst_addr,
uint8_t  src_space 
)
Description:
Checks the parameters for programming errors for the VXLIB_colorConvert_IYUVtoRGBX_i8u_o8u function.
Method:
The following checks are made:
  • There shall be no NULL pointers
  • Both images shall have the same x and y dimensions
  • The stride_y of the src image shall be equal to or greater than dim_x
  • The stride_y of the dst image shall be equal to or greater than dim_x * 4
  • The src_space parameter shall be a valid value [0..3]
Parameters
[in]src0[]Pointer to array containing input luma plane (UQ8.0)
[in]src0_addr[]Pointer to structure containing dimensional information of src0
[in]src1[]Pointer to array containing input U plane (UQ8.0)
[in]src1_addr[]Pointer to structure containing dimensional information of src1
[in]src2[]Pointer to array containing input V plane (UQ8.0)
[in]src2_addr[]Pointer to structure containing dimensional information of src2
[out]dst[]Pointer to array containing output RGBX image (UQ8.0)
[in]dst_addr[]Pointer to structure containing dimensional information of dst
[in]src_spaceParameter indicating the color space of src

Copyright 2023, Texas Instruments Incorporated