From a3796c8090a524846d54cd6dd248200a42ac502c Mon Sep 17 00:00:00 2001 From: Christoffer Rodbro Date: Wed, 16 Jun 2021 11:07:06 +0200 Subject: [PATCH] Revert the send-side bwe behavior to slow ramp-up on lifted REMB cap. The behavior was changed on https://webrtc-review.googlesource.com/c/src/+/219696. The revert is due to unknown implications for a downstream project. As REMB caps are not used with send-side bandwidth estimation it should be a noop. Bug: webrtc:12306 Change-Id: Idecc49fda007f72512a8fc1e35d62e673b00df3d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222607 Reviewed-by: Magnus Flodman Commit-Queue: Christoffer Rodbro Cr-Commit-Position: refs/heads/master@{#34313} --- .../goog_cc/goog_cc_network_control_unittest.cc | 10 +++++----- .../goog_cc/send_side_bandwidth_estimation.cc | 8 ++++---- .../goog_cc/send_side_bandwidth_estimation.h | 2 +- 3 files changed, 10 insertions(+), 10 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 484b5681a3..7e8d7b9ac6 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 @@ -879,16 +879,16 @@ TEST_F(GoogCcNetworkControllerTest, IsFairToTCP) { EXPECT_LT(client->send_bandwidth().kbps(), 750); } -TEST(GoogCcScenario, RampupOnRembCapLifted) { +TEST(GoogCcScenario, FastRampupOnRembCapLiftedWithFieldTrial) { + ScopedFieldTrials trial("WebRTC-Bwe-ReceiverLimitCapsOnly/Enabled/"); DataRate final_estimate = - RunRembDipScenario("googcc_unit/rampup_ramb_cap_lifted"); + RunRembDipScenario("googcc_unit/fast_rampup_on_remb_cap_lifted"); EXPECT_GT(final_estimate.kbps(), 1500); } -TEST(GoogCcScenario, SlowRampupOnRembCapLiftedWithKillSwitch) { - ScopedFieldTrials trial("WebRTC-Bwe-ReceiverLimitCapsOnly/Disabled/"); +TEST(GoogCcScenario, SlowRampupOnRembCapLifted) { DataRate final_estimate = - RunRembDipScenario("googcc_unit/slow_rampup_remb_cap_lifted_killswitch"); + RunRembDipScenario("googcc_unit/default_slow_rampup_on_remb_cap_lifted"); EXPECT_LT(final_estimate.kbps(), 1000); } 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 a4ee99d753..c5f51df99b 100644 --- a/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.cc +++ b/modules/congestion_controller/goog_cc/send_side_bandwidth_estimation.cc @@ -227,7 +227,7 @@ SendSideBandwidthEstimation::SendSideBandwidthEstimation( high_loss_threshold_(kDefaultHighLossThreshold), bitrate_threshold_(kDefaultBitrateThreshold), loss_based_bandwidth_estimation_(key_value_config), - disable_receiver_limit_caps_only_("Disabled") { + receiver_limit_caps_only_("Enabled") { RTC_DCHECK(event_log); if (BweLossExperimentIsEnabled()) { uint32_t bitrate_threshold_kbps; @@ -240,7 +240,7 @@ SendSideBandwidthEstimation::SendSideBandwidthEstimation( bitrate_threshold_ = DataRate::KilobitsPerSec(bitrate_threshold_kbps); } } - ParseFieldTrial({&disable_receiver_limit_caps_only_}, + ParseFieldTrial({&receiver_limit_caps_only_}, key_value_config->Lookup("WebRTC-Bwe-ReceiverLimitCapsOnly")); } @@ -311,7 +311,7 @@ int SendSideBandwidthEstimation::GetMinBitrate() const { DataRate SendSideBandwidthEstimation::target_rate() const { DataRate target = current_target_; - if (!disable_receiver_limit_caps_only_) + if (receiver_limit_caps_only_) target = std::min(target, receiver_limit_); return std::max(min_bitrate_configured_, target); } @@ -585,7 +585,7 @@ void SendSideBandwidthEstimation::UpdateMinHistory(Timestamp at_time) { DataRate SendSideBandwidthEstimation::GetUpperLimit() const { DataRate upper_limit = delay_based_limit_; - if (disable_receiver_limit_caps_only_) + if (!receiver_limit_caps_only_) upper_limit = std::min(upper_limit, receiver_limit_); return std::min(upper_limit, max_bitrate_configured_); } 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 8c1e1d04d8..b97b940db0 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,7 @@ class SendSideBandwidthEstimation { float high_loss_threshold_; DataRate bitrate_threshold_; LossBasedBandwidthEstimation loss_based_bandwidth_estimation_; - FieldTrialFlag disable_receiver_limit_caps_only_; + FieldTrialFlag receiver_limit_caps_only_; }; } // namespace webrtc #endif // MODULES_CONGESTION_CONTROLLER_GOOG_CC_SEND_SIDE_BANDWIDTH_ESTIMATION_H_