[opencv] 42/251: ipp(minmaxIdx): disable SSE4.2 optimizations for 32f datatype
Nobuhiro Iwamatsu
iwamatsu at moszumanska.debian.org
Sun Aug 27 23:27:22 UTC 2017
This is an automated email from the git hooks/post-receive script.
iwamatsu pushed a commit to annotated tag 3.3.0
in repository opencv.
commit 5ebfb52a4a3bb327a09852533e4fd00602ad3f91
Author: Alexander Alekhin <alexander.alekhin at intel.com>
Date: Wed Jul 12 16:06:18 2017 +0300
ipp(minmaxIdx): disable SSE4.2 optimizations for 32f datatype
NaN values handling issue
---
modules/core/include/opencv2/core/private.hpp | 2 ++
modules/core/src/stat.cpp | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/modules/core/include/opencv2/core/private.hpp b/modules/core/include/opencv2/core/private.hpp
index 418e1fa..61059fa 100644
--- a/modules/core/include/opencv2/core/private.hpp
+++ b/modules/core/include/opencv2/core/private.hpp
@@ -209,6 +209,8 @@ CV_EXPORTS void scalarToRawData(const cv::Scalar& s, void* buf, int type, int un
#define IPP_DISABLE_RESIZE_NEAREST 1 // Accuracy mismatch (max diff 1)
#define IPP_DISABLE_RESIZE_AREA 1 // Accuracy mismatch (max diff 1)
+#define IPP_DISABLE_MINMAX_NAN_SSE42 1 // cv::minMaxIdx problem with NaN input
+
// Temporary disabled named IPP region. Performance
#define IPP_DISABLE_PERF_COPYMAKE 1 // performance variations
#define IPP_DISABLE_PERF_LUT 1 // there are no performance benefits (PR #2653)
diff --git a/modules/core/src/stat.cpp b/modules/core/src/stat.cpp
index d40e91a..06e3d46 100644
--- a/modules/core/src/stat.cpp
+++ b/modules/core/src/stat.cpp
@@ -2534,6 +2534,12 @@ static bool ipp_minMaxIdx(Mat &src, double* _minVal, double* _maxVal, int* _minI
#if IPP_VERSION_X100 >= 700
CV_INSTRUMENT_REGION_IPP()
+#if IPP_DISABLE_MINMAX_NAN_SSE42
+ // Disable 32F processing only
+ if(src.depth() == CV_32F && !(ipp::getIppFeatures()&ippCPUID_AVX))
+ return false;
+#endif
+
IppStatus status;
IppDataType dataType = ippiGetDataType(src.depth());
float minVal = 0;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git
More information about the debian-science-commits
mailing list