Home | History | Annotate | Download | only in source
      1 /*
      2  *  Copyright (c) 2011 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_MAIN_SOURCE_SPLITTING_FILTER_H_
     12 #define WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_SPLITTING_FILTER_H_
     13 
     14 #include "typedefs.h"
     15 #include "signal_processing_library.h"
     16 
     17 namespace webrtc {
     18 /*
     19  * SplittingFilterbank_analysisQMF(...)
     20  *
     21  * Splits a super-wb signal into two subbands: 0-8 kHz and 8-16 kHz.
     22  *
     23  * Input:
     24  *    - in_data  : super-wb audio signal
     25  *
     26  * Input & Output:
     27  *    - filt_state1: Filter state for first all-pass filter
     28  *    - filt_state2: Filter state for second all-pass filter
     29  *
     30  * Output:
     31  *    - low_band : The signal from the 0-4 kHz band
     32  *    - high_band  : The signal from the 4-8 kHz band
     33  */
     34 void SplittingFilterAnalysis(const WebRtc_Word16* in_data,
     35                              WebRtc_Word16* low_band,
     36                              WebRtc_Word16* high_band,
     37                              WebRtc_Word32* filt_state1,
     38                              WebRtc_Word32* filt_state2);
     39 
     40 /*
     41  * SplittingFilterbank_synthesisQMF(...)
     42  *
     43  * Combines the two subbands (0-8 and 8-16 kHz) into a super-wb signal.
     44  *
     45  * Input:
     46  *    - low_band : The signal with the 0-8 kHz band
     47  *    - high_band  : The signal with the 8-16 kHz band
     48  *
     49  * Input & Output:
     50  *    - filt_state1: Filter state for first all-pass filter
     51  *    - filt_state2: Filter state for second all-pass filter
     52  *
     53  * Output:
     54  *    - out_data : super-wb speech signal
     55  */
     56 void SplittingFilterSynthesis(const WebRtc_Word16* low_band,
     57                               const WebRtc_Word16* high_band,
     58                               WebRtc_Word16* out_data,
     59                               WebRtc_Word32* filt_state1,
     60                               WebRtc_Word32* filt_state2);
     61 }  // namespace webrtc
     62 
     63 #endif  // WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_SPLITTING_FILTER_H_
     64