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 #include <stdlib.h> | 10 #include <stdlib.h> |
11 #include <new> | 11 #include <new> |
12 | 12 |
13 #include "third_party/googletest/src/include/gtest/gtest.h" | 13 #include "third_party/googletest/src/include/gtest/gtest.h" |
14 | 14 |
| 15 #include "test/clear_system_state.h" |
| 16 |
15 #include "vpx/vpx_integer.h" | 17 #include "vpx/vpx_integer.h" |
16 #include "vpx_config.h" | 18 #include "vpx_config.h" |
17 extern "C" { | 19 extern "C" { |
18 #if CONFIG_VP8_ENCODER | 20 #if CONFIG_VP8_ENCODER |
19 # include "vp8/common/variance.h" | 21 # include "vp8/common/variance.h" |
20 # include "vp8_rtcd.h" | 22 # include "vp8_rtcd.h" |
21 #endif | 23 #endif |
22 #if CONFIG_VP9_ENCODER | 24 #if CONFIG_VP9_ENCODER |
23 # include "vp9/encoder/vp9_variance.h" | 25 # include "vp9/encoder/vp9_variance.h" |
24 # include "vp9_rtcd.h" | 26 # include "vp9_rtcd.h" |
(...skipping 19 matching lines...) Expand all Loading... |
44 block_size_ = width_ * height_; | 46 block_size_ = width_ * height_; |
45 src_ = new uint8_t[block_size_]; | 47 src_ = new uint8_t[block_size_]; |
46 ref_ = new uint8_t[block_size_]; | 48 ref_ = new uint8_t[block_size_]; |
47 ASSERT_TRUE(src_ != NULL); | 49 ASSERT_TRUE(src_ != NULL); |
48 ASSERT_TRUE(ref_ != NULL); | 50 ASSERT_TRUE(ref_ != NULL); |
49 } | 51 } |
50 | 52 |
51 virtual void TearDown() { | 53 virtual void TearDown() { |
52 delete[] src_; | 54 delete[] src_; |
53 delete[] ref_; | 55 delete[] ref_; |
| 56 libvpx_test::ClearSystemState(); |
54 } | 57 } |
55 | 58 |
56 protected: | 59 protected: |
57 void ZeroTest(); | 60 void ZeroTest(); |
58 void OneQuarterTest(); | 61 void OneQuarterTest(); |
59 | 62 |
60 uint8_t* src_; | 63 uint8_t* src_; |
61 uint8_t* ref_; | 64 uint8_t* ref_; |
62 int width_; | 65 int width_; |
63 int height_; | 66 int height_; |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 make_tuple(8, 8, variance8x8_wmt), | 202 make_tuple(8, 8, variance8x8_wmt), |
200 make_tuple(8, 16, variance8x16_wmt), | 203 make_tuple(8, 16, variance8x16_wmt), |
201 make_tuple(16, 8, variance16x8_wmt), | 204 make_tuple(16, 8, variance16x8_wmt), |
202 make_tuple(16, 16, variance16x16_wmt))); | 205 make_tuple(16, 16, variance16x16_wmt))); |
203 #endif | 206 #endif |
204 #endif // CONFIG_VP9_ENCODER | 207 #endif // CONFIG_VP9_ENCODER |
205 | 208 |
206 } // namespace vp9 | 209 } // namespace vp9 |
207 | 210 |
208 } // namespace | 211 } // namespace |
OLD | NEW |