Limit 32S data in perf test for addWeighted to avoid integer overflow

pull/82/head
Andrey Kamaev 12 years ago
parent c13eb07d47
commit b45a870d9a
  1. 7
      modules/core/perf/perf_addWeighted.cpp

@ -23,6 +23,13 @@ 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)
{
//see ticket 1529: absdiff can be without saturation on 32S
src1 /= 8;
src2 /= 8;
}
TEST_CYCLE() cv::addWeighted( src1, alpha, src2, beta, gamma, dst, dst.type() );
SANITY_CHECK(dst);

Loading…
Cancel
Save