OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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_THREE_BAND_FILTER_BANK_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_ |
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_ | 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_ |
13 | 13 |
14 #include <cstring> | 14 #include <cstring> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "webrtc/common_audio/sparse_fir_filter.h" | 17 #include "webrtc/common_audio/sparse_fir_filter.h" |
18 #include "webrtc/system_wrappers/interface/scoped_vector.h" | 18 #include "webrtc/system_wrappers/include/scoped_vector.h" |
19 | 19 |
20 namespace webrtc { | 20 namespace webrtc { |
21 | 21 |
22 // An implementation of a 3-band FIR filter-bank with DCT modulation, similar to | 22 // An implementation of a 3-band FIR filter-bank with DCT modulation, similar to |
23 // the proposed in "Multirate Signal Processing for Communication Systems" by | 23 // the proposed in "Multirate Signal Processing for Communication Systems" by |
24 // Fredric J Harris. | 24 // Fredric J Harris. |
25 // The low-pass filter prototype has these characteristics: | 25 // The low-pass filter prototype has these characteristics: |
26 // * Pass-band ripple = 0.3dB | 26 // * Pass-band ripple = 0.3dB |
27 // * Pass-band frequency = 0.147 (7kHz at 48kHz) | 27 // * Pass-band frequency = 0.147 (7kHz at 48kHz) |
28 // * Stop-band attenuation = 40dB | 28 // * Stop-band attenuation = 40dB |
(...skipping 30 matching lines...) Expand all Loading... |
59 std::vector<float> in_buffer_; | 59 std::vector<float> in_buffer_; |
60 std::vector<float> out_buffer_; | 60 std::vector<float> out_buffer_; |
61 ScopedVector<SparseFIRFilter> analysis_filters_; | 61 ScopedVector<SparseFIRFilter> analysis_filters_; |
62 ScopedVector<SparseFIRFilter> synthesis_filters_; | 62 ScopedVector<SparseFIRFilter> synthesis_filters_; |
63 std::vector<std::vector<float>> dct_modulation_; | 63 std::vector<std::vector<float>> dct_modulation_; |
64 }; | 64 }; |
65 | 65 |
66 } // namespace webrtc | 66 } // namespace webrtc |
67 | 67 |
68 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_ | 68 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_ |
OLD | NEW |