OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "third_party/googletest/src/include/gtest/gtest.h" | 11 #include "third_party/googletest/src/include/gtest/gtest.h" |
12 #include "test/acm_random.h" | 12 #include "test/acm_random.h" |
13 #include "test/clear_system_state.h" | 13 #include "test/clear_system_state.h" |
14 #include "test/register_state_check.h" | 14 #include "test/register_state_check.h" |
15 #include "./vpx_config.h" | 15 #include "./vpx_config.h" |
16 #include "./vp9_rtcd.h" | 16 #include "./vp9_rtcd.h" |
17 #include "vp9/common/vp9_blockd.h" | 17 #include "vp9/common/vp9_blockd.h" |
18 #include "vpx_mem/vpx_mem.h" | 18 #include "vpx_mem/vpx_mem.h" |
19 | 19 |
20 typedef void (*subtract_fn_t)(int rows, int cols, | 20 typedef void (*SubtractFunc)(int rows, int cols, |
21 int16_t *diff_ptr, ptrdiff_t diff_stride, | 21 int16_t *diff_ptr, ptrdiff_t diff_stride, |
22 const uint8_t *src_ptr, ptrdiff_t src_stride, | 22 const uint8_t *src_ptr, ptrdiff_t src_stride, |
23 const uint8_t *pred_ptr, ptrdiff_t pred_stride); | 23 const uint8_t *pred_ptr, ptrdiff_t pred_stride); |
24 | 24 |
25 namespace vp9 { | 25 namespace vp9 { |
26 | 26 |
27 class VP9SubtractBlockTest : public ::testing::TestWithParam<subtract_fn_t> { | 27 class VP9SubtractBlockTest : public ::testing::TestWithParam<SubtractFunc> { |
28 public: | 28 public: |
29 virtual void TearDown() { | 29 virtual void TearDown() { |
30 libvpx_test::ClearSystemState(); | 30 libvpx_test::ClearSystemState(); |
31 } | 31 } |
32 }; | 32 }; |
33 | 33 |
34 using libvpx_test::ACMRandom; | 34 using libvpx_test::ACMRandom; |
35 | 35 |
36 TEST_P(VP9SubtractBlockTest, SimpleSubtract) { | 36 TEST_P(VP9SubtractBlockTest, SimpleSubtract) { |
37 ACMRandom rnd(ACMRandom::DeterministicSeed()); | 37 ACMRandom rnd(ACMRandom::DeterministicSeed()); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } | 89 } |
90 | 90 |
91 INSTANTIATE_TEST_CASE_P(C, VP9SubtractBlockTest, | 91 INSTANTIATE_TEST_CASE_P(C, VP9SubtractBlockTest, |
92 ::testing::Values(vp9_subtract_block_c)); | 92 ::testing::Values(vp9_subtract_block_c)); |
93 | 93 |
94 #if HAVE_SSE2 && CONFIG_USE_X86INC | 94 #if HAVE_SSE2 && CONFIG_USE_X86INC |
95 INSTANTIATE_TEST_CASE_P(SSE2, VP9SubtractBlockTest, | 95 INSTANTIATE_TEST_CASE_P(SSE2, VP9SubtractBlockTest, |
96 ::testing::Values(vp9_subtract_block_sse2)); | 96 ::testing::Values(vp9_subtract_block_sse2)); |
97 #endif | 97 #endif |
98 } // namespace vp9 | 98 } // namespace vp9 |
OLD | NEW |