| 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 22 matching lines...) Expand all Loading... |
| 33 std::array<float, kBlockSize> x_old; | 33 std::array<float, kBlockSize> x_old; |
| 34 SubtractorOutput output; | 34 SubtractorOutput output; |
| 35 RenderBuffer render_buffer(Aec3Optimization::kNone, 3, kAdaptiveFilterLength, | 35 RenderBuffer render_buffer(Aec3Optimization::kNone, 3, kAdaptiveFilterLength, |
| 36 std::vector<size_t>(1, kAdaptiveFilterLength)); | 36 std::vector<size_t>(1, kAdaptiveFilterLength)); |
| 37 RenderSignalAnalyzer render_signal_analyzer; | 37 RenderSignalAnalyzer render_signal_analyzer; |
| 38 Random random_generator(42U); | 38 Random random_generator(42U); |
| 39 Aec3Fft fft; | 39 Aec3Fft fft; |
| 40 std::array<float, kFftLengthBy2Plus1> Y2; | 40 std::array<float, kFftLengthBy2Plus1> Y2; |
| 41 std::array<float, kFftLengthBy2Plus1> E2_main; | 41 std::array<float, kFftLengthBy2Plus1> E2_main; |
| 42 std::array<float, kFftLengthBy2Plus1> E2_shadow; | 42 std::array<float, kFftLengthBy2Plus1> E2_shadow; |
| 43 AecState aec_state(0.f); | 43 AecState aec_state(AudioProcessing::Config::EchoCanceller3{}); |
| 44 x_old.fill(0.f); | 44 x_old.fill(0.f); |
| 45 Y2.fill(0.f); | 45 Y2.fill(0.f); |
| 46 E2_main.fill(0.f); | 46 E2_main.fill(0.f); |
| 47 E2_shadow.fill(0.f); | 47 E2_shadow.fill(0.f); |
| 48 | 48 |
| 49 DelayBuffer<float> delay_buffer(delay_samples); | 49 DelayBuffer<float> delay_buffer(delay_samples); |
| 50 for (int k = 0; k < num_blocks_to_process; ++k) { | 50 for (int k = 0; k < num_blocks_to_process; ++k) { |
| 51 RandomizeSampleVector(&random_generator, x[0]); | 51 RandomizeSampleVector(&random_generator, x[0]); |
| 52 if (uncorrelated_inputs) { | 52 if (uncorrelated_inputs) { |
| 53 RandomizeSampleVector(&random_generator, y); | 53 RandomizeSampleVector(&random_generator, y); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 for (size_t delay_samples : {0, 64, 150, 200, 301}) { | 163 for (size_t delay_samples : {0, 64, 150, 200, 301}) { |
| 164 SCOPED_TRACE(ProduceDebugText(delay_samples)); | 164 SCOPED_TRACE(ProduceDebugText(delay_samples)); |
| 165 | 165 |
| 166 float echo_to_nearend_power = RunSubtractorTest( | 166 float echo_to_nearend_power = RunSubtractorTest( |
| 167 100, delay_samples, false, blocks_with_echo_path_changes); | 167 100, delay_samples, false, blocks_with_echo_path_changes); |
| 168 EXPECT_NEAR(1.f, echo_to_nearend_power, 0.0000001f); | 168 EXPECT_NEAR(1.f, echo_to_nearend_power, 0.0000001f); |
| 169 } | 169 } |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace webrtc | 172 } // namespace webrtc |
| OLD | NEW |