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

Side by Side Diff: webrtc/modules/audio_processing/level_controller/level_controller.cc

Issue 3007763002: Move array_view.h to webrtc/api/ (Closed)
Patch Set: rebase Created 3 years, 3 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) 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 10
11 #include "webrtc/modules/audio_processing/level_controller/level_controller.h" 11 #include "webrtc/modules/audio_processing/level_controller/level_controller.h"
12 12
13 #include <math.h> 13 #include <math.h>
14 #include <algorithm> 14 #include <algorithm>
15 #include <numeric> 15 #include <numeric>
16 16
17 #include "webrtc/api/array_view.h"
17 #include "webrtc/modules/audio_processing/audio_buffer.h" 18 #include "webrtc/modules/audio_processing/audio_buffer.h"
18 #include "webrtc/modules/audio_processing/level_controller/gain_applier.h" 19 #include "webrtc/modules/audio_processing/level_controller/gain_applier.h"
19 #include "webrtc/modules/audio_processing/level_controller/gain_selector.h" 20 #include "webrtc/modules/audio_processing/level_controller/gain_selector.h"
20 #include "webrtc/modules/audio_processing/level_controller/noise_level_estimator .h" 21 #include "webrtc/modules/audio_processing/level_controller/noise_level_estimator .h"
21 #include "webrtc/modules/audio_processing/level_controller/peak_level_estimator. h" 22 #include "webrtc/modules/audio_processing/level_controller/peak_level_estimator. h"
22 #include "webrtc/modules/audio_processing/level_controller/saturating_gain_estim ator.h" 23 #include "webrtc/modules/audio_processing/level_controller/saturating_gain_estim ator.h"
23 #include "webrtc/modules/audio_processing/level_controller/signal_classifier.h" 24 #include "webrtc/modules/audio_processing/level_controller/signal_classifier.h"
24 #include "webrtc/modules/audio_processing/logging/apm_data_dumper.h" 25 #include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
25 #include "webrtc/rtc_base/array_view.h"
26 #include "webrtc/rtc_base/arraysize.h" 26 #include "webrtc/rtc_base/arraysize.h"
27 #include "webrtc/rtc_base/checks.h" 27 #include "webrtc/rtc_base/checks.h"
28 #include "webrtc/rtc_base/logging.h" 28 #include "webrtc/rtc_base/logging.h"
29 #include "webrtc/system_wrappers/include/metrics.h" 29 #include "webrtc/system_wrappers/include/metrics.h"
30 30
31 namespace webrtc { 31 namespace webrtc {
32 namespace { 32 namespace {
33 33
34 void UpdateAndRemoveDcLevel(float forgetting_factor, 34 void UpdateAndRemoveDcLevel(float forgetting_factor,
35 float* dc_level, 35 float* dc_level,
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 bool LevelController::Validate( 285 bool LevelController::Validate(
286 const AudioProcessing::Config::LevelController& config) { 286 const AudioProcessing::Config::LevelController& config) {
287 return (config.initial_peak_level_dbfs < 287 return (config.initial_peak_level_dbfs <
288 std::numeric_limits<float>::epsilon() && 288 std::numeric_limits<float>::epsilon() &&
289 config.initial_peak_level_dbfs > 289 config.initial_peak_level_dbfs >
290 -(100.f + std::numeric_limits<float>::epsilon())); 290 -(100.f + std::numeric_limits<float>::epsilon()));
291 } 291 }
292 292
293 } // namespace webrtc 293 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698