aboutsummaryrefslogtreecommitdiff
path: root/src/dsp/x86/common_sse4_test.cc
diff options
context:
space:
mode:
authorBoyuan Yang <byang@debian.org>2023-11-27 22:46:29 -0500
committerBoyuan Yang <byang@debian.org>2023-11-27 22:46:29 -0500
commit19564cb4f77660cdb2f980ca619d4b979b9fe342 (patch)
treeff97ccd1471553f1e861c8ea747faa45a023e119 /src/dsp/x86/common_sse4_test.cc
parentd4dbf19f6b0181ee78034bfe4caf189d1c016998 (diff)
downloadlibgav1-19564cb4f77660cdb2f980ca619d4b979b9fe342.tar.gz
libgav1-19564cb4f77660cdb2f980ca619d4b979b9fe342.tar.bz2
libgav1-19564cb4f77660cdb2f980ca619d4b979b9fe342.zip
New upstream version 0.19.0
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