Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: source/libvpx/test/decode_test_driver.cc

Issue 958693004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/libvpx/test/decode_api_test.cc ('k') | source/libvpx/test/encode_test_driver.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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, 0); 68 Decoder* const decoder = codec_->CreateDecoder(dec_cfg, flags_, 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
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
OLDNEW
« no previous file with comments | « source/libvpx/test/decode_api_test.cc ('k') | source/libvpx/test/encode_test_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698