Functions
VXLIB_colorConvert_RGBXtoRGB_i8u_o8u

Functions

VXLIB_STATUS VXLIB_colorConvert_RGBXtoRGB_i8u_o8u (const uint8_t src[restrict], const VXLIB_bufParams2D_t *src_addr, uint8_t dst[restrict], const VXLIB_bufParams2D_t *dst_addr)
 
VXLIB_STATUS VXLIB_colorConvert_RGBXtoRGB_i8u_o8u_checkParams (const uint8_t src[restrict], const VXLIB_bufParams2D_t *src_addr, const uint8_t dst[restrict], const VXLIB_bufParams2D_t *dst_addr)
 

Detailed Description

Function Documentation

◆ VXLIB_colorConvert_RGBXtoRGB_i8u_o8u()

VXLIB_STATUS VXLIB_colorConvert_RGBXtoRGB_i8u_o8u ( const uint8_t  src[restrict],
const VXLIB_bufParams2D_t *  src_addr,
uint8_t  dst[restrict],
const VXLIB_bufParams2D_t *  dst_addr 
)
Description:
Converts RGBX interleaved to RGB interleaved (discard the X channel).
Method:
Copy the first three channels of a set of four and discard the fourth.
Parameters
[in]src[]Pointer to array containing input RGBX image (UQ8.0)
[in]src_addr[]Pointer to structure containing dimensional information of src
[out]dst[]Pointer to array containing output RGB image (UQ8.0)
[in]dst_addr[]Pointer to structure containing dimensional information of dst
Assumptions:
  • I/O buffer pointers are assumed to be not aliased.
  • RGBX Input (1 plane): src_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
  • RGB (1 plane): dst_addr
    • 'dim_x' refers to the number of RGB pixel units per line
    • 'dim_y' refers to the number of lines in the image
    • 'stride_y' should be at least ('dim_x' * 3 * 1) bytes
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

◆ VXLIB_colorConvert_RGBXtoRGB_i8u_o8u_checkParams()

VXLIB_STATUS VXLIB_colorConvert_RGBXtoRGB_i8u_o8u_checkParams ( const uint8_t  src[restrict],
const VXLIB_bufParams2D_t *  src_addr,
const uint8_t  dst[restrict],
const VXLIB_bufParams2D_t *  dst_addr 
)
Description:
Checks the parameters for programming errors for the VXLIB_colorConvert_RGBXtoRGB_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 * 4
  • The stride_y of the dst image shall be equal to or greater than dim_x * 3
Parameters
[in]src[]Pointer to array containing input RGBX image (UQ8.0)
[in]src_addr[]Pointer to structure containing dimensional information of src
[out]dst[]Pointer to array containing output RGB image (UQ8.0)
[in]dst_addr[]Pointer to structure containing dimensional information of dst

Copyright 2023, Texas Instruments Incorporated