Adding field trials to control additional quality scaler settings

Bug: webrtc:11924
Change-Id: I98c7aa4bd4536770500fec7e8e8da9629fddd20f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183342
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32103}
This commit is contained in:
Harsh Maniar
2020-09-11 00:34:53 -07:00
committed by Commit Bot
parent 34f5ab82fe
commit 6e046668d1
3 changed files with 33 additions and 6 deletions

View File

@ -189,13 +189,17 @@ QualityScaler::QualityScaler(QualityScalerQpUsageHandlerInterface* handler,
// Protected ctor, should not be called directly.
QualityScaler::QualityScaler(QualityScalerQpUsageHandlerInterface* handler,
VideoEncoder::QpThresholds thresholds,
int64_t sampling_period_ms)
int64_t default_sampling_period_ms)
: handler_(handler),
thresholds_(thresholds),
sampling_period_ms_(sampling_period_ms),
sampling_period_ms_(QualityScalerSettings::ParseFromFieldTrials()
.SamplingPeriodMs()
.value_or(default_sampling_period_ms)),
fast_rampup_(true),
// Arbitrarily choose size based on 30 fps for 5 seconds.
average_qp_(5 * 30),
average_qp_(QualityScalerSettings::ParseFromFieldTrials()
.AverageQpWindow()
.value_or(5 * 30)),
framedrop_percent_media_opt_(5 * 30),
framedrop_percent_all_(5 * 30),
experiment_enabled_(QualityScalingExperiment::Enabled()),