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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 // Thresholds for expected quality. | 273 // Thresholds for expected quality. |
274 QualityThresholds quality_thresholds; | 274 QualityThresholds quality_thresholds; |
275 SetQualityThresholds(&quality_thresholds, 19.0, 16.0, 0.50, 0.35); | 275 SetQualityThresholds(&quality_thresholds, 19.0, 16.0, 0.50, 0.35); |
276 // Thresholds for rate control. | 276 // Thresholds for rate control. |
277 RateControlThresholds rc_thresholds[1]; | 277 RateControlThresholds rc_thresholds[1]; |
278 SetRateControlThresholds(rc_thresholds, 0, 0, 40, 20, 10, 15, 0, 1); | 278 SetRateControlThresholds(rc_thresholds, 0, 0, 40, 20, 10, 15, 0, 1); |
279 ProcessFramesAndVerify(quality_thresholds, rate_profile, process_settings, | 279 ProcessFramesAndVerify(quality_thresholds, rate_profile, process_settings, |
280 rc_thresholds, nullptr /* visualization_params */); | 280 rc_thresholds, nullptr /* visualization_params */); |
281 } | 281 } |
282 | 282 |
| 283 // This test is identical to VideoProcessorIntegrationTest.ProcessZeroPacketLoss |
| 284 // except that |batch_mode| is turned on. The main point of this test is to see |
| 285 // that the reported stats are not wildly varying between batch mode and the |
| 286 // regular online mode. |
| 287 TEST_F(VideoProcessorIntegrationTest, ProcessInBatchMode) { |
| 288 // Bit rate and frame rate profile. |
| 289 RateProfile rate_profile; |
| 290 SetRateProfile(&rate_profile, 0, 500, 30, 0); |
| 291 rate_profile.frame_index_rate_update[1] = kNumFramesShort + 1; |
| 292 rate_profile.num_frames = kNumFramesShort; |
| 293 // Codec/network settings. |
| 294 CodecParams process_settings; |
| 295 SetCodecParams(&process_settings, kVideoCodecVP8, kHwCodec, kUseSingleCore, |
| 296 0.0f, -1, 1, false, true, true, false, 352, 288, "foreman_cif", |
| 297 false /* verbose_logging */, true /* batch_mode */); |
| 298 // Thresholds for expected quality. |
| 299 QualityThresholds quality_thresholds; |
| 300 SetQualityThresholds(&quality_thresholds, 34.95, 33.0, 0.90, 0.89); |
| 301 // Thresholds for rate control. |
| 302 RateControlThresholds rc_thresholds[1]; |
| 303 SetRateControlThresholds(rc_thresholds, 0, 0, 40, 20, 10, 15, 0, 1); |
| 304 ProcessFramesAndVerify(quality_thresholds, rate_profile, process_settings, |
| 305 rc_thresholds, nullptr /* visualization_params */); |
| 306 } |
| 307 |
283 #endif // !defined(WEBRTC_IOS) | 308 #endif // !defined(WEBRTC_IOS) |
284 | 309 |
285 // The tests below are currently disabled for Android. For ARM, the encoder | 310 // The tests below are currently disabled for Android. For ARM, the encoder |
286 // uses |cpu_speed| = 12, as opposed to default |cpu_speed| <= 6 for x86, | 311 // uses |cpu_speed| = 12, as opposed to default |cpu_speed| <= 6 for x86, |
287 // which leads to significantly different quality. The quality and rate control | 312 // which leads to significantly different quality. The quality and rate control |
288 // settings in the tests below are defined for encoder speed setting | 313 // settings in the tests below are defined for encoder speed setting |
289 // |cpu_speed| <= ~6. A number of settings would need to be significantly | 314 // |cpu_speed| <= ~6. A number of settings would need to be significantly |
290 // modified for the |cpu_speed| = 12 case. For now, keep the tests below | 315 // modified for the |cpu_speed| = 12 case. For now, keep the tests below |
291 // disabled on Android. Some quality parameter in the above test has been | 316 // disabled on Android. Some quality parameter in the above test has been |
292 // adjusted to also pass for |cpu_speed| <= 12. | 317 // adjusted to also pass for |cpu_speed| <= 12. |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 SetQualityThresholds(&quality_thresholds, 32.5, 30.0, 0.85, 0.80); | 421 SetQualityThresholds(&quality_thresholds, 32.5, 30.0, 0.85, 0.80); |
397 // Thresholds for rate control. | 422 // Thresholds for rate control. |
398 RateControlThresholds rc_thresholds[2]; | 423 RateControlThresholds rc_thresholds[2]; |
399 SetRateControlThresholds(rc_thresholds, 0, 0, 20, 30, 10, 10, 0, 1); | 424 SetRateControlThresholds(rc_thresholds, 0, 0, 20, 30, 10, 10, 0, 1); |
400 SetRateControlThresholds(rc_thresholds, 1, 0, 0, 30, 15, 10, 0, 0); | 425 SetRateControlThresholds(rc_thresholds, 1, 0, 0, 30, 15, 10, 0, 0); |
401 ProcessFramesAndVerify(quality_thresholds, rate_profile, process_settings, | 426 ProcessFramesAndVerify(quality_thresholds, rate_profile, process_settings, |
402 rc_thresholds, nullptr /* visualization_params */); | 427 rc_thresholds, nullptr /* visualization_params */); |
403 } | 428 } |
404 } // namespace test | 429 } // namespace test |
405 } // namespace webrtc | 430 } // namespace webrtc |
OLD | NEW |