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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/overuse_estimator.cc

Issue 2964773002: Revert "Update includes for webrtc/{base => rtc_base} rename (1/3)" (Closed)
Patch Set: Created 3 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 10
11 #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h" 11 #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h"
12 12
13 #include <assert.h> 13 #include <assert.h>
14 #include <math.h> 14 #include <math.h>
15 #include <stdlib.h> 15 #include <stdlib.h>
16 #include <string.h> 16 #include <string.h>
17 17
18 #include <algorithm> 18 #include <algorithm>
19 19
20 #include "webrtc/base/logging.h"
20 #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h" 21 #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h"
21 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h" 22 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h"
22 #include "webrtc/rtc_base/logging.h"
23 23
24 namespace webrtc { 24 namespace webrtc {
25 25
26 enum { kMinFramePeriodHistoryLength = 60 }; 26 enum { kMinFramePeriodHistoryLength = 60 };
27 enum { kDeltaCounterMax = 1000 }; 27 enum { kDeltaCounterMax = 1000 };
28 28
29 OveruseEstimator::OveruseEstimator(const OverUseDetectorOptions& options) 29 OveruseEstimator::OveruseEstimator(const OverUseDetectorOptions& options)
30 : options_(options), 30 : options_(options),
31 num_of_deltas_(0), 31 num_of_deltas_(0),
32 slope_(options_.initial_slope), 32 slope_(options_.initial_slope),
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 const double beta = pow(1 - alpha, ts_delta * 30.0 / 1000.0); 157 const double beta = pow(1 - alpha, ts_delta * 30.0 / 1000.0);
158 avg_noise_ = beta * avg_noise_ 158 avg_noise_ = beta * avg_noise_
159 + (1 - beta) * residual; 159 + (1 - beta) * residual;
160 var_noise_ = beta * var_noise_ 160 var_noise_ = beta * var_noise_
161 + (1 - beta) * (avg_noise_ - residual) * (avg_noise_ - residual); 161 + (1 - beta) * (avg_noise_ - residual) * (avg_noise_ - residual);
162 if (var_noise_ < 1) { 162 if (var_noise_ < 1) {
163 var_noise_ = 1; 163 var_noise_ = 1;
164 } 164 }
165 } 165 }
166 } // namespace webrtc 166 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698