OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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 |
(...skipping 51 matching lines...) Loading... |
62 | 62 |
63 void Subtractor::HandleEchoPathChange( | 63 void Subtractor::HandleEchoPathChange( |
64 const EchoPathVariability& echo_path_variability) { | 64 const EchoPathVariability& echo_path_variability) { |
65 if (echo_path_variability.delay_change) { | 65 if (echo_path_variability.delay_change) { |
66 main_filter_.HandleEchoPathChange(); | 66 main_filter_.HandleEchoPathChange(); |
67 shadow_filter_.HandleEchoPathChange(); | 67 shadow_filter_.HandleEchoPathChange(); |
68 G_main_.HandleEchoPathChange(); | 68 G_main_.HandleEchoPathChange(); |
69 } | 69 } |
70 } | 70 } |
71 | 71 |
72 void Subtractor::Process(const FftBuffer& render_buffer, | 72 void Subtractor::Process(const RenderBuffer& render_buffer, |
73 const rtc::ArrayView<const float> capture, | 73 const rtc::ArrayView<const float> capture, |
74 const RenderSignalAnalyzer& render_signal_analyzer, | 74 const RenderSignalAnalyzer& render_signal_analyzer, |
75 bool saturation, | 75 bool saturation, |
76 SubtractorOutput* output) { | 76 SubtractorOutput* output) { |
77 RTC_DCHECK_EQ(kBlockSize, capture.size()); | 77 RTC_DCHECK_EQ(kBlockSize, capture.size()); |
78 rtc::ArrayView<const float> y = capture; | 78 rtc::ArrayView<const float> y = capture; |
79 const FftBuffer& X_buffer = render_buffer; | 79 const RenderBuffer& X_buffer = render_buffer; |
80 FftData& E_main = output->E_main; | 80 FftData& E_main = output->E_main; |
81 FftData& E_shadow = output->E_shadow; | 81 FftData& E_shadow = output->E_shadow; |
82 std::array<float, kBlockSize>& e_main = output->e_main; | 82 std::array<float, kBlockSize>& e_main = output->e_main; |
83 std::array<float, kBlockSize>& e_shadow = output->e_shadow; | 83 std::array<float, kBlockSize>& e_shadow = output->e_shadow; |
84 | 84 |
85 FftData S; | 85 FftData S; |
86 FftData& G = S; | 86 FftData& G = S; |
87 | 87 |
88 // Form and analyze the output of the main filter. | 88 // Form and analyze the output of the main filter. |
89 main_filter_.Filter(X_buffer, &S); | 89 main_filter_.Filter(X_buffer, &S); |
(...skipping 19 matching lines...) Loading... |
109 shadow_filter_.SizePartitions(), saturation, &G); | 109 shadow_filter_.SizePartitions(), saturation, &G); |
110 shadow_filter_.Adapt(X_buffer, G); | 110 shadow_filter_.Adapt(X_buffer, G); |
111 data_dumper_->DumpRaw("aec3_subtractor_G_shadow", G.re); | 111 data_dumper_->DumpRaw("aec3_subtractor_G_shadow", G.re); |
112 data_dumper_->DumpRaw("aec3_subtractor_G_shadow", G.im); | 112 data_dumper_->DumpRaw("aec3_subtractor_G_shadow", G.im); |
113 | 113 |
114 main_filter_.DumpFilter("aec3_subtractor_H_main"); | 114 main_filter_.DumpFilter("aec3_subtractor_H_main"); |
115 shadow_filter_.DumpFilter("aec3_subtractor_H_shadow"); | 115 shadow_filter_.DumpFilter("aec3_subtractor_H_shadow"); |
116 } | 116 } |
117 | 117 |
118 } // namespace webrtc | 118 } // namespace webrtc |
OLD | NEW |