mirror of
https://github.com/opencv/opencv.git
synced 2026-07-28 23:03:03 +04:00
Merge pull request #29581 from varun-jaiswal17/fix_ci-warnings
fix MSVC C4293 warning in CV_ELEM_SIZE1 macro
This commit is contained in:
@@ -521,10 +521,11 @@ Cv64suf;
|
||||
CV_16U - 2 bytes
|
||||
...
|
||||
*/
|
||||
// '& 15' == '- 16' for depth in [16,31] here, but avoids a spurious MSVC C4293 on this ternary.
|
||||
#define CV_ELEM_SIZE1(type) \
|
||||
((int)((CV_MAT_DEPTH(type) < 16 \
|
||||
? (0x1114881228442211ULL >> (CV_MAT_DEPTH(type) * 4)) \
|
||||
: (0x0000000000000001ULL >> ((CV_MAT_DEPTH(type) - 16) * 4))) & 15))
|
||||
? (0x1114881228442211ULL >> ((CV_MAT_DEPTH(type) & 15) * 4)) \
|
||||
: (0x0000000000000001ULL >> ((CV_MAT_DEPTH(type) & 15) * 4))) & 15))
|
||||
|
||||
#define CV_ELEM_SIZE(type) (CV_MAT_CN(type)*CV_ELEM_SIZE1(type))
|
||||
|
||||
|
||||
@@ -54,8 +54,9 @@ PERF_TEST_P(PointsNum_Algo, solvePnP,
|
||||
}
|
||||
|
||||
SANITY_CHECK(rvec, 1e-4);
|
||||
// the check is relaxed from 1e-4 to 2e-2 after LevMarq replacement
|
||||
SANITY_CHECK(tvec, 2e-2);
|
||||
// the check is relaxed from 1e-4 to 2e-2 after LevMarq replacement (#21018),
|
||||
// then to 3e-2 after the cv::Mat broadcasting element-wise engine rewrite (#29426)
|
||||
SANITY_CHECK(tvec, 3e-2);
|
||||
}
|
||||
|
||||
PERF_TEST_P(PointsNum_Algo, solvePnPSmallPoints,
|
||||
|
||||
Reference in New Issue
Block a user