Functions
VXLIB_channelExtract_1of2_i8u_o8u

Functions

VXLIB_STATUS VXLIB_channelExtract_1of2_i8u_o8u (const uint8_t src[restrict], const VXLIB_bufParams2D_t *src_addr, uint8_t dst[restrict], const VXLIB_bufParams2D_t *dst_addr, uint8_t channelOffset)
 
VXLIB_STATUS VXLIB_channelExtract_1of2_i8u_o8u_checkParams (const uint8_t src[], const VXLIB_bufParams2D_t *src_addr, const uint8_t dst[], const VXLIB_bufParams2D_t *dst_addr, uint8_t channelOffset)
 

Detailed Description

Function Documentation

◆ VXLIB_channelExtract_1of2_i8u_o8u()

VXLIB_STATUS VXLIB_channelExtract_1of2_i8u_o8u ( const uint8_t  src[restrict],
const VXLIB_bufParams2D_t *  src_addr,
uint8_t  dst[restrict],
const VXLIB_bufParams2D_t *  dst_addr,
uint8_t  channelOffset 
)
Description:
Extracts a single channel from a 2-channel interleaved image format.
Method:
The channel extract is computed using the following equation:
 dst(x) = src(2*x + channelOffset)
Parameters
[in]src[]Pointer to array containing input image (UQ8.0)
[in]src_addr[]Pointer to structure containing dimensional information of src
[out]dst[]Pointer to array containing output image (UQ8.0)
[in]dst_addr[]Pointer to structure containing dimensional information of dst
[in]channelOffsetIdentifies which channel to extract (0 or 1)
Assumptions:
  • I/O buffer pointers are assumed to be not aliased.
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 values to a multiple of 8
    • Set all width values to a multiple of 8

◆ VXLIB_channelExtract_1of2_i8u_o8u_checkParams()

VXLIB_STATUS VXLIB_channelExtract_1of2_i8u_o8u_checkParams ( const uint8_t  src[],
const VXLIB_bufParams2D_t *  src_addr,
const uint8_t  dst[],
const VXLIB_bufParams2D_t *  dst_addr,
uint8_t  channelOffset 
)
Description:
Checks the parameters for programming errors for the VXLIB_channelExtract_1of2_i8u_o8u function.
Method:
The following checks are made:
  • There shall be no NULL pointers
  • The src image can be VXLIB_UINT8 or VXLIB_UINT16
    • If VXLIB_UINT8:
      • The dim_x of the src image shall be 2 * dim_x of dst image
    • If VXLIB_UINT16:
      • The dim_x of the src image shall be equal to the dim_x of dst image
  • The stride_y of the src image shall be equal to or greater than dst image dim_x * 2
  • The stride_y of the dst image shall be equal to or greater than dim_x
  • The channelOffset shall be either 0 or 1
Parameters
[in]src[]Pointer to array containing first input image (UQ8.0)
[in]src_addr[]Pointer to structure containing dimensional information of src
[out]dst[]Pointer to array containing output image (UQ8.0)
[in]dst_addr[]Pointer to structure containing dimensional information of dst
[in]channelOffsetIdentifies which channel to extract (0 or 1)

Copyright 2023, Texas Instruments Incorporated