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

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

Issue 1782003003: Tune BWE to be a bit less sensitive to spurious delay events. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « webrtc/common_types.h ('k') | webrtc/modules/remote_bitrate_estimator/overuse_detector_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/overuse_detector.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc b/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc
index 042fe9aa2ae05625ce88861225637fc1bd1278aa..2f1ce36c303e9aacda0535a873a2376d3e58b6d2 100644
--- a/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc
+++ b/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc
@@ -142,8 +142,10 @@ void OveruseDetector::UpdateThreshold(double modified_offset, int64_t now_ms) {
}
const double k = fabs(modified_offset) < threshold_ ? k_down_ : k_up_;
+ const int64_t kMaxTimeDeltaMs = 100;
stefan-webrtc 2016/03/10 11:34:41 This was caught by the existing tests: TestShortTi
mflodman 2016/03/10 11:59:33 Good catch!
mflodman 2016/03/10 11:59:33 After discussions, I agree that 100 is a good thre
+ int64_t time_delta_ms = std::min(now_ms - last_update_ms_, kMaxTimeDeltaMs);
threshold_ +=
- k * (fabs(modified_offset) - threshold_) * (now_ms - last_update_ms_);
+ k * (fabs(modified_offset) - threshold_) * time_delta_ms;
const double kMinThreshold = 6;
const double kMaxThreshold = 600;
« no previous file with comments | « webrtc/common_types.h ('k') | webrtc/modules/remote_bitrate_estimator/overuse_detector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698