VXLIB_convertDepth_i8u_o16s


Detailed Description


Functions

VXLIB_STATUS VXLIB_convertDepth_i8u_o16s (const uint8_t src[restrict], const VXLIB_bufParams2D_t *src_addr, int16_t dst[restrict], const VXLIB_bufParams2D_t *dst_addr, uint32_t shift)
VXLIB_STATUS VXLIB_convertDepth_i8u_o16s_checkParams (const uint8_t src[], const VXLIB_bufParams2D_t *src_addr, const int16_t dst[], const VXLIB_bufParams2D_t *dst_addr, uint32_t shift)


Function Documentation

VXLIB_STATUS VXLIB_convertDepth_i8u_o16s ( const uint8_t  src[restrict],
const VXLIB_bufParams2D_t src_addr,
int16_t  dst[restrict],
const VXLIB_bufParams2D_t dst_addr,
uint32_t  shift 
)

Description:
Converts image bit depth.
Method:
Convert Bit Depth is computed by using the following equation:

    dst(x,y) = ((int16)src(x,y)) << shift;

   

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 (SQ15.0)
[in] dst_addr[] Pointer to structure containing dimensional information of dst
[in] shift Parameter indicating shift value; valid for 0 <= shift < 8
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
    • Align all pointers to 8 byte boundaries
    • Set all stride values to a multiple of 8
    • Set all width values to a multiple of 16

VXLIB_STATUS VXLIB_convertDepth_i8u_o16s_checkParams ( const uint8_t  src[],
const VXLIB_bufParams2D_t src_addr,
const int16_t  dst[],
const VXLIB_bufParams2D_t dst_addr,
uint32_t  shift 
)

Description:
Checks the parameters for programming errors for the VXLIB_convertDepth_i8u_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
  • 'shift' value shall conform to range: 0 <= shift < 8
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 (SQ15.0)
[in] dst_addr[] Pointer to structure containing dimensional information of dst
[in] shift Parameter indicating shift value; valid for 0 <= shift < 8


Copyright 2020, Texas Instruments Incorporated