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 "vpx_config.h" | 10 #include "vpx_config.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 again = video->img() != NULL; | 153 again = video->img() != NULL; |
154 | 154 |
155 PreEncodeFrameHook(video); | 155 PreEncodeFrameHook(video); |
156 PreEncodeFrameHook(video, &encoder); | 156 PreEncodeFrameHook(video, &encoder); |
157 encoder.EncodeFrame(video, frame_flags_); | 157 encoder.EncodeFrame(video, frame_flags_); |
158 | 158 |
159 CxDataIterator iter = encoder.GetCxData(); | 159 CxDataIterator iter = encoder.GetCxData(); |
160 | 160 |
161 while (const vpx_codec_cx_pkt_t *pkt = iter.Next()) { | 161 while (const vpx_codec_cx_pkt_t *pkt = iter.Next()) { |
162 again = true; | 162 again = true; |
163 | 163 #if CONFIG_VP8_DECODER |
| 164 vpx_codec_err_t res_dec; |
| 165 #endif |
164 switch (pkt->kind) { | 166 switch (pkt->kind) { |
165 case VPX_CODEC_CX_FRAME_PKT: | 167 case VPX_CODEC_CX_FRAME_PKT: |
166 #if CONFIG_VP8_DECODER | 168 #if CONFIG_VP8_DECODER |
167 has_cxdata = true; | 169 has_cxdata = true; |
168 decoder.DecodeFrame((const uint8_t*)pkt->data.frame.buf, | 170 res_dec = decoder.DecodeFrame((const uint8_t*)pkt->data.frame.buf, |
169 pkt->data.frame.sz); | 171 pkt->data.frame.sz); |
| 172 ASSERT_EQ(VPX_CODEC_OK, res_dec) << decoder.DecodeError(); |
170 #endif | 173 #endif |
171 ASSERT_GE(pkt->data.frame.pts, last_pts_); | 174 ASSERT_GE(pkt->data.frame.pts, last_pts_); |
172 last_pts_ = pkt->data.frame.pts; | 175 last_pts_ = pkt->data.frame.pts; |
173 FramePktHook(pkt); | 176 FramePktHook(pkt); |
174 break; | 177 break; |
175 | 178 |
176 case VPX_CODEC_PSNR_PKT: | 179 case VPX_CODEC_PSNR_PKT: |
177 PSNRPktHook(pkt); | 180 PSNRPktHook(pkt); |
178 break; | 181 break; |
179 | 182 |
(...skipping 17 matching lines...) Expand all Loading... |
197 break; | 200 break; |
198 } | 201 } |
199 | 202 |
200 EndPassHook(); | 203 EndPassHook(); |
201 | 204 |
202 if (!Continue()) | 205 if (!Continue()) |
203 break; | 206 break; |
204 } | 207 } |
205 } | 208 } |
206 } // namespace libvpx_test | 209 } // namespace libvpx_test |
OLD | NEW |