OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | |
ivoc
2017/02/10 13:52:34
2017
peah-webrtc
2017/02/20 07:37:16
Done.
| |
3 * | |
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 | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ERL_ESTIMATOR_H_ | |
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ERL_ESTIMATOR_H_ | |
13 | |
14 #include <array> | |
15 | |
16 #include "webrtc/base/array_view.h" | |
ivoc
2017/02/10 13:52:34
Again, no ArrayViews in this file, but maybe there
peah-webrtc
2017/02/20 07:37:16
Not in this case, since we know what the incoming
ivoc
2017/02/21 17:26:01
Acknowledged.
peah-webrtc
2017/02/21 23:00:39
Acknowledged.
| |
17 #include "webrtc/base/constructormagic.h" | |
18 #include "webrtc/base/optional.h" | |
ivoc
2017/02/10 13:52:34
Can be removed.
peah-webrtc
2017/02/20 07:37:16
Done.
| |
19 #include "webrtc/modules/audio_processing/aec3/aec3_constants.h" | |
20 | |
21 namespace webrtc { | |
22 | |
23 // Estimates the echo return loss based on the signal spectra. | |
24 class ErlEstimator { | |
25 public: | |
26 ErlEstimator(); | |
27 ~ErlEstimator(); | |
28 | |
29 // Updates the ERL estimate. | |
30 void Update(const std::array<float, kFftLengthBy2Plus1>& render_spectrum, | |
31 const std::array<float, kFftLengthBy2Plus1>& capture_spectrum); | |
32 | |
33 // Returns the most recent ERL estimate. | |
34 const std::array<float, kFftLengthBy2Plus1>& Erl() const { return erl_; } | |
35 | |
36 private: | |
37 std::array<float, kFftLengthBy2Plus1> erl_; | |
38 std::array<int, kFftLengthBy2Plus1 - 2> hold_counters_; | |
39 | |
40 RTC_DISALLOW_COPY_AND_ASSIGN(ErlEstimator); | |
41 }; | |
42 | |
43 } // namespace webrtc | |
44 | |
45 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_ERL_ESTIMATOR_H_ | |
OLD | NEW |