RateControlSettings: add option to set min pixels per frame for libvpx vp8.

Bug: none
Change-Id: I09aa1bcea2f4a9cd65ffeef1df1d9656e4604def
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144029
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28412}
This commit is contained in:
Åsa Persson
2019-06-27 13:44:30 +02:00
committed by Commit Bot
parent 60bfb3d4e3
commit a09484940b
4 changed files with 35 additions and 4 deletions

View File

@ -67,6 +67,7 @@ RateControlSettings::RateControlSettings(
pacing_factor_("pacing_factor"),
alr_probing_("alr_probing", false),
vp8_qp_max_("vp8_qp_max"),
vp8_min_pixels_("vp8_min_pixels"),
trust_vp8_(
"trust_vp8",
IsEnabled(key_value_config, kVp8TrustedRateControllerFieldTrialName)),
@ -91,10 +92,10 @@ RateControlSettings::RateControlSettings(
ParseFieldTrial({&congestion_window_, &congestion_window_pushback_},
key_value_config->Lookup("WebRTC-CongestionWindow"));
ParseFieldTrial(
{&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_},
{&pacing_factor_, &alr_probing_, &vp8_qp_max_, &vp8_min_pixels_,
&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_},
key_value_config->Lookup("WebRTC-VideoRateControl"));
}
@ -147,6 +148,13 @@ absl::optional<int> RateControlSettings::LibvpxVp8QpMax() const {
return vp8_qp_max_.GetOptional();
}
absl::optional<int> RateControlSettings::LibvpxVp8MinPixels() const {
if (vp8_min_pixels_ && vp8_min_pixels_.Value() < 1) {
return absl::nullopt;
}
return vp8_min_pixels_.GetOptional();
}
bool RateControlSettings::LibvpxVp8TrustedRateController() const {
return trust_vp8_.Get();
}