ipp: some functions are not available in the ICV package
authorAlexander Alekhin <alexander.alekhin@itseez.com>
Tue, 8 Apr 2014 14:00:21 +0000 (18:00 +0400)
committerAlexander Alekhin <alexander.alekhin@itseez.com>
Wed, 9 Apr 2014 14:20:49 +0000 (18:20 +0400)
modules/imgproc/src/color.cpp
modules/imgproc/src/deriv.cpp
modules/imgproc/src/imgwarp.cpp
modules/imgproc/src/morph.cpp

index 2bd2332..287a188 100644 (file)
@@ -300,7 +300,7 @@ static ippiReorderFunc ippiSwapChannelsC3RTab[] =
     0, (ippiReorderFunc)ippiSwapChannels_32f_C3R, 0, 0
 };
 
-#if IPP_VERSION_X100 >= 801
+#if !defined(HAVE_IPP_ICV_ONLY) && IPP_VERSION_X100 >= 801
 static ippiReorderFunc ippiSwapChannelsC4RTab[] =
 {
     (ippiReorderFunc)ippiSwapChannels_8u_C4R, 0, (ippiReorderFunc)ippiSwapChannels_16u_C4R, 0,
@@ -3280,7 +3280,7 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn )
                 if( CvtColorIPPLoopCopy(src, dst, IPPReorderFunctor(ippiSwapChannelsC3RTab[depth], 2, 1, 0)) )
                     return;
             }
-#if (IPP_VERSION_X100 >= 801)
+#if !defined(HAVE_IPP_ICV_ONLY) && (IPP_VERSION_X100 >= 801)
             else if( code == CV_RGBA2BGRA )
             {
                 if( CvtColorIPPLoopCopy(src, dst, IPPReorderFunctor(ippiSwapChannelsC4RTab[depth], 2, 1, 0)) )
index 9bfac45..1b3e2c4 100644 (file)
@@ -233,6 +233,9 @@ static bool IPPDerivScharr(const Mat& src, Mat& dst, int ddepth, int dx, int dy,
             }
         }
     case CV_32F:
+#if defined(HAVE_IPP_ICV_ONLY) // N/A: ippiMulC_32f_C1R
+        return false;
+#else
         {
             switch(dst.type())
             {
@@ -277,6 +280,7 @@ static bool IPPDerivScharr(const Mat& src, Mat& dst, int ddepth, int dx, int dy,
                 return false;
             }
         }
+#endif
     default:
         return false;
     }
@@ -341,6 +345,9 @@ static bool IPPDeriv(const Mat& src, Mat& dst, int ddepth, int dx, int dy, int k
 
         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))
             {
@@ -411,6 +418,7 @@ static bool IPPDeriv(const Mat& src, Mat& dst, int ddepth, int dx, int dy, int k
                     ippiMulC_32f_C1R((Ipp32f *)dst.data, (int)dst.step, (Ipp32f)scale, (Ipp32f *)dst.data, (int)dst.step, ippiSize(dst.cols*dst.channels(), dst.rows));
                 return true;
             }
+#endif
         }
     }
 
index 344601b..45a66bd 100644 (file)
@@ -1912,7 +1912,7 @@ static int computeResizeAreaTab( int ssize, int dsize, int cn, double scale, Dec
     getBufferSizeFunc = (ippiResizeGetBufferSize)ippiResizeGetBufferSize_##TYPE;\
     getSrcOffsetFunc =  (ippiResizeGetSrcOffset)ippiResizeGetSrcOffset_##TYPE;
 
-#if IPP_VERSION_X100 >= 701
+#if !defined(HAVE_IPP_ICV_ONLY) && IPP_VERSION_X100 >= 701
 class IPPresizeInvoker :
     public ParallelLoopBody
 {
@@ -2384,7 +2384,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 IPP_VERSION_X100 >= 701
+#if !defined(HAVE_IPP_ICV_ONLY) && IPP_VERSION_X100 >= 701
 #define IPP_RESIZE_EPS    1.e-10
 
     double ex = fabs((double)dsize.width/src.cols  - inv_scale_x)/inv_scale_x;
index 07aa4c5..5b13ffc 100644 (file)
@@ -1228,6 +1228,9 @@ 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) \
@@ -1257,6 +1260,7 @@ static bool IPPMorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kerne
         }
 
         #undef IPP_MORPH_CASE
+#endif
     }
 }