Commit 507f8add authored by Brad Kelly's avatar Brad Kelly

Implementing AVX512 Support for 2 and 4 channel mats for CV_64F format

parent 9d3d5e9d
...@@ -11,7 +11,7 @@ typedef perf::TestBaseWithParam<Size_MatType_OutMatDepth_t> Size_MatType_OutMatD ...@@ -11,7 +11,7 @@ typedef perf::TestBaseWithParam<Size_MatType_OutMatDepth_t> Size_MatType_OutMatD
PERF_TEST_P(Size_MatType_OutMatDepth, integral, PERF_TEST_P(Size_MatType_OutMatDepth, integral,
testing::Combine( testing::Combine(
testing::Values(TYPICAL_MAT_SIZES), testing::Values(TYPICAL_MAT_SIZES),
testing::Values(CV_8UC1, CV_8UC3, CV_8UC4), testing::Values(CV_8UC1, CV_8UC2, CV_8UC3, CV_8UC4),
testing::Values(CV_32S, CV_32F, CV_64F) testing::Values(CV_32S, CV_32F, CV_64F)
) )
) )
...@@ -32,9 +32,9 @@ PERF_TEST_P(Size_MatType_OutMatDepth, integral, ...@@ -32,9 +32,9 @@ PERF_TEST_P(Size_MatType_OutMatDepth, integral,
PERF_TEST_P(Size_MatType_OutMatDepth, integral_sqsum, PERF_TEST_P(Size_MatType_OutMatDepth, integral_sqsum,
testing::Combine( testing::Combine(
testing::Values(::perf::szVGA, ::perf::sz1080p), testing::Values(TYPICAL_MAT_SIZES),
testing::Values(CV_8UC1, CV_8UC4), testing::Values(CV_8UC1, CV_8UC2, CV_8UC3, CV_8UC4),
testing::Values(CV_32S, CV_32F) testing::Values(CV_32S, CV_32F, CV_64F)
) )
) )
{ {
...@@ -57,9 +57,9 @@ PERF_TEST_P(Size_MatType_OutMatDepth, integral_sqsum, ...@@ -57,9 +57,9 @@ PERF_TEST_P(Size_MatType_OutMatDepth, integral_sqsum,
PERF_TEST_P( Size_MatType_OutMatDepth, integral_sqsum_tilted, PERF_TEST_P( Size_MatType_OutMatDepth, integral_sqsum_tilted,
testing::Combine( testing::Combine(
testing::Values( ::perf::szVGA, ::perf::szODD , ::perf::sz1080p ), testing::Values(TYPICAL_MAT_SIZES),
testing::Values( CV_8UC1, CV_8UC4 ), testing::Values( CV_8UC1, CV_8UC2, CV_8UC3, CV_8UC4 ),
testing::Values( CV_32S, CV_32F ) testing::Values( CV_32S, CV_32F, CV_64F )
) )
) )
{ {
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
#include "opencv2/core/hal/intrin.hpp" #include "opencv2/core/hal/intrin.hpp"
#include "sumpixels.hpp" #include "sumpixels.hpp"
namespace cv namespace cv
{ {
...@@ -77,8 +76,8 @@ struct Integral_SIMD<uchar, double, double> { ...@@ -77,8 +76,8 @@ struct Integral_SIMD<uchar, double, double> {
{ {
#if CV_TRY_AVX512_SKX #if CV_TRY_AVX512_SKX
CV_UNUSED(_tiltedstep); CV_UNUSED(_tiltedstep);
// TODO: Add support for 1,2, and 4 channels // TODO: Add support for 1 channel input (WIP)
if (CV_CPU_HAS_SUPPORT_AVX512_SKX && !tilted && cn == 3){ if (CV_CPU_HAS_SUPPORT_AVX512_SKX && !tilted && ((cn >= 2) && (cn <= 4))){
opt_AVX512_SKX::calculate_integral_avx512(src, _srcstep, sum, _sumstep, opt_AVX512_SKX::calculate_integral_avx512(src, _srcstep, sum, _sumstep,
sqsum, _sqsumstep, width, height, cn); sqsum, _sqsumstep, width, height, cn);
return true; return true;
......
...@@ -1667,12 +1667,11 @@ void CV_IntegralTest::get_test_array_types_and_sizes( int test_case_idx, ...@@ -1667,12 +1667,11 @@ void CV_IntegralTest::get_test_array_types_and_sizes( int test_case_idx,
{ {
RNG& rng = ts->get_rng(); RNG& rng = ts->get_rng();
int depth = cvtest::randInt(rng) % 2, sum_depth; int depth = cvtest::randInt(rng) % 2, sum_depth;
int cn = cvtest::randInt(rng) % 3 + 1; int cn = cvtest::randInt(rng) % 4 + 1;
cvtest::ArrayTest::get_test_array_types_and_sizes( test_case_idx, sizes, types ); cvtest::ArrayTest::get_test_array_types_and_sizes( test_case_idx, sizes, types );
Size sum_size; Size sum_size;
depth = depth == 0 ? CV_8U : CV_32F; depth = depth == 0 ? CV_8U : CV_32F;
cn += cn == 2;
int b = (cvtest::randInt(rng) & 1) != 0; int b = (cvtest::randInt(rng) & 1) != 0;
sum_depth = depth == CV_8U && b ? CV_32S : b ? CV_32F : CV_64F; sum_depth = depth == CV_8U && b ? CV_32S : b ? CV_32F : CV_64F;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment