71 if (handle == NULL || bufParamsIn == NULL || bufParamsOut == NULL || pKerInitArgs == NULL) {
76 uint32_t dTypeIn = bufParamsIn->
data_type;
77 uint32_t widthIn = bufParamsIn->
dim_x;
78 uint32_t heightIn = bufParamsIn->
dim_y;
79 uint32_t strideIn = bufParamsIn->
stride_y;
82 uint32_t dTypeOut = bufParamsOut->
data_type;
83 uint32_t widthOut = bufParamsOut->
dim_x;
84 uint32_t heightOut = bufParamsOut->
dim_y;
85 uint32_t strideOut = bufParamsOut->
stride_y;
88 size_t padLeft = pKerInitArgs->
padLeft;
89 size_t padRight = pKerInitArgs->
padRight;
90 size_t padTop = pKerInitArgs->
padTop;
91 size_t padBottom = pKerInitArgs->
padBottom;
94 bool isNotPadded = (padLeft == 0) && (padRight == 0) && (padTop == 0) && (padBottom == 0);
105 else if (!isNotPadded) {
110 else if ((widthIn < ((widthOut + 2) * 2)) || (heightIn != ((heightOut + 2) * 2)) ||
111 (strideInElements < widthIn) || (strideOutElements < widthOut) || (widthIn < filterDim) ||
112 (heightIn < filterDim)) {
136 printf(
"Enter VXLIB_halfScaleGaussian_exec_checkParams\n");
138 if ((handle == NULL) || (pIn == NULL) || (pOut == NULL)) {
177 printf(
"VXLIB_DEBUGPRINT Enter VXLIB_halfScaleGaussian_init\n");
181 uint32_t dTypeIn = bufParamsIn->
data_type;
182 uint32_t dTypeOut = bufParamsOut->
data_type;
202 bufParamsOut, pKerInitArgs);
226 printf(
"VXLIB_DEBUGPRINT Enter VXLIB_halfScaleGaussian_exec\n");
231 status = pKerPrivArgs->
execute(handle, pIn, pOut);
template VXLIB_STATUS VXLIB_halfScaleGaussian_exec_ci< VXLIB_HALF_SCALE_GAUSSIAN_TYPENAME_I8U_O8U >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
template VXLIB_STATUS VXLIB_halfScaleGaussian_init_ci< VXLIB_HALF_SCALE_GAUSSIAN_DTYPE_I8U_O8U >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_halfScaleGaussian_InitArgs *pKerInitArgs)
template VXLIB_STATUS VXLIB_halfScaleGaussian_exec_cn< VXLIB_HALF_SCALE_GAUSSIAN_TYPENAME_I8U_O8U >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
Header file for kernel's internal use. For the kernel's interface, please see VXLIB_halfScaleGaussian...
#define VXLIB_HALF_SCALE_GAUSSIAN_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_NOT_IMPLEMENTED
@ VXLIB_ERR_INVALID_DIMENSION
static int32_t VXLIB_sizeof(uint32_t type)
Inline function returns number of bytes per element given a type of VXLIB_data_type_e.
int32_t VXLIB_halfScaleGaussian_getHandleSize(VXLIB_halfScaleGaussian_InitArgs *pKerInitArgs)
This is a query function to calculate the size of internal handle.
VXLIB_STATUS VXLIB_halfScaleGaussian_init(VXLIB_kernelHandle handle, VXLIB_bufParams2D_t *bufParamsIn, VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_halfScaleGaussian_InitArgs *pKerInitArgs)
This function should be called before the VXLIB_halfScaleGaussian_exec function is called....
VXLIB_STATUS VXLIB_halfScaleGaussian_exec(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
This function is the main kernel compute function.
VXLIB_STATUS VXLIB_halfScaleGaussian_init_checkParams(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_halfScaleGaussian_InitArgs *pKerInitArgs)
This function checks the validity of the parameters passed to VXLIB_halfScaleGaussian_init function....
VXLIB_STATUS VXLIB_halfScaleGaussian_exec_checkParams(VXLIB_kernelHandle handle, const void *restrict pIn, const void *restrict pOut)
This function checks the validity of the parameters passed to VXLIB_halfScaleGaussian_exec 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.
int32_t padLeft
Padding options
int8_t funcStyle
Variant of the function, refer to VXLIB_FUNCTION_STYLE
int8_t filterSize
Width and height of filter
Structure that is reserved for internal use by the kernel.
size_t widthOut
Width of output image
VXLIB_halfScaleGaussian_InitArgs pKerInitArgs
Initargs of the kernel.
size_t strideInElements
Stride of input in elements.
size_t widthIn
Width of input image
pFxnVXLIB_halfScaleGaussian_exec execute
Function pointer to point to the right execution variant between VXLIB_halfScaleGaussian_exec_cn and ...
size_t strideOutElements
Stride of output in elements.
size_t heightOut
Height of output image
size_t heightIn
Height of input image