Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: webrtc/modules/audio_processing/three_band_filter_bank.h

Issue 2288133002: Fix Chromium clang plugin warnings (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
(...skipping 17 matching lines...) Expand all
28 // * Stop-band attenuation = 40dB 28 // * Stop-band attenuation = 40dB
29 // * Stop-band frequency = 0.192 (9.2kHz at 48kHz) 29 // * Stop-band frequency = 0.192 (9.2kHz at 48kHz)
30 // * Delay = 24 samples (500us at 48kHz) 30 // * Delay = 24 samples (500us at 48kHz)
31 // * Linear phase 31 // * Linear phase
32 // This filter bank does not satisfy perfect reconstruction. The SNR after 32 // This filter bank does not satisfy perfect reconstruction. The SNR after
33 // analysis and synthesis (with no processing in between) is approximately 9.5dB 33 // analysis and synthesis (with no processing in between) is approximately 9.5dB
34 // depending on the input signal after compensating for the delay. 34 // depending on the input signal after compensating for the delay.
35 class ThreeBandFilterBank final { 35 class ThreeBandFilterBank final {
36 public: 36 public:
37 explicit ThreeBandFilterBank(size_t length); 37 explicit ThreeBandFilterBank(size_t length);
38 ~ThreeBandFilterBank();
38 39
39 // Splits |in| into 3 downsampled frequency bands in |out|. 40 // Splits |in| into 3 downsampled frequency bands in |out|.
40 // |length| is the |in| length. Each of the 3 bands of |out| has to have a 41 // |length| is the |in| length. Each of the 3 bands of |out| has to have a
41 // length of |length| / 3. 42 // length of |length| / 3.
42 void Analysis(const float* in, size_t length, float* const* out); 43 void Analysis(const float* in, size_t length, float* const* out);
43 44
44 // Merges the 3 downsampled frequency bands in |in| into |out|. 45 // Merges the 3 downsampled frequency bands in |in| into |out|.
45 // |split_length| is the length of each band of |in|. |out| has to have at 46 // |split_length| is the length of each band of |in|. |out| has to have at
46 // least a length of 3 * |split_length|. 47 // least a length of 3 * |split_length|.
47 void Synthesis(const float* const* in, size_t split_length, float* out); 48 void Synthesis(const float* const* in, size_t split_length, float* out);
(...skipping 11 matching lines...) Expand all
59 std::vector<float> in_buffer_; 60 std::vector<float> in_buffer_;
60 std::vector<float> out_buffer_; 61 std::vector<float> out_buffer_;
61 std::vector<std::unique_ptr<SparseFIRFilter>> analysis_filters_; 62 std::vector<std::unique_ptr<SparseFIRFilter>> analysis_filters_;
62 std::vector<std::unique_ptr<SparseFIRFilter>> synthesis_filters_; 63 std::vector<std::unique_ptr<SparseFIRFilter>> synthesis_filters_;
63 std::vector<std::vector<float>> dct_modulation_; 64 std::vector<std::vector<float>> dct_modulation_;
64 }; 65 };
65 66
66 } // namespace webrtc 67 } // namespace webrtc
67 68
68 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_ 69 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_THREE_BAND_FILTER_BANK_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/splitting_filter.cc ('k') | webrtc/modules/audio_processing/three_band_filter_bank.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698