fixed (IppiSize&)sz
authorIlya Lavrenov <ilya.lavrenov@itseez.com>
Mon, 7 Apr 2014 13:09:11 +0000 (17:09 +0400)
committerIlya Lavrenov <ilya.lavrenov@itseez.com>
Tue, 8 Apr 2014 20:19:56 +0000 (00:19 +0400)
cmake/OpenCVFindIPP.cmake
modules/core/include/opencv2/core/private.hpp
modules/core/src/arithm.cpp
modules/core/src/matmul.cpp
modules/core/src/stat.cpp
modules/imgproc/src/accum.cpp
modules/imgproc/src/color.cpp
modules/imgproc/src/imgwarp.cpp
modules/imgproc/src/morph.cpp

index 495c243..559f70a 100644 (file)
@@ -159,12 +159,14 @@ macro(ipp_set_variables _LATEST_VERSION)
   set(IPPM    "m")        # matrix math
 
   list(APPEND IPP_LIBRARIES ${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPVM}${IPP_SUFFIX}${IPP_LIB_SUFFIX})
-  list(APPEND IPP_LIBRARIES ${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPM}${IPP_SUFFIX}${IPP_LIB_SUFFIX})
   list(APPEND IPP_LIBRARIES ${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCC}${IPP_SUFFIX}${IPP_LIB_SUFFIX})
   list(APPEND IPP_LIBRARIES ${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCV}${IPP_SUFFIX}${IPP_LIB_SUFFIX})
   list(APPEND IPP_LIBRARIES ${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPI}${IPP_SUFFIX}${IPP_LIB_SUFFIX})
   list(APPEND IPP_LIBRARIES ${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPS}${IPP_SUFFIX}${IPP_LIB_SUFFIX})
   list(APPEND IPP_LIBRARIES ${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCORE}${IPP_SUFFIX}${IPP_LIB_SUFFIX})
+  if(NOT HAVE_IPP_ICV_ONLY)
+    list(APPEND IPP_LIBRARIES ${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPM}${IPP_SUFFIX}${IPP_LIB_SUFFIX})
+  endif()
 
 # FIXIT
 #  if(UNIX AND NOT HAVE_IPP_ICV_ONLY)
@@ -186,7 +188,7 @@ macro(ipp_set_variables _LATEST_VERSION)
       if(NOT EXISTS ${INTEL_COMPILER_LIBRARY_DIR}/ia32)
         message(SEND_ERROR "Intel compiler IA32 libraries not found")
       endif()
-      if (NOT APLLE)
+      if (NOT APPLE)
         set(INTEL_COMPILER_LIBRARY_DIR ${INTEL_COMPILER_LIBRARY_DIR}/ia32)
       endif()
     endif()
index 45351d1..f516e64 100644 (file)
@@ -223,6 +223,13 @@ static inline IppiSize ippiSize(int width, int height)
     IppiSize size = { width, height };
     return size;
 }
+
+static inline IppiSize ippiSize(const cv::Size & _size)
+{
+    IppiSize size = { _size.width, _size.height };
+    return size;
+}
+
 #else
 #  define IPP_VERSION_X100 0
 #endif
index ecc2ca0..aa9469c 100644 (file)
@@ -460,7 +460,7 @@ static void add8u( const uchar* src1, size_t step1,
 {
 #if (ARITHM_USE_IPP == 1)
     fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-    if (0 <= ippiAdd_8u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz, 0))
+    if (0 <= ippiAdd_8u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz), 0))
         return;
 #endif
     (vBinOp<uchar, OpAdd<uchar>, IF_SIMD(VAdd<uchar>)>(src1, step1, src2, step2, dst, step, sz));
@@ -479,7 +479,7 @@ static void add16u( const ushort* src1, size_t step1,
 {
 #if (ARITHM_USE_IPP == 1)
     fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-    if (0 <= ippiAdd_16u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz, 0))
+    if (0 <= ippiAdd_16u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz), 0))
         return;
 #endif
     (vBinOp<ushort, OpAdd<ushort>, IF_SIMD(VAdd<ushort>)>(src1, step1, src2, step2, dst, step, sz));
@@ -491,7 +491,7 @@ static void add16s( const short* src1, size_t step1,
 {
 #if (ARITHM_USE_IPP == 1)
     fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-    if (0 <= ippiAdd_16s_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz, 0))
+    if (0 <= ippiAdd_16s_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz), 0))
         return;
 #endif
     (vBinOp<short, OpAdd<short>, IF_SIMD(VAdd<short>)>(src1, step1, src2, step2, dst, step, sz));
@@ -510,7 +510,7 @@ static void add32f( const float* src1, size_t step1,
 {
 #if (ARITHM_USE_IPP == 1)
     fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-    if (0 <= ippiAdd_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz))
+    if (0 <= ippiAdd_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)))
         return;
 #endif
     (vBinOp32<float, OpAdd<float>, IF_SIMD(VAdd<float>)>(src1, step1, src2, step2, dst, step, sz));
@@ -529,7 +529,7 @@ static void sub8u( const uchar* src1, size_t step1,
 {
 #if (ARITHM_USE_IPP == 1)
     fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-    if (0 <= ippiSub_8u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz, 0))
+    if (0 <= ippiSub_8u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, ippiSize(sz), 0))
         return;
 #endif
     (vBinOp<uchar, OpSub<uchar>, IF_SIMD(VSub<uchar>)>(src1, step1, src2, step2, dst, step, sz));
@@ -548,7 +548,7 @@ static void sub16u( const ushort* src1, size_t step1,
 {
 #if (ARITHM_USE_IPP == 1)
     fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-    if (0 <= ippiSub_16u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz, 0))
+    if (0 <= ippiSub_16u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, ippiSize(sz), 0))
         return;
 #endif
     (vBinOp<ushort, OpSub<ushort>, IF_SIMD(VSub<ushort>)>(src1, step1, src2, step2, dst, step, sz));
@@ -560,7 +560,7 @@ static void sub16s( const short* src1, size_t step1,
 {
 #if (ARITHM_USE_IPP == 1)
     fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-    if (0 <= ippiSub_16s_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz, 0))
+    if (0 <= ippiSub_16s_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, ippiSize(sz), 0))
         return;
 #endif
     (vBinOp<short, OpSub<short>, IF_SIMD(VSub<short>)>(src1, step1, src2, step2, dst, step, sz));
@@ -579,7 +579,7 @@ static void sub32f( const float* src1, size_t step1,
 {
 #if (ARITHM_USE_IPP == 1)
     fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-    if (0 <= ippiSub_32f_C1R(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz))
+    if (0 <= ippiSub_32f_C1R(src2, (int)step2, src1, (int)step1, dst, (int)step, ippiSize(sz)))
         return;
 #endif
     (vBinOp32<float, OpSub<float>, IF_SIMD(VSub<float>)>(src1, step1, src2, step2, dst, step, sz));
@@ -801,7 +801,7 @@ static void absdiff8u( const uchar* src1, size_t step1,
 {
 #if (ARITHM_USE_IPP == 1)
     fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-    if (0 <= ippiAbsDiff_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz))
+    if (0 <= ippiAbsDiff_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)))
         return;
 #endif
     (vBinOp<uchar, OpAbsDiff<uchar>, IF_SIMD(VAbsDiff<uchar>)>(src1, step1, src2, step2, dst, step, sz));
@@ -820,7 +820,7 @@ static void absdiff16u( const ushort* src1, size_t step1,
 {
 #if (ARITHM_USE_IPP == 1)
     fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-    if (0 <= ippiAbsDiff_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz))
+    if (0 <= ippiAbsDiff_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)))
         return;
 #endif
     (vBinOp<ushort, OpAbsDiff<ushort>, IF_SIMD(VAbsDiff<ushort>)>(src1, step1, src2, step2, dst, step, sz));
@@ -846,7 +846,7 @@ static void absdiff32f( const float* src1, size_t step1,
 {
 #if (ARITHM_USE_IPP == 1)
     fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-    if (0 <= ippiAbsDiff_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz))
+    if (0 <= ippiAbsDiff_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)))
         return;
 #endif
     (vBinOp32<float, OpAbsDiff<float>, IF_SIMD(VAbsDiff<float>)>(src1, step1, src2, step2, dst, step, sz));
@@ -866,7 +866,7 @@ static void and8u( const uchar* src1, size_t step1,
 {
 #if (ARITHM_USE_IPP == 1)
     fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-    if (0 <= ippiAnd_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz))
+    if (0 <= ippiAnd_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)))
         return;
 #endif
     (vBinOp<uchar, OpAnd<uchar>, IF_SIMD(VAnd<uchar>)>(src1, step1, src2, step2, dst, step, sz));
@@ -878,7 +878,7 @@ static void or8u( const uchar* src1, size_t step1,
 {
 #if (ARITHM_USE_IPP == 1)
     fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-    if (0 <= ippiOr_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz))
+    if (0 <= ippiOr_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)))
         return;
 #endif
     (vBinOp<uchar, OpOr<uchar>, IF_SIMD(VOr<uchar>)>(src1, step1, src2, step2, dst, step, sz));
@@ -890,7 +890,7 @@ static void xor8u( const uchar* src1, size_t step1,
 {
 #if (ARITHM_USE_IPP == 1)
     fixSteps(sz, sizeof(dst[0]), step1, step2, step);
-    if (0 <= ippiXor_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz))
+    if (0 <= ippiXor_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(sz)))
         return;
 #endif
     (vBinOp<uchar, OpXor<uchar>, IF_SIMD(VXor<uchar>)>(src1, step1, src2, step2, dst, step, sz));
@@ -901,8 +901,8 @@ static void not8u( const uchar* src1, size_t step1,
                    uchar* dst, size_t step, Size sz, void* )
 {
 #if (ARITHM_USE_IPP == 1)
-    fixSteps(sz, sizeof(dst[0]), step1, step2, step); (void *)src2;
-    if (0 <= ippiNot_8u_C1R(src1, (int)step1, dst, (int)step, (IppiSize&)sz))
+    fixSteps(sz, sizeof(dst[0]), step1, step2, step); (void)src2;
+    if (0 <= ippiNot_8u_C1R(src1, (int)step1, dst, (int)step, ippiSize(sz)))
         return;
 #endif
     (vBinOp<uchar, OpNot<uchar>, IF_SIMD(VNot<uchar>)>(src1, step1, src2, step2, dst, step, sz));
@@ -2386,7 +2386,7 @@ static void cmp8u(const uchar* src1, size_t step1, const uchar* src2, size_t ste
     if( op  >= 0 )
     {
         fixSteps(size, sizeof(dst[0]), step1, step2, step);
-        if (0 <= ippiCompare_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op))
+        if (0 <= ippiCompare_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(size), op))
             return;
     }
 #endif
@@ -2469,7 +2469,7 @@ static void cmp16u(const ushort* src1, size_t step1, const ushort* src2, size_t
     if( op  >= 0 )
     {
         fixSteps(size, sizeof(dst[0]), step1, step2, step);
-        if (0 <= ippiCompare_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op))
+        if (0 <= ippiCompare_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(size), op))
             return;
     }
 #endif
@@ -2484,7 +2484,7 @@ static void cmp16s(const short* src1, size_t step1, const short* src2, size_t st
     if( op  > 0 )
     {
         fixSteps(size, sizeof(dst[0]), step1, step2, step);
-        if (0 <= ippiCompare_16s_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op))
+        if (0 <= ippiCompare_16s_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(size), op))
             return;
     }
 #endif
@@ -2590,7 +2590,7 @@ static void cmp32f(const float* src1, size_t step1, const float* src2, size_t st
     if( op  >= 0 )
     {
         fixSteps(size, sizeof(dst[0]), step1, step2, step);
-        if (0 <= ippiCompare_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op))
+        if (0 <= ippiCompare_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, ippiSize(size), op))
             return;
     }
 #endif
index 4e0b70a..2373519 100644 (file)
@@ -2227,7 +2227,7 @@ void cv::scaleAdd( InputArray _src1, double alpha, InputArray _src2, OutputArray
         if (depth == CV_32F &&
                 ippmSaxpy_vava_32f((const Ipp32f *)src1.data, (int)src1.step, sizeof(Ipp32f), falpha,
                 (const Ipp32f *)src2.data, (int)src2.step, sizeof(Ipp32f),
-                (Ipp32f *)dst.data, (int)dst.step, sizeof(Ipp32f), len, 1) >= 0)
+                (Ipp32f *)dst.data, (int)dst.step, sizeof(Ipp32f), (int)len, 1) >= 0)
             return;
 #endif
         func(src1.data, src2.data, dst.data, (int)len, palpha);
index 8986abd..c717459 100644 (file)
@@ -2114,11 +2114,7 @@ double cv::norm( InputArray _src, int normType, InputArray _mask )
                 type == CV_16UC3 ? (ippiNormFuncNoHint)ippiNorm_Inf_16u_C3R :
                 type == CV_16UC4 ? (ippiNormFuncNoHint)ippiNorm_Inf_16u_C4R :
                 type == CV_16SC1 ? (ippiNormFuncNoHint)ippiNorm_Inf_16s_C1R :
-<<<<<<< HEAD
 #if (IPP_VERSION_X100 >= 801)
-=======
-#if IPP_VERSION_MAJOR * 10 + IPP_VERSION_MINOR >= 81
->>>>>>> cv::scaleAdd
                 type == CV_16SC3 ? (ippiNormFuncNoHint)ippiNorm_Inf_16s_C3R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768
                 type == CV_16SC4 ? (ippiNormFuncNoHint)ippiNorm_Inf_16s_C4R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768
 #endif
@@ -2550,11 +2546,7 @@ double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _m
                 type == CV_16UC3 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_16u_C3R :
                 type == CV_16UC4 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_16u_C4R :
                 type == CV_16SC1 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_16s_C1R :
-<<<<<<< HEAD
 #if (IPP_VERSION_X100 >= 801)
-=======
-#if IPP_VERSION_MAJOR * 10 + IPP_VERSION_MINOR >= 81
->>>>>>> cv::scaleAdd
                 type == CV_16SC3 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_16s_C3R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768
                 type == CV_16SC4 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_16s_C4R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768
 #endif
index c431a65..216ddcb 100644 (file)
@@ -487,10 +487,10 @@ void cv::accumulateSquare( InputArray _src, InputOutputArray _dst, InputArray _m
             int srcstep = (int)src.step, dststep = (int)dst.step, maskstep = (int)mask.step;
             if (src.isContinuous() && dst.isContinuous() && mask.isContinuous())
             {
-                srcstep = src.total() * src.elemSize();
-                dststep = dst.total() * dst.elemSize();
-                maskstep = mask.total() * mask.elemSize();
-                size.width = (int)src.total();
+                srcstep = static_cast<int>(src.total() * src.elemSize());
+                dststep = static_cast<int>(dst.total() * dst.elemSize());
+                maskstep = static_cast<int>(mask.total() * mask.elemSize());
+                size.width = static_cast<int>(src.total());
                 size.height = 1;
             }
             size.width *= scn;
@@ -564,13 +564,13 @@ void cv::accumulateProduct( InputArray _src1, InputArray _src2,
 
             Size size = src1.size();
             int src1step = (int)src1.step, src2step = (int)src2.step, dststep = (int)dst.step, maskstep = (int)mask.step;
-            if (src1.isContinuous() && src2.isContinuous() && dst.isContinuous() && mask.empty())
+            if (src1.isContinuous() && src2.isContinuous() && dst.isContinuous() && mask.isContinuous())
             {
-                src1step = src1.total() * src1.elemSize();
-                src2step = src2.total() * src2.elemSize();
-                dststep = dst.total() * dst.elemSize();
-                maskstep = mask.total() * mask.elemSize();
-                size.width = (int)src1.total();
+                src1step = static_cast<int>(src1.total() * src1.elemSize());
+                src2step = static_cast<int>(src2.total() * src2.elemSize());
+                dststep = static_cast<int>(dst.total() * dst.elemSize());
+                maskstep = static_cast<int>(mask.total() * mask.elemSize());
+                size.width = static_cast<int>(src1.total());
                 size.height = 1;
             }
             size.width *= scn;
@@ -645,12 +645,12 @@ void cv::accumulateWeighted( InputArray _src, InputOutputArray _dst,
 
             Size size = src.size();
             int srcstep = (int)src.step, dststep = (int)dst.step, maskstep = (int)mask.step;
-            if (src.isContinuous() && dst.isContinuous() && mask.empty())
+            if (src.isContinuous() && dst.isContinuous() && mask.isContinuous())
             {
-                srcstep = src.total() * src.elemSize();
-                dststep = dst.total() * dst.elemSize();
-                maskstep = mask.total() * mask.elemSize();
-                size.width = (int)src.total();
+                srcstep = static_cast<int>(src.total() * src.elemSize());
+                dststep = static_cast<int>(dst.total() * dst.elemSize());
+                maskstep = static_cast<int>(mask.total() * mask.elemSize());
+                size.width = static_cast<int>((int)src.total());
                 size.height = 1;
             }
             size.width *= scn;
index d3443d1..bded528 100644 (file)
@@ -3254,11 +3254,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
                 if( CvtColorIPPLoopCopy(src, dst, IPPReorderFunctor(ippiSwapChannelsC3RTab[depth], 2, 1, 0)) )
                     return;
             }
-<<<<<<< HEAD
 #if (IPP_VERSION_X100 >= 801)
-=======
-#if IPP_VERSION_MAJOR * 10 + IPP_VERSION_MINOR >= 81
->>>>>>> cv::scaleAdd
             else if( code == CV_RGBA2BGRA )
             {
                 if( CvtColorIPPLoopCopy(src, dst, IPPReorderFunctor(ippiSwapChannelsC4RTab[depth], 2, 1, 0)) )
index 8dec622..344601b 100644 (file)
@@ -61,7 +61,7 @@ namespace cv
     typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*);
 #endif
 
-#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
+#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) && 0
     typedef IppStatus (CV_STDCALL* ippiSetFunc)(const void*, void *, int, IppiSize);
     typedef IppStatus (CV_STDCALL* ippiWarpPerspectiveFunc)(const void*, IppiSize, int, IppiRect, void *, int, IppiRect, double [3][3], int);
     typedef IppStatus (CV_STDCALL* ippiWarpAffineBackFunc)(const void*, IppiSize, int, IppiRect, void *, int, IppiRect, double [2][3], int);
@@ -4015,7 +4015,7 @@ private:
 
 
     /*
-#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 10 + IPP_VERSION_MINOR >= 81
+#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 100 + IPP_VERSION_MINOR >= 801
 class IPPWarpAffineInvoker :
     public ParallelLoopBody
 {
@@ -4215,7 +4215,7 @@ void cv::warpAffine( InputArray _src, OutputArray _dst,
     const int AB_SCALE = 1 << AB_BITS;
 
     /*
-#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 10 + IPP_VERSION_MINOR >= 81
+#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 100 + IPP_VERSION_MINOR >= 801
     int type = src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
     if( ( depth == CV_8U || depth == CV_16U || depth == CV_32F ) &&
        ( cn == 1 || cn == 3 || cn == 4 ) &&
@@ -4381,53 +4381,52 @@ private:
 };
 
     /*
-#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 10 + IPP_VERSION_MINOR >= 81
+#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 100 + IPP_VERSION_MINOR >= 801
 class IPPWarpPerspectiveInvoker :
-   public ParallelLoopBody
+    public ParallelLoopBody
 {
 public:
-   IPPWarpPerspectiveInvoker(Mat &_src, Mat &_dst, double (&_coeffs)[3][3], int &_interpolation,
-                             int &_borderType, const Scalar &_borderValue, ippiWarpPerspectiveFunc _func, bool *_ok) :
-       ParallelLoopBody(), src(_src), dst(_dst), mode(_interpolation), coeffs(_coeffs),
-       borderType(_borderType), borderValue(_borderValue), func(_func), ok(_ok)
-   {
-       *ok = true;
-   }
-
-   virtual void operator() (const Range& range) const
-   {
-       IppiSize srcsize = {src.cols, src.rows};
-       IppiRect srcroi = {0, 0, src.cols, src.rows};
-       IppiRect dstroi = {0, range.start, dst.cols, range.end - range.start};
-       int cnn = src.channels();
-
-       if( borderType == BORDER_CONSTANT )
-       {
-           IppiSize setSize = {dst.cols, range.end - range.start};
-           void *dataPointer = dst.data + dst.step[0] * range.start;
-           if( !IPPSet( borderValue, dataPointer, (int)dst.step[0], setSize, cnn, src.depth() ) )
-           {
-               *ok = false;
-               return;
-           }
-       }
-
-       IppStatus status = func(src.data, srcsize, (int)src.step[0], srcroi, dst.data, (int)dst.step[0], dstroi, coeffs, mode);
-       printf("%d\n", status);
-       if (status != ippStsNoErr)
-           *ok = false;
-   }
+    IPPWarpPerspectiveInvoker(Mat &_src, Mat &_dst, double (&_coeffs)[3][3], int &_interpolation,
+        int &_borderType, const Scalar &_borderValue, ippiWarpPerspectiveFunc _func, bool *_ok) :
+        ParallelLoopBody(), src(_src), dst(_dst), mode(_interpolation), coeffs(_coeffs),
+        borderType(_borderType), borderValue(_borderValue), func(_func), ok(_ok)
+    {
+        *ok = true;
+    }
+
+    virtual void operator() (const Range& range) const
+    {
+        IppiSize srcsize = {src.cols, src.rows};
+        IppiRect srcroi = {0, 0, src.cols, src.rows};
+        IppiRect dstroi = {0, range.start, dst.cols, range.end - range.start};
+        int cnn = src.channels();
+
+        if( borderType == BORDER_CONSTANT )
+        {
+            IppiSize setSize = {dst.cols, range.end - range.start};
+            void *dataPointer = dst.data + dst.step[0] * range.start;
+            if( !IPPSet( borderValue, dataPointer, (int)dst.step[0], setSize, cnn, src.depth() ) )
+            {
+                *ok = false;
+                return;
+            }
+        }
+
+        IppStatus status = func(src.data, srcsize, (int)src.step[0], srcroi, dst.data, (int)dst.step[0], dstroi, coeffs, mode);
+        if (status != ippStsNoErr)
+            *ok = false;
+    }
 private:
-   Mat &src;
-   Mat &dst;
-   int mode;
-   double (&coeffs)[3][3];
-   int borderType;
-   const Scalar borderValue;
-   ippiWarpPerspectiveFunc func;
-   bool *ok;
-
-   const IPPWarpPerspectiveInvoker& operator= (const IPPWarpPerspectiveInvoker&);
+    Mat &src;
+    Mat &dst;
+    int mode;
+    double (&coeffs)[3][3];
+    int borderType;
+    const Scalar borderValue;
+    ippiWarpPerspectiveFunc func;
+    bool *ok;
+
+    const IPPWarpPerspectiveInvoker& operator= (const IPPWarpPerspectiveInvoker&);
 };
 #endif
     */
@@ -4464,7 +4463,7 @@ void cv::warpPerspective( InputArray _src, OutputArray _dst, InputArray _M0,
 #endif
 
     /*
-#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 10 + IPP_VERSION_MINOR >= 81
+#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 100 + IPP_VERSION_MINOR >= 801
     int type = src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
     if( (depth == CV_8U || depth == CV_16U || depth == CV_32F) &&
        (cn == 1 || cn == 3 || cn == 4) &&
index e3aa19a..07aa4c5 100644 (file)
@@ -1136,11 +1136,7 @@ private:
     Scalar borderValue;
 };
 
-<<<<<<< HEAD
 #if IPP_VERSION_X100 >= 801
-=======
-#if defined (HAVE_IPP) && IPP_VERSION_MAJOR * 10 + IPP_VERSION_MINOR >= 81
->>>>>>> cv::scaleAdd
 static bool IPPMorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kernel,
                               const Size& ksize, const Point &anchor, bool rectKernel)
 {