| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 set_cfg(cfg); | 128 set_cfg(cfg); |
| 129 set_flags(flags); | 129 set_flags(flags); |
| 130 | 130 |
| 131 // Decode frame, and check the md5 matching. | 131 // Decode frame, and check the md5 matching. |
| 132 ASSERT_NO_FATAL_FAILURE(RunLoop(video, cfg)); | 132 ASSERT_NO_FATAL_FAILURE(RunLoop(video, cfg)); |
| 133 delete video; | 133 delete video; |
| 134 } | 134 } |
| 135 | 135 |
| 136 // Test VP8 decode in serial mode with single thread. | 136 // Test VP8 decode in serial mode with single thread. |
| 137 // NOTE: VP8 only support serial mode. | 137 // NOTE: VP8 only support serial mode. |
| 138 #if CONFIG_VP8_DECODER |
| 138 VP8_INSTANTIATE_TEST_CASE( | 139 VP8_INSTANTIATE_TEST_CASE( |
| 139 TestVectorTest, | 140 TestVectorTest, |
| 140 ::testing::Combine( | 141 ::testing::Combine( |
| 141 ::testing::Values(0), // Serial Mode. | 142 ::testing::Values(0), // Serial Mode. |
| 142 ::testing::Values(1), // Single thread. | 143 ::testing::Values(1), // Single thread. |
| 143 ::testing::ValuesIn(libvpx_test::kVP8TestVectors, | 144 ::testing::ValuesIn(libvpx_test::kVP8TestVectors, |
| 144 libvpx_test::kVP8TestVectors + | 145 libvpx_test::kVP8TestVectors + |
| 145 libvpx_test::kNumVP8TestVectors))); | 146 libvpx_test::kNumVP8TestVectors))); |
| 147 #endif // CONFIG_VP8_DECODER |
| 146 | 148 |
| 147 // Test VP9 decode in serial mode with single thread. | 149 // Test VP9 decode in serial mode with single thread. |
| 150 #if CONFIG_VP9_DECODER |
| 148 VP9_INSTANTIATE_TEST_CASE( | 151 VP9_INSTANTIATE_TEST_CASE( |
| 149 TestVectorTest, | 152 TestVectorTest, |
| 150 ::testing::Combine( | 153 ::testing::Combine( |
| 151 ::testing::Values(0), // Serial Mode. | 154 ::testing::Values(0), // Serial Mode. |
| 152 ::testing::Values(1), // Single thread. | 155 ::testing::Values(1), // Single thread. |
| 153 ::testing::ValuesIn(libvpx_test::kVP9TestVectors, | 156 ::testing::ValuesIn(libvpx_test::kVP9TestVectors, |
| 154 libvpx_test::kVP9TestVectors + | 157 libvpx_test::kVP9TestVectors + |
| 155 libvpx_test::kNumVP9TestVectors))); | 158 libvpx_test::kNumVP9TestVectors))); |
| 156 | 159 |
| 157 | |
| 158 #if CONFIG_VP9_DECODER | |
| 159 // Test VP9 decode in frame parallel mode with different number of threads. | 160 // Test VP9 decode in frame parallel mode with different number of threads. |
| 160 INSTANTIATE_TEST_CASE_P( | 161 INSTANTIATE_TEST_CASE_P( |
| 161 VP9MultiThreadedFrameParallel, TestVectorTest, | 162 VP9MultiThreadedFrameParallel, TestVectorTest, |
| 162 ::testing::Combine( | 163 ::testing::Combine( |
| 163 ::testing::Values( | 164 ::testing::Values( |
| 164 static_cast<const libvpx_test::CodecFactory *>(&libvpx_test::kVP9)), | 165 static_cast<const libvpx_test::CodecFactory *>(&libvpx_test::kVP9)), |
| 165 ::testing::Combine( | 166 ::testing::Combine( |
| 166 ::testing::Values(1), // Frame Parallel mode. | 167 ::testing::Values(1), // Frame Parallel mode. |
| 167 ::testing::Range(2, 9), // With 2 ~ 8 threads. | 168 ::testing::Range(2, 9), // With 2 ~ 8 threads. |
| 168 ::testing::ValuesIn(libvpx_test::kVP9TestVectors, | 169 ::testing::ValuesIn(libvpx_test::kVP9TestVectors, |
| 169 libvpx_test::kVP9TestVectors + | 170 libvpx_test::kVP9TestVectors + |
| 170 libvpx_test::kNumVP9TestVectors)))); | 171 libvpx_test::kNumVP9TestVectors)))); |
| 171 #endif | 172 #endif |
| 172 } // namespace | 173 } // namespace |
| OLD | NEW |