OLD | NEW |
---|---|
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 |
11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_ |
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_ | 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_ |
13 | 13 |
14 #include <stddef.h> | 14 #include <stddef.h> |
15 #include "webrtc/typedefs.h" | 15 #include "webrtc/typedefs.h" |
16 | 16 |
17 namespace webrtc { | 17 namespace webrtc { |
18 | 18 |
19 #ifdef _MSC_VER /* visual c++ */ | 19 #ifdef _MSC_VER /* visual c++ */ |
20 #define ALIGN16_BEG __declspec(align(16)) | 20 #define ALIGN16_BEG __declspec(align(16)) |
21 #define ALIGN16_END | 21 #define ALIGN16_END |
22 #else /* gcc or icc */ | 22 #else /* gcc or icc */ |
23 #define ALIGN16_BEG | 23 #define ALIGN16_BEG |
24 #define ALIGN16_END __attribute__((aligned(16))) | 24 #define ALIGN16_END __attribute__((aligned(16))) |
25 #endif | 25 #endif |
26 | 26 |
27 enum class Aec3Optimization { kNone, kSse2 }; | 27 enum class Aec3Optimization { kNone, kSse2 }; |
28 | 28 |
29 constexpr int kMetricsReportingInterval = 10 * 250; | |
hlundin-webrtc
2017/02/28 10:04:22
What is the unit? Milliseconds?
peah-webrtc
2017/02/28 12:57:25
Done.
| |
30 constexpr int kMetricsComputationBlocks = 10; | |
31 constexpr int kMetricsCollectionBlocks = | |
32 kMetricsReportingInterval - kMetricsComputationBlocks; | |
33 | |
29 constexpr size_t kFftLengthBy2 = 64; | 34 constexpr size_t kFftLengthBy2 = 64; |
30 constexpr size_t kFftLengthBy2Plus1 = kFftLengthBy2 + 1; | 35 constexpr size_t kFftLengthBy2Plus1 = kFftLengthBy2 + 1; |
31 constexpr size_t kFftLengthBy2Minus1 = kFftLengthBy2 - 1; | 36 constexpr size_t kFftLengthBy2Minus1 = kFftLengthBy2 - 1; |
32 constexpr size_t kFftLength = 2 * kFftLengthBy2; | 37 constexpr size_t kFftLength = 2 * kFftLengthBy2; |
33 | 38 |
34 constexpr size_t kMaxNumBands = 3; | 39 constexpr size_t kMaxNumBands = 3; |
35 constexpr size_t kSubFrameLength = 80; | 40 constexpr size_t kSubFrameLength = 80; |
36 | 41 |
37 constexpr size_t kBlockSize = kFftLengthBy2; | 42 constexpr size_t kBlockSize = kFftLengthBy2; |
38 constexpr size_t kExtendedBlockSize = 2 * kFftLengthBy2; | 43 constexpr size_t kExtendedBlockSize = 2 * kFftLengthBy2; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 static_assert(ValidFullBandRate(32000), | 79 static_assert(ValidFullBandRate(32000), |
75 "Test that 32 kHz is a valid sample rate"); | 80 "Test that 32 kHz is a valid sample rate"); |
76 static_assert(ValidFullBandRate(48000), | 81 static_assert(ValidFullBandRate(48000), |
77 "Test that 48 kHz is a valid sample rate"); | 82 "Test that 48 kHz is a valid sample rate"); |
78 static_assert(!ValidFullBandRate(8001), | 83 static_assert(!ValidFullBandRate(8001), |
79 "Test that 8001 Hz is not a valid sample rate"); | 84 "Test that 8001 Hz is not a valid sample rate"); |
80 | 85 |
81 } // namespace webrtc | 86 } // namespace webrtc |
82 | 87 |
83 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_ | 88 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_COMMON_H_ |
OLD | NEW |