Avoid modifying BWE internal state on reception of REMB feedback.

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 <asapersson@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34109}
This commit is contained in:
Christoffer Rodbro 2021-05-24 21:20:23 +02:00 committed by WebRTC LUCI CQ
parent c09c58134a
commit 6396b48b18
3 changed files with 2 additions and 11 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -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_