diff options
author | Boyuan Yang <byang@debian.org> | 2023-11-27 22:46:32 -0500 |
---|---|---|
committer | Boyuan Yang <byang@debian.org> | 2023-11-27 22:46:32 -0500 |
commit | 7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d (patch) | |
tree | 4ed468528001d8e80e3be09413ae927ca2ac05ce /src/dsp/x86/common_avx2_test.cc | |
parent | 0d1e75e423265689dd49c7d6023d8bba70ca4d05 (diff) | |
parent | 19564cb4f77660cdb2f980ca619d4b979b9fe342 (diff) | |
download | libgav1-7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d.tar.gz libgav1-7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d.tar.bz2 libgav1-7fee0fd1b17b4f963fa1db74c3a5fcc3ff142e0d.zip |
Update upstream source from tag 'upstream/0.19.0'
Update to upstream version '0.19.0'
with Debian dir a4233a4a247b06e8d6e36d07d059f03582d97721
Diffstat (limited to 'src/dsp/x86/common_avx2_test.cc')
-rw-r--r-- | src/dsp/x86/common_avx2_test.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/dsp/x86/common_avx2_test.cc b/src/dsp/x86/common_avx2_test.cc index 2062683..4b294b0 100644 --- a/src/dsp/x86/common_avx2_test.cc +++ b/src/dsp/x86/common_avx2_test.cc @@ -12,26 +12,27 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/dsp/x86/common_avx2.h" +#include "src/dsp/x86/common_avx2_test.h" #include "gtest/gtest.h" +#include "src/utils/cpu.h" #if LIBGAV1_TARGETING_AVX2 #include <cstdint> +#include "src/dsp/x86/common_avx2.h" #include "src/utils/common.h" namespace libgav1 { namespace dsp { -namespace { // Show that RightShiftWithRounding_S16() is equal to // RightShiftWithRounding() only for values less than or equal to // INT16_MAX - ((1 << bits) >> 1). In particular, if bits == 16, then // RightShiftWithRounding_S16() is equal to RightShiftWithRounding() only for // negative values. -TEST(CommonDspTest, AVX2RightShiftWithRoundingS16) { +void AVX2RightShiftWithRoundingS16Test() { for (int bits = 0; bits < 16; ++bits) { const int bias = (1 << bits) >> 1; for (int32_t value = INT16_MIN; value <= INT16_MAX; ++value) { @@ -53,15 +54,20 @@ TEST(CommonDspTest, AVX2RightShiftWithRoundingS16) { } } -} // namespace } // namespace dsp } // namespace libgav1 #else // !LIBGAV1_TARGETING_AVX2 -TEST(CommonDspTest, AVX2) { +namespace libgav1 { +namespace dsp { + +void AVX2RightShiftWithRoundingS16Test() { GTEST_SKIP() << "Build this module for x86(-64) with AVX2 enabled to enable " "the tests."; } +} // namespace dsp +} // namespace libgav1 + #endif // LIBGAV1_TARGETING_AVX2 |