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

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

Issue 2549453002: fix coding and documentary ambiguity in AimdRateControl::TimeToReduceFurther. (Closed)
Patch Set: fix coding and documentary ambiguity in AimdRateControl::TimeToReduceFurther. 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 | « webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h ('k') | no next file » | 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..685be422bfc768896754fbb248bd6f2b59fc0dbc 100644
--- a/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc
+++ b/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc
@@ -24,7 +24,6 @@
namespace webrtc {
static const int64_t kDefaultRttMs = 200;
-static const double kWithinIncomingBitrateHysteresis = 1.05;
static const int64_t kMaxFeedbackIntervalMs = 1000;
AimdRateControl::AimdRateControl()
@@ -72,10 +71,10 @@ bool AimdRateControl::TimeToReduceFurther(int64_t time_now,
return true;
}
if (ValidEstimate()) {
- const int threshold = static_cast<int>(kWithinIncomingBitrateHysteresis *
- incoming_bitrate_bps);
- const int bitrate_difference = LatestEstimate() - incoming_bitrate_bps;
- return bitrate_difference > threshold;
+ // TODO(terelius/holmer): Investigate consequences of increasing
+ // the threshold to 0.95 * LatestEstimate().
+ const uint32_t threshold = static_cast<uint32_t> (0.5 * LatestEstimate());
stefan-webrtc 2016/12/02 09:15:38 remove space between > and (
+ return incoming_bitrate_bps < threshold;
}
return false;
}
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698