Index: webrtc/modules/audio_processing/aec3/suppression_gain.h |
diff --git a/webrtc/modules/audio_processing/aec3/suppression_gain.h b/webrtc/modules/audio_processing/aec3/suppression_gain.h |
index d22eb8a5232c16e6701bb0dce12abfca24261640..86956c2f820e59d14c7dc7f6a89aa5e0a1e5ef10 100644 |
--- a/webrtc/modules/audio_processing/aec3/suppression_gain.h |
+++ b/webrtc/modules/audio_processing/aec3/suppression_gain.h |
@@ -16,13 +16,15 @@ |
#include "webrtc/modules/audio_processing/aec3/aec3_common.h" |
#include "webrtc/modules/audio_processing/aec3/render_signal_analyzer.h" |
+#include "webrtc/modules/audio_processing/include/audio_processing.h" |
#include "webrtc/rtc_base/constructormagic.h" |
namespace webrtc { |
class SuppressionGain { |
public: |
- explicit SuppressionGain(Aec3Optimization optimization); |
+ SuppressionGain(const AudioProcessing::Config::EchoCanceller3& config, |
+ Aec3Optimization optimization); |
void GetGain(const std::array<float, kFftLengthBy2Plus1>& nearend, |
const std::array<float, kFftLengthBy2Plus1>& echo, |
const std::array<float, kFftLengthBy2Plus1>& comfort_noise, |
@@ -34,6 +36,32 @@ class SuppressionGain { |
std::array<float, kFftLengthBy2Plus1>* low_band_gain); |
private: |
+ void UpdateMaxGainIncrease( |
+ size_t no_saturation_counter, |
+ bool low_noise_render, |
+ const std::array<float, kFftLengthBy2Plus1>& last_echo, |
+ const std::array<float, kFftLengthBy2Plus1>& echo, |
+ const std::array<float, kFftLengthBy2Plus1>& last_gain, |
+ const std::array<float, kFftLengthBy2Plus1>& new_gain, |
+ std::array<float, kFftLengthBy2Plus1>* gain_increase) const; |
+ |
+ void GainToNoAudibleEcho( |
+ bool low_noise_render, |
+ bool saturated_echo, |
+ const std::array<float, kFftLengthBy2Plus1>& nearend, |
+ const std::array<float, kFftLengthBy2Plus1>& echo, |
+ const std::array<float, kFftLengthBy2Plus1>& masker, |
+ const std::array<float, kFftLengthBy2Plus1>& min_gain, |
+ const std::array<float, kFftLengthBy2Plus1>& max_gain, |
+ const std::array<float, kFftLengthBy2Plus1>& one_by_echo, |
+ std::array<float, kFftLengthBy2Plus1>* gain) const; |
+ |
+ void MaskingPower(const std::array<float, kFftLengthBy2Plus1>& nearend, |
+ const std::array<float, kFftLengthBy2Plus1>& comfort_noise, |
+ const std::array<float, kFftLengthBy2Plus1>& last_masker, |
+ const std::array<float, kFftLengthBy2Plus1>& gain, |
+ std::array<float, kFftLengthBy2Plus1>* masker) const; |
+ |
void LowerBandGain(bool stationary_with_low_power, |
const rtc::Optional<int>& narrow_peak_band, |
bool saturated_echo, |
@@ -58,7 +86,8 @@ class SuppressionGain { |
LowNoiseRenderDetector low_render_detector_; |
size_t no_saturation_counter_ = 0; |
- RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(SuppressionGain); |
+ const AudioProcessing::Config::EchoCanceller3 config_; |
+ RTC_DISALLOW_COPY_AND_ASSIGN(SuppressionGain); |
}; |
} // namespace webrtc |