David Barker | 838367d | 2017-01-12 15:13:28 +0000 | [diff] [blame] | 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 | |
Tom Finegan | 7a07ece | 2017-02-07 17:14:05 -0800 | [diff] [blame] | 12 | #include "third_party/googletest/src/googletest/include/gtest/gtest.h" |
Sean Purser-Haskell | 05a12ea | 2017-03-30 14:56:50 -0700 | [diff] [blame] | 13 | #include "test/warp_filter_test_util.h" |
David Barker | 838367d | 2017-01-12 15:13:28 +0000 | [diff] [blame] | 14 | |
| 15 | using std::tr1::tuple; |
| 16 | using std::tr1::make_tuple; |
| 17 | using libaom_test::ACMRandom; |
Sean Purser-Haskell | 05a12ea | 2017-03-30 14:56:50 -0700 | [diff] [blame] | 18 | using libaom_test::AV1WarpFilter::AV1WarpFilterTest; |
Sebastien Alaiwan | 71e8784 | 2017-04-12 16:03:28 +0200 | [diff] [blame] | 19 | #if CONFIG_HIGHBITDEPTH |
David Barker | 2bcf280 | 2017-04-05 11:44:31 +0100 | [diff] [blame] | 20 | using libaom_test::AV1HighbdWarpFilter::AV1HighbdWarpFilterTest; |
| 21 | #endif |
David Barker | 838367d | 2017-01-12 15:13:28 +0000 | [diff] [blame] | 22 | |
| 23 | namespace { |
| 24 | |
Cheng Chen | fbaf513 | 2017-11-09 11:45:57 -0800 | [diff] [blame] | 25 | #if CONFIG_JNT_COMP && CONFIG_CONVOLVE_ROUND && HAVE_SSE4_1 |
| 26 | TEST_P(AV1WarpFilterTest, CheckOutput) { RunCheckOutput(GET_PARAM(3)); } |
| 27 | |
| 28 | INSTANTIATE_TEST_CASE_P( |
| 29 | SSE4_1, AV1WarpFilterTest, |
| 30 | libaom_test::AV1WarpFilter::BuildParams(av1_warp_affine_sse4_1)); |
| 31 | |
Cheng Chen | cce312f | 2017-11-09 16:19:17 -0800 | [diff] [blame] | 32 | #if CONFIG_HIGHBITDEPTH |
| 33 | TEST_P(AV1HighbdWarpFilterTest, CheckOutput) { |
| 34 | RunCheckOutput(av1_highbd_warp_affine_sse4_1); |
| 35 | } |
| 36 | |
| 37 | INSTANTIATE_TEST_CASE_P(SSE4_1, AV1HighbdWarpFilterTest, |
| 38 | libaom_test::AV1HighbdWarpFilter::GetDefaultParams()); |
| 39 | #endif |
Cheng Chen | fbaf513 | 2017-11-09 11:45:57 -0800 | [diff] [blame] | 40 | |
| 41 | #else // CONFIG_JNT_COMP && CONFIG_CONVOLVE_ROUND && HAVE_SSE4_1 |
David Barker | d8a423c | 2017-04-19 10:32:43 +0100 | [diff] [blame] | 42 | TEST_P(AV1WarpFilterTest, CheckOutput) { RunCheckOutput(GET_PARAM(3)); } |
David Barker | 838367d | 2017-01-12 15:13:28 +0000 | [diff] [blame] | 43 | |
David Barker | d8a423c | 2017-04-19 10:32:43 +0100 | [diff] [blame] | 44 | INSTANTIATE_TEST_CASE_P( |
| 45 | SSE2, AV1WarpFilterTest, |
| 46 | libaom_test::AV1WarpFilter::BuildParams(av1_warp_affine_sse2)); |
David Barker | 838367d | 2017-01-12 15:13:28 +0000 | [diff] [blame] | 47 | |
David Barker | c2d500a | 2017-06-06 11:41:50 +0100 | [diff] [blame] | 48 | #if HAVE_SSSE3 |
David Barker | d8a423c | 2017-04-19 10:32:43 +0100 | [diff] [blame] | 49 | INSTANTIATE_TEST_CASE_P( |
| 50 | SSSE3, AV1WarpFilterTest, |
| 51 | libaom_test::AV1WarpFilter::BuildParams(av1_warp_affine_ssse3)); |
David Barker | c2d500a | 2017-06-06 11:41:50 +0100 | [diff] [blame] | 52 | #endif |
David Barker | d8a423c | 2017-04-19 10:32:43 +0100 | [diff] [blame] | 53 | |
| 54 | #if CONFIG_HIGHBITDEPTH && HAVE_SSSE3 |
David Barker | 521383a | 2017-04-05 14:07:12 +0100 | [diff] [blame] | 55 | TEST_P(AV1HighbdWarpFilterTest, CheckOutput) { |
| 56 | RunCheckOutput(av1_highbd_warp_affine_ssse3); |
| 57 | } |
| 58 | |
| 59 | INSTANTIATE_TEST_CASE_P(SSSE3, AV1HighbdWarpFilterTest, |
| 60 | libaom_test::AV1HighbdWarpFilter::GetDefaultParams()); |
| 61 | #endif |
Cheng Chen | fbaf513 | 2017-11-09 11:45:57 -0800 | [diff] [blame] | 62 | #endif // CONFIG_JNT_COMP && CONFIG_CONVOVLE_ROUND && HAVE_SSE4_1 |
David Barker | 521383a | 2017-04-05 14:07:12 +0100 | [diff] [blame] | 63 | |
David Barker | 838367d | 2017-01-12 15:13:28 +0000 | [diff] [blame] | 64 | } // namespace |