Functions
VXLIB_remapBilinear_bc_i8u_i32f_o8u

Functions

VXLIB_STATUS VXLIB_remapBilinear_bc_i8u_i32f_o8u (const uint8_t src[restrict], const VXLIB_bufParams2D_t *src_addr, uint8_t dst[restrict], const VXLIB_bufParams2D_t *dst_addr, const VXLIB_F32 remap[restrict], const VXLIB_bufParams2D_t *remap_addr, uint8_t border_constant_value)
 
VXLIB_STATUS VXLIB_remapBilinear_bc_i8u_i32f_o8u_checkParams (const uint8_t src[restrict], const VXLIB_bufParams2D_t *src_addr, uint8_t dst[restrict], const VXLIB_bufParams2D_t *dst_addr, const VXLIB_F32 remap[restrict], const VXLIB_bufParams2D_t *remap_addr, uint8_t border_constant_value)
 

Detailed Description

Function Documentation

◆ VXLIB_remapBilinear_bc_i8u_i32f_o8u()

VXLIB_STATUS VXLIB_remapBilinear_bc_i8u_i32f_o8u ( const uint8_t  src[restrict],
const VXLIB_bufParams2D_t *  src_addr,
uint8_t  dst[restrict],
const VXLIB_bufParams2D_t *  dst_addr,
const VXLIB_F32  remap[restrict],
const VXLIB_bufParams2D_t *  remap_addr,
uint8_t  border_constant_value 
)

Maps output pixels in an image from an input pixels in an image (8-bit), using bilinear interpolation. If the input pixel mapping is out of bounds from the input image, then the border_constant_value is placed in the output cooresponding to the out of bounds input.

Method:
The Image Remap Kernel is computed by using the following equation:
 dst(x,y) = src[remap(x*2,y), remap(x*2+1,y)]
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]remap[]Pointer to array containing the remap table (F32) Format of array is (x0, y0, x1, y1, ... ) so that array width is twice the width of the dst array: 2 coordinates for each output pixel.
[in]remap_addr[]Pointer to structure containing dimensional information of remap
[in]border_constant_valueParameter indicating out of bounds value (UQ8.0)
Assumptions:
  • I/O buffer pointers are assumed to be not aliased.
  • remap_addr->dim_x == dst_addr->dim_x * 2
Performance Considerations:
  • For best performance, the following parameter settings are recommended:
    • Set widths equal to strides
  • If a user wants to divide processing of the image into smaller blocks using DMA, then it can divide the output image and remap image into blocks, but the input image should be accessable in its entirety since the remap coordinates refer to x and y offsets in the full input image.

◆ VXLIB_remapBilinear_bc_i8u_i32f_o8u_checkParams()

VXLIB_STATUS VXLIB_remapBilinear_bc_i8u_i32f_o8u_checkParams ( const uint8_t  src[restrict],
const VXLIB_bufParams2D_t *  src_addr,
uint8_t  dst[restrict],
const VXLIB_bufParams2D_t *  dst_addr,
const VXLIB_F32  remap[restrict],
const VXLIB_bufParams2D_t *  remap_addr,
uint8_t  border_constant_value 
)
Description:
Checks the parameters for programming errors for the VXLIB_remapBilinear_bc_i8u_i32f_o8u function.
Method:
The following checks are made:
  • There shall be no NULL pointers
  • Remap and dst images shall have the same y dimensions
  • Remap shall have the same x dimensions of 2x that of dst image.
  • 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 (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]remap[]Pointer to array containing the remap table (F32) Format of array is (x0, y0, x1, y1, ... ) so that array width is twice the width of the dst array: 2 coordinates for each output pixel.
[in]remap_addr[]Pointer to structure containing dimensional information of remap
[in]border_constant_valueParameter indicating out of bounds value (UQ8.0)

Copyright 2024, Texas Instruments Incorporated