From 6396b48b18597beb5108347421efab23c5a7bbea Mon Sep 17 00:00:00 2001 From: Christoffer Rodbro Date: Mon, 24 May 2021 21:20:23 +0200 Subject: [PATCH] Avoid modifying BWE internal state on reception of REMB feedback. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead, cap the final bandwidth estimate by the last received cap. This allows fast rampup after a REMB cap is lifted. Bug: webrtc:12306 Change-Id: Ia99707134ce145275460524b3e46923876fdf62f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219696 Reviewed-by: Åsa Persson Commit-Queue: Christoffer Rodbro Cr-Commit-Position: refs/heads/master@{#34109} --- .../goog_cc/goog_cc_network_control_unittest.cc | 1 - .../goog_cc/send_side_bandwidth_estimation.cc | 11 ++--------- .../goog_cc/send_side_bandwidth_estimation.h | 1 - 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc b/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc index 8eb4a00431..37089bc5ab 100644 --- a/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc +++ b/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc @@ -851,7 +851,6 @@ TEST_F(GoogCcNetworkControllerTest, IsFairToTCP) { } TEST(GoogCcScenario, RampupOnRembCapLifted) { - ScopedFieldTrials trial("WebRTC-Bwe-ReceiverLimitCapsOnly/Enabled/"); Scenario s("googcc_unit/rampup_ramb_cap_lifted"); NetworkSimulationConfig net_conf; net_conf.bandwidth = DataRate::KilobitsPerSec(2000); diff --git a/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.cc b/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.cc index a2865d9f5a..c8509556c6 100644 --- a/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.cc +++ b/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.cc @@ -226,8 +226,7 @@ SendSideBandwidthEstimation::SendSideBandwidthEstimation( low_loss_threshold_(kDefaultLowLossThreshold), high_loss_threshold_(kDefaultHighLossThreshold), bitrate_threshold_(kDefaultBitrateThreshold), - loss_based_bandwidth_estimation_(key_value_config), - receiver_limit_caps_only_("Enabled") { + loss_based_bandwidth_estimation_(key_value_config) { RTC_DCHECK(event_log); if (BweLossExperimentIsEnabled()) { uint32_t bitrate_threshold_kbps; @@ -240,8 +239,6 @@ SendSideBandwidthEstimation::SendSideBandwidthEstimation( bitrate_threshold_ = DataRate::KilobitsPerSec(bitrate_threshold_kbps); } } - ParseFieldTrial({&receiver_limit_caps_only_}, - key_value_config->Lookup("WebRTC-Bwe-ReceiverLimitCapsOnly")); } SendSideBandwidthEstimation::~SendSideBandwidthEstimation() {} @@ -310,9 +307,7 @@ int SendSideBandwidthEstimation::GetMinBitrate() const { } DataRate SendSideBandwidthEstimation::target_rate() const { - DataRate target = current_target_; - if (receiver_limit_caps_only_) - target = std::min(target, receiver_limit_); + DataRate target = std::min(current_target_, receiver_limit_); return std::max(min_bitrate_configured_, target); } @@ -585,8 +580,6 @@ void SendSideBandwidthEstimation::UpdateMinHistory(Timestamp at_time) { DataRate SendSideBandwidthEstimation::GetUpperLimit() const { DataRate upper_limit = delay_based_limit_; - if (!receiver_limit_caps_only_) - upper_limit = std::min(upper_limit, receiver_limit_); upper_limit = std::min(upper_limit, max_bitrate_configured_); return upper_limit; } diff --git a/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.h b/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.h index b97b940db0..05bf10d6ff 100644 --- a/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.h +++ b/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.h @@ -190,7 +190,6 @@ class SendSideBandwidthEstimation { float high_loss_threshold_; DataRate bitrate_threshold_; LossBasedBandwidthEstimation loss_based_bandwidth_estimation_; - FieldTrialFlag receiver_limit_caps_only_; }; } // namespace webrtc #endif // MODULES_CONGESTION_CONTROLLER_GOOG_CC_SEND_SIDE_BANDWIDTH_ESTIMATION_H_