speed up accumulate, accumulateSquare, accumulateProduct and accumulateWeighted using SIMD

* use SSE and/or AVX based on configuration
  * revise the test to verify the implementation
pull/6798/head
Tomoaki Teshima 8 years ago
parent da69cd08db
commit 3c2f7ecc97
  1. 1364
      modules/imgproc/src/accum.cpp
  2. 6
      modules/video/test/test_accum.cpp

File diff suppressed because it is too large Load Diff

@ -72,11 +72,11 @@ void CV_AccumBaseTest::get_test_array_types_and_sizes( int test_case_idx,
vector<vector<Size> >& sizes, vector<vector<int> >& types )
{
RNG& rng = ts->get_rng();
int depth = cvtest::randInt(rng) % 3, cn = cvtest::randInt(rng) & 1 ? 3 : 1;
int accdepth = std::max((int)(cvtest::randInt(rng) % 2 + 1), depth);
int depth = cvtest::randInt(rng) % 4, cn = cvtest::randInt(rng) & 1 ? 3 : 1;
int accdepth = (int)(cvtest::randInt(rng) % 2 + 1);
int i, input_count = (int)test_array[INPUT].size();
cvtest::ArrayTest::get_test_array_types_and_sizes( test_case_idx, sizes, types );
depth = depth == 0 ? CV_8U : depth == 1 ? CV_32F : CV_64F;
depth = depth == 0 ? CV_8U : depth == 1 ? CV_16U : depth == 2 ? CV_32F : CV_64F;
accdepth = accdepth == 1 ? CV_32F : CV_64F;
accdepth = MAX(accdepth, depth);

Loading…
Cancel
Save