aboutsummaryrefslogtreecommitdiff
path: root/src/dsp/x86/common_sse4_test.cc
diff options
context:
space:
mode:
authorSebastian Ramacher <sramacher@debian.org>2024-12-29 12:50:37 +0000
committerSebastian Ramacher <sramacher@debian.org>2024-12-29 12:50:37 +0000
commit873c687c09e0a1a78a8f3601d31330ad1897e484 (patch)
treeff2fa2e2d27b55c002a6d46d50aab2c66e0bf21a /src/dsp/x86/common_sse4_test.cc
parent395b1f6877fbc2666383f3428f17400c35aa52a4 (diff)
parentb9ae809f200982119d16ec9613f3db95eca923b9 (diff)
downloadlibgav1-873c687c09e0a1a78a8f3601d31330ad1897e484.tar.gz
libgav1-873c687c09e0a1a78a8f3601d31330ad1897e484.tar.bz2
libgav1-873c687c09e0a1a78a8f3601d31330ad1897e484.zip
Merge branch 'master' into 'scrub-obsolete'
# Conflicts: # debian/changelog
Diffstat (limited to 'src/dsp/x86/common_sse4_test.cc')
-rw-r--r--src/dsp/x86/common_sse4_test.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/dsp/x86/common_sse4_test.cc b/src/dsp/x86/common_sse4_test.cc
index 3288cfc..592630c 100644
--- a/src/dsp/x86/common_sse4_test.cc
+++ b/src/dsp/x86/common_sse4_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_sse4.h"
+#include "src/dsp/x86/common_sse4_test.h"
#include "gtest/gtest.h"
+#include "src/utils/cpu.h"
#if LIBGAV1_TARGETING_SSE4_1
#include <cstdint>
+#include "src/dsp/x86/common_sse4.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, SSE41RightShiftWithRoundingS16) {
+void SSE41RightShiftWithRoundingS16Test() {
for (int bits = 0; bits < 16; ++bits) {
const int bias = (1 << bits) >> 1;
for (int32_t value = INT16_MIN; value <= INT16_MAX; ++value) {
@@ -50,15 +51,20 @@ TEST(CommonDspTest, SSE41RightShiftWithRoundingS16) {
}
}
-} // namespace
} // namespace dsp
} // namespace libgav1
#else // !LIBGAV1_TARGETING_SSE4_1
-TEST(CommonDspTest, SSE41) {
+namespace libgav1 {
+namespace dsp {
+
+void SSE41RightShiftWithRoundingS16Test() {
GTEST_SKIP() << "Build this module for x86(-64) with SSE4 enabled to enable "
"the tests.";
}
+} // namespace dsp
+} // namespace libgav1
+
#endif // LIBGAV1_TARGETING_SSE4_1