RateControlSettings: add option to set max QP for libvpx vp8.

Bug: none
Change-Id: Ia662068fe179faebc1df0aaa7f37b6e989b6525f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135569
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27888}
This commit is contained in:
Åsa Persson
2019-05-08 14:44:12 +02:00
committed by Commit Bot
parent ea5cbb5d1a
commit d7dd49ff3d
4 changed files with 30 additions and 1 deletions

View File

@ -66,6 +66,7 @@ RateControlSettings::RateControlSettings(
congestion_window_pushback_("MinBitrate"),
pacing_factor_("pacing_factor"),
alr_probing_("alr_probing", false),
vp8_qp_max_("vp8_qp_max"),
trust_vp8_(
"trust_vp8",
IsEnabled(key_value_config, kVp8TrustedRateControllerFieldTrialName)),
@ -90,7 +91,7 @@ RateControlSettings::RateControlSettings(
ParseFieldTrial({&congestion_window_, &congestion_window_pushback_},
key_value_config->Lookup("WebRTC-CongestionWindow"));
ParseFieldTrial(
{&pacing_factor_, &alr_probing_, &trust_vp8_, &trust_vp9_,
{&pacing_factor_, &alr_probing_, &vp8_qp_max_, &trust_vp8_, &trust_vp9_,
&video_hysteresis_, &screenshare_hysteresis_, &probe_max_allocation_,
&bitrate_adjuster_, &adjuster_use_headroom_, &vp8_s0_boost_,
&vp8_dynamic_rate_, &vp9_dynamic_rate_},
@ -138,6 +139,14 @@ bool RateControlSettings::UseAlrProbing() const {
return alr_probing_.Get();
}
absl::optional<int> RateControlSettings::LibvpxVp8QpMax() const {
if (vp8_qp_max_ && (vp8_qp_max_.Value() < 0 || vp8_qp_max_.Value() > 63)) {
RTC_LOG(LS_WARNING) << "Unsupported vp8_qp_max_ value, ignored.";
return absl::nullopt;
}
return vp8_qp_max_.GetOptional();
}
bool RateControlSettings::LibvpxVp8TrustedRateController() const {
return trust_vp8_.Get();
}