74 template <
typename dataType>
82 printf(
"Enter VXLIB_tableLookup_exec_cn\n");
89 size_t width = pKerPrivArgs->
width;
90 size_t height = pKerPrivArgs->
height;
102 dataType *restrict pInLocal = (dataType *) pIn;
103 dataType *restrict pOutLocal = (dataType *) pOut;
104 dataType *restrict lutLocal = (dataType *) pLut;
107 printf(
"In VXLIB_tableLookup_exec_cn, width: %d, height: %d\n", width, height);
110 for (uint32_t i = 0; i < height; i++) {
111 for (uint32_t j = 0; j < width; j++) {
112 srcIndex = pInLocal[i * strideInElements + j];
113 lutIndex = (int32_t) offset + (int32_t) srcIndex;
114 if (lutIndex >= 0 && (uint32_t)lutIndex < count) {
116 pOutLocal[i * strideOutElements + j] = lutLocal[lutIndex];
130 void *restrict pLut);
134 void *restrict pLut);
138 void *restrict pLut);
142 void *restrict pLut);
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)
VXLIB_STATUS VXLIB_tableLookup_set_cn(VXLIB_kernelHandle handle, void *restrict pLut)
This function set the lookup table in memory for the natural C implementation of the kernel....
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)
VXLIB_STATUS VXLIB_tableLookup_exec_cn(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pLut)
This function is the main execution function for the natural C implementation of the kernel....
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.
void * VXLIB_kernelHandle
Handle type for VXLIB operations.
VXLIB_STATUS_NAME
The enumeration of all status codes.
@ VXLIB_ERR_INVALID_DIMENSION
uint32_t count
Parameter indicating size of lookup table
uint16_t offset
Parameter indicating index of input value = 0 in the lookup table
Structure that is reserved for internal use by the kernel.
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.