From 91ce6ef190bd90d96fce50e3a26e870f50613d1e Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 1 Dec 2020 14:01:42 +0000 Subject: [PATCH] core(ipp): disable SSE4.2 code path in countNonZero() --- modules/core/src/count_non_zero.dispatch.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/core/src/count_non_zero.dispatch.cpp b/modules/core/src/count_non_zero.dispatch.cpp index 96b80c0d8c..cd3ed84350 100644 --- a/modules/core/src/count_non_zero.dispatch.cpp +++ b/modules/core/src/count_non_zero.dispatch.cpp @@ -62,11 +62,9 @@ static bool ipp_countNonZero( Mat &src, int &res ) { CV_INSTRUMENT_REGION_IPP(); -#if defined __APPLE__ || (defined _MSC_VER && defined _M_IX86) // see https://github.com/opencv/opencv/issues/17453 - if (src.dims <= 2 && src.step > 520000) + if (src.dims <= 2 && src.step > 520000 && cv::ipp::getIppTopFeatures() == ippCPUID_SSE42) return false; -#endif #if IPP_VERSION_X100 < 201801 // Poor performance of SSE42