diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-15 09:23:27 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-15 09:23:27 +0000 |
commit | a6bdef775db1b8791f1bed8dcc34cd5f5ebb9392 (patch) | |
tree | 756b70279c1f9558e435faa2e82fda941424ae04 /src/dsp/cdef_test.cc | |
parent | d8f883b2b6856bed4ff36cd1a39e933e93d630f1 (diff) | |
parent | 3259758f9a1a85933bcf4c4136fe280b21198b7b (diff) | |
download | libgav1-aml_tz5_341510010.tar.gz |
Snap for 11224086 from 3259758f9a1a85933bcf4c4136fe280b21198b7b to mainline-tzdata5-releaseaml_tz5_341510070aml_tz5_341510050aml_tz5_341510010aml_tz5_341510010
Change-Id: If9e5531e6158619080b6ddbf0fbfc5f4dadfdaa7
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]); } } |