Skip to content

Commit e58a778

Browse files
committed
core(stat): disable IPP optimization in meanStdDev (cn > 1)
1 parent bdb6b45 commit e58a778

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

modules/core/src/stat.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,6 +1739,13 @@ static bool ipp_meanStdDev(Mat& src, OutputArray _mean, OutputArray _sdv, Mat& m
17391739

17401740
#if IPP_VERSION_X100 >= 700
17411741
int cn = src.channels();
1742+
1743+
#if IPP_VERSION_X100 < 201801
1744+
// IPP_DISABLE: C3C functions can read outside of allocated memory
1745+
if (cn > 1)
1746+
return false;
1747+
#endif
1748+
17421749
size_t total_size = src.total();
17431750
int rows = src.size[0], cols = rows ? (int)(total_size/rows) : 0;
17441751
if( src.dims == 2 || (src.isContinuous() && mask.isContinuous() && cols > 0 && (size_t)rows*cols == total_size) )

0 commit comments

Comments
 (0)