📄 _cxipp.h
字号:
////////////////////////////////////// AbsDiff ///////////////////////////////////////////
#define IPCV_ABS_DIFF( flavor, arrtype ) \
IPCVAPI_EX( CvStatus, icvAbsDiff_##flavor##_C1R, \
"ippiAbsDiff_" #flavor "_C1R", CV_PLUGINS1(CV_PLUGIN_IPPCV),\
( const arrtype* src1, int srcstep1, \
const arrtype* src2, int srcstep2, \
arrtype* dst, int dststep, CvSize size ))
IPCV_ABS_DIFF( 8u, uchar )
IPCV_ABS_DIFF( 16u, ushort )
IPCV_ABS_DIFF( 16s, short )
IPCV_ABS_DIFF( 32s, int )
IPCV_ABS_DIFF( 32f, float )
IPCV_ABS_DIFF( 64f, double )
#undef IPCV_ABS_DIFF
////////////////////////////// Comparisons //////////////////////////////////////////
#define IPCV_CMP( arrtype, flavor ) \
IPCVAPI_EX( CvStatus, icvCompare_##flavor##_C1R, \
"ippiCompare_" #flavor "_C1R", CV_PLUGINS1(CV_PLUGIN_IPPI), \
( const arrtype* src1, int srcstep1, const arrtype* src2, int srcstep2, \
arrtype* dst, int dststep, CvSize size, int cmp_op )) \
IPCVAPI_EX( CvStatus, icvCompareC_##flavor##_C1R, \
"ippiCompareC_" #flavor "_C1R", CV_PLUGINS1(CV_PLUGIN_IPPI), \
( const arrtype* src1, int srcstep1, arrtype scalar, \
arrtype* dst, int dststep, CvSize size, int cmp_op )) \
IPCVAPI_EX( CvStatus, icvThreshold_GT_##flavor##_C1R, \
"ippiThreshold_GT_" #flavor "_C1R", CV_PLUGINS1(CV_PLUGIN_IPPI), \
( const arrtype* pSrc, int srcstep, arrtype* pDst, int dststep, \
CvSize size, arrtype threshold )) \
IPCVAPI_EX( CvStatus, icvThreshold_LT_##flavor##_C1R, \
"ippiThreshold_LT_" #flavor "_C1R", CV_PLUGINS1(CV_PLUGIN_IPPI), \
( const arrtype* pSrc, int srcstep, arrtype* pDst, int dststep, \
CvSize size, arrtype threshold ))
IPCV_CMP( uchar, 8u )
IPCV_CMP( short, 16s )
IPCV_CMP( float, 32f )
#undef IPCV_CMP
/****************************************************************************************\
* Utilities *
\****************************************************************************************/
////////////////////////////// Copy Pixel <-> Plane /////////////////////////////////
#define IPCV_PIX_PLANE( flavor, arrtype ) \
IPCVAPI_EX( CvStatus, icvCopy_##flavor##_C2P2R, \
"ippiCopy_" #flavor "_C2P2R", 0/*CV_PLUGINS1(CV_PLUGIN_IPPI)*/, \
( const arrtype* src, int srcstep, arrtype** dst, int dststep, CvSize size )) \
IPCVAPI_EX( CvStatus, icvCopy_##flavor##_C3P3R, \
"ippiCopy_" #flavor "_C3P3R", CV_PLUGINS1(CV_PLUGIN_IPPI), \
( const arrtype* src, int srcstep, arrtype** dst, int dststep, CvSize size )) \
IPCVAPI_EX( CvStatus, icvCopy_##flavor##_C4P4R, \
"ippiCopy_" #flavor "_C4P4R", CV_PLUGINS1(CV_PLUGIN_IPPI), \
( const arrtype* src, int srcstep, arrtype** dst, int dststep, CvSize size )) \
IPCVAPI_EX( CvStatus, icvCopy_##flavor##_CnC1CR, \
"ippiCopy_" #flavor "_CnC1CR", 0/*CV_PLUGINS1(CV_PLUGIN_OPTCV)*/, \
( const arrtype* src, int srcstep, arrtype* dst, int dststep, \
CvSize size, int cn, int coi )) \
IPCVAPI_EX( CvStatus, icvCopy_##flavor##_C1CnCR, \
"ippiCopy_" #flavor "_CnC1CR", 0/*CV_PLUGINS1(CV_PLUGIN_OPTCV)*/, \
( const arrtype* src, int srcstep, arrtype* dst, int dststep, \
CvSize size, int cn, int coi )) \
IPCVAPI_EX( CvStatus, icvCopy_##flavor##_P2C2R, \
"ippiCopy_" #flavor "_P2C2R", 0/*CV_PLUGINS1(CV_PLUGIN_IPPI)*/, \
( const arrtype** src, int srcstep, arrtype* dst, int dststep, CvSize size )) \
IPCVAPI_EX( CvStatus, icvCopy_##flavor##_P3C3R, \
"ippiCopy_" #flavor "_P3C3R", CV_PLUGINS1(CV_PLUGIN_IPPI), \
( const arrtype** src, int srcstep, arrtype* dst, int dststep, CvSize size )) \
IPCVAPI_EX( CvStatus, icvCopy_##flavor##_P4C4R, \
"ippiCopy_" #flavor "_P4C4R", CV_PLUGINS1(CV_PLUGIN_IPPI), \
( const arrtype** src, int srcstep, arrtype* dst, int dststep, CvSize size ))
IPCV_PIX_PLANE( 8u, uchar )
IPCV_PIX_PLANE( 16s, ushort )
IPCV_PIX_PLANE( 32f, int )
IPCV_PIX_PLANE( 64f, int64 )
#undef IPCV_PIX_PLANE
/****************************************************************************************/
/* Math routines and RNGs */
/****************************************************************************************/
IPCVAPI_EX( CvStatus, icvInvSqrt_32f, "ippsInvSqrt_32f_A21",
CV_PLUGINS1(CV_PLUGIN_IPPVM),
( const float* src, float* dst, int len ))
IPCVAPI_EX( CvStatus, icvSqrt_32f, "ippsSqrt_32f_A21, ippsSqrt_32f",
CV_PLUGINS2(CV_PLUGIN_IPPVM,CV_PLUGIN_IPPS),
( const float* src, float* dst, int len ))
IPCVAPI_EX( CvStatus, icvInvSqrt_64f, "ippsInvSqrt_64f_A50",
CV_PLUGINS1(CV_PLUGIN_IPPVM),
( const double* src, double* dst, int len ))
IPCVAPI_EX( CvStatus, icvSqrt_64f, "ippsSqrt_64f_A50, ippsSqrt_64f",
CV_PLUGINS2(CV_PLUGIN_IPPVM,CV_PLUGIN_IPPS),
( const double* src, double* dst, int len ))
IPCVAPI_EX( CvStatus, icvLog_32f, "ippsLn_32f_A21, ippsLn_32f",
CV_PLUGINS2(CV_PLUGIN_IPPVM,CV_PLUGIN_IPPS),
( const float *x, float *y, int n ) )
IPCVAPI_EX( CvStatus, icvLog_64f, "ippsLn_64f_A50, ippsLn_64f",
CV_PLUGINS2(CV_PLUGIN_IPPVM,CV_PLUGIN_IPPS),
( const double *x, double *y, int n ) )
IPCVAPI_EX( CvStatus, icvExp_32f, "ippsExp_32f_A21, ippsExp_32f",
CV_PLUGINS2(CV_PLUGIN_IPPVM,CV_PLUGIN_IPPS),
( const float *x, float *y, int n ) )
IPCVAPI_EX( CvStatus, icvExp_64f, "ippsExp_64f_A50, ippsExp_64f",
CV_PLUGINS2(CV_PLUGIN_IPPVM,CV_PLUGIN_IPPS),
( const double *x, double *y, int n ) )
IPCVAPI_EX( CvStatus, icvFastArctan_32f, "ippibFastArctan_32f",
CV_PLUGINS1(CV_PLUGIN_IPPCV),
( const float* y, const float* x, float* angle, int len ))
/****************************************************************************************/
/* Error handling functions */
/****************************************************************************************/
IPCVAPI_EX( CvStatus, icvCheckArray_32f_C1R,
"ippiCheckArray_32f_C1R", 0/*CV_PLUGINS1(CV_PLUGIN_OPTCV)*/,
( const float* src, int srcstep,
CvSize size, int flags,
double min_val, double max_val ))
IPCVAPI_EX( CvStatus, icvCheckArray_64f_C1R,
"ippiCheckArray_64f_C1R", 0/*CV_PLUGINS1(CV_PLUGIN_OPTCV)*/,
( const double* src, int srcstep,
CvSize size, int flags,
double min_val, double max_val ))
/****************************************************************************************/
/* Affine transformations of matrix/image elements */
/****************************************************************************************/
#define IPCV_TRANSFORM( suffix, ipp_suffix, cn ) \
IPCVAPI_EX( CvStatus, icvColorTwist##suffix##_C##cn##R, \
"ippiColorTwist" #ipp_suffix "_C" #cn \
"R,ippiColorTwist" #ipp_suffix "_C" #cn "R", \
CV_PLUGINS2(CV_PLUGIN_IPPI, CV_PLUGIN_IPPCC), \
( const void* src, int srcstep, void* dst, int dststep, \
CvSize roisize, const float* twist_matrix ))
IPCV_TRANSFORM( _8u, 32f_8u, 3 )
IPCV_TRANSFORM( _16u, 32f_16u, 3 )
IPCV_TRANSFORM( _16s, 32f_16s, 3 )
IPCV_TRANSFORM( _32f, _32f, 3 )
IPCV_TRANSFORM( _32f, _32f, 4 )
#undef IPCV_TRANSFORM
#define IPCV_TRANSFORM_N1( suffix ) \
IPCVAPI_EX( CvStatus, icvColorToGray##suffix, \
"ippiColorToGray" #suffix ",ippiColorToGray" #suffix, \
CV_PLUGINS2(CV_PLUGIN_IPPI,CV_PLUGIN_IPPCC), \
( const void* src, int srcstep, void* dst, int dststep, \
CvSize roisize, const float* coeffs ))
IPCV_TRANSFORM_N1( _8u_C3C1R )
IPCV_TRANSFORM_N1( _16u_C3C1R )
IPCV_TRANSFORM_N1( _16s_C3C1R )
IPCV_TRANSFORM_N1( _32f_C3C1R )
IPCV_TRANSFORM_N1( _8u_AC4C1R )
IPCV_TRANSFORM_N1( _16u_AC4C1R )
IPCV_TRANSFORM_N1( _16s_AC4C1R )
IPCV_TRANSFORM_N1( _32f_AC4C1R )
#undef IPCV_TRANSFORM_N1
/****************************************************************************************/
/* Matrix routines from BLAS/LAPACK compatible libraries */
/****************************************************************************************/
IPCVAPI_C_EX( void, icvBLAS_GEMM_32f, "sgemm, mkl_sgemm", CV_PLUGINS2(CV_PLUGIN_MKL,CV_PLUGIN_MKL),
(const char *transa, const char *transb, int *n, int *m, int *k,
const void *alpha, const void *a, int *lda, const void *b, int *ldb,
const void *beta, void *c, int *ldc ))
IPCVAPI_C_EX( void, icvBLAS_GEMM_64f, "dgemm, mkl_dgemm", CV_PLUGINS2(CV_PLUGIN_MKL,CV_PLUGIN_MKL),
(const char *transa, const char *transb, int *n, int *m, int *k,
const void *alpha, const void *a, int *lda, const void *b, int *ldb,
const void *beta, void *c, int *ldc ))
IPCVAPI_C_EX( void, icvBLAS_GEMM_32fc, "cgemm, mkl_cgemm", CV_PLUGINS2(CV_PLUGIN_MKL,CV_PLUGIN_MKL),
(const char *transa, const char *transb, int *n, int *m, int *k,
const void *alpha, const void *a, int *lda, const void *b, int *ldb,
const void *beta, void *c, int *ldc ))
IPCVAPI_C_EX( void, icvBLAS_GEMM_64fc, "zgemm, mkl_zgemm", CV_PLUGINS2(CV_PLUGIN_MKL,CV_PLUGIN_MKL),
(const char *transa, const char *transb, int *n, int *m, int *k,
const void *alpha, const void *a, int *lda, const void *b, int *ldb,
const void *beta, void *c, int *ldc ))
#define IPCV_DFT( init_flavor, fwd_flavor, inv_flavor ) \
IPCVAPI_EX( CvStatus, icvDFTInitAlloc_##init_flavor, "ippsDFTInitAlloc_" #init_flavor, \
CV_PLUGINS1(CV_PLUGIN_IPPS), ( void**, int, int, CvHintAlgorithm )) \
\
IPCVAPI_EX( CvStatus, icvDFTFree_##init_flavor, "ippsDFTFree_" #init_flavor, \
CV_PLUGINS1(CV_PLUGIN_IPPS), ( void* )) \
\
IPCVAPI_EX( CvStatus, icvDFTGetBufSize_##init_flavor, "ippsDFTGetBufSize_" #init_flavor,\
CV_PLUGINS1(CV_PLUGIN_IPPS), ( const void* spec, int* buf_size )) \
\
IPCVAPI_EX( CvStatus, icvDFTFwd_##fwd_flavor, "ippsDFTFwd_" #fwd_flavor, \
CV_PLUGINS1(CV_PLUGIN_IPPS), ( const void* src, void* dst, \
const void* spec, void* buffer )) \
\
IPCVAPI_EX( CvStatus, icvDFTInv_##inv_flavor, "ippsDFTInv_" #inv_flavor, \
CV_PLUGINS1(CV_PLUGIN_IPPS), ( const void* src, void* dst, \
const void* spec, void* buffer ))
IPCV_DFT( C_32fc, CToC_32fc, CToC_32fc )
IPCV_DFT( R_32f, RToPack_32f, PackToR_32f )
IPCV_DFT( C_64fc, CToC_64fc, CToC_64fc )
IPCV_DFT( R_64f, RToPack_64f, PackToR_64f )
#undef IPCV_DFT
#endif /*_CXCORE_IPP_H_*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -