Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | |
| 3 * | |
| 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 | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_CONSTANTS_H_ | |
| 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_CONSTANTS_H_ | |
| 13 | |
| 14 #include <stddef.h> | |
| 15 | |
| 16 // TODO(peah): Remove when the code is landed. | |
|
hlundin-webrtc
2016/12/16 10:04:46
When which code is landed? This CL or all of AEC3?
peah-webrtc
2016/12/20 10:10:23
Sorry, the comment is incorrect. It is currently u
| |
| 17 #define AEC3_PROTOTYPE 1 | |
| 18 | |
| 19 namespace webrtc { | |
| 20 | |
| 21 constexpr size_t kFftLengthBy2 = 64; | |
| 22 constexpr size_t kFftLengthBy2Plus1 = kFftLengthBy2 + 1; | |
| 23 constexpr size_t kFftLength = 2 * kFftLengthBy2; | |
| 24 | |
| 25 constexpr size_t kMaxNumBands = 3; | |
| 26 constexpr size_t kSubFrameLength = 80; | |
| 27 | |
| 28 constexpr size_t kBlockSize = kFftLengthBy2; | |
| 29 constexpr size_t kExtendedBlockSize = 2 * kFftLengthBy2; | |
| 30 constexpr size_t kSubBlockSize = 16; | |
| 31 | |
| 32 constexpr size_t NumBandsForRate(int sample_rate_hz) { | |
| 33 return sample_rate_hz == 8000 ? 1 : sample_rate_hz / 16000; | |
|
aleloi
2016/12/16 15:04:31
I think some of our compilers will complain here.
peah-webrtc
2016/12/20 10:10:23
Good point!
Done.
| |
| 34 } | |
| 35 constexpr int LowestBandRate(int sample_rate_hz) { | |
| 36 return sample_rate_hz == 8000 ? sample_rate_hz : 16000; | |
| 37 } | |
| 38 | |
| 39 } // namespace webrtc | |
| 40 | |
| 41 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_AEC3_CONSTANTS_H_ | |
| OLD | NEW |