Chromium Code Reviews

Side by Side Diff: webrtc/modules/audio_processing/aec3/aec3_common.h

Issue 2974583004: Transparency improvements in the echo canceller 3 (Closed)
Patch Set: Corrected wrong echo estimate vector in unittest Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 15 matching lines...)
26 26
27 enum class Aec3Optimization { kNone, kSse2, kNeon }; 27 enum class Aec3Optimization { kNone, kSse2, kNeon };
28 28
29 constexpr int kNumBlocksPerSecond = 250; 29 constexpr int kNumBlocksPerSecond = 250;
30 30
31 constexpr int kMetricsReportingIntervalBlocks = 10 * kNumBlocksPerSecond; 31 constexpr int kMetricsReportingIntervalBlocks = 10 * kNumBlocksPerSecond;
32 constexpr int kMetricsComputationBlocks = 9; 32 constexpr int kMetricsComputationBlocks = 9;
33 constexpr int kMetricsCollectionBlocks = 33 constexpr int kMetricsCollectionBlocks =
34 kMetricsReportingIntervalBlocks - kMetricsComputationBlocks; 34 kMetricsReportingIntervalBlocks - kMetricsComputationBlocks;
35 35
36 constexpr int kAdaptiveFilterLength = 12;
37 constexpr int kResidualEchoPowerRenderWindowSize = 30;
38
39 constexpr size_t kFftLengthBy2 = 64; 36 constexpr size_t kFftLengthBy2 = 64;
40 constexpr size_t kFftLengthBy2Plus1 = kFftLengthBy2 + 1; 37 constexpr size_t kFftLengthBy2Plus1 = kFftLengthBy2 + 1;
41 constexpr size_t kFftLengthBy2Minus1 = kFftLengthBy2 - 1; 38 constexpr size_t kFftLengthBy2Minus1 = kFftLengthBy2 - 1;
42 constexpr size_t kFftLength = 2 * kFftLengthBy2; 39 constexpr size_t kFftLength = 2 * kFftLengthBy2;
43 40
41 constexpr int kAdaptiveFilterLength = 12;
42 constexpr int kResidualEchoPowerRenderWindowSize = 30;
43 constexpr int kAdaptiveFilterTimeDomainLength =
44 kAdaptiveFilterLength * kFftLengthBy2;
45
44 constexpr size_t kMaxNumBands = 3; 46 constexpr size_t kMaxNumBands = 3;
45 constexpr size_t kSubFrameLength = 80; 47 constexpr size_t kSubFrameLength = 80;
46 48
47 constexpr size_t kBlockSize = kFftLengthBy2; 49 constexpr size_t kBlockSize = kFftLengthBy2;
48 constexpr size_t kExtendedBlockSize = 2 * kFftLengthBy2; 50 constexpr size_t kExtendedBlockSize = 2 * kFftLengthBy2;
49 constexpr size_t kSubBlockSize = 16; 51 constexpr size_t kSubBlockSize = 16;
50 52
51 constexpr size_t kNumMatchedFilters = 4; 53 constexpr size_t kNumMatchedFilters = 4;
52 constexpr size_t kMatchedFilterWindowSizeSubBlocks = 32; 54 constexpr size_t kMatchedFilterWindowSizeSubBlocks = 32;
53 constexpr size_t kMatchedFilterAlignmentShiftSizeSubBlocks = 55 constexpr size_t kMatchedFilterAlignmentShiftSizeSubBlocks =
(...skipping 51 matching lines...)
105 static_assert(ValidFullBandRate(32000), 107 static_assert(ValidFullBandRate(32000),
106 "Test that 32 kHz is a valid sample rate"); 108 "Test that 32 kHz is a valid sample rate");
107 static_assert(ValidFullBandRate(48000), 109 static_assert(ValidFullBandRate(48000),
108 "Test that 48 kHz is a valid sample rate"); 110 "Test that 48 kHz is a valid sample rate");
109 static_assert(!ValidFullBandRate(8001), 111 static_assert(!ValidFullBandRate(8001),
110 "Test that 8001 Hz is not a valid sample rate"); 112 "Test that 8001 Hz is not a valid sample rate");
111 113
112 } // namespace webrtc 114 } // namespace webrtc
113 115
114 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_ 116 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/aec3/adaptive_fir_filter_unittest.cc ('k') | webrtc/modules/audio_processing/aec3/aec_state.h » ('j') | no next file with comments »

Powered by Google App Engine