| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 else | 151 else |
| 152 cfg_.g_pass = VPX_RC_LAST_PASS; | 152 cfg_.g_pass = VPX_RC_LAST_PASS; |
| 153 | 153 |
| 154 BeginPassHook(pass); | 154 BeginPassHook(pass); |
| 155 Encoder* const encoder = codec_->CreateEncoder(cfg_, deadline_, init_flags_, | 155 Encoder* const encoder = codec_->CreateEncoder(cfg_, deadline_, init_flags_, |
| 156 &stats_); | 156 &stats_); |
| 157 ASSERT_TRUE(encoder != NULL); | 157 ASSERT_TRUE(encoder != NULL); |
| 158 Decoder* const decoder = codec_->CreateDecoder(dec_cfg, 0); | 158 Decoder* const decoder = codec_->CreateDecoder(dec_cfg, 0); |
| 159 bool again; | 159 bool again; |
| 160 for (again = true, video->Begin(); again; video->Next()) { | 160 for (again = true, video->Begin(); again; video->Next()) { |
| 161 again = video->img() != NULL; | 161 again = (video->img() != NULL); |
| 162 | 162 |
| 163 PreEncodeFrameHook(video); | 163 PreEncodeFrameHook(video); |
| 164 PreEncodeFrameHook(video, encoder); | 164 PreEncodeFrameHook(video, encoder); |
| 165 encoder->EncodeFrame(video, frame_flags_); | 165 encoder->EncodeFrame(video, frame_flags_); |
| 166 | 166 |
| 167 CxDataIterator iter = encoder->GetCxData(); | 167 CxDataIterator iter = encoder->GetCxData(); |
| 168 | 168 |
| 169 bool has_cxdata = false; | 169 bool has_cxdata = false; |
| 170 bool has_dxdata = false; | 170 bool has_dxdata = false; |
| 171 while (const vpx_codec_cx_pkt_t *pkt = iter.Next()) { | 171 while (const vpx_codec_cx_pkt_t *pkt = iter.Next()) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 if (decoder) | 216 if (decoder) |
| 217 delete decoder; | 217 delete decoder; |
| 218 delete encoder; | 218 delete encoder; |
| 219 | 219 |
| 220 if (!Continue()) | 220 if (!Continue()) |
| 221 break; | 221 break; |
| 222 } | 222 } |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace libvpx_test | 225 } // namespace libvpx_test |
| OLD | NEW |