| 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 "test/codec_factory.h" | 10 #include "test/codec_factory.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 } else { | 58 } else { |
| 59 /* The Vp9 implementation of PeekStream returns an error only if the | 59 /* The Vp9 implementation of PeekStream returns an error only if the |
| 60 * data passed to it isn't a valid Vp9 chunk. */ | 60 * data passed to it isn't a valid Vp9 chunk. */ |
| 61 ASSERT_EQ(VPX_CODEC_OK, res_peek) << "Peek return failed: " | 61 ASSERT_EQ(VPX_CODEC_OK, res_peek) << "Peek return failed: " |
| 62 << vpx_codec_err_to_string(res_peek); | 62 << vpx_codec_err_to_string(res_peek); |
| 63 } | 63 } |
| 64 } | 64 } |
| 65 | 65 |
| 66 void DecoderTest::RunLoop(CompressedVideoSource *video, | 66 void DecoderTest::RunLoop(CompressedVideoSource *video, |
| 67 const vpx_codec_dec_cfg_t &dec_cfg) { | 67 const vpx_codec_dec_cfg_t &dec_cfg) { |
| 68 Decoder* const decoder = codec_->CreateDecoder(dec_cfg, flags_, 0); | 68 Decoder* const decoder = codec_->CreateDecoder(dec_cfg, 0); |
| 69 ASSERT_TRUE(decoder != NULL); | 69 ASSERT_TRUE(decoder != NULL); |
| 70 bool end_of_file = false; | 70 bool end_of_file = false; |
| 71 | 71 |
| 72 // Decode frames. | 72 // Decode frames. |
| 73 for (video->Begin(); !::testing::Test::HasFailure() && !end_of_file; | 73 for (video->Begin(); !::testing::Test::HasFailure() && !end_of_file; |
| 74 video->Next()) { | 74 video->Next()) { |
| 75 PreDecodeFrameHook(*video, decoder); | 75 PreDecodeFrameHook(*video, decoder); |
| 76 | 76 |
| 77 vpx_codec_stream_info_t stream_info; | 77 vpx_codec_stream_info_t stream_info; |
| 78 stream_info.sz = sizeof(stream_info); | 78 stream_info.sz = sizeof(stream_info); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 void DecoderTest::set_cfg(const vpx_codec_dec_cfg_t &dec_cfg) { | 113 void DecoderTest::set_cfg(const vpx_codec_dec_cfg_t &dec_cfg) { |
| 114 memcpy(&cfg_, &dec_cfg, sizeof(cfg_)); | 114 memcpy(&cfg_, &dec_cfg, sizeof(cfg_)); |
| 115 } | 115 } |
| 116 | 116 |
| 117 void DecoderTest::set_flags(const vpx_codec_flags_t flags) { | 117 void DecoderTest::set_flags(const vpx_codec_flags_t flags) { |
| 118 flags_ = flags; | 118 flags_ = flags; |
| 119 } | 119 } |
| 120 | 120 |
| 121 } // namespace libvpx_test | 121 } // namespace libvpx_test |
| OLD | NEW |