Commit 41df63aa authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #3010 from vpisarev:ocl_disable_some_norms2

parents a587759d af83884d
...@@ -1452,6 +1452,9 @@ static bool ocl_minMaxIdx( InputArray _src, double* minVal, double* maxVal, int* ...@@ -1452,6 +1452,9 @@ static bool ocl_minMaxIdx( InputArray _src, double* minVal, double* maxVal, int*
CV_Assert(!haveSrc2 || _src2.type() == type); CV_Assert(!haveSrc2 || _src2.type() == type);
if (depth == CV_32S || depth == CV_32F)
return false;
if ((depth == CV_64F || ddepth == CV_64F) && !doubleSupport) if ((depth == CV_64F || ddepth == CV_64F) && !doubleSupport)
return false; return false;
...@@ -2185,6 +2188,9 @@ static bool ocl_norm( InputArray _src, int normType, InputArray _mask, double & ...@@ -2185,6 +2188,9 @@ static bool ocl_norm( InputArray _src, int normType, InputArray _mask, double &
(!doubleSupport && depth == CV_64F)) (!doubleSupport && depth == CV_64F))
return false; return false;
if( depth == CV_32F && (!_mask.empty() || normType == NORM_INF) )
return false;
UMat src = _src.getUMat(); UMat src = _src.getUMat();
if (normType == NORM_INF) if (normType == NORM_INF)
...@@ -2540,7 +2546,7 @@ static bool ocl_norm( InputArray _src1, InputArray _src2, int normType, InputArr ...@@ -2540,7 +2546,7 @@ static bool ocl_norm( InputArray _src1, InputArray _src2, int normType, InputArr
normType &= ~NORM_RELATIVE; normType &= ~NORM_RELATIVE;
bool normsum = normType == NORM_L1 || normType == NORM_L2 || normType == NORM_L2SQR; bool normsum = normType == NORM_L1 || normType == NORM_L2 || normType == NORM_L2SQR;
if ( !(normType == NORM_INF || normsum) ) if ( !normsum || !_mask.empty() )
return false; return false;
if (normsum) if (normsum)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment