mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -117,7 +117,7 @@ OCL_PERF_TEST_P(LogFixture, Log, ::testing::Combine(
|
||||
OCL_TEST_CYCLE() cv::log(src, dst);
|
||||
|
||||
if (CV_MAT_DEPTH(type) >= CV_32F)
|
||||
SANITY_CHECK(dst, 1e-5, ERROR_RELATIVE);
|
||||
SANITY_CHECK(dst, 2e-4, ERROR_RELATIVE);
|
||||
else
|
||||
SANITY_CHECK(dst, 1);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ PERF_TEST_P(Size_MatType, addWeighted, TYPICAL_MATS_ADWEIGHTED)
|
||||
{
|
||||
Size size = get<0>(GetParam());
|
||||
int type = get<1>(GetParam());
|
||||
int depth = CV_MAT_DEPTH(type);
|
||||
Mat src1(size, type);
|
||||
Mat src2(size, type);
|
||||
double alpha = 3.75;
|
||||
@@ -21,7 +22,7 @@ PERF_TEST_P(Size_MatType, addWeighted, TYPICAL_MATS_ADWEIGHTED)
|
||||
|
||||
declare.in(src1, src2, dst, WARMUP_RNG).out(dst);
|
||||
|
||||
if (CV_MAT_DEPTH(type) == CV_32S)
|
||||
if (depth == CV_32S)
|
||||
{
|
||||
// there might be not enough precision for integers
|
||||
src1 /= 2048;
|
||||
@@ -30,7 +31,7 @@ PERF_TEST_P(Size_MatType, addWeighted, TYPICAL_MATS_ADWEIGHTED)
|
||||
|
||||
TEST_CYCLE() cv::addWeighted( src1, alpha, src2, beta, gamma, dst, dst.type() );
|
||||
|
||||
SANITY_CHECK(dst, 1);
|
||||
SANITY_CHECK(dst, depth == CV_32S ? 4 : 1);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -33,7 +33,7 @@ PERF_TEST_P( Size_DepthSrc_DepthDst_Channels_alpha, convertTo,
|
||||
int runs = (sz.width <= 640) ? 8 : 1;
|
||||
TEST_CYCLE_MULTIRUN(runs) src.convertTo(dst, depthDst, alpha);
|
||||
|
||||
double eps = depthSrc <= CV_32S ? 1e-12 : (FLT_EPSILON * maxValue);
|
||||
double eps = depthSrc <= CV_32S && (depthDst <= CV_32S || depthDst == CV_64F) ? 1e-12 : (FLT_EPSILON * maxValue);
|
||||
eps = eps * std::max(1.0, fabs(alpha));
|
||||
SANITY_CHECK(dst, eps);
|
||||
}
|
||||
|
||||
@@ -27,11 +27,7 @@ PERF_TEST_P( Size_Depth_Channels, split,
|
||||
int runs = (sz.width <= 640) ? 8 : 1;
|
||||
TEST_CYCLE_MULTIRUN(runs) split(m, (vector<Mat>&)mv);
|
||||
|
||||
#if defined (__aarch64__)
|
||||
SANITY_CHECK(mv, 2e-5);
|
||||
#else
|
||||
SANITY_CHECK(mv, 1e-12);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user