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

Side by Side Diff: webrtc/modules/congestion_controller/median_slope_estimator.h

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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/trendline_estimator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_MEDIAN_SLOPE_ESTIMATOR_H_ 10 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_MEDIAN_SLOPE_ESTIMATOR_H_
11 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_MEDIAN_SLOPE_ESTIMATOR_H_ 11 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_MEDIAN_SLOPE_ESTIMATOR_H_
12 12
13 #include <stddef.h> 13 #include <stddef.h>
14 #include <stdint.h> 14 #include <stdint.h>
15 15
16 #include <list> 16 #include <deque>
17 #include <vector> 17 #include <vector>
18 18
19 #include "webrtc/base/constructormagic.h" 19 #include "webrtc/base/constructormagic.h"
20 #include "webrtc/base/numerics/percentile_filter.h" 20 #include "webrtc/base/numerics/percentile_filter.h"
21 21
22 namespace webrtc { 22 namespace webrtc {
23 23
24 class MedianSlopeEstimator { 24 class MedianSlopeEstimator {
25 public: 25 public:
26 // |window_size| is the number of points required to compute a trend line. 26 // |window_size| is the number of points required to compute a trend line.
(...skipping 29 matching lines...) Expand all
56 double delay; 56 double delay;
57 std::vector<double> slopes; 57 std::vector<double> slopes;
58 }; 58 };
59 // Parameters. 59 // Parameters.
60 const size_t window_size_; 60 const size_t window_size_;
61 const double threshold_gain_; 61 const double threshold_gain_;
62 // Used by the existing threshold. 62 // Used by the existing threshold.
63 unsigned int num_of_deltas_; 63 unsigned int num_of_deltas_;
64 // Theil-Sen robust line fitting 64 // Theil-Sen robust line fitting
65 double accumulated_delay_; 65 double accumulated_delay_;
66 std::list<DelayInfo> delay_hist_; 66 std::deque<DelayInfo> delay_hist_;
67 PercentileFilter<double> median_filter_; 67 PercentileFilter<double> median_filter_;
68 double trendline_; 68 double trendline_;
69 69
70 RTC_DISALLOW_COPY_AND_ASSIGN(MedianSlopeEstimator); 70 RTC_DISALLOW_COPY_AND_ASSIGN(MedianSlopeEstimator);
71 }; 71 };
72 } // namespace webrtc 72 } // namespace webrtc
73 73
74 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_MEDIAN_SLOPE_ESTIMATOR_H_ 74 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_MEDIAN_SLOPE_ESTIMATOR_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/trendline_estimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698