diff options
author | Sebastian Ramacher <sramacher@debian.org> | 2024-12-29 12:50:37 +0000 |
---|---|---|
committer | Sebastian Ramacher <sramacher@debian.org> | 2024-12-29 12:50:37 +0000 |
commit | 873c687c09e0a1a78a8f3601d31330ad1897e484 (patch) | |
tree | ff2fa2e2d27b55c002a6d46d50aab2c66e0bf21a /src/dsp/cdef_test.cc | |
parent | 395b1f6877fbc2666383f3428f17400c35aa52a4 (diff) | |
parent | b9ae809f200982119d16ec9613f3db95eca923b9 (diff) | |
download | libgav1-873c687c09e0a1a78a8f3601d31330ad1897e484.tar.gz libgav1-873c687c09e0a1a78a8f3601d31330ad1897e484.tar.bz2 libgav1-873c687c09e0a1a78a8f3601d31330ad1897e484.zip |
Merge branch 'master' into 'scrub-obsolete'
# Conflicts:
# debian/changelog
Diffstat (limited to 'src/dsp/cdef_test.cc')
-rw-r--r-- | src/dsp/cdef_test.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/dsp/cdef_test.cc b/src/dsp/cdef_test.cc index c25d7df..e2db17a 100644 --- a/src/dsp/cdef_test.cc +++ b/src/dsp/cdef_test.cc @@ -79,11 +79,11 @@ class CdefDirectionTest : public testing::TestWithParam<int> { const char* const test_case = test_info->test_suite_name(); if (absl::StartsWith(test_case, "C/")) { } else if (absl::StartsWith(test_case, "SSE41/")) { + if ((GetCpuInfo() & kSSE4_1) == 0) GTEST_SKIP() << "No SSE4.1 support!"; CdefInit_SSE4_1(); } else if (absl::StartsWith(test_case, "AVX2/")) { - if ((GetCpuInfo() & kAVX2) != 0) { - CdefInit_AVX2(); - } + if ((GetCpuInfo() & kAVX2) == 0) GTEST_SKIP() << "No AVX2 support!"; + CdefInit_AVX2(); } else if (absl::StartsWith(test_case, "NEON/")) { CdefInit_NEON(); } else { @@ -275,11 +275,11 @@ class CdefFilteringTest : public testing::TestWithParam<CdefTestParam> { } else if (absl::StartsWith(test_case, "NEON/")) { CdefInit_NEON(); } else if (absl::StartsWith(test_case, "SSE41/")) { + if ((GetCpuInfo() & kSSE4_1) == 0) GTEST_SKIP() << "No SSE4.1 support!"; CdefInit_SSE4_1(); } else if (absl::StartsWith(test_case, "AVX2/")) { - if ((GetCpuInfo() & kAVX2) != 0) { - CdefInit_AVX2(); - } + if ((GetCpuInfo() & kAVX2) == 0) GTEST_SKIP() << "No AVX2 support!"; + CdefInit_AVX2(); } else { FAIL() << "Unrecognized architecture prefix in test case name: " << test_case; @@ -304,7 +304,7 @@ template <int bitdepth, typename Pixel> void CdefFilteringTest<bitdepth, Pixel>::TestRandomValues(int num_runs) { const int id = static_cast<int>(param_.rows4x4 < 4) * 3 + (param_.subsampling_x + param_.subsampling_y) * 6; - absl::Duration elapsed_time; + absl::Duration elapsed_time[kMaxPlanes]; for (int num_tests = 0; num_tests < num_runs; ++num_tests) { for (int plane = kPlaneY; plane < kMaxPlanes; ++plane) { const int subsampling_x = (plane == kPlaneY) ? 0 : param_.subsampling_x; @@ -355,7 +355,7 @@ void CdefFilteringTest<bitdepth, Pixel>::TestRandomValues(int num_runs) { source_ + offset, kSourceStride, block_height, primary_strength_, secondary_strength_, damping_, direction_, dest_[plane], kTestBufferStride * sizeof(dest_[0][0])); - elapsed_time += absl::Now() - start; + elapsed_time[plane] += absl::Now() - start; } } @@ -379,7 +379,7 @@ void CdefFilteringTest<bitdepth, Pixel>::TestRandomValues(int num_runs) { ASSERT_NE(expected_digest, nullptr); test_utils::CheckMd5Digest(kCdef, kCdefFilterName, expected_digest, reinterpret_cast<uint8_t*>(dest_[plane]), - sizeof(dest_[plane]), elapsed_time); + sizeof(dest_[plane]), elapsed_time[plane]); } } |