/* * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ /* * This file contains the splitting filter functions. * */ #include "rtc_base/checks.h" #include "common_audio/signal_processing/include/signal_processing_library.h" // Maximum number of samples in a low/high-band frame. enum { … }; // QMF filter coefficients in Q16. static const uint16_t WebRtcSpl_kAllPassFilter1[3] = …; static const uint16_t WebRtcSpl_kAllPassFilter2[3] = …; /////////////////////////////////////////////////////////////////////////////////////////////// // WebRtcSpl_AllPassQMF(...) // // Allpass filter used by the analysis and synthesis parts of the QMF filter. // // Input: // - in_data : Input data sequence (Q10) // - data_length : Length of data sequence (>2) // - filter_coefficients : Filter coefficients (length 3, Q16) // // Input & Output: // - filter_state : Filter state (length 6, Q10). // // Output: // - out_data : Output data sequence (Q10), length equal to // `data_length` // static void WebRtcSpl_AllPassQMF(int32_t* in_data, size_t data_length, int32_t* out_data, const uint16_t* filter_coefficients, int32_t* filter_state) { … } void WebRtcSpl_AnalysisQMF(const int16_t* in_data, size_t in_data_length, int16_t* low_band, int16_t* high_band, int32_t* filter_state1, int32_t* filter_state2) { … } void WebRtcSpl_SynthesisQMF(const int16_t* low_band, const int16_t* high_band, size_t band_length, int16_t* out_data, int32_t* filter_state1, int32_t* filter_state2) { … }