70 if ((handle == NULL) || (bufParamsIn == NULL) || (bufParamsOut == NULL) || (pKerInitArgs == NULL)) {
77 uint32_t dTypeIn = bufParamsIn->
data_type;
78 uint32_t widthIn = bufParamsIn->
dim_x;
79 uint32_t heightIn = bufParamsIn->
dim_y;
80 uint32_t strideIn = bufParamsIn->
stride_y;
83 uint32_t dTypeOut = bufParamsOut->
data_type;
84 uint32_t widthOut = bufParamsOut->
dim_x;
85 uint32_t heightOut = bufParamsOut->
dim_y;
86 uint32_t strideOut = bufParamsOut->
stride_y;
88 uint32_t strideInElements = strideIn /
VXLIB_sizeof(dTypeIn);
89 uint32_t strideOutElements = strideOut /
VXLIB_sizeof(dTypeOut);
91 if ((widthIn != widthOut) || (heightIn != heightOut)) {
94 else if ((strideInElements < widthIn) || (strideOutElements < widthOut)) {
117 const void *restrict pIn,
118 const void *restrict pOut,
119 const void *restrict pUpperVal,
120 const void *restrict pLowerVal,
121 const void *restrict pTrueVal,
122 const void *restrict pFalseVal)
127 printf(
"Enter VXLIB_thresholdRange_exec_checkParams\n");
129 if ((handle == NULL) || (pIn == NULL) || (pOut == NULL) || (pUpperVal == NULL) || (pLowerVal == NULL) ||
130 (pTrueVal == NULL) || (pFalseVal == NULL)) {
167 printf(
"VXLIB_DEBUGPRINT Enter VXLIB_thresholdRange_init\n");
171 uint32_t dTypeIn = bufParamsIn->
data_type;
172 uint32_t dTypeOut = bufParamsOut->
data_type;
235 void *restrict pUpperVal,
236 void *restrict pLowerVal,
237 void *restrict pTrueVal,
238 void *restrict pFalseVal)
244 printf(
"VXLIB_DEBUGPRINT Enter VXLIB_thresholdRange_exec\n");
249 status = pKerPrivArgs->
execute(handle, pIn, pOut, pUpperVal, pLowerVal, pTrueVal, pFalseVal);
template VXLIB_STATUS VXLIB_thresholdRange_init_ci< VXLIB_THRESHOLDRANGE_DTYPE_I16U_O16U >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_thresholdRange_InitArgs *pKerInitArgs)
template VXLIB_STATUS VXLIB_thresholdRange_init_ci< VXLIB_THRESHOLDRANGE_DTYPE_I16S_O16S >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_thresholdRange_InitArgs *pKerInitArgs)
template VXLIB_STATUS VXLIB_thresholdRange_exec_ci< VXLIB_THRESHOLDRANGE_TYPENAME_I16U_O16U >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pUpperVal, void *restrict pLowerVal, void *restrict pTrueVal, void *restrict pFalseVal)
template VXLIB_STATUS VXLIB_thresholdRange_exec_ci< VXLIB_THRESHOLDRANGE_TYPENAME_I16S_O16S >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pUpperVal, void *restrict pLowerVal, void *restrict pTrueVal, void *restrict pFalseVal)
template VXLIB_STATUS VXLIB_thresholdRange_init_ci< VXLIB_THRESHOLDRANGE_DTYPE_I8U_O8U >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_thresholdRange_InitArgs *pKerInitArgs)
template VXLIB_STATUS VXLIB_thresholdRange_exec_ci< VXLIB_THRESHOLDRANGE_TYPENAME_I8U_O8U >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pUpperVal, void *restrict pLowerVal, void *restrict pTrueVal, void *restrict pFalseVal)
template VXLIB_STATUS VXLIB_thresholdRange_exec_ci< VXLIB_THRESHOLDRANGE_TYPENAME_I8S_O8S >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pUpperVal, void *restrict pLowerVal, void *restrict pTrueVal, void *restrict pFalseVal)
template VXLIB_STATUS VXLIB_thresholdRange_init_ci< VXLIB_THRESHOLDRANGE_DTYPE_I8S_O8S >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_thresholdRange_InitArgs *pKerInitArgs)
template VXLIB_STATUS VXLIB_thresholdRange_exec_cn< VXLIB_THRESHOLDRANGE_TYPENAME_I8U_O8U >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pUpperVal, void *restrict pLowerVal, void *restrict pTrueVal, void *restrict pFalseVal)
template VXLIB_STATUS VXLIB_thresholdRange_exec_cn< VXLIB_THRESHOLDRANGE_TYPENAME_I16S_O16S >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pUpperVal, void *restrict pLowerVal, void *restrict pTrueVal, void *restrict pFalseVal)
template VXLIB_STATUS VXLIB_thresholdRange_exec_cn< VXLIB_THRESHOLDRANGE_TYPENAME_I8S_O8S >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pUpperVal, void *restrict pLowerVal, void *restrict pTrueVal, void *restrict pFalseVal)
template VXLIB_STATUS VXLIB_thresholdRange_exec_cn< VXLIB_THRESHOLDRANGE_TYPENAME_I16U_O16U >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pUpperVal, void *restrict pLowerVal, void *restrict pTrueVal, void *restrict pFalseVal)
Header file for kernel's internal use. For the kernel's interface, please see VXLIB_thresholdRange.
#define VXLIB_THRESHOLDRANGE_I16S_O16S
#define VXLIB_THRESHOLDRANGE_I8U_O8U
Macros that will be useful to check for datatype combinations.
#define VXLIB_THRESHOLDRANGE_I8S_O8S
#define VXLIB_THRESHOLDRANGE_I16U_O16U
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_thresholdRange_init(VXLIB_kernelHandle handle, VXLIB_bufParams2D_t *bufParamsIn, VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_thresholdRange_InitArgs *pKerInitArgs)
This function should be called before the VXLIB_thresholdRange_exec function is called....
int32_t VXLIB_thresholdRange_getHandleSize(VXLIB_thresholdRange_InitArgs *pKerInitArgs)
This is a query function to calculate the size of internal handle.
VXLIB_STATUS VXLIB_thresholdRange_init_checkParams(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_thresholdRange_InitArgs *pKerInitArgs)
This function checks the validity of the parameters passed to VXLIB_thresholdRange_init function....
VXLIB_STATUS VXLIB_thresholdRange_exec_checkParams(VXLIB_kernelHandle handle, const void *restrict pIn, const void *restrict pOut, const void *restrict pUpperVal, const void *restrict pLowerVal, const void *restrict pTrueVal, const void *restrict pFalseVal)
This function checks the validity of the parameters passed to VXLIB_thresholdRange_exec function....
VXLIB_STATUS VXLIB_thresholdRange_exec(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pUpperVal, void *restrict pLowerVal, void *restrict pTrueVal, void *restrict pFalseVal)
This function is the main kernel compute function.
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.
int8_t funcStyle
Variant of the function, refer to VXLIB_FUNCTION_STYLE
Structure that is reserved for internal use by the kernel.
size_t height
Height of image
size_t strideOutElements
Stride of output in elements.
pFxnVXLIB_thresholdRange_exec execute
Function pointer to point to the right execution variant between VXLIB_thresholdRange_exec_cn and VXL...
size_t strideInElements
Stride of input in elements.
VXLIB_thresholdRange_InitArgs pKerInitArgs
Initargs of the kernel.
size_t width
Width of image