Reland "Enable quality scaling when allowed"

This reverts commit eb449a979bc561a8b256cca434e582f3889375e2.

Reason for revert: Added QP parsing in https://webrtc.googlesource.com/src/+/8639673f0c098efc294a7593fa3bd98e28ab7508

Original change's description:
Before this CL quality scaling was conditioned on scaling settings
provided by encoder. That should not be a requirement since encoder
may not be aware of quality scaling which is a WebRTC feature. In M90
chromium HW encoders do not provide scaling settings (chromium:1179020).
The default scaling settings provided by these encoders are not correct
(b/181537172).

This CL adds is_quality_scaling_allowed to VideoEncoderConfig. The flag
is set to true in singlecast with normal video feed (not screen sharing)
mode. If quality scaling is allowed it is enabled no matter whether
scaling settings are present in encoder info or not. Setting from
QualityScalingExperiment are used in case if not provided by encoder.

Bug: chromium:1179020
Bug: webrtc:12511
Change-Id: I97911fde9005ec25028a640a3f007d12f2bbc2e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/211349
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33438}
This commit is contained in:
Sergey Silkin
2021-03-11 13:28:23 +01:00
committed by Commit Bot
parent 7bf29bc3ed
commit 0021fe7793
6 changed files with 120 additions and 5 deletions

View File

@ -57,7 +57,8 @@ VideoEncoderConfig::VideoEncoderConfig()
max_bitrate_bps(0),
bitrate_priority(1.0),
number_of_streams(0),
legacy_conference_mode(false) {}
legacy_conference_mode(false),
is_quality_scaling_allowed(false) {}
VideoEncoderConfig::VideoEncoderConfig(VideoEncoderConfig&&) = default;

View File

@ -181,6 +181,9 @@ class VideoEncoderConfig {
// Legacy Google conference mode flag for simulcast screenshare
bool legacy_conference_mode;
// Indicates whether quality scaling can be used or not.
bool is_quality_scaling_allowed;
private:
// Access to the copy constructor is private to force use of the Copy()
// method for those exceptional cases where we do use it.