OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | |
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_SUPPRESSION_GAIN_H_ | |
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SUPPRESSION_GAIN_H_ | |
13 | |
14 #include <array> | |
15 #include <vector> | |
hlundin-webrtc
2017/02/21 16:34:03
Not used.
peah-webrtc
2017/02/21 23:00:41
Done.
| |
16 | |
17 #include "webrtc/base/constructormagic.h" | |
18 #include "webrtc/modules/audio_processing/aec3/aec3_common.h" | |
19 #include "webrtc/modules/audio_processing/aec3/fft_buffer.h" | |
20 | |
21 namespace webrtc { | |
22 | |
23 #if defined(WEBRTC_ARCH_X86_FAMILY) | |
24 | |
25 void ComputeGains_SSE2( | |
hlundin-webrtc
2017/02/21 16:34:03
Why are these two non-member functions exposed in
peah-webrtc
2017/02/21 23:00:41
Yes, these are only there for the sake of the meth
hlundin-webrtc
2017/02/22 15:24:05
Good.
peah-webrtc
2017/02/22 23:51:36
Acknowledged.
| |
26 const std::array<float, kFftLengthBy2Plus1>& nearend_power, | |
27 const std::array<float, kFftLengthBy2Plus1>& residual_echo_power, | |
28 const std::array<float, kFftLengthBy2Plus1>& comfort_noise_power, | |
29 float strong_nearend_margin, | |
30 std::array<float, kFftLengthBy2 - 1>* previous_gain_squared, | |
31 std::array<float, kFftLengthBy2 - 1>* previous_masker, | |
32 std::array<float, kFftLengthBy2Plus1>* gain); | |
33 | |
34 #endif | |
35 | |
36 void ComputeGains( | |
37 const std::array<float, kFftLengthBy2Plus1>& nearend_power, | |
38 const std::array<float, kFftLengthBy2Plus1>& residual_echo_power, | |
39 const std::array<float, kFftLengthBy2Plus1>& comfort_noise_power, | |
40 float strong_nearend_margin, | |
41 std::array<float, kFftLengthBy2 - 1>* previous_gain_squared, | |
42 std::array<float, kFftLengthBy2 - 1>* previous_masker, | |
43 std::array<float, kFftLengthBy2Plus1>* gain); | |
44 | |
45 class SuppressionGain { | |
46 public: | |
47 explicit SuppressionGain(Aec3Optimization optimization); | |
48 void GetGain(const std::array<float, kFftLengthBy2Plus1>& nearend_power, | |
49 const std::array<float, kFftLengthBy2Plus1>& residual_echo_power, | |
50 const std::array<float, kFftLengthBy2Plus1>& comfort_noise_power, | |
51 float strong_nearend_margin, | |
52 std::array<float, kFftLengthBy2Plus1>* gain); | |
53 | |
54 private: | |
55 const Aec3Optimization optimization_; | |
56 std::array<float, kFftLengthBy2 - 1> previous_gain_squared_; | |
57 std::array<float, kFftLengthBy2 - 1> previous_masker_; | |
58 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(SuppressionGain); | |
59 }; | |
60 | |
61 } // namespace webrtc | |
62 | |
63 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_SUPPRESSION_GAIN_H_ | |
OLD | NEW |