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 "./vp8_rtcd.h" | 16 #include "./vp8_rtcd.h" |
17 #include "vp8/common/blockd.h" | 17 #include "vp8/common/blockd.h" |
18 #include "vp8/encoder/block.h" | 18 #include "vp8/encoder/block.h" |
19 #include "vpx_mem/vpx_mem.h" | 19 #include "vpx_mem/vpx_mem.h" |
20 | 20 |
21 typedef void (*subtract_b_fn_t)(BLOCK *be, BLOCKD *bd, int pitch); | 21 typedef void (*SubtractBlockFunc)(BLOCK *be, BLOCKD *bd, int pitch); |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 class SubtractBlockTest : public ::testing::TestWithParam<subtract_b_fn_t> { | 25 class SubtractBlockTest : public ::testing::TestWithParam<SubtractBlockFunc> { |
26 public: | 26 public: |
27 virtual void TearDown() { | 27 virtual void TearDown() { |
28 libvpx_test::ClearSystemState(); | 28 libvpx_test::ClearSystemState(); |
29 } | 29 } |
30 }; | 30 }; |
31 | 31 |
32 using libvpx_test::ACMRandom; | 32 using libvpx_test::ACMRandom; |
33 | 33 |
34 TEST_P(SubtractBlockTest, SimpleSubtract) { | 34 TEST_P(SubtractBlockTest, SimpleSubtract) { |
35 ACMRandom rnd(ACMRandom::DeterministicSeed()); | 35 ACMRandom rnd(ACMRandom::DeterministicSeed()); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 INSTANTIATE_TEST_CASE_P(MMX, SubtractBlockTest, | 114 INSTANTIATE_TEST_CASE_P(MMX, SubtractBlockTest, |
115 ::testing::Values(vp8_subtract_b_mmx)); | 115 ::testing::Values(vp8_subtract_b_mmx)); |
116 #endif | 116 #endif |
117 | 117 |
118 #if HAVE_SSE2 | 118 #if HAVE_SSE2 |
119 INSTANTIATE_TEST_CASE_P(SSE2, SubtractBlockTest, | 119 INSTANTIATE_TEST_CASE_P(SSE2, SubtractBlockTest, |
120 ::testing::Values(vp8_subtract_b_sse2)); | 120 ::testing::Values(vp8_subtract_b_sse2)); |
121 #endif | 121 #endif |
122 | 122 |
123 } // namespace | 123 } // namespace |
OLD | NEW |