Functions
VXLIB_addSquare_i8u_i16s_o16s

Functions

VXLIB_STATUS VXLIB_addSquare_i8u_i16s_o16s (const uint8_t src0[restrict], const VXLIB_bufParams2D_t *src0_addr, const int16_t src1[restrict], const VXLIB_bufParams2D_t *src1_addr, int16_t dst[restrict], const VXLIB_bufParams2D_t *dst_addr, uint32_t shift)
 
VXLIB_STATUS VXLIB_addSquare_i8u_i16s_o16s_checkParams (const uint8_t src0[], const VXLIB_bufParams2D_t *src0_addr, const int16_t src1[], const VXLIB_bufParams2D_t *src1_addr, const int16_t dst[], const VXLIB_bufParams2D_t *dst_addr, uint32_t shift)
 

Detailed Description

Function Documentation

◆ VXLIB_addSquare_i8u_i16s_o16s()

VXLIB_STATUS VXLIB_addSquare_i8u_i16s_o16s ( const uint8_t  src0[restrict],
const VXLIB_bufParams2D_t *  src0_addr,
const int16_t  src1[restrict],
const VXLIB_bufParams2D_t *  src1_addr,
int16_t  dst[restrict],
const VXLIB_bufParams2D_t *  dst_addr,
uint32_t  shift 
)
Description:
Squares the value of one input image and adds it to another input image.
Method:
Square is computed by:
 dst(x,y) = saturateINT16( (uint16)src1(x,y) + (((uint16)src0(x,y)^2)>>(shift)) )
Parameters
[in]src0[]Pointer to array containing first input image (UQ8.0)
[in]src0_addr[]Pointer to structure containing dimensional information of src
[in]src1[]Pointer to array containing output image (SQ15.0)
[in]src1_addr[]Pointer to structure containing dimensional information of src
[out]dst[]Pointer to array containing output image (SQ15.0)
[in]dst_addr[]Pointer to structure containing dimensional information of dst
[in]shiftParameter indicating shift value, where 0 <= shift <= 15
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
    • Set all stride values to a multiple of 8
    • Set all width values to a multiple of 8

◆ VXLIB_addSquare_i8u_i16s_o16s_checkParams()

VXLIB_STATUS VXLIB_addSquare_i8u_i16s_o16s_checkParams ( const uint8_t  src0[],
const VXLIB_bufParams2D_t *  src0_addr,
const int16_t  src1[],
const VXLIB_bufParams2D_t *  src1_addr,
const int16_t  dst[],
const VXLIB_bufParams2D_t *  dst_addr,
uint32_t  shift 
)
Description:
Checks the parameters for programming errors for the VXLIB_addSquare_i8u_i16s_o16s function.
Method:
The following checks are made:
  • There shall be no NULL pointers
  • All images shall have the same x and y dimensions
  • The strides of each image shall be equal to or greater than the x dimension
  • The shift parameter shall be < 16
Parameters
[in]src0[]Pointer to array containing first input image (UQ8.0)
[in]src0_addr[]Pointer to structure containing dimensional information of src
[in]src1[]Pointer to array containing first input image (SQ15.0)
[in]src1_addr[]Pointer to structure containing dimensional information of src
[out]dst[]Pointer to array containing output image (SQ15.0)
[in]dst_addr[]Pointer to structure containing dimensional information of dst
[in]shiftParameter indicating shift value, where 0 <= shift <= 15

Copyright 2022, Texas Instruments Incorporated