xref: /aosp_15_r20/external/libaom/test/hiprec_convolve_test.cc (revision 77c1e3ccc04c968bd2bc212e87364f250e820521)
1 /*
2  * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
3  *
4  * This source code is subject to the terms of the BSD 2 Clause License and
5  * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6  * was not distributed with this source code in the LICENSE file, you can
7  * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8  * Media Patent License 1.0 was not distributed with this source code in the
9  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
10  */
11 
12 #include <tuple>
13 
14 #include "gtest/gtest.h"
15 #include "test/hiprec_convolve_test_util.h"
16 
17 using libaom_test::ACMRandom;
18 #if CONFIG_AV1_HIGHBITDEPTH
19 using libaom_test::AV1HighbdHiprecConvolve::AV1HighbdHiprecConvolveTest;
20 GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AV1HighbdHiprecConvolveTest);
21 #endif
22 using libaom_test::AV1HiprecConvolve::AV1HiprecConvolveTest;
23 GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AV1HiprecConvolveTest);
24 using std::make_tuple;
25 using std::tuple;
26 
27 namespace {
28 
TEST_P(AV1HiprecConvolveTest,CheckOutput)29 TEST_P(AV1HiprecConvolveTest, CheckOutput) { RunCheckOutput(GET_PARAM(3)); }
TEST_P(AV1HiprecConvolveTest,DISABLED_SpeedTest)30 TEST_P(AV1HiprecConvolveTest, DISABLED_SpeedTest) {
31   RunSpeedTest(GET_PARAM(3));
32 }
33 #if HAVE_SSE2
34 INSTANTIATE_TEST_SUITE_P(SSE2, AV1HiprecConvolveTest,
35                          libaom_test::AV1HiprecConvolve::BuildParams(
36                              av1_wiener_convolve_add_src_sse2));
37 #endif
38 #if HAVE_AVX2
39 INSTANTIATE_TEST_SUITE_P(AVX2, AV1HiprecConvolveTest,
40                          libaom_test::AV1HiprecConvolve::BuildParams(
41                              av1_wiener_convolve_add_src_avx2));
42 #endif
43 #if HAVE_NEON
44 INSTANTIATE_TEST_SUITE_P(NEON, AV1HiprecConvolveTest,
45                          libaom_test::AV1HiprecConvolve::BuildParams(
46                              av1_wiener_convolve_add_src_neon));
47 #endif
48 
49 #if CONFIG_AV1_HIGHBITDEPTH
50 #if HAVE_SSSE3 || HAVE_AVX2 || HAVE_NEON
TEST_P(AV1HighbdHiprecConvolveTest,CheckOutput)51 TEST_P(AV1HighbdHiprecConvolveTest, CheckOutput) {
52   RunCheckOutput(GET_PARAM(4));
53 }
TEST_P(AV1HighbdHiprecConvolveTest,DISABLED_SpeedTest)54 TEST_P(AV1HighbdHiprecConvolveTest, DISABLED_SpeedTest) {
55   RunSpeedTest(GET_PARAM(4));
56 }
57 #if HAVE_SSSE3
58 INSTANTIATE_TEST_SUITE_P(SSSE3, AV1HighbdHiprecConvolveTest,
59                          libaom_test::AV1HighbdHiprecConvolve::BuildParams(
60                              av1_highbd_wiener_convolve_add_src_ssse3));
61 #endif
62 #if HAVE_AVX2
63 INSTANTIATE_TEST_SUITE_P(AVX2, AV1HighbdHiprecConvolveTest,
64                          libaom_test::AV1HighbdHiprecConvolve::BuildParams(
65                              av1_highbd_wiener_convolve_add_src_avx2));
66 #endif
67 
68 #if HAVE_NEON
69 INSTANTIATE_TEST_SUITE_P(NEON, AV1HighbdHiprecConvolveTest,
70                          libaom_test::AV1HighbdHiprecConvolve::BuildParams(
71                              av1_highbd_wiener_convolve_add_src_neon));
72 #endif
73 #endif
74 #endif  // CONFIG_AV1_HIGHBITDEPTH
75 
76 }  // namespace
77