icv: enable functions

pull/2679/head
Alexander Alekhin 11 years ago
parent 5658ba0002
commit b62e59aac0
  1. 2
      modules/calib3d/src/stereosgbm.cpp
  2. 12
      modules/core/src/arithm.cpp
  3. 6
      modules/core/src/convert.cpp
  4. 12
      modules/core/src/copy.cpp
  5. 8
      modules/core/src/dxt.cpp
  6. 16
      modules/core/src/mathfuncs.cpp
  7. 14
      modules/core/src/matrix.cpp
  8. 4
      modules/core/src/stat.cpp
  9. 8
      modules/imgproc/src/accum.cpp
  10. 16
      modules/imgproc/src/color.cpp
  11. 2
      modules/imgproc/src/corner.cpp
  12. 25
      modules/imgproc/src/deriv.cpp
  13. 6
      modules/imgproc/src/distransform.cpp
  14. 4
      modules/imgproc/src/histogram.cpp
  15. 4
      modules/imgproc/src/imgwarp.cpp
  16. 2
      modules/imgproc/src/moments.cpp
  17. 4
      modules/imgproc/src/morph.cpp
  18. 6
      modules/imgproc/src/pyramids.cpp
  19. 7
      modules/imgproc/src/smooth.cpp
  20. 6
      modules/imgproc/src/templmatch.cpp
  21. 8
      modules/imgproc/src/thresh.cpp
  22. 6
      modules/video/src/motempl.cpp

@ -1084,7 +1084,7 @@ void cv::filterSpeckles( InputOutputArray _img, double _newval, int maxSpeckleSi
int newVal = cvRound(_newval), maxDiff = cvRound(_maxDiff);
#if IPP_VERSION_X100 >= 801 && !defined HAVE_IPP_ICV_ONLY
#if IPP_VERSION_X100 >= 801
Ipp32s bufsize = 0;
IppiSize roisize = { img.cols, img.rows };
IppDataType datatype = type == CV_8UC1 ? ipp8u : ipp16s;

@ -705,7 +705,7 @@ static void max64f( const double* src1, size_t step1,
const double* src2, size_t step2,
double* dst, size_t step, Size sz, void* )
{
#if ARITHM_USE_IPP == 1 && !defined HAVE_IPP_ICV_ONLY
#if ARITHM_USE_IPP == 1
double* s1 = (double*)src1;
double* s2 = (double*)src2;
double* d = dst;
@ -826,7 +826,7 @@ static void min64f( const double* src1, size_t step1,
const double* src2, size_t step2,
double* dst, size_t step, Size sz, void* )
{
#if ARITHM_USE_IPP == 1 && !defined HAVE_IPP_ICV_ONLY
#if ARITHM_USE_IPP == 1
double* s1 = (double*)src1;
double* s2 = (double*)src2;
double* d = dst;
@ -2014,7 +2014,7 @@ static void mul8u( const uchar* src1, size_t step1, const uchar* src2, size_t st
uchar* dst, size_t step, Size sz, void* scale)
{
float fscale = (float)*(const double*)scale;
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
#if defined HAVE_IPP
if (std::fabs(fscale - 1) <= FLT_EPSILON)
{
if (ippiMul_8u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz), 0) >= 0)
@ -2035,7 +2035,7 @@ static void mul16u( const ushort* src1, size_t step1, const ushort* src2, size_t
ushort* dst, size_t step, Size sz, void* scale)
{
float fscale = (float)*(const double*)scale;
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
#if defined HAVE_IPP
if (std::fabs(fscale - 1) <= FLT_EPSILON)
{
if (ippiMul_16u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz), 0) >= 0)
@ -2050,7 +2050,7 @@ static void mul16s( const short* src1, size_t step1, const short* src2, size_t s
short* dst, size_t step, Size sz, void* scale)
{
float fscale = (float)*(const double*)scale;
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
#if defined HAVE_IPP
if (std::fabs(fscale - 1) <= FLT_EPSILON)
{
if (ippiMul_16s_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz), 0) >= 0)
@ -2071,7 +2071,7 @@ static void mul32f( const float* src1, size_t step1, const float* src2, size_t s
float* dst, size_t step, Size sz, void* scale)
{
float fscale = (float)*(const double*)scale;
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
#if defined HAVE_IPP
if (std::fabs(fscale - 1) <= FLT_EPSILON)
{
if (ippiMul_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)) >= 0)

@ -1079,7 +1079,7 @@ dtype* dst, size_t dstep, Size size, double* scale) \
cvtScale_(src, sstep, dst, dstep, size, (wtype)scale[0], (wtype)scale[1]); \
}
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
#define DEF_CVT_FUNC_F(suffix, stype, dtype, ippFavor) \
static void cvt##suffix( const stype* src, size_t sstep, const uchar*, size_t, \
dtype* dst, size_t dstep, Size size, double*) \
@ -1564,7 +1564,7 @@ static bool ocl_LUT(InputArray _src, InputArray _lut, OutputArray _dst)
#endif
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
namespace ipp {
#if 0 // there are no performance benefits (PR #2653)
@ -1781,7 +1781,7 @@ void cv::LUT( InputArray _src, InputArray _lut, OutputArray _dst )
{
bool ok = false;
Ptr<ParallelLoopBody> body;
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
size_t elemSize1 = CV_ELEM_SIZE1(dst.depth());
#if 0 // there are no performance benefits (PR #2653)
if (lutcn == 1)

@ -81,7 +81,7 @@ copyMask_(const uchar* _src, size_t sstep, const uchar* mask, size_t mstep, ucha
template<> void
copyMask_<uchar>(const uchar* _src, size_t sstep, const uchar* mask, size_t mstep, uchar* _dst, size_t dstep, Size size)
{
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
#if defined HAVE_IPP
if (ippiCopy_8u_C1MR(_src, (int)sstep, _dst, (int)dstep, ippiSize(size), mask, (int)mstep) >= 0)
return;
setIppErrorStatus();
@ -117,7 +117,7 @@ copyMask_<uchar>(const uchar* _src, size_t sstep, const uchar* mask, size_t mste
template<> void
copyMask_<ushort>(const uchar* _src, size_t sstep, const uchar* mask, size_t mstep, uchar* _dst, size_t dstep, Size size)
{
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
#if defined HAVE_IPP
if (ippiCopy_16u_C1MR((const Ipp16u *)_src, (int)sstep, (Ipp16u *)_dst, (int)dstep, ippiSize(size), mask, (int)mstep) >= 0)
return;
setIppErrorStatus();
@ -177,7 +177,7 @@ static void copyMask##suffix(const uchar* src, size_t sstep, const uchar* mask,
copyMask_<type>(src, sstep, mask, mstep, dst, dstep, size); \
}
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
#if defined HAVE_IPP
#define DEF_COPY_MASK_F(suffix, type, ippfavor, ipptype) \
static void copyMask##suffix(const uchar* src, size_t sstep, const uchar* mask, size_t mstep, \
uchar* dst, size_t dstep, Size size, void*) \
@ -281,7 +281,7 @@ void Mat::copyTo( OutputArray _dst ) const
Size sz = getContinuousSize(*this, dst);
size_t len = sz.width*elemSize();
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
#if defined HAVE_IPP
if (ippiCopy_8u_C1R(sptr, (int)step, dptr, (int)dst.step, ippiSize((int)len, sz.height)) >= 0)
return;
setIppErrorStatus();
@ -419,7 +419,7 @@ Mat& Mat::setTo(InputArray _value, InputArray _mask)
CV_Assert( checkScalar(value, type(), _value.kind(), _InputArray::MAT ));
CV_Assert( mask.empty() || (mask.type() == CV_8U && size == mask.size) );
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
#if defined HAVE_IPP
int cn = channels(), depth0 = depth();
if (!mask.empty() && (dims <= 2 || (isContinuous() && mask.isContinuous())) &&
@ -681,7 +681,7 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
Mat dst = _dst.getMat();
size_t esz = CV_ELEM_SIZE(type);
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
#if defined HAVE_IPP
typedef IppStatus (CV_STDCALL * ippiMirror)(const void * pSrc, int srcStep, void * pDst, int dstStep, IppiSize roiSize, IppiAxis flip);
typedef IppStatus (CV_STDCALL * ippiMirrorI)(const void * pSrcDst, int srcDstStep, IppiSize roiSize, IppiAxis flip);
ippiMirror ippFunc = 0;

@ -53,7 +53,7 @@ namespace cv
# pragma warning(disable: 4748)
#endif
#if IPP_VERSION_X100 >= 701 && !defined(HAVE_IPP_ICV_ONLY)
#if IPP_VERSION_X100 >= 701
#define USE_IPP_DFT 1
#else
#undef USE_IPP_DFT
@ -1478,7 +1478,7 @@ typedef IppStatus (CV_STDCALL* IppDFTInitFunc)(int, int, IppHintAlgorithm, void*
namespace cv
{
#if defined USE_IPP_DFT && !defined HAVE_IPP_ICV_ONLY
#if defined USE_IPP_DFT
typedef IppStatus (CV_STDCALL* ippiDFT_C_Func)(const Ipp32fc*, int, Ipp32fc*, int, const IppiDFTSpec_C_32fc*, Ipp8u*);
typedef IppStatus (CV_STDCALL* ippiDFT_R_Func)(const Ipp32f* , int, Ipp32f* , int, const IppiDFTSpec_R_32f* , Ipp8u*);
@ -2063,9 +2063,10 @@ void cv::dft( InputArray _src0, OutputArray _dst, int flags, int nonzero_rows )
Mat dst = _dst.getMat();
#if defined USE_IPP_DFT && !defined HAVE_IPP_ICV_ONLY
#if defined USE_IPP_DFT
if ((src.depth() == CV_32F) && (src.total()>(int)(1<<6)) && nonzero_rows == 0)
{
if ((flags & DFT_ROWS) == 0)
{
if (!real_transform)
@ -2098,6 +2099,7 @@ void cv::dft( InputArray _src0, OutputArray _dst, int flags, int nonzero_rows )
setIppErrorStatus();
}
}
}
#endif
if( !real_transform )

@ -237,7 +237,7 @@ float cubeRoot( float value )
static void Magnitude_32f(const float* x, const float* y, float* mag, int len)
{
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
IppStatus status = ippsMagnitude_32f(x, y, mag, len);
if (status >= 0)
return;
@ -270,7 +270,7 @@ static void Magnitude_32f(const float* x, const float* y, float* mag, int len)
static void Magnitude_64f(const double* x, const double* y, double* mag, int len)
{
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
IppStatus status = ippsMagnitude_64f(x, y, mag, len);
if (status >= 0)
return;
@ -304,7 +304,7 @@ static void Magnitude_64f(const double* x, const double* y, double* mag, int len
static void InvSqrt_32f(const float* src, float* dst, int len)
{
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
if (ippsInvSqrt_32f_A21(src, dst, len) >= 0)
return;
setIppErrorStatus();
@ -353,7 +353,7 @@ static void InvSqrt_64f(const double* src, double* dst, int len)
static void Sqrt_32f(const float* src, float* dst, int len)
{
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
if (ippsSqrt_32f_A21(src, dst, len) >= 0)
return;
setIppErrorStatus();
@ -387,7 +387,7 @@ static void Sqrt_32f(const float* src, float* dst, int len)
static void Sqrt_64f(const double* src, double* dst, int len)
{
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
if (ippsSqrt_64f_A50(src, dst, len) >= 0)
return;
setIppErrorStatus();
@ -759,7 +759,7 @@ void polarToCart( InputArray src1, InputArray src2,
dst2.create( Angle.dims, Angle.size, type );
Mat X = dst1.getMat(), Y = dst2.getMat();
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
if (Mag.isContinuous() && Angle.isContinuous() && X.isContinuous() && Y.isContinuous() && !angleInDegrees)
{
typedef IppStatus (CV_STDCALL * ippsPolarToCart)(const void * pSrcMagn, const void * pSrcPhase,
@ -2170,7 +2170,7 @@ void pow( InputArray _src, double power, OutputArray _dst )
_src.copyTo(_dst);
return;
case 2:
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
if (depth == CV_32F && !same && ( (_src.dims() <= 2 && !ocl::useOpenCL()) || (_src.dims() > 2 && _src.isContinuous() && _dst.isContinuous()) ))
{
Mat src = _src.getMat();
@ -2243,7 +2243,7 @@ void pow( InputArray _src, double power, OutputArray _dst )
}
else
{
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
if (src.isContinuous() && dst.isContinuous())
{
IppStatus status = depth == CV_32F ?

@ -3019,7 +3019,7 @@ void cv::transpose( InputArray _src, OutputArray _dst )
return;
}
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
#if defined HAVE_IPP
typedef IppStatus (CV_STDCALL * ippiTranspose)(const void * pSrc, int srcStep, void * pDst, int dstStep, IppiSize roiSize);
typedef IppStatus (CV_STDCALL * ippiTransposeI)(const void * pSrcDst, int srcDstStep, IppiSize roiSize);
ippiTranspose ippFunc = 0;
@ -3268,7 +3268,7 @@ typedef void (*ReduceFunc)( const Mat& src, Mat& dst );
#define reduceMinR32f reduceR_<float, float, OpMin<float> >
#define reduceMinR64f reduceR_<double,double,OpMin<double> >
#if IPP_VERSION_X100 > 0 && !defined HAVE_IPP_ICV_ONLY
#if IPP_VERSION_X100 > 0
static inline void reduceSumC_8u16u16s32f_64f(const cv::Mat& srcmat, cv::Mat& dstmat)
{
@ -3342,7 +3342,7 @@ static inline void reduceSumC_8u16u16s32f_64f(const cv::Mat& srcmat, cv::Mat& ds
#define reduceSumC32f32f reduceC_<float, float, OpAdd<float> >
#define reduceSumC64f64f reduceC_<double,double,OpAdd<double> >
#if IPP_VERSION_X100 > 0 && !defined HAVE_IPP_ICV_ONLY
#if IPP_VERSION_X100 > 0
#define reduceSumC8u64f reduceSumC_8u16u16s32f_64f
#define reduceSumC16u64f reduceSumC_8u16u16s32f_64f
#define reduceSumC16s64f reduceSumC_8u16u16s32f_64f
@ -3354,7 +3354,7 @@ static inline void reduceSumC_8u16u16s32f_64f(const cv::Mat& srcmat, cv::Mat& ds
#define reduceSumC32f64f reduceC_<float, double,OpAdd<double> >
#endif
#if IPP_VERSION_X100 > 0 && !defined HAVE_IPP_ICV_ONLY
#if IPP_VERSION_X100 > 0
#define REDUCE_OP(favor, optype, type1, type2) \
static inline void reduce##optype##C##favor(const cv::Mat& srcmat, cv::Mat& dstmat) \
{ \
@ -3378,7 +3378,7 @@ static inline void reduce##optype##C##favor(const cv::Mat& srcmat, cv::Mat& dstm
}
#endif
#if IPP_VERSION_X100 > 0 && !defined HAVE_IPP_ICV_ONLY
#if IPP_VERSION_X100 > 0
REDUCE_OP(8u, Max, uchar, uchar)
REDUCE_OP(16u, Max, ushort, ushort)
REDUCE_OP(16s, Max, short, short)
@ -3391,7 +3391,7 @@ REDUCE_OP(32f, Max, float, float)
#endif
#define reduceMaxC64f reduceC_<double,double,OpMax<double> >
#if IPP_VERSION_X100 > 0 && !defined HAVE_IPP_ICV_ONLY
#if IPP_VERSION_X100 > 0
REDUCE_OP(8u, Min, uchar, uchar)
REDUCE_OP(16u, Min, ushort, ushort)
REDUCE_OP(16s, Min, short, short)
@ -3614,7 +3614,7 @@ void cv::reduce(InputArray _src, OutputArray _dst, int dim, int op, int dtype)
namespace cv
{
#if IPP_VERSION_X100 > 0 && !defined HAVE_IPP_ICV_ONLY
#if IPP_VERSION_X100 > 0
#define USE_IPP_SORT
typedef IppStatus (CV_STDCALL *IppSortFunc)(void *, int);

@ -1383,9 +1383,7 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
CV_SUPPRESS_DEPRECATED_START
ippiMaskMinMaxIndxFuncC1 ippFuncC1 =
type == CV_8UC1 ? (ippiMaskMinMaxIndxFuncC1)ippiMinMaxIndx_8u_C1MR :
#ifndef HAVE_IPP_ICV_ONLY
type == CV_8SC1 ? (ippiMaskMinMaxIndxFuncC1)ippiMinMaxIndx_8s_C1MR :
#endif
type == CV_16UC1 ? (ippiMaskMinMaxIndxFuncC1)ippiMinMaxIndx_16u_C1MR :
type == CV_32FC1 ? (ippiMaskMinMaxIndxFuncC1)ippiMinMaxIndx_32f_C1MR : 0;
CV_SUPPRESS_DEPRECATED_END
@ -1424,9 +1422,7 @@ void cv::minMaxIdx(InputArray _src, double* minVal,
CV_SUPPRESS_DEPRECATED_START
ippiMinMaxIndxFuncC1 ippFuncC1 =
depth == CV_8U ? (ippiMinMaxIndxFuncC1)ippiMinMaxIndx_8u_C1R :
#ifndef HAVE_IPP_ICV_ONLY
depth == CV_8S ? (ippiMinMaxIndxFuncC1)ippiMinMaxIndx_8s_C1R :
#endif
depth == CV_16U ? (ippiMinMaxIndxFuncC1)ippiMinMaxIndx_16u_C1R :
depth == CV_32F ? (ippiMinMaxIndxFuncC1)ippiMinMaxIndx_32f_C1R : 0;
CV_SUPPRESS_DEPRECATED_END

@ -431,7 +431,7 @@ void cv::accumulate( InputArray _src, InputOutputArray _dst, InputArray _mask )
Mat src = _src.getMat(), dst = _dst.getMat(), mask = _mask.getMat();
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
#if defined HAVE_IPP
if (src.dims <= 2 || (src.isContinuous() && dst.isContinuous() && (mask.empty() || mask.isContinuous())))
{
typedef IppStatus (CV_STDCALL * ippiAdd)(const void * pSrc, int srcStep, Ipp32f * pSrcDst, int srcdstStep, IppiSize roiSize);
@ -510,7 +510,7 @@ void cv::accumulateSquare( InputArray _src, InputOutputArray _dst, InputArray _m
Mat src = _src.getMat(), dst = _dst.getMat(), mask = _mask.getMat();
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
if (src.dims <= 2 || (src.isContinuous() && dst.isContinuous() && (mask.empty() || mask.isContinuous())))
{
typedef IppStatus (CV_STDCALL * ippiAddSquare)(const void * pSrc, int srcStep, Ipp32f * pSrcDst, int srcdstStep, IppiSize roiSize);
@ -589,7 +589,7 @@ void cv::accumulateProduct( InputArray _src1, InputArray _src2,
Mat src1 = _src1.getMat(), src2 = _src2.getMat(), dst = _dst.getMat(), mask = _mask.getMat();
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
if (src1.dims <= 2 || (src1.isContinuous() && src2.isContinuous() && dst.isContinuous()))
{
typedef IppStatus (CV_STDCALL * ippiAddProduct)(const void * pSrc1, int src1Step, const void * pSrc2,
@ -670,7 +670,7 @@ void cv::accumulateWeighted( InputArray _src, InputOutputArray _dst,
Mat src = _src.getMat(), dst = _dst.getMat(), mask = _mask.getMat();
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
if (src.dims <= 2 || (src.isContinuous() && dst.isContinuous() && mask.isContinuous()))
{
typedef IppStatus (CV_STDCALL * ippiAddWeighted)(const void * pSrc, int srcStep, Ipp32f * pSrcDst, int srcdstStep,

@ -300,7 +300,7 @@ static ippiReorderFunc ippiSwapChannelsC3RTab[] =
0, (ippiReorderFunc)ippiSwapChannels_32f_C3R, 0, 0
};
#if !defined(HAVE_IPP_ICV_ONLY) && IPP_VERSION_X100 >= 801
#if IPP_VERSION_X100 >= 801
static ippiReorderFunc ippiSwapChannelsC4RTab[] =
{
(ippiReorderFunc)ippiSwapChannels_8u_C4R, 0, (ippiReorderFunc)ippiSwapChannels_16u_C4R, 0,
@ -3314,7 +3314,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
return;
setIppErrorStatus();
}
#if !defined(HAVE_IPP_ICV_ONLY) && (IPP_VERSION_X100 >= 801)
#if IPP_VERSION_X100 >= 801
else if( code == CV_RGBA2BGRA )
{
if( CvtColorIPPLoopCopy(src, dst, IPPReorderFunctor(ippiSwapChannelsC4RTab[depth], 2, 1, 0)) )
@ -3343,7 +3343,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
_dst.create(sz, CV_8UC2);
dst = _dst.getMat();
#if defined HAVE_IPP && !defined(HAVE_IPP_ICV_ONLY)
#ifdef HAVE_IPP
CV_SUPPRESS_DEPRECATED_START
#if 0
if (code == CV_BGR2BGR565 && scn == 3)
@ -3400,7 +3400,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
_dst.create(sz, CV_MAKETYPE(depth, dcn));
dst = _dst.getMat();
#if defined HAVE_IPP && !defined(HAVE_IPP_ICV_ONLY)
#ifdef HAVE_IPP
CV_SUPPRESS_DEPRECATED_START
if (code == CV_BGR5652BGR && dcn == 3)
{
@ -3919,7 +3919,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
_dst.create(sz, CV_MAKETYPE(depth, 3));
dst = _dst.getMat();
#if defined HAVE_IPP && !defined(HAVE_IPP_ICV_ONLY)
#ifdef HAVE_IPP
#if 0
if (code == CV_LBGR2Lab && scn == 3 && depth == CV_8U)
{
@ -4012,8 +4012,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
_dst.create(sz, CV_MAKETYPE(depth, dcn));
dst = _dst.getMat();
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if 0
#if defined(HAVE_IPP) && 0
if( code == CV_Lab2LBGR && dcn == 3 && depth == CV_8U)
{
if( CvtColorIPPLoop(src, dst, IPPGeneralFunctor((ippiGeneralFunc)ippiLabToBGR_8u_C3R)) )
@ -4064,7 +4063,6 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
ippiSwapChannelsC3C4RTab[depth], 2, 1, 0, depth)) )
return;
}
#endif
#endif
if( code == CV_Lab2BGR || code == CV_Lab2RGB ||
@ -4264,7 +4262,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
if( depth == CV_8U )
{
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
if (CvtColorIPPLoop(src, dst, IPPGeneralFunctor((ippiGeneralFunc)ippiAlphaPremul_8u_AC4R)))
return;
setIppErrorStatus();

@ -473,7 +473,7 @@ void cv::cornerHarris( InputArray _src, OutputArray _dst, int blockSize, int ksi
_dst.create( src.size(), CV_32FC1 );
Mat dst = _dst.getMat();
#if IPP_VERSION_X100 >= 801 && !defined HAVE_IPP_ICV_ONLY
#if IPP_VERSION_X100 >= 801
int type = src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
int borderTypeNI = borderType & ~BORDER_ISOLATED;
bool isolated = (borderType & BORDER_ISOLATED) != 0;

@ -189,13 +189,9 @@ cv::Ptr<cv::FilterEngine> cv::createDerivFilter(int srcType, int dstType,
namespace cv
{
#if (IPP_VERSION_X100 >= 801)
#if IPP_VERSION_X100 >= 801
static bool IPPDerivScharr(InputArray _src, OutputArray _dst, int ddepth, int dx, int dy, double scale, double delta, int borderType)
{
#if defined(HAVE_IPP_ICV_ONLY)
(void)_src; (void)_dst; (void)ddepth; (void)dx; (void)dy; (void)scale; (void)delta; (void)borderType;
return false;
#else
if ((0 > dx) || (0 > dy) || (1 != dx + dy))
return false;
if (fabs(delta) > FLT_EPSILON)
@ -306,9 +302,8 @@ static bool IPPDerivScharr(InputArray _src, OutputArray _dst, int ddepth, int dx
sts = ippiMulC_32f_C1R((Ipp32f *)dst.data, (int)dst.step, (Ipp32f)scale, (Ipp32f *)dst.data, (int)dst.step, roiSize);
}
return (0 <= sts);
#endif
}
#elif (IPP_VERSION_MAJOR >= 7)
#elif IPP_VERSION_X100 >= 700
static bool IPPDerivScharr(InputArray _src, OutputArray _dst, int ddepth, int dx, int dy, double scale, double delta, int borderType)
{
if (BORDER_REPLICATE != borderType)
@ -363,9 +358,6 @@ static bool IPPDerivScharr(InputArray _src, OutputArray _dst, int ddepth, int dx
}
}
case CV_32FC1:
#if defined(HAVE_IPP_ICV_ONLY) // N/A: ippiMulC_32f_C1R
return false;
#else
{
switch(dst.type())
{
@ -410,7 +402,6 @@ static bool IPPDerivScharr(InputArray _src, OutputArray _dst, int ddepth, int dx
return false;
}
}
#endif
default:
return false;
}
@ -460,9 +451,7 @@ static bool IPPDerivSobel(InputArray _src, OutputArray _dst, int ddepth, int dx,
return true;
}
#if defined(HAVE_IPP_ICV_ONLY)
return false;
#else
#if !defined(HAVE_IPP_ICV_ONLY)
if ((dx == 2) && (dy == 0))
{
if (0 > ippiFilterSobelVertSecondGetBufferSize_8u16s_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize))
@ -493,9 +482,6 @@ static bool IPPDerivSobel(InputArray _src, OutputArray _dst, int ddepth, int dx,
if (src.type() == CV_32F && dst.type() == CV_32F)
{
#if defined(HAVE_IPP_ICV_ONLY) // N/A: ippiMulC_32f_C1R
return false;
#else
#if 0
if ((dx == 1) && (dy == 0))
{
@ -526,6 +512,7 @@ static bool IPPDerivSobel(InputArray _src, OutputArray _dst, int ddepth, int dx,
return true;
}
#endif
#if !defined(HAVE_IPP_ICV_ONLY)
if((dx == 2) && (dy == 0))
{
if (0 > ippiFilterSobelVertSecondGetBufferSize_32f_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize))
@ -585,7 +572,7 @@ void cv::Sobel( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy,
}
#endif
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
#ifdef HAVE_IPP
if (ksize < 0)
{
if (IPPDerivScharr(_src, _dst, ddepth, dx, dy, scale, delta, borderType))
@ -713,7 +700,7 @@ void cv::Laplacian( InputArray _src, OutputArray _dst, int ddepth, int ksize,
ddepth = sdepth;
_dst.create( _src.size(), CV_MAKETYPE(ddepth, cn) );
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
#ifdef HAVE_IPP
if ((ksize == 3 || ksize == 5) && ((borderType & BORDER_ISOLATED) != 0 || !_src.isSubmatrix()) &&
((stype == CV_8UC1 && ddepth == CV_16S) || (ddepth == CV_32F && stype == CV_32FC1)))
{

@ -688,7 +688,7 @@ static void distanceTransform_L1_8U(InputArray _src, OutputArray _dst)
_dst.create( src.size(), CV_8UC1);
Mat dst = _dst.getMat();
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) && !defined HAVE_IPP_ICV_ONLY
#ifdef HAVE_IPP
IppiSize roi = { src.cols, src.rows };
Ipp32s pMetrics[2] = { 1, 2 }; //L1, 3x3 mask
if (ippiDistanceTransform_3x3_8u_C1R(src.ptr<uchar>(), (int)src.step, dst.ptr<uchar>(), (int)dst.step, roi, pMetrics)>=0)
@ -734,7 +734,7 @@ void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labe
if( maskSize == CV_DIST_MASK_PRECISE )
{
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
#ifdef HAVE_IPP
if ((currentParallelFramework()==NULL) || (src.total()<(int)(1<<14)))
{
IppStatus status;
@ -773,7 +773,7 @@ void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labe
{
if( maskSize == CV_DIST_MASK_3 )
{
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) && !defined HAVE_IPP_ICV_ONLY
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
IppiSize roi = { src.cols, src.rows };
if (ippiDistanceTransform_3x3_8u32f_C1R(src.ptr<uchar>(), (int)src.step, dst.ptr<float>(), (int)dst.step, roi, _mask)>=0)
return;

@ -1175,7 +1175,7 @@ calcHist_8u( std::vector<uchar*>& _ptrs, const std::vector<int>& _deltas,
}
}
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
#ifdef HAVE_IPP
class IPPCalcHistInvoker :
public ParallelLoopBody
@ -1232,7 +1232,7 @@ void cv::calcHist( const Mat* images, int nimages, const int* channels,
Mat hist = _hist.getMat(), ihist = hist;
ihist.flags = (ihist.flags & ~CV_MAT_TYPE_MASK)|CV_32S;
#if defined HAVE_IPP && !defined HAVE_IPP_ICV_ONLY
#ifdef HAVE_IPP
if (nimages == 1 && images[0].type() == CV_8UC1 && dims == 1 && channels &&
channels[0] == 0 && mask.empty() && images[0].dims <= 2 &&
!accumulate && uniform)

@ -1911,7 +1911,7 @@ static int computeResizeAreaTab( int ssize, int dsize, int cn, double scale, Dec
getBufferSizeFunc = (ippiResizeGetBufferSize)ippiResizeGetBufferSize_##TYPE; \
getSrcOffsetFunc = (ippiResizeGetSrcOffset)ippiResizeGetSrcOffset_##TYPE;
#if !defined(HAVE_IPP_ICV_ONLY) && IPP_VERSION_X100 >= 701
#if IPP_VERSION_X100 >= 701
class IPPresizeInvoker :
public ParallelLoopBody
{
@ -2395,7 +2395,7 @@ void cv::resize( InputArray _src, OutputArray _dst, Size dsize,
double scale_x = 1./inv_scale_x, scale_y = 1./inv_scale_y;
int k, sx, sy, dx, dy;
#if !defined(HAVE_IPP_ICV_ONLY) && IPP_VERSION_X100 >= 701
#if IPP_VERSION_X100 >= 701
#define IPP_RESIZE_EPS 1e-10
double ex = fabs((double)dsize.width / src.cols - inv_scale_x) / inv_scale_x;

@ -462,7 +462,7 @@ cv::Moments cv::moments( InputArray _src, bool binary )
if( cn > 1 )
CV_Error( CV_StsBadArg, "Invalid image type (must be single-channel)" );
#if IPP_VERSION_X100 >= 801 && !defined HAVE_IPP_ICV_ONLY
#if IPP_VERSION_X100 >= 801
if (!binary)
{
IppiSize roi = { mat.cols, mat.rows };

@ -1228,9 +1228,6 @@ static bool IPPMorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kerne
}
else
{
#if defined(HAVE_IPP_ICV_ONLY) // N/A: ippiFilterMin*/ippiFilterMax*
return false;
#else
IppiPoint point = {anchor.x, anchor.y};
#define IPP_MORPH_CASE(cvtype, flavor, data_type) \
@ -1262,7 +1259,6 @@ static bool IPPMorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kerne
#if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 8
return false; /// It disables false positive warning in GCC 4.8.2
#endif
#endif
}
}

@ -508,7 +508,7 @@ void cv::pyrDown( InputArray _src, OutputArray _dst, const Size& _dsz, int borde
return;
#endif
#if (defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY) && IPP_VERSION_X100 >= 801)
#if IPP_VERSION_X100 >= 801
bool isolated = (borderType & BORDER_ISOLATED) != 0;
int borderTypeNI = borderType & ~BORDER_ISOLATED;
if (borderTypeNI == BORDER_DEFAULT && (!src.isSubmatrix() || isolated) && dsz == Size((src.cols + 1)/2, (src.rows + 1)/2))
@ -577,7 +577,7 @@ void cv::pyrUp( InputArray _src, OutputArray _dst, const Size& _dsz, int borderT
return;
#endif
#if (defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY) && IPP_VERSION_X100 >= 801)
#if IPP_VERSION_X100 >= 801
bool isolated = (borderType & BORDER_ISOLATED) != 0;
int borderTypeNI = borderType & ~BORDER_ISOLATED;
if (borderTypeNI == BORDER_DEFAULT && (!src.isSubmatrix() || isolated) && dsz == Size(src.cols*2, src.rows*2))
@ -648,7 +648,7 @@ void cv::buildPyramid( InputArray _src, OutputArrayOfArrays _dst, int maxlevel,
int i=1;
#if (defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY) && IPP_VERSION_X100 >= 801)
#if IPP_VERSION_X100 >= 801
bool isolated = (borderType & BORDER_ISOLATED) != 0;
int borderTypeNI = borderType & ~BORDER_ISOLATED;
if (borderTypeNI == BORDER_DEFAULT && (!src.isSubmatrix() || isolated))

@ -858,7 +858,7 @@ void cv::boxFilter( InputArray _src, OutputArray _dst, int ddepth,
return;
#endif
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
int ippBorderType = borderType & ~BORDER_ISOLATED;
Point ocvAnchor, ippAnchor;
ocvAnchor.x = anchor.x < 0 ? ksize.width / 2 : anchor.x;
@ -885,7 +885,6 @@ void cv::boxFilter( InputArray _src, OutputArray _dst, int ddepth,
(int)dst.step, roiSize, maskSize, \
(IppiBorderType)ippBorderType, borderValue, buffer); \
ippsFree(buffer); \
printf("%s %d %d\n", ippGetStatusString(status), (int)src.step, (int)dst.step); \
if (status >= 0) \
return; \
} \
@ -2025,7 +2024,7 @@ void cv::medianBlur( InputArray _src0, OutputArray _dst, int ksize )
_dst.create( src0.size(), src0.type() );
Mat dst = _dst.getMat();
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY) && IPP_VERSION_X100 >= 801
#if IPP_VERSION_X100 >= 801
#define IPP_FILTER_MEDIAN_BORDER(ippType, ippDataType, flavor) \
do \
{ \
@ -2274,7 +2273,7 @@ private:
float *space_weight, *color_weight;
};
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) && !defined(HAVE_IPP_ICV_ONLY)
#if defined (HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY) && 0
class IPPBilateralFilter_8u_Invoker :
public ParallelLoopBody
{

@ -341,7 +341,7 @@ static bool ocl_matchTemplate( InputArray _img, InputArray _templ, OutputArray _
#endif
#if defined HAVE_IPP && IPP_VERSION_MAJOR >= 7 && !defined HAVE_IPP_ICV_ONLY
#if defined HAVE_IPP
typedef IppStatus (CV_STDCALL * ippimatchTemplate)(const void*, int, IppiSize, const void*, int, IppiSize, Ipp32f* , int , IppEnum , Ipp8u*);
@ -633,7 +633,7 @@ void cv::matchTemplate( InputArray _img, InputArray _templ, OutputArray _result,
return;
#endif
#if defined HAVE_IPP && IPP_VERSION_MAJOR >= 7 && !defined HAVE_IPP_ICV_ONLY
#if defined HAVE_IPP
if (method == CV_TM_SQDIFF && cn == 1)
{
if (ipp_sqrDistance(img, templ, result))
@ -642,7 +642,7 @@ void cv::matchTemplate( InputArray _img, InputArray _templ, OutputArray _result,
}
#endif
#if defined HAVE_IPP && IPP_VERSION_MAJOR >= 7 && !defined HAVE_IPP_ICV_ONLY
#if defined HAVE_IPP
if (cn == 1)
{
if (!ipp_crossCorr(img, templ, result))

@ -68,7 +68,7 @@ thresh_8u( const Mat& _src, Mat& _dst, uchar thresh, uchar maxval, int type )
return;
#endif
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
IppiSize sz = { roi.width, roi.height };
switch( type )
{
@ -309,7 +309,7 @@ thresh_16s( const Mat& _src, Mat& _dst, short thresh, short maxval, int type )
return;
#endif
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
IppiSize sz = { roi.width, roi.height };
switch( type )
{
@ -503,7 +503,7 @@ thresh_32f( const Mat& _src, Mat& _dst, float thresh, float maxval, int type )
return;
#endif
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
IppiSize sz = { roi.width, roi.height };
switch( type )
{
@ -683,7 +683,7 @@ getThreshVal_Otsu_8u( const Mat& _src )
step = size.width;
}
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY) && IPP_VERSION_X100 >= 801
#if IPP_VERSION_X100 >= 801 && !defined(HAVE_IPP_ICV_ONLY)
IppiSize srcSize = { size.width, size.height };
Ipp8u thresh;
CV_SUPPRESS_DEPRECATED_START

@ -80,7 +80,7 @@ void cv::updateMotionHistory( InputArray _silhouette, InputOutputArray _mhi,
Mat silh = _silhouette.getMat(), mhi = _mhi.getMat();
Size size = silh.size();
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
int silhstep = (int)silh.step, mhistep = (int)mhi.step;
#endif
@ -88,13 +88,13 @@ void cv::updateMotionHistory( InputArray _silhouette, InputOutputArray _mhi,
{
size.width *= size.height;
size.height = 1;
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
silhstep = (int)silh.total();
mhistep = (int)mhi.total() * sizeof(Ipp32f);
#endif
}
#if defined(HAVE_IPP) && !defined(HAVE_IPP_ICV_ONLY)
#if defined(HAVE_IPP)
IppStatus status = ippiUpdateMotionHistory_8u32f_C1IR((const Ipp8u *)silh.data, silhstep, (Ipp32f *)mhi.data, mhistep,
ippiSize(size.width, size.height), (Ipp32f)timestamp, (Ipp32f)duration);
if (status >= 0)

Loading…
Cancel
Save