VXLIB_channelCombine_yuyv_i8u_o8u


Detailed Description


Functions

VXLIB_STATUS VXLIB_channelCombine_yuyv_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, int8_t yidx)
VXLIB_STATUS VXLIB_channelCombine_yuyv_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, int8_t yidx)


Function Documentation

VXLIB_STATUS VXLIB_channelCombine_yuyv_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,
int8_t  yidx 
)

Description:
Implements the Channel Combine Kernel.
Method:
The YUYV Channel Combine is implemented using the following equation:

      dst[x + yidx]            = src0[x]
      dst[x + (1 - yidx)]      = src1[x]
      dst[x + 2 + yidx]        = src0[x + 1]
      dst[x + 2 + (1 - yidx)]  = src2[x]

   

Parameters:
[in] src0[] Pointer to array containing first input image (UQ8.0)
[in] src0_addr[] Pointer to structure containing dimensional information of src0
[in] src1[] Pointer to array containing second input image (UQ8.0)
[in] src1_addr[] Pointer to structure containing dimensional information of src1
[in] src2[] Pointer to array containing third input image (UQ8.0)
[in] src2_addr[] Pointer to structure containing dimensional information of src2
[out] dst[] Pointer to array containing output image (UQ8.0)
[in] dst_addr[] Pointer to structure containing dimensional information of dst
[in] yidx Parameter indicating how images should be interleaved (0: luma is in even byte offsets; 1: luma is in odd byte offsets)
Assumptions:
  • I/O buffer pointers are assumed to be not aliased.
Performance Considerations:
  • For best performance, the following parameter settings are recommended:
    • Set dst_addr->stride_y equal to src0_addr->stride_y * 2
    • Set src0_addr->stride_y and src1_addr->stride_y equal to src0_addr->stride_y/2
    • Align all pointers to 8 byte boundaries
    • Set all stride values to a multiple of 16
    • Set all width values to a multiple of 16

VXLIB_STATUS VXLIB_channelCombine_yuyv_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,
int8_t  yidx 
)

Description:
Checks the parameters for programming errors for the VXLIB_channelCombine_yuyv_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 images 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 * 2
  • The yidx shall be either 0 or 1.
  • The dst image data type shall be set to VXLIB_UINT16.
Parameters:
[in] src0[] Pointer to array containing first input image (UQ8.0)
[in] src0_addr[] Pointer to structure containing dimensional information of src0
[in] src1[] Pointer to array containing second input image (UQ8.0)
[in] src1_addr[] Pointer to structure containing dimensional information of src1
[in] src2[] Pointer to array containing third input image (UQ8.0)
[in] src2_addr[] Pointer to structure containing dimensional information of src2
[out] dst[] Pointer to array containing output image (UQ8.0)
[in] dst_addr[] Pointer to structure containing dimensional information of dst
[in] yidx Parameter indicating how images should be interleaved (0: luma is in even byte offsets; 1: luma is in odd byte offsets)


Copyright 2020, Texas Instruments Incorporated