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

Side by Side Diff: webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc

Issue 2001533003: Refactoring: Hide VideoCodec.codecSpecific as "private" (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC 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 10
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 // Configure codec settings. 185 // Configure codec settings.
186 config_.codec_settings = &codec_settings_; 186 config_.codec_settings = &codec_settings_;
187 config_.codec_settings->startBitrate = start_bitrate_; 187 config_.codec_settings->startBitrate = start_bitrate_;
188 config_.codec_settings->width = kCIFWidth; 188 config_.codec_settings->width = kCIFWidth;
189 config_.codec_settings->height = kCIFHeight; 189 config_.codec_settings->height = kCIFHeight;
190 190
191 // These features may be set depending on the test. 191 // These features may be set depending on the test.
192 switch (config_.codec_settings->codecType) { 192 switch (config_.codec_settings->codecType) {
193 case kVideoCodecH264: 193 case kVideoCodecH264:
194 config_.codec_settings->codecSpecific.H264.frameDroppingOn = 194 config_.codec_settings->H264()->frameDroppingOn = frame_dropper_on_;
195 frame_dropper_on_; 195 config_.codec_settings->H264()->keyFrameInterval =
196 config_.codec_settings->codecSpecific.H264.keyFrameInterval =
197 kBaseKeyFrameInterval; 196 kBaseKeyFrameInterval;
198 break; 197 break;
199 case kVideoCodecVP8: 198 case kVideoCodecVP8:
200 config_.codec_settings->codecSpecific.VP8.errorConcealmentOn = 199 config_.codec_settings->VP8()->errorConcealmentOn =
201 error_concealment_on_; 200 error_concealment_on_;
202 config_.codec_settings->codecSpecific.VP8.denoisingOn = denoising_on_; 201 config_.codec_settings->VP8()->denoisingOn = denoising_on_;
203 config_.codec_settings->codecSpecific.VP8.numberOfTemporalLayers = 202 config_.codec_settings->VP8()->numberOfTemporalLayers =
204 num_temporal_layers_; 203 num_temporal_layers_;
205 config_.codec_settings->codecSpecific.VP8.frameDroppingOn = 204 config_.codec_settings->VP8()->frameDroppingOn = frame_dropper_on_;
206 frame_dropper_on_; 205 config_.codec_settings->VP8()->automaticResizeOn = spatial_resize_on_;
207 config_.codec_settings->codecSpecific.VP8.automaticResizeOn = 206 config_.codec_settings->VP8()->keyFrameInterval = kBaseKeyFrameInterval;
208 spatial_resize_on_;
209 config_.codec_settings->codecSpecific.VP8.keyFrameInterval =
210 kBaseKeyFrameInterval;
211 break; 207 break;
212 case kVideoCodecVP9: 208 case kVideoCodecVP9:
213 config_.codec_settings->codecSpecific.VP9.denoisingOn = denoising_on_; 209 config_.codec_settings->VP9()->denoisingOn = denoising_on_;
214 config_.codec_settings->codecSpecific.VP9.numberOfTemporalLayers = 210 config_.codec_settings->VP9()->numberOfTemporalLayers =
215 num_temporal_layers_; 211 num_temporal_layers_;
216 config_.codec_settings->codecSpecific.VP9.frameDroppingOn = 212 config_.codec_settings->VP9()->frameDroppingOn = frame_dropper_on_;
217 frame_dropper_on_; 213 config_.codec_settings->VP9()->automaticResizeOn = spatial_resize_on_;
218 config_.codec_settings->codecSpecific.VP9.automaticResizeOn = 214 config_.codec_settings->VP9()->keyFrameInterval = kBaseKeyFrameInterval;
219 spatial_resize_on_;
220 config_.codec_settings->codecSpecific.VP9.keyFrameInterval =
221 kBaseKeyFrameInterval;
222 break; 215 break;
223 default: 216 default:
224 assert(false); 217 assert(false);
225 break; 218 break;
226 } 219 }
227 frame_reader_ = new webrtc::test::FrameReaderImpl( 220 frame_reader_ = new webrtc::test::FrameReaderImpl(
228 config_.input_filename, config_.codec_settings->width, 221 config_.input_filename, config_.codec_settings->width,
229 config_.codec_settings->height); 222 config_.codec_settings->height);
230 frame_writer_ = new webrtc::test::FrameWriterImpl( 223 frame_writer_ = new webrtc::test::FrameWriterImpl(
231 config_.output_filename, config_.frame_length_in_bytes); 224 config_.output_filename, config_.frame_length_in_bytes);
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 QualityMetrics quality_metrics; 999 QualityMetrics quality_metrics;
1007 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80); 1000 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80);
1008 // Metrics for rate control. 1001 // Metrics for rate control.
1009 RateControlMetrics rc_metrics[2]; 1002 RateControlMetrics rc_metrics[2];
1010 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1); 1003 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1);
1011 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0); 1004 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0);
1012 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, 1005 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings,
1013 rc_metrics); 1006 rc_metrics);
1014 } 1007 }
1015 } // namespace webrtc 1008 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codec_database.cc ('k') | webrtc/modules/video_coding/codecs/tools/video_quality_measurement.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698