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

Unified Diff: webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc

Issue 2542083003: Use different restrictions of acked bitrate lag depending on operating point. (Closed)
Patch Set: Comments addressed. Created 4 years 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
« no previous file with comments | « no previous file | webrtc/modules/remote_bitrate_estimator/aimd_rate_control_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc b/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc
index 530453d74cc1612c105de25bb7cc0280d261c53a..6449f240bff64afc2586cb7cea5a1ec13e83ecfb 100644
--- a/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc
+++ b/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc
@@ -229,10 +229,13 @@ uint32_t AimdRateControl::ChangeBitrate(uint32_t current_bitrate_bps,
default:
assert(false);
}
- if ((incoming_bitrate_bps > 100000 || current_bitrate_bps > 150000) &&
- current_bitrate_bps > 1.5 * incoming_bitrate_bps) {
- // Allow changing the bit rate if we are operating at very low rates
- // Don't change the bit rate if the send side is too far off
+ // We allow a bit more lag at very low rates to not too easily get stuck if
+ // the encoder produces uneven outputs.
+ const uint32_t max_allowed_lag_kbps =
terelius 2016/12/02 15:30:13 Could we rename this max_bitrate_bps? Lag makes me
stefan-webrtc 2016/12/02 16:16:13 Done.
+ static_cast<uint32_t>(1.5f * incoming_bitrate_bps) + 10000;
+ if (current_bitrate_bps > current_bitrate_bps_ &&
+ current_bitrate_bps > max_allowed_lag_kbps) {
+ // Don't change the bit rate if the send side is too far off.
terelius 2016/12/02 15:30:13 Place this comment above if-statement and other co
stefan-webrtc 2016/12/02 16:16:14 Done.
current_bitrate_bps = current_bitrate_bps_;
terelius 2016/12/02 15:30:13 If max_allowed_lag_kbps is the cap and we are abov
stefan-webrtc 2016/12/02 16:16:14 Done as discussed.
time_last_bitrate_change_ = now_ms;
}
« no previous file with comments | « no previous file | webrtc/modules/remote_bitrate_estimator/aimd_rate_control_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698