Skip to content

Commit b6a49a8

Browse files
committed
Added extra test tag for Qualcomm DSP (disabled by default)
1 parent a0e609f commit b6a49a8

10 files changed

+38
-12
lines changed

modules/fastcv/perf/perf_blur_dsp.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ PERF_TEST_P(Filter2DPerfTest_DSP, run,
1616
)
1717
)
1818
{
19+
applyTestTag(CV_TEST_TAG_DSP);
20+
1921
//Initialize DSP
2022
int initStatus = cv::fastcv::dsp::fcvdspinit();
2123
ASSERT_EQ(initStatus, 0) << "Failed to initialize FastCV DSP";
@@ -68,4 +70,4 @@ PERF_TEST_P(Filter2DPerfTest_DSP, run,
6870
SANITY_CHECK_NOTHING();
6971
}
7072

71-
} // namespace
73+
} // namespace

modules/fastcv/perf/perf_edges_dsp.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ PERF_TEST_P(CannyPerfTest, run,
1717
)
1818
)
1919
{
20+
applyTestTag(CV_TEST_TAG_DSP);
21+
2022
//Initialize DSP
2123
int initStatus = cv::fastcv::dsp::fcvdspinit();
2224
ASSERT_EQ(initStatus, 0) << "Failed to initialize FastCV DSP";
@@ -29,7 +31,7 @@ PERF_TEST_P(CannyPerfTest, run,
2931
cv::Mat src;
3032
src.allocator = cv::fastcv::getQcAllocator();
3133
src.create(srcSize, CV_8UC1);
32-
34+
3335
cv::Mat dst;
3436
dst.allocator = cv::fastcv::getQcAllocator();
3537

@@ -44,11 +46,11 @@ PERF_TEST_P(CannyPerfTest, run,
4446
cv::fastcv::dsp::Canny(src, dst, lowThreshold, highThreshold, apertureSize, L2gradient);
4547
stopTimer();
4648
}
47-
49+
4850
//De-Initialize DSP
4951
cv::fastcv::dsp::fcvdspdeinit();
5052

5153
SANITY_CHECK_NOTHING();
5254
}
5355

54-
} //namespace
56+
} //namespace

modules/fastcv/perf/perf_fft_dsp.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ typedef perf::TestBaseWithParam<cv::Size> FFT_DSPExtPerfTest;
1111

1212
PERF_TEST_P_(FFT_DSPExtPerfTest, forward)
1313
{
14+
applyTestTag(CV_TEST_TAG_DSP);
15+
1416
//Initialize DSP
1517
int initStatus = cv::fastcv::dsp::fcvdspinit();
1618
ASSERT_EQ(initStatus, 0) << "Failed to initialize FastCV DSP";
@@ -33,7 +35,7 @@ PERF_TEST_P_(FFT_DSPExtPerfTest, forward)
3335
cv::fastcv::dsp::FFT(src, dst);
3436
stopTimer();
3537
}
36-
38+
3739
//De-Initialize DSP
3840
cv::fastcv::dsp::fcvdspdeinit();
3941

@@ -42,6 +44,8 @@ PERF_TEST_P_(FFT_DSPExtPerfTest, forward)
4244

4345
PERF_TEST_P_(FFT_DSPExtPerfTest, inverse)
4446
{
47+
applyTestTag(CV_TEST_TAG_DSP);
48+
4549
//Initialize DSP
4650
int initStatus = cv::fastcv::dsp::fcvdspinit();
4751
ASSERT_EQ(initStatus, 0) << "Failed to initialize FastCV DSP";
@@ -53,13 +57,13 @@ PERF_TEST_P_(FFT_DSPExtPerfTest, inverse)
5357
Mat src;
5458
src.allocator = cv::fastcv::getQcAllocator();
5559
src.create(size, CV_8UC1);
56-
60+
5761
cvtest::randUni(rng, src, Scalar::all(0), Scalar::all(256));
5862

5963
Mat fwd, back;
6064
fwd.allocator = cv::fastcv::getQcAllocator();
6165
back.allocator = cv::fastcv::getQcAllocator();
62-
66+
6367
cv::fastcv::dsp::FFT(src, fwd);
6468

6569
while (next())

modules/fastcv/perf/perf_sad_dsp.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ PERF_TEST_P(SumOfAbsDiffsPerfTest, run,
1616
cv::Size(1920, 1080)) // 1080p
1717
)
1818
{
19+
applyTestTag(CV_TEST_TAG_DSP);
20+
1921
// Initialize FastCV DSP
2022
int initStatus = cv::fastcv::dsp::fcvdspinit();
2123
ASSERT_EQ(initStatus, 0) << "Failed to initialize FastCV DSP";

modules/fastcv/perf/perf_thresh_dsp.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ PERF_TEST_P(ThresholdOtsuPerfTest, run,
1616
)
1717
)
1818
{
19+
applyTestTag(CV_TEST_TAG_DSP);
20+
1921
//Initialize DSP
2022
int initStatus = cv::fastcv::dsp::fcvdspinit();
2123
ASSERT_EQ(initStatus, 0) << "Failed to initialize FastCV DSP";
@@ -34,7 +36,7 @@ PERF_TEST_P(ThresholdOtsuPerfTest, run,
3436

3537
cv::Mat dst;
3638
dst.allocator = cv::fastcv::getQcAllocator();
37-
39+
3840
while (next())
3941
{
4042
startTimer();
@@ -47,4 +49,4 @@ PERF_TEST_P(ThresholdOtsuPerfTest, run,
4749
SANITY_CHECK_NOTHING();
4850
}
4951

50-
} // namespace
52+
} // namespace

modules/fastcv/test/test_blur_dsp.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ typedef testing::TestWithParam<tuple<Size, int, int>> Filter2DTest_DSP;
1111

1212
TEST_P(Filter2DTest_DSP, accuracy)
1313
{
14+
applyTestTag(CV_TEST_TAG_DSP);
15+
1416
//Initialize DSP
1517
int initStatus = cv::fastcv::dsp::fcvdspinit();
1618
ASSERT_EQ(initStatus, 0) << "Failed to initialize FastCV DSP";
@@ -70,4 +72,4 @@ INSTANTIATE_TEST_CASE_P(FastCV_Extension, Filter2DTest_DSP, Combine(
7072
/*kernel size*/ Values(3, 5, 7, 9, 11)
7173
));
7274

73-
}} // namespaces opencv_test, ::
75+
}} // namespaces opencv_test, ::

modules/fastcv/test/test_edges_dsp.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ namespace opencv_test { namespace {
99

1010
TEST(DSP_CannyTest, accuracy)
1111
{
12+
applyTestTag(CV_TEST_TAG_DSP);
13+
1214
//Initialize DSP
1315
int initStatus = cv::fastcv::dsp::fcvdspinit();
1416
ASSERT_EQ(initStatus, 0) << "Failed to initialize FastCV DSP";
@@ -23,7 +25,7 @@ TEST(DSP_CannyTest, accuracy)
2325

2426
int lowThreshold = 0;
2527
int highThreshold = 150;
26-
28+
2729
cv::fastcv::dsp::Canny(src, dst, lowThreshold, highThreshold, 3, true);
2830

2931
//De-Initialize DSP

modules/fastcv/test/test_fft_dsp.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class FFT_DSPExtTest : public ::testing::TestWithParam<cv::Size> {};
1111

1212
TEST_P(FFT_DSPExtTest, forward)
1313
{
14+
applyTestTag(CV_TEST_TAG_DSP);
15+
1416
//Initialize DSP
1517
int initStatus = cv::fastcv::dsp::fcvdspinit();
1618
ASSERT_EQ(initStatus, 0) << "Failed to initialize FastCV DSP";
@@ -46,14 +48,16 @@ TEST_P(FFT_DSPExtTest, forward)
4648

4749
TEST_P(FFT_DSPExtTest, inverse)
4850
{
51+
applyTestTag(CV_TEST_TAG_DSP);
52+
4953
//Initialize DSP
5054
int initStatus = cv::fastcv::dsp::fcvdspinit();
5155
ASSERT_EQ(initStatus, 0) << "Failed to initialize FastCV DSP";
5256

5357
Size size = GetParam();
5458

5559
RNG& rng = cv::theRNG();
56-
60+
5761
Mat src;
5862
src.allocator = cv::fastcv::getQcAllocator();
5963
src.create(size, CV_8UC1);

modules/fastcv/test/test_sad_dsp.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ namespace opencv_test { namespace {
1111

1212
TEST(SadTest, accuracy)
1313
{
14+
applyTestTag(CV_TEST_TAG_DSP);
15+
1416
//Initialize DSP
1517
int initStatus = cv::fastcv::dsp::fcvdspinit();
1618
ASSERT_EQ(initStatus, 0) << "Failed to initialize FastCV DSP";

modules/fastcv/test/test_thresh_dsp.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ namespace opencv_test { namespace {
99

1010
TEST(ThresholdOtsuTest, accuracy)
1111
{
12+
applyTestTag(CV_TEST_TAG_DSP);
13+
1214
//Initialize DSP
1315
int initStatus = cv::fastcv::dsp::fcvdspinit();
1416
ASSERT_EQ(initStatus, 0) << "Failed to initialize FastCV DSP";
@@ -46,6 +48,8 @@ TEST(ThresholdOtsuTest, accuracy)
4648

4749
TEST(ThresholdOtsuTest, inPlaceAccuracy)
4850
{
51+
applyTestTag(CV_TEST_TAG_DSP);
52+
4953
// Initialize DSP
5054
int initStatus = cv::fastcv::dsp::fcvdspinit();
5155
ASSERT_EQ(initStatus, 0) << "Failed to initialize FastCV DSP";

0 commit comments

Comments
 (0)