Interface

Overview

Define your functions to override default implementations:

// typedefs

typedef uint32_t uint;
typedef signed char schar;
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef int64_t int64;
typedef uint64_t uint64;

// structs

struct cvhalDFT;

// global functions

int
hal_ni_dct2D(
    cvhalDFT* context,
    const uchar* src_data,
    size_t src_step,
    uchar* dst_data,
    size_t dst_step
    );

int
hal_ni_dctFree2D(cvhalDFT* context);

int
hal_ni_dctInit2D(
    cvhalDFT** context,
    int width,
    int height,
    int depth,
    int flags
    );

int
hal_ni_dft1D(
    cvhalDFT* context,
    const uchar* src,
    uchar* dst
    );

int
hal_ni_dft2D(
    cvhalDFT* context,
    const uchar* src_data,
    size_t src_step,
    uchar* dst_data,
    size_t dst_step
    );

int
hal_ni_dftFree1D(cvhalDFT* context);

int
hal_ni_dftFree2D(cvhalDFT* context);

int
hal_ni_dftInit1D(
    cvhalDFT** context,
    int len,
    int count,
    int depth,
    int flags,
    bool* needBuffer
    );

int
hal_ni_dftInit2D(
    cvhalDFT** context,
    int width,
    int height,
    int depth,
    int src_channels,
    int dst_channels,
    int flags,
    int nonzero_rows
    );

// macros

#define CV_16S
#define CV_16SC(n)
#define CV_16SC1
#define CV_16SC2
#define CV_16SC3
#define CV_16SC4
#define CV_16U
#define CV_16UC(n)
#define CV_16UC1
#define CV_16UC2
#define CV_16UC3
#define CV_16UC4
#define CV_32F
#define CV_32FC(n)
#define CV_32FC1
#define CV_32FC2
#define CV_32FC3
#define CV_32FC4
#define CV_32S
#define CV_32SC(n)
#define CV_32SC1
#define CV_32SC2
#define CV_32SC3
#define CV_32SC4
#define CV_64F
#define CV_64FC(n)
#define CV_64FC1
#define CV_64FC2
#define CV_64FC3
#define CV_64FC4
#define CV_8S
#define CV_8SC(n)
#define CV_8SC1
#define CV_8SC2
#define CV_8SC3
#define CV_8SC4
#define CV_8U
#define CV_8UC(n)
#define CV_8UC1
#define CV_8UC2
#define CV_8UC3
#define CV_8UC4
#define CV_BIG_INT(n)
#define CV_BIG_UINT(n)
#define CV_CN_MAX
#define CV_CN_SHIFT
#define CV_DEPTH_MAX
#define CV_HAL_BORDER_CONSTANT
#define CV_HAL_BORDER_ISOLATED
#define CV_HAL_BORDER_REFLECT
#define CV_HAL_BORDER_REFLECT_101
#define CV_HAL_BORDER_REPLICATE
#define CV_HAL_BORDER_TRANSPARENT
#define CV_HAL_BORDER_WRAP
#define CV_HAL_CMP_EQ
#define CV_HAL_CMP_GE
#define CV_HAL_CMP_GT
#define CV_HAL_CMP_LE
#define CV_HAL_CMP_LT
#define CV_HAL_CMP_NE
#define CV_HAL_DFT_COMPLEX_OUTPUT
#define CV_HAL_DFT_INVERSE
#define CV_HAL_DFT_IS_CONTINUOUS
#define CV_HAL_DFT_IS_INPLACE
#define CV_HAL_DFT_REAL_OUTPUT
#define CV_HAL_DFT_ROWS
#define CV_HAL_DFT_SCALE
#define CV_HAL_DFT_STAGE_COLS
#define CV_HAL_DFT_TWO_STAGE
#define CV_HAL_ERROR_NOT_IMPLEMENTED
#define CV_HAL_ERROR_OK
#define CV_HAL_ERROR_UNKNOWN
#define CV_HAL_GEMM_1_T
#define CV_HAL_GEMM_2_T
#define CV_HAL_GEMM_3_T
#define CV_HAL_SVD_FULL_UV
#define CV_HAL_SVD_MODIFY_A
#define CV_HAL_SVD_NO_UV
#define CV_HAL_SVD_SHORT_UV

#define CV_MAKETYPE( \
    depth, \
    cn \
    )

#define CV_MAKE_TYPE
#define CV_MAT_DEPTH(flags)
#define CV_MAT_DEPTH_MASK
#define CV_USRTYPE1

Detailed Documentation

Define your functions to override default implementations:

#undef hal_add8u
#define hal_add8u my_add8u

Global Functions

int
hal_ni_dct2D(
    cvhalDFT* context,
    const uchar* src_data,
    size_t src_step,
    uchar* dst_data,
    size_t dst_step
    )

Parameters:

context pointer to context storing all necessary data
src_data  
src_step source image data and step
dst_data  
dst_step destination image data and step
int
hal_ni_dctFree2D(cvhalDFT* context)

Parameters:

context pointer to context storing all necessary data
int
hal_ni_dctInit2D(
    cvhalDFT** context,
    int width,
    int height,
    int depth,
    int flags
    )

Parameters:

context double pointer to context storing all necessary data
width  
height image dimensions
depth image type (CV_32F or CV64F)
flags algorithm options (combination of CV_HAL_DFT_INVERSE, …)
int
hal_ni_dft1D(
    cvhalDFT* context,
    const uchar* src,
    uchar* dst
    )

Parameters:

context pointer to context storing all necessary data
src source data
dst destination data
int
hal_ni_dft2D(
    cvhalDFT* context,
    const uchar* src_data,
    size_t src_step,
    uchar* dst_data,
    size_t dst_step
    )

Parameters:

context pointer to context storing all necessary data
src_data  
src_step source image data and step
dst_data  
dst_step destination image data and step
int
hal_ni_dftFree1D(cvhalDFT* context)

Parameters:

context pointer to context storing all necessary data
int
hal_ni_dftFree2D(cvhalDFT* context)

Parameters:

context pointer to context storing all necessary data
int
hal_ni_dftInit1D(
    cvhalDFT** context,
    int len,
    int count,
    int depth,
    int flags,
    bool* needBuffer
    )

Parameters:

context double pointer to context storing all necessary data
len transformed array length
count estimated transformation count
depth array type (CV_32F or CV_64F)
flags algorithm options (combination of CV_HAL_DFT_INVERSE, CV_HAL_DFT_SCALE, …)
needBuffer pointer to boolean variable, if valid pointer provided, then variable value should be set to true to signal that additional memory buffer is needed for operations
int
hal_ni_dftInit2D(
    cvhalDFT** context,
    int width,
    int height,
    int depth,
    int src_channels,
    int dst_channels,
    int flags,
    int nonzero_rows
    )

Parameters:

context double pointer to context storing all necessary data
width  
height image dimensions
depth image type (CV_32F or CV64F)
src_channels number of channels in input image
dst_channels number of channels in output image
flags algorithm options (combination of CV_HAL_DFT_INVERSE, …)
nonzero_rows number of nonzero rows in image, can be used for optimization