2017-02-23 05:16:26 -08:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_OUTPUT_H_
|
|
|
|
|
#define MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_OUTPUT_H_
|
2017-02-23 05:16:26 -08:00
|
|
|
|
|
|
|
|
#include <array>
|
|
|
|
|
|
2018-07-26 15:32:24 +02:00
|
|
|
#include "api/array_view.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "modules/audio_processing/aec3/aec3_common.h"
|
|
|
|
|
#include "modules/audio_processing/aec3/fft_data.h"
|
2017-02-23 05:16:26 -08:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
// Stores the values being returned from the echo subtractor.
|
|
|
|
|
struct SubtractorOutput {
|
2018-07-26 15:32:24 +02:00
|
|
|
SubtractorOutput();
|
|
|
|
|
~SubtractorOutput();
|
|
|
|
|
|
2017-07-11 02:54:02 -07:00
|
|
|
std::array<float, kBlockSize> s_main;
|
2018-08-01 16:24:08 +02:00
|
|
|
std::array<float, kBlockSize> s_shadow;
|
2017-02-23 05:16:26 -08:00
|
|
|
std::array<float, kBlockSize> e_main;
|
|
|
|
|
std::array<float, kBlockSize> e_shadow;
|
|
|
|
|
FftData E_main;
|
|
|
|
|
std::array<float, kFftLengthBy2Plus1> E2_main;
|
|
|
|
|
std::array<float, kFftLengthBy2Plus1> E2_shadow;
|
2018-08-01 16:24:08 +02:00
|
|
|
float s2_main = 0.f;
|
|
|
|
|
float s2_shadow = 0.f;
|
2018-07-26 15:32:24 +02:00
|
|
|
float e2_main = 0.f;
|
|
|
|
|
float e2_shadow = 0.f;
|
|
|
|
|
float y2 = 0.f;
|
2018-10-16 14:38:10 +02:00
|
|
|
float s_main_max_abs = 0.f;
|
|
|
|
|
float s_shadow_max_abs = 0.f;
|
2018-07-26 15:32:24 +02:00
|
|
|
|
|
|
|
|
// Reset the struct content.
|
|
|
|
|
void Reset();
|
2017-02-23 05:16:26 -08:00
|
|
|
|
2018-07-26 15:32:24 +02:00
|
|
|
// Updates the powers of the signals.
|
2018-10-16 14:38:10 +02:00
|
|
|
void ComputeMetrics(rtc::ArrayView<const float> y);
|
2017-02-23 05:16:26 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_OUTPUT_H_
|