41 #include "VXLIB_types.h"
74 if (handle == NULL || bufParamsIn == NULL || bufParamsOut == NULL || bufParamsLut == NULL || pKerInitArgs == NULL) {
95 else if ((bufParamsIn->
dim_x != bufParamsOut->
dim_x) || (bufParamsIn->
dim_y != bufParamsOut->
dim_y))
100 else if ((strideInElements < bufParamsIn->dim_x) || (strideOutElements < bufParamsOut->
dim_x))
122 const void *restrict pIn,
123 const void *restrict pOut,
124 const void *restrict pLut)
129 printf(
"Enter VXLIB_tableLookup_exec_checkParams\n");
131 if ((handle == NULL) || (pIn == NULL) || (pOut == NULL) || (pLut == NULL)) {
169 printf(
"VXLIB_DEBUGPRINT Enter VXLIB_tableLookup_init\n");
173 uint32_t dTypeIn = bufParamsIn->
data_type;
174 uint32_t dTypeOut = bufParamsOut->
data_type;
175 uint32_t dTypeLut = bufParamsLut->
data_type;
248 status = pKerPrivArgs->
lutSet(handle, pLut);
259 printf(
"VXLIB_DEBUGPRINT Enter VXLIB_tableLookup_exec\n");
264 status = pKerPrivArgs->
execute(handle, pIn, pOut, pLut);
template VXLIB_STATUS VXLIB_tableLookup_set_ci< int16_t >(VXLIB_kernelHandle handle, void *restrict lut)
template VXLIB_STATUS VXLIB_tableLookup_set_ci< int8_t >(VXLIB_kernelHandle handle, void *restrict lut)
template VXLIB_STATUS VXLIB_tableLookup_exec_ci< uint16_t >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict lut)
template VXLIB_STATUS VXLIB_tableLookup_exec_ci< int8_t >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict lut)
template VXLIB_STATUS VXLIB_tableLookup_init_ci< VXLIB_TABLELOOKUP_DTYPE_I16U_O16U >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_bufParams1D_t *bufParamsLut, const VXLIB_tableLookup_InitArgs *pKerInitArgs)
template VXLIB_STATUS VXLIB_tableLookup_set_ci< uint8_t >(VXLIB_kernelHandle handle, void *restrict lut)
template VXLIB_STATUS VXLIB_tableLookup_exec_ci< int16_t >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict lut)
template VXLIB_STATUS VXLIB_tableLookup_init_ci< VXLIB_TABLELOOKUP_DTYPE_I16S_O16S >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_bufParams1D_t *bufParamsLut, const VXLIB_tableLookup_InitArgs *pKerInitArgs)
template VXLIB_STATUS VXLIB_tableLookup_init_ci< VXLIB_TABLELOOKUP_DTYPE_I8U_O8U >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_bufParams1D_t *bufParamsLut, const VXLIB_tableLookup_InitArgs *pKerInitArgs)
template VXLIB_STATUS VXLIB_tableLookup_set_ci< uint16_t >(VXLIB_kernelHandle handle, void *restrict lut)
template VXLIB_STATUS VXLIB_tableLookup_init_ci< VXLIB_TABLELOOKUP_DTYPE_I8S_O8S >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_bufParams1D_t *bufParamsLut, const VXLIB_tableLookup_InitArgs *pKerInitArgs)
template VXLIB_STATUS VXLIB_tableLookup_exec_ci< uint8_t >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict lut)
template VXLIB_STATUS VXLIB_tableLookup_exec_cn< uint16_t >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pLut)
template VXLIB_STATUS VXLIB_tableLookup_set_cn< int8_t >(VXLIB_kernelHandle handle, void *restrict pLut)
template VXLIB_STATUS VXLIB_tableLookup_exec_cn< int16_t >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pLut)
template VXLIB_STATUS VXLIB_tableLookup_set_cn< uint16_t >(VXLIB_kernelHandle handle, void *restrict pLut)
template VXLIB_STATUS VXLIB_tableLookup_exec_cn< int8_t >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pLut)
template VXLIB_STATUS VXLIB_tableLookup_exec_cn< uint8_t >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pLut)
template VXLIB_STATUS VXLIB_tableLookup_set_cn< int16_t >(VXLIB_kernelHandle handle, void *restrict pLut)
template VXLIB_STATUS VXLIB_tableLookup_set_cn< uint8_t >(VXLIB_kernelHandle handle, void *restrict pLut)
Header file for kernel's internal use. For the kernel's interface, please see VXLIB_tableLookup.
#define VXLIB_TABLELOOKUP_I16U_I16U_O16U
#define VXLIB_TABLELOOKUP_I8S_I8S_O8S
#define VXLIB_TABLELOOKUP_I16S_I16S_O16S
#define VXLIB_TABLELOOKUP_I8U_I8U_O8U
Macros that will be useful to check for datatype combinations.
void * VXLIB_kernelHandle
Handle type for VXLIB operations.
VXLIB_STATUS_NAME
The enumeration of all status codes.
@ VXLIB_ERR_INVALID_DIMENSION
@ VXLIB_ERR_NOT_EQUAL_WIDTH_STRIDE
static int32_t VXLIB_sizeof(uint32_t type)
Inline function returns number of bytes per element given a type of VXLIB_data_type_e.
VXLIB_STATUS VXLIB_tableLookup_exec_checkParams(VXLIB_kernelHandle handle, const void *restrict pIn, const void *restrict pOut, const void *restrict pLut)
This function checks the validity of the parameters passed to VXLIB_tableLookup_exec function....
VXLIB_STATUS VXLIB_tableLookup_init(VXLIB_kernelHandle handle, VXLIB_bufParams2D_t *bufParamsIn, VXLIB_bufParams2D_t *bufParamsOut, VXLIB_bufParams1D_t *bufParamsLut, const VXLIB_tableLookup_InitArgs *pKerInitArgs)
This function should be called before the VXLIB_tableLookup_exec function is called....
VXLIB_STATUS VXLIB_tableLookup_exec(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pLut)
This function is the main kernel compute function.
VXLIB_STATUS VXLIB_tableLookup_init_checkParams(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_bufParams1D_t *bufParamsLut, const VXLIB_tableLookup_InitArgs *pKerInitArgs)
This function checks the validity of the parameters passed to VXLIB_tableLookup_init function....
int32_t VXLIB_tableLookup_getHandleSize(VXLIB_tableLookup_InitArgs *pKerInitArgs)
This is a query function to calculate the size of internal handle.
VXLIB_STATUS VXLIB_tableLookup_set(VXLIB_kernelHandle handle, void *restrict pLut)
This function place the lookup table in suitable memory location.
A structure for a 1 dimensional buffer descriptor.
uint32_t data_type
Values are of type VXLIB_data_type_e.
A structure for a 2 dimensional buffer descriptor.
uint32_t dim_y
Height of buffer in Y dimension in elements.
uint32_t dim_x
Width of buffer in X dimension in elements.
uint32_t data_type
Values are of type VXLIB_data_type_e.
int32_t stride_y
Stride in Y dimension in bytes.
Structure containing the parameters to initialize the kernel.
uint32_t count
Parameter indicating size of lookup table
int8_t funcStyle
Variant of the function, refer to VXLIB_FUNCTION_STYLE
Structure that is reserved for internal use by the kernel.
pFxnVXLIB_tableLookup_set lutSet
size_t strideOutElements
Stride of output in elements.
VXLIB_tableLookup_InitArgs pKerInitArgs
Initargs of the kernel.
size_t width
Width of image
size_t height
Height of image
size_t strideInElements
Stride of input in elements.
pFxnVXLIB_tableLookup_exec execute
Function pointer to point to the right execution variant between VXLIB_tableLookup_exec_cn and VXLIB_...