Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Unified Diff: modules/remote_bitrate_estimator/aimd_rate_control.cc

Issue 3011323002: Rollback of "Use small BWE period when there is a true network degradation" (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: modules/remote_bitrate_estimator/aimd_rate_control.cc
diff --git a/modules/remote_bitrate_estimator/aimd_rate_control.cc b/modules/remote_bitrate_estimator/aimd_rate_control.cc
index d91f2cb342e80397df60d251836f2407d57967db..2daac01d216a53ca5334a3c92db921a3a6f86aac 100644
--- a/modules/remote_bitrate_estimator/aimd_rate_control.cc
+++ b/modules/remote_bitrate_estimator/aimd_rate_control.cc
@@ -136,12 +136,13 @@ int AimdRateControl::GetNearMaxIncreaseRateBps() const {
}
int AimdRateControl::GetExpectedBandwidthPeriodMs() const {
- constexpr int kMinPeriodMs = 500;
+ constexpr int kMinPeriodMs = 2000;
+ constexpr int kDefaultPeriodMs = 3000;
constexpr int kMaxPeriodMs = 50000;
int increase_rate = GetNearMaxIncreaseRateBps();
if (!last_decrease_)
- return kMinPeriodMs;
+ return kDefaultPeriodMs;
return std::min(kMaxPeriodMs,
std::max<int>(1000 * static_cast<int64_t>(*last_decrease_) /
@@ -210,17 +211,8 @@ uint32_t AimdRateControl::ChangeBitrate(uint32_t new_bitrate_bps,
if (bitrate_is_initialized_ &&
incoming_bitrate_bps < current_bitrate_bps_) {
- constexpr float kDegradationFactor = 0.9f;
- if (new_bitrate_bps <
- kDegradationFactor * beta_ * current_bitrate_bps_) {
- // If bitrate decreases more than a normal back off after overuse, it
- // indicates a real network degradation. We do not let such a decrease
- // to determine the bandwidth estimation period.
- last_decrease_ = rtc::Optional<int>();
- } else {
- last_decrease_ = rtc::Optional<int>(
- current_bitrate_bps_ - new_bitrate_bps);
- }
+ last_decrease_ =
+ rtc::Optional<int>(current_bitrate_bps_ - new_bitrate_bps);
}
if (incoming_bitrate_kbps <
avg_max_bitrate_kbps_ - 3 * std_max_bit_rate) {

Powered by Google App Engine
This is Rietveld 408576698