Functions
VXLIB_convolve_3x3_i8u_c16s_o16s

Functions

VXLIB_STATUS VXLIB_convolve_3x3_i8u_c16s_o16s (const uint8_t src[restrict], const VXLIB_bufParams2D_t *src_addr, int16_t dst[restrict], const VXLIB_bufParams2D_t *dst_addr, const int16_t conv_mat[restrict], uint32_t shift)
 
VXLIB_STATUS VXLIB_convolve_3x3_i8u_c16s_o16s_checkParams (const uint8_t src[restrict], const VXLIB_bufParams2D_t *src_addr, const int16_t dst[restrict], const VXLIB_bufParams2D_t *dst_addr, const int16_t conv_mat[restrict], uint32_t shift)
 

Detailed Description

Function Documentation

◆ VXLIB_convolve_3x3_i8u_c16s_o16s()

VXLIB_STATUS VXLIB_convolve_3x3_i8u_c16s_o16s ( const uint8_t  src[restrict],
const VXLIB_bufParams2D_t *  src_addr,
int16_t  dst[restrict],
const VXLIB_bufParams2D_t *  dst_addr,
const int16_t  conv_mat[restrict],
uint32_t  shift 
)
Description:
Computes a user programmable convolution operation using the 3x3 neighborhood of each input pixel.
Method:
This filter uses the user supplied convolution matrix
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 (SQ15.0)
[in]dst_addr[]Pointer to structure containing dimensional information of dst
[in]conv_mat[]Pointer to array containing the convolution matrix (SQ15.0)
[in]shiftValue to right shift the sum of products of the 9 neighborhood pixels
Assumptions:
  • I/O buffer pointers are assumed to be not aliased.
  • Output height should be == (Input height - 2)
  • Output width should be == (Input width - 2) OR (Input width)
Performance Considerations:
  • For best performance, the following parameter settings are recommended:
    • Set widths equal each other and equal to strides (allows processing over whole image in single loop)

◆ VXLIB_convolve_3x3_i8u_c16s_o16s_checkParams()

VXLIB_STATUS VXLIB_convolve_3x3_i8u_c16s_o16s_checkParams ( const uint8_t  src[restrict],
const VXLIB_bufParams2D_t *  src_addr,
const int16_t  dst[restrict],
const VXLIB_bufParams2D_t *  dst_addr,
const int16_t  conv_mat[restrict],
uint32_t  shift 
)
Description:
Checks the parameters for programming errors for the VXLIB_convolve_3x3_i8u_c16s_o16s function.
Method:
The following checks are made:
  • There shall be no NULL pointers
  • Output height should be == (Input height - 2)
  • Output width should be <= Input width
  • The strides of each image shall be equal to or greater than the x dimension
  • The shift parameter should be <= 31
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 (SQ15.0)
[in]dst_addr[]Pointer to structure containing dimensional information of dst
[in]conv_mat[]Pointer to array containing the convolution matrix (SQ15.0)
[in]shiftValue to right shift the sum of products of the 9 neighborhood pixels

Copyright 2023, Texas Instruments Incorporated