VXLIB User Guide
VXLIB_absDiff_priv.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  ******************************************************************************/
33 
34 #ifndef VXLIB_ABSDIFF_IXX_IXX_OXX_PRIV_H_
35 #define VXLIB_ABSDIFF_IXX_IXX_OXX_PRIV_H_
36 
37 #include "../common/VXLIB_utility.h"
38 #include "VXLIB_absDiff.h"
39 
54 #define VXLIB_ABSDIFF_IXX_IXX_OXX_PBLOCK_SIZE (2 * VXLIB_SE_PARAM_SIZE + VXLIB_SA_PARAM_SIZE)
61  void *restrict pIn0,
62  void *restrict pIn1,
63  void *restrict pOut);
64 
95 template <uint32_t dTypeIn0>
97  const VXLIB_bufParams2D_t *bufParamsIn0,
98  const VXLIB_bufParams2D_t *bufParamsIn1,
99  const VXLIB_bufParams2D_t *bufParamsOut,
100  const VXLIB_absDiff_InitArgs *pKerInitArgs);
101 
128 template <typename dataType>
129 extern VXLIB_STATUS
130 VXLIB_absDiff_exec_ci(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut);
131 
148 template <typename dataType>
149 extern VXLIB_STATUS
150 VXLIB_absDiff_exec_cn(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut);
151 
155 typedef struct {
161  uint32_t height;
163  uint32_t width;
171  size_t numBlocks;
172 
175 
197  VXLIB_bufParams2D_t *bufParamsIn0,
198  VXLIB_bufParams2D_t *bufParamsIn1,
199  VXLIB_bufParams2D_t *bufParamsOut);
200 
203 #endif /* VXLIB_ABSDIFF_IXX_IXX_OXX_PRIV_H_ */
VXLIB_STATUS VXLIB_absDiff_exec_cn(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
This function is the main execution function for the natural C implementation of the kernel....
VXLIB_STATUS VXLIB_absDiff_exec_ci(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
This function is the main execution function for the C7x implementation of the kernel....
VXLIB_STATUS VXLIB_absDiff_init_cn(VXLIB_kernelHandle handle, VXLIB_bufParams2D_t *bufParamsIn0, VXLIB_bufParams2D_t *bufParamsIn1, VXLIB_bufParams2D_t *bufParamsOut)
This function is the initialization function for the natural C implementation of the kernel....
#define VXLIB_ABSDIFF_IXX_IXX_OXX_PBLOCK_SIZE
Macro to define the size of bufPblock array of VXLIB_absDiff_PrivArgs structure.
VXLIB_STATUS VXLIB_absDiff_init_ci(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn0, const VXLIB_bufParams2D_t *bufParamsIn1, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_absDiff_InitArgs *pKerInitArgs)
This function is the initialization function for the C7x implementation of the kernel....
VXLIB_STATUS(* pFxnVXLIB_absDiff_exec)(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
This is a function pointer type that conforms to the declaration of VXLIB_absDiff_exec_ci and VXLIB_a...
void * VXLIB_kernelHandle
Handle type for VXLIB operations.
Definition: VXLIB_types.h:247
VXLIB_STATUS_NAME VXLIB_STATUS
Return value for VXLIB functions.
Definition: VXLIB_types.h:245
VXLIB_STATUS_NAME
The enumeration of all status codes.
Definition: VXLIB_types.h:220
Structure containing the parameters to initialize the kernel.
Definition: VXLIB_absDiff.h:78
Structure that is reserved for internal use by the kernel.
size_t numBlocks
Number of blocks to be processed after simidfication.
uint32_t height
Height of image
uint32_t strideIn1Elements
Stride of input1 in elements.
pFxnVXLIB_absDiff_exec execute
Function pointer to point to the right execution variant between VXLIB_absDiff_exec_cn and VXLIB_absD...
uint32_t strideIn0Elements
Stride of input0 in elements.
uint32_t width
Width of image
uint32_t strideOutElements
Stride of output in elements.
A structure for a 2 dimensional buffer descriptor.