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

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

Issue 2684353004: Reduce the BWE with 50% when feedback is received too late. (Closed)
Patch Set: Updated comment. Created 3 years, 10 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: webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h
diff --git a/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h b/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h
index b3c5928e054af3ab1657ff84258214a234a45f73..03fc2d3f9e54274aacc88f342e992b9068a2f508 100644
--- a/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h
+++ b/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h
@@ -58,9 +58,14 @@ class AimdRateControl {
// in the "decrease" state the bitrate will be decreased to slightly below the
// incoming bitrate. When in the "hold" state the bitrate will be kept
// constant to allow built up queues to drain.
- uint32_t ChangeBitrate(uint32_t current_bit_rate,
- uint32_t incoming_bit_rate,
+ uint32_t ChangeBitrate(uint32_t current_bitrate,
+ uint32_t incoming_bitrate,
int64_t now_ms);
+ // Clamps new_bitrate_bps to within the configured min bitrate and a linear
+ // function of the incoming bitrate, so that the new bitrate can't grow too
+ // large compared to the bitrate actually being received by the other end.
+ uint32_t ClampBitrate(uint32_t new_bitrate_bps,
+ uint32_t incoming_bitrate_bps) const;
uint32_t MultiplicativeRateIncrease(int64_t now_ms, int64_t last_ms,
uint32_t current_bitrate_bps) const;
uint32_t AdditiveRateIncrease(int64_t now_ms, int64_t last_ms) const;

Powered by Google App Engine
This is Rietveld 408576698