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

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

Issue 2633293004: Improve computational performance of BWE by switching list to deque. (Closed)
Patch Set: Created 3 years, 11 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/modules/remote_bitrate_estimator/overuse_estimator.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/overuse_estimator.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/overuse_estimator.cc b/webrtc/modules/remote_bitrate_estimator/overuse_estimator.cc
index 54e73d972b10b92b17c726b1cf840b37e52db370..85efecd02c199f6e7b41484e28587ab8e53897ed 100644
--- a/webrtc/modules/remote_bitrate_estimator/overuse_estimator.cc
+++ b/webrtc/modules/remote_bitrate_estimator/overuse_estimator.cc
@@ -129,9 +129,8 @@ double OveruseEstimator::UpdateMinFramePeriod(double ts_delta) {
if (ts_delta_hist_.size() >= kMinFramePeriodHistoryLength) {
ts_delta_hist_.pop_front();
}
- std::list<double>::iterator it = ts_delta_hist_.begin();
- for (; it != ts_delta_hist_.end(); it++) {
- min_frame_period = std::min(*it, min_frame_period);
+ for (const double old_ts_delta : ts_delta_hist_) {
+ min_frame_period = std::min(old_ts_delta, min_frame_period);
}
ts_delta_hist_.push_back(ts_delta);
return min_frame_period;
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/overuse_estimator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698