| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 struct FileList { | 156 struct FileList { |
| 157 const char *name; | 157 const char *name; |
| 158 const char *expected_md5; | 158 const char *expected_md5; |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 // Decodes |filename| with |num_threads|. Returns the md5 of the decoded frames. | 161 // Decodes |filename| with |num_threads|. Returns the md5 of the decoded frames. |
| 162 string DecodeFile(const string& filename, int num_threads) { | 162 string DecodeFile(const string& filename, int num_threads) { |
| 163 libvpx_test::WebMVideoSource video(filename); | 163 libvpx_test::WebMVideoSource video(filename); |
| 164 video.Init(); | 164 video.Init(); |
| 165 | 165 |
| 166 vpx_codec_dec_cfg_t cfg = {0}; | 166 vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t(); |
| 167 cfg.threads = num_threads; | 167 cfg.threads = num_threads; |
| 168 libvpx_test::VP9Decoder decoder(cfg, 0); | 168 libvpx_test::VP9Decoder decoder(cfg, 0); |
| 169 | 169 |
| 170 libvpx_test::MD5 md5; | 170 libvpx_test::MD5 md5; |
| 171 for (video.Begin(); video.cxdata(); video.Next()) { | 171 for (video.Begin(); video.cxdata(); video.Next()) { |
| 172 const vpx_codec_err_t res = | 172 const vpx_codec_err_t res = |
| 173 decoder.DecodeFrame(video.cxdata(), video.frame_size()); | 173 decoder.DecodeFrame(video.cxdata(), video.frame_size()); |
| 174 if (res != VPX_CODEC_OK) { | 174 if (res != VPX_CODEC_OK) { |
| 175 EXPECT_EQ(VPX_CODEC_OK, res) << decoder.DecodeError(); | 175 EXPECT_EQ(VPX_CODEC_OK, res) << decoder.DecodeError(); |
| 176 break; | 176 break; |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 { NULL, NULL } | 305 { NULL, NULL } |
| 306 }; | 306 }; |
| 307 | 307 |
| 308 DecodeFiles(files); | 308 DecodeFiles(files); |
| 309 } | 309 } |
| 310 #endif // CONFIG_WEBM_IO | 310 #endif // CONFIG_WEBM_IO |
| 311 | 311 |
| 312 INSTANTIATE_TEST_CASE_P(Synchronous, VP9WorkerThreadTest, ::testing::Bool()); | 312 INSTANTIATE_TEST_CASE_P(Synchronous, VP9WorkerThreadTest, ::testing::Bool()); |
| 313 | 313 |
| 314 } // namespace | 314 } // namespace |
| OLD | NEW |