OLD | NEW |
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 // Configure codec settings. | 186 // Configure codec settings. |
187 config_.codec_settings = &codec_settings_; | 187 config_.codec_settings = &codec_settings_; |
188 config_.codec_settings->startBitrate = start_bitrate_; | 188 config_.codec_settings->startBitrate = start_bitrate_; |
189 config_.codec_settings->width = kCIFWidth; | 189 config_.codec_settings->width = kCIFWidth; |
190 config_.codec_settings->height = kCIFHeight; | 190 config_.codec_settings->height = kCIFHeight; |
191 | 191 |
192 // These features may be set depending on the test. | 192 // These features may be set depending on the test. |
193 switch (config_.codec_settings->codecType) { | 193 switch (config_.codec_settings->codecType) { |
194 case kVideoCodecH264: | 194 case kVideoCodecH264: |
195 config_.codec_settings->codecSpecific.H264.frameDroppingOn = | 195 config_.codec_settings->H264()->frameDroppingOn = frame_dropper_on_; |
196 frame_dropper_on_; | 196 config_.codec_settings->H264()->keyFrameInterval = |
197 config_.codec_settings->codecSpecific.H264.keyFrameInterval = | |
198 kBaseKeyFrameInterval; | 197 kBaseKeyFrameInterval; |
199 break; | 198 break; |
200 case kVideoCodecVP8: | 199 case kVideoCodecVP8: |
201 config_.codec_settings->codecSpecific.VP8.errorConcealmentOn = | 200 config_.codec_settings->VP8()->errorConcealmentOn = |
202 error_concealment_on_; | 201 error_concealment_on_; |
203 config_.codec_settings->codecSpecific.VP8.denoisingOn = denoising_on_; | 202 config_.codec_settings->VP8()->denoisingOn = denoising_on_; |
204 config_.codec_settings->codecSpecific.VP8.numberOfTemporalLayers = | 203 config_.codec_settings->VP8()->numberOfTemporalLayers = |
205 num_temporal_layers_; | 204 num_temporal_layers_; |
206 config_.codec_settings->codecSpecific.VP8.frameDroppingOn = | 205 config_.codec_settings->VP8()->frameDroppingOn = frame_dropper_on_; |
207 frame_dropper_on_; | 206 config_.codec_settings->VP8()->automaticResizeOn = spatial_resize_on_; |
208 config_.codec_settings->codecSpecific.VP8.automaticResizeOn = | 207 config_.codec_settings->VP8()->keyFrameInterval = kBaseKeyFrameInterval; |
209 spatial_resize_on_; | |
210 config_.codec_settings->codecSpecific.VP8.keyFrameInterval = | |
211 kBaseKeyFrameInterval; | |
212 break; | 208 break; |
213 case kVideoCodecVP9: | 209 case kVideoCodecVP9: |
214 config_.codec_settings->codecSpecific.VP9.denoisingOn = denoising_on_; | 210 config_.codec_settings->VP9()->denoisingOn = denoising_on_; |
215 config_.codec_settings->codecSpecific.VP9.numberOfTemporalLayers = | 211 config_.codec_settings->VP9()->numberOfTemporalLayers = |
216 num_temporal_layers_; | 212 num_temporal_layers_; |
217 config_.codec_settings->codecSpecific.VP9.frameDroppingOn = | 213 config_.codec_settings->VP9()->frameDroppingOn = frame_dropper_on_; |
218 frame_dropper_on_; | 214 config_.codec_settings->VP9()->automaticResizeOn = spatial_resize_on_; |
219 config_.codec_settings->codecSpecific.VP9.automaticResizeOn = | 215 config_.codec_settings->VP9()->keyFrameInterval = kBaseKeyFrameInterval; |
220 spatial_resize_on_; | |
221 config_.codec_settings->codecSpecific.VP9.keyFrameInterval = | |
222 kBaseKeyFrameInterval; | |
223 break; | 216 break; |
224 default: | 217 default: |
225 assert(false); | 218 assert(false); |
226 break; | 219 break; |
227 } | 220 } |
228 frame_reader_ = new webrtc::test::FrameReaderImpl( | 221 frame_reader_ = new webrtc::test::FrameReaderImpl( |
229 config_.input_filename, config_.frame_length_in_bytes); | 222 config_.input_filename, config_.frame_length_in_bytes); |
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); |
232 ASSERT_TRUE(frame_reader_->Init()); | 225 ASSERT_TRUE(frame_reader_->Init()); |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 QualityMetrics quality_metrics; | 990 QualityMetrics quality_metrics; |
998 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80); | 991 SetQualityMetrics(&quality_metrics, 32.5, 30.0, 0.85, 0.80); |
999 // Metrics for rate control. | 992 // Metrics for rate control. |
1000 RateControlMetrics rc_metrics[2]; | 993 RateControlMetrics rc_metrics[2]; |
1001 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1); | 994 SetRateControlMetrics(rc_metrics, 0, 0, 20, 30, 10, 10, 0, 1); |
1002 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0); | 995 SetRateControlMetrics(rc_metrics, 1, 0, 0, 30, 15, 10, 0, 0); |
1003 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, | 996 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, |
1004 rc_metrics); | 997 rc_metrics); |
1005 } | 998 } |
1006 } // namespace webrtc | 999 } // namespace webrtc |
OLD | NEW |