1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge pull request #16754 from alalek:issue_16752

* core(test): FP16 norm test

* core: norm()-FP16 disable OpenCL

* core(norm): fix 16f32f local buffer size
This commit is contained in:
Alexander Alekhin
2020-03-07 22:06:47 +03:00
committed by GitHub
parent 619180dffd
commit 198b5096aa
5 changed files with 18 additions and 5 deletions
+6 -2
View File
@@ -87,7 +87,9 @@ double getMinVal(int depth)
depth = CV_MAT_DEPTH(depth);
double val = depth == CV_8U ? 0 : depth == CV_8S ? SCHAR_MIN : depth == CV_16U ? 0 :
depth == CV_16S ? SHRT_MIN : depth == CV_32S ? INT_MIN :
depth == CV_32F ? -FLT_MAX : depth == CV_64F ? -DBL_MAX : -1;
depth == CV_32F ? -FLT_MAX : depth == CV_64F ? -DBL_MAX :
depth == CV_16F ? -65504
: -1;
CV_Assert(val != -1);
return val;
}
@@ -97,7 +99,9 @@ double getMaxVal(int depth)
depth = CV_MAT_DEPTH(depth);
double val = depth == CV_8U ? UCHAR_MAX : depth == CV_8S ? SCHAR_MAX : depth == CV_16U ? USHRT_MAX :
depth == CV_16S ? SHRT_MAX : depth == CV_32S ? INT_MAX :
depth == CV_32F ? FLT_MAX : depth == CV_64F ? DBL_MAX : -1;
depth == CV_32F ? FLT_MAX : depth == CV_64F ? DBL_MAX :
depth == CV_16F ? 65504
: -1;
CV_Assert(val != -1);
return val;
}