Functions
VXLIB_tableLookup_i16s_o16s

Functions

VXLIB_STATUS VXLIB_tableLookup_i16s_o16s (const int16_t src[restrict], const VXLIB_bufParams2D_t *src_addr, int16_t dst[restrict], const VXLIB_bufParams2D_t *dst_addr, const int16_t lut[restrict], uint32_t count, uint16_t offset)
 
VXLIB_STATUS VXLIB_tableLookup_i16s_o16s_checkParams (const int16_t src[], const VXLIB_bufParams2D_t *src_addr, const int16_t dst[], const VXLIB_bufParams2D_t *dst_addr, const int16_t lut[], uint32_t count, uint16_t offset)
 

Detailed Description

Function Documentation

◆ VXLIB_tableLookup_i16s_o16s()

VXLIB_STATUS VXLIB_tableLookup_i16s_o16s ( const int16_t  src[restrict],
const VXLIB_bufParams2D_t *  src_addr,
int16_t  dst[restrict],
const VXLIB_bufParams2D_t *  dst_addr,
const int16_t  lut[restrict],
uint32_t  count,
uint16_t  offset 
)

Implements the Table Lookup Image Kernel (Signed 16-bit).

Method:
The Table Lookup Image Kernel is computed by using the following equation:
 dst(x,y) = lut[offset + src(x,y)]
Parameters
[in]src[]Pointer to array containing first input image (SQ15.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]lut[]Pointer to array containing the lookup table (SQ15.0)
[in]countParameter indicating size of LUT (U32.0)
[in]offsetParameter indicating index of input value = 0 in the LUT (U16.0)
Assumptions:
  • I/O buffer pointers are assumed to be not aliased.
  • LUT size is larger than max value in src
  • The count parameter should be <= 65536
  • The offset parameter should be less than the count parameter
  • The input pixel values shall fall within the range of the lookup table given the count and offset values.
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 4

◆ VXLIB_tableLookup_i16s_o16s_checkParams()

VXLIB_STATUS VXLIB_tableLookup_i16s_o16s_checkParams ( const int16_t  src[],
const VXLIB_bufParams2D_t *  src_addr,
const int16_t  dst[],
const VXLIB_bufParams2D_t *  dst_addr,
const int16_t  lut[],
uint32_t  count,
uint16_t  offset 
)
Description:
Checks the parameters for programming errors for the VXLIB_tableLookup_i16s_o16s function.
Method:
The following checks are made:
  • There shall be no NULL pointers
  • The count parameter shall be <= 65536
  • 'offset' shall be < 'count'
  • 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
Parameters
[in]src[]Pointer to array containing first input image (SQ15.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]lut[]Pointer to array containing the lookup table (SQ15.0)
[in]countParameter indicating size of LUT (U32.0)
[in]offsetParameter indicating index of input value = 0 in the LUT (U16.0)

Copyright 2023, Texas Instruments Incorporated