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