From dc7d2c6fd7cad069fa7054033dc88e1f65848717 Mon Sep 17 00:00:00 2001 From: Per Kjellander Date: Wed, 11 Sep 2019 20:48:36 +0200 Subject: [PATCH] Backoff to acked bitrate during first overuse detection In DelayBasedBwe, in experiment WebRTC-Bwe-AlrLimitedBackoff, back off relative the BWE only after the first detected overuse. The first time overuse is detected, back down to the acked bitrate. The idea is to faster drop BWE in the beginning of the call when the initial BWE guess may be too high. Withouth this, it may take a too long time to initially back down. BUG=webrtc:10542 Change-Id: I2a11457d2391ad25658e7c13d9cae02a38973ecb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152541 Reviewed-by: Sebastian Jansson Commit-Queue: Per Kjellander Cr-Commit-Position: refs/heads/master@{#29163} --- modules/congestion_controller/goog_cc/delay_based_bwe.cc | 4 +++- modules/congestion_controller/goog_cc/delay_based_bwe.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/congestion_controller/goog_cc/delay_based_bwe.cc b/modules/congestion_controller/goog_cc/delay_based_bwe.cc index 56714044fe..706e2dba09 100644 --- a/modules/congestion_controller/goog_cc/delay_based_bwe.cc +++ b/modules/congestion_controller/goog_cc/delay_based_bwe.cc @@ -71,6 +71,7 @@ DelayBasedBwe::DelayBasedBwe(const WebRtcKeyValueConfig* key_value_config, uma_recorded_(false), rate_control_(key_value_config, /*send_side=*/true), prev_bitrate_(DataRate::Zero()), + has_once_detected_overuse_(false), prev_state_(BandwidthUsage::kBwNormal), alr_limited_backoff_enabled_( key_value_config->Lookup("WebRTC-Bwe-AlrLimitedBackoff") @@ -181,7 +182,7 @@ DelayBasedBwe::Result DelayBasedBwe::MaybeUpdateEstimate( // Currently overusing the bandwidth. if (delay_detector_->State() == BandwidthUsage::kBwOverusing) { - if (in_alr && alr_limited_backoff_enabled_) { + if (has_once_detected_overuse_ && in_alr && alr_limited_backoff_enabled_) { if (rate_control_.TimeToReduceFurther(at_time, prev_bitrate_)) { result.updated = UpdateEstimate(at_time, prev_bitrate_, &result.target_bitrate); @@ -202,6 +203,7 @@ DelayBasedBwe::Result DelayBasedBwe::MaybeUpdateEstimate( result.probe = false; result.target_bitrate = rate_control_.LatestEstimate(); } + has_once_detected_overuse_ = true; } else { if (probe_bitrate) { result.probe = true; diff --git a/modules/congestion_controller/goog_cc/delay_based_bwe.h b/modules/congestion_controller/goog_cc/delay_based_bwe.h index 4501b116e6..2cf8eb54b6 100644 --- a/modules/congestion_controller/goog_cc/delay_based_bwe.h +++ b/modules/congestion_controller/goog_cc/delay_based_bwe.h @@ -93,6 +93,7 @@ class DelayBasedBwe { bool uma_recorded_; AimdRateControl rate_control_; DataRate prev_bitrate_; + bool has_once_detected_overuse_; BandwidthUsage prev_state_; bool alr_limited_backoff_enabled_;