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

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

Issue 2537043003: fix wrong implementation of AimdRateControl::TimeToReduceFurther. (Closed)
Patch Set: Created 4 years, 1 month 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 | 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 f4835f57c1f9e3e78f87bd278a1dfe9a7d6ea747..53245abd09f8ac74ee9592d446f975c1a2ebf21c 100644
--- a/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc
+++ b/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc
@@ -72,10 +72,9 @@ 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;
+ const uint32_t threshold = static_cast<uint32_t>
+ (kWithinIncomingBitrateHysteresis * LatestEstimate());
+ return incoming_bitrate_bps > threshold;
stefan-webrtc 2016/11/29 15:52:08 Agree that it's wrong! I think the comment is wron
zhengpeng 2016/11/30 04:33:11 After reconsideration, I agree that if we are over
}
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698