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

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

Issue 2581013003: Remove redundant local variable from OveruseDetector::Detect. (Closed)
Patch Set: Rebase 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 | 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/overuse_detector.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc b/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc
index a57ea16584091075b92d0dc21306b531d84befea..8c2854dacd16c4e3bbfecec481f7401f1259fd11 100644
--- a/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc
+++ b/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc
@@ -91,8 +91,6 @@ BandwidthUsage OveruseDetector::Detect(double offset,
if (num_of_deltas < 2) {
return kBwNormal;
}
- const double prev_offset = prev_offset_;
- prev_offset_ = offset;
const double T = std::min(num_of_deltas, kMinNumDeltas) * offset;
BWE_TEST_LOGGING_PLOT(1, "offset_ms#1", now_ms, offset);
BWE_TEST_LOGGING_PLOT(1, "gamma_ms#1", now_ms, threshold_ / kMinNumDeltas);
@@ -108,7 +106,7 @@ BandwidthUsage OveruseDetector::Detect(double offset,
}
overuse_counter_++;
if (time_over_using_ > overusing_time_threshold_ && overuse_counter_ > 1) {
- if (offset >= prev_offset) {
+ if (offset >= prev_offset_) {
time_over_using_ = 0;
overuse_counter_ = 0;
hypothesis_ = kBwOverusing;
@@ -123,6 +121,7 @@ BandwidthUsage OveruseDetector::Detect(double offset,
overuse_counter_ = 0;
hypothesis_ = kBwNormal;
}
+ prev_offset_ = offset;
UpdateThreshold(T, now_ms);
« 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