| OLD | NEW | 
|   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_TRENDLINE_ESTIMATOR_H_ |  10 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_TRENDLINE_ESTIMATOR_H_ | 
|  11 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_TRENDLINE_ESTIMATOR_H_ |  11 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_TRENDLINE_ESTIMATOR_H_ | 
|  12  |  12  | 
|  13 #include <stddef.h> |  13 #include <stddef.h> | 
|  14 #include <stdint.h> |  14 #include <stdint.h> | 
|  15  |  15  | 
|  16 #include <deque> |  16 #include <deque> | 
|  17 #include <utility> |  17 #include <utility> | 
|  18  |  18  | 
|  19 #include "webrtc/rtc_base/constructormagic.h" |  19 #include "webrtc/base/constructormagic.h" | 
|  20  |  20  | 
|  21 namespace webrtc { |  21 namespace webrtc { | 
|  22  |  22  | 
|  23 class TrendlineEstimator { |  23 class TrendlineEstimator { | 
|  24  public: |  24  public: | 
|  25   // |window_size| is the number of points required to compute a trend line. |  25   // |window_size| is the number of points required to compute a trend line. | 
|  26   // |smoothing_coef| controls how much we smooth out the delay before fitting |  26   // |smoothing_coef| controls how much we smooth out the delay before fitting | 
|  27   // the trend line. |threshold_gain| is used to scale the trendline slope for |  27   // the trend line. |threshold_gain| is used to scale the trendline slope for | 
|  28   // comparison to the old threshold. Once the old estimator has been removed |  28   // comparison to the old threshold. Once the old estimator has been removed | 
|  29   // (or the thresholds been merged into the estimators), we can just set the |  29   // (or the thresholds been merged into the estimators), we can just set the | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  62   double smoothed_delay_; |  62   double smoothed_delay_; | 
|  63   // Linear least squares regression. |  63   // Linear least squares regression. | 
|  64   std::deque<std::pair<double, double>> delay_hist_; |  64   std::deque<std::pair<double, double>> delay_hist_; | 
|  65   double trendline_; |  65   double trendline_; | 
|  66  |  66  | 
|  67   RTC_DISALLOW_COPY_AND_ASSIGN(TrendlineEstimator); |  67   RTC_DISALLOW_COPY_AND_ASSIGN(TrendlineEstimator); | 
|  68 }; |  68 }; | 
|  69 }  // namespace webrtc |  69 }  // namespace webrtc | 
|  70  |  70  | 
|  71 #endif  // WEBRTC_MODULES_CONGESTION_CONTROLLER_TRENDLINE_ESTIMATOR_H_ |  71 #endif  // WEBRTC_MODULES_CONGESTION_CONTROLLER_TRENDLINE_ESTIMATOR_H_ | 
| OLD | NEW |