| 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 #ifndef TEST_ENCODE_TEST_DRIVER_H_ | 10 #ifndef TEST_ENCODE_TEST_DRIVER_H_ |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 virtual bool DoDecode() const { return 1; } | 214 virtual bool DoDecode() const { return 1; } |
| 215 | 215 |
| 216 // Hook to handle encode/decode mismatch | 216 // Hook to handle encode/decode mismatch |
| 217 virtual void MismatchHook(const vpx_image_t *img1, | 217 virtual void MismatchHook(const vpx_image_t *img1, |
| 218 const vpx_image_t *img2); | 218 const vpx_image_t *img2); |
| 219 | 219 |
| 220 // Hook to be called on every decompressed frame. | 220 // Hook to be called on every decompressed frame. |
| 221 virtual void DecompressedFrameHook(const vpx_image_t& img, | 221 virtual void DecompressedFrameHook(const vpx_image_t& img, |
| 222 vpx_codec_pts_t pts) {} | 222 vpx_codec_pts_t pts) {} |
| 223 | 223 |
| 224 // Hook to be called to handle decode result. Return true to continue. |
| 225 virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec, |
| 226 const VideoSource& /* video */, |
| 227 Decoder *decoder) { |
| 228 EXPECT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError(); |
| 229 return VPX_CODEC_OK == res_dec; |
| 230 } |
| 231 |
| 224 // Hook that can modify the encoder's output data | 232 // Hook that can modify the encoder's output data |
| 225 virtual const vpx_codec_cx_pkt_t * MutateEncoderOutputHook( | 233 virtual const vpx_codec_cx_pkt_t * MutateEncoderOutputHook( |
| 226 const vpx_codec_cx_pkt_t *pkt) { | 234 const vpx_codec_cx_pkt_t *pkt) { |
| 227 return pkt; | 235 return pkt; |
| 228 } | 236 } |
| 229 | 237 |
| 230 bool abort_; | 238 bool abort_; |
| 231 vpx_codec_enc_cfg_t cfg_; | 239 vpx_codec_enc_cfg_t cfg_; |
| 232 unsigned int passes_; | 240 unsigned int passes_; |
| 233 unsigned long deadline_; | 241 unsigned long deadline_; |
| 234 TwopassStatsStore stats_; | 242 TwopassStatsStore stats_; |
| 235 unsigned long init_flags_; | 243 unsigned long init_flags_; |
| 236 unsigned long frame_flags_; | 244 unsigned long frame_flags_; |
| 237 vpx_codec_pts_t last_pts_; | 245 vpx_codec_pts_t last_pts_; |
| 238 }; | 246 }; |
| 239 | 247 |
| 240 } // namespace libvpx_test | 248 } // namespace libvpx_test |
| 241 | 249 |
| 242 #endif // TEST_ENCODE_TEST_DRIVER_H_ | 250 #endif // TEST_ENCODE_TEST_DRIVER_H_ |
| OLD | NEW |