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

Side by Side Diff: source/libvpx/test/encode_test_driver.h

Issue 168343002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: libvpx: Pull from upstream Created 6 years, 10 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 | Annotate | Revision Log
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 #ifndef TEST_ENCODE_TEST_DRIVER_H_ 10 #ifndef TEST_ENCODE_TEST_DRIVER_H_
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 void Control(int ctrl_id, int arg) { 116 void Control(int ctrl_id, int arg) {
117 const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg); 117 const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
118 ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); 118 ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
119 } 119 }
120 120
121 void Control(int ctrl_id, struct vpx_scaling_mode *arg) { 121 void Control(int ctrl_id, struct vpx_scaling_mode *arg) {
122 const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg); 122 const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
123 ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); 123 ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
124 } 124 }
125 125
126 void Control(int ctrl_id, struct vpx_svc_layer_id *arg) {
127 const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg);
128 ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
129 }
130
126 void set_deadline(unsigned long deadline) { 131 void set_deadline(unsigned long deadline) {
127 deadline_ = deadline; 132 deadline_ = deadline;
128 } 133 }
129 134
130 protected: 135 protected:
131 virtual const vpx_codec_iface_t* CodecInterface() const = 0; 136 virtual vpx_codec_iface_t* CodecInterface() const = 0;
132 137
133 const char *EncoderError() { 138 const char *EncoderError() {
134 const char *detail = vpx_codec_error_detail(&encoder_); 139 const char *detail = vpx_codec_error_detail(&encoder_);
135 return detail ? detail : vpx_codec_error(&encoder_); 140 return detail ? detail : vpx_codec_error(&encoder_);
136 } 141 }
137 142
138 // Encode an image 143 // Encode an image
139 void EncodeFrameInternal(const VideoSource &video, 144 void EncodeFrameInternal(const VideoSource &video,
140 const unsigned long frame_flags); 145 const unsigned long frame_flags);
141 146
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 unsigned long deadline_; 223 unsigned long deadline_;
219 TwopassStatsStore stats_; 224 TwopassStatsStore stats_;
220 unsigned long init_flags_; 225 unsigned long init_flags_;
221 unsigned long frame_flags_; 226 unsigned long frame_flags_;
222 vpx_codec_pts_t last_pts_; 227 vpx_codec_pts_t last_pts_;
223 }; 228 };
224 229
225 } // namespace libvpx_test 230 } // namespace libvpx_test
226 231
227 #endif // TEST_ENCODE_TEST_DRIVER_H_ 232 #endif // TEST_ENCODE_TEST_DRIVER_H_
OLDNEW
« no previous file with comments | « source/libvpx/test/decode_test_driver.cc ('k') | source/libvpx/test/external_frame_buffer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698