From 9fe11db7e2d6ddfacaafc6815d3e4cb1f8d68f1d Mon Sep 17 00:00:00 2001 From: Elena Gvozdeva Date: Tue, 2 Sep 2014 15:44:07 +0400 Subject: [PATCH] disabled IPP acceleration for 3-channel norms and for CV_8S only for APPLE --- modules/core/src/stat.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/core/src/stat.cpp b/modules/core/src/stat.cpp index 2f614af..cb8a44e 100644 --- a/modules/core/src/stat.cpp +++ b/modules/core/src/stat.cpp @@ -2621,13 +2621,17 @@ double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _m ippiMaskNormRelFuncC1 ippFuncC1 = normType == NORM_INF ? (type == CV_8UC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_Inf_8u_C1MR : +#ifndef __APPLE__ type == CV_8SC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_Inf_8s_C1MR : +#endif type == CV_16UC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_Inf_16u_C1MR : type == CV_32FC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_Inf_32f_C1MR : 0) : normType == NORM_L1 ? (type == CV_8UC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_L1_8u_C1MR : +#ifndef __APPLE__ type == CV_8SC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_L1_8s_C1MR : +#endif type == CV_16UC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_L1_16u_C1MR : type == CV_32FC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_L1_32f_C1MR : 0) : @@ -2723,7 +2727,9 @@ double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _m 0) : normType == NORM_L1 ? (type == CV_8UC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_L1_8u_C1MR : - //type == CV_8SC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_L1_8s_C1MR : +#ifndef __APPLE__ + type == CV_8SC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_L1_8s_C1MR : +#endif type == CV_16UC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_L1_16u_C1MR : type == CV_32FC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_L1_32f_C1MR : 0) : @@ -2740,7 +2746,8 @@ double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _m return normType == NORM_L2SQR ? (double)(norm * norm) : (double)norm; setIppErrorStatus(); } - /*typedef IppStatus (CV_STDCALL* ippiMaskNormDiffFuncC3)(const void *, int, const void *, int, const void *, int, IppiSize, int, Ipp64f *); +#ifndef __APPLE__ + typedef IppStatus (CV_STDCALL* ippiMaskNormDiffFuncC3)(const void *, int, const void *, int, const void *, int, IppiSize, int, Ipp64f *); ippiMaskNormDiffFuncC3 ippFuncC3 = normType == NORM_INF ? (type == CV_8UC3 ? (ippiMaskNormDiffFuncC3)ippiNormDiff_Inf_8u_C3CMR : @@ -2775,7 +2782,8 @@ double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _m return normType == NORM_L2SQR ? (double)(norm * norm) : (double)norm; } setIppErrorStatus(); - }*/ + } +#endif } else { -- 2.7.4