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 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 else | 188 else |
189 cfg_.g_pass = VPX_RC_LAST_PASS; | 189 cfg_.g_pass = VPX_RC_LAST_PASS; |
190 | 190 |
191 BeginPassHook(pass); | 191 BeginPassHook(pass); |
192 Encoder* const encoder = codec_->CreateEncoder(cfg_, deadline_, init_flags_, | 192 Encoder* const encoder = codec_->CreateEncoder(cfg_, deadline_, init_flags_, |
193 &stats_); | 193 &stats_); |
194 ASSERT_TRUE(encoder != NULL); | 194 ASSERT_TRUE(encoder != NULL); |
195 | 195 |
196 video->Begin(); | 196 video->Begin(); |
197 encoder->InitEncoder(video); | 197 encoder->InitEncoder(video); |
| 198 ASSERT_FALSE(::testing::Test::HasFatalFailure()); |
198 | 199 |
199 unsigned long dec_init_flags = 0; // NOLINT | 200 unsigned long dec_init_flags = 0; // NOLINT |
200 // Use fragment decoder if encoder outputs partitions. | 201 // Use fragment decoder if encoder outputs partitions. |
201 // NOTE: fragment decoder and partition encoder are only supported by VP8. | 202 // NOTE: fragment decoder and partition encoder are only supported by VP8. |
202 if (init_flags_ & VPX_CODEC_USE_OUTPUT_PARTITION) | 203 if (init_flags_ & VPX_CODEC_USE_OUTPUT_PARTITION) |
203 dec_init_flags |= VPX_CODEC_USE_INPUT_FRAGMENTS; | 204 dec_init_flags |= VPX_CODEC_USE_INPUT_FRAGMENTS; |
204 Decoder* const decoder = codec_->CreateDecoder(dec_cfg, dec_init_flags, 0); | 205 Decoder* const decoder = codec_->CreateDecoder(dec_cfg, dec_init_flags, 0); |
205 bool again; | 206 bool again; |
206 for (again = true; again; video->Next()) { | 207 for (again = true; again; video->Next()) { |
207 again = (video->img() != NULL); | 208 again = (video->img() != NULL); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 if (decoder) | 273 if (decoder) |
273 delete decoder; | 274 delete decoder; |
274 delete encoder; | 275 delete encoder; |
275 | 276 |
276 if (!Continue()) | 277 if (!Continue()) |
277 break; | 278 break; |
278 } | 279 } |
279 } | 280 } |
280 | 281 |
281 } // namespace libvpx_test | 282 } // namespace libvpx_test |
OLD | NEW |