Home | History | Annotate | Download | only in source
      1 /*
      2  *  Copyright (c) 2012 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 /*
     12  * pitch_estimator.h
     13  *
     14  * Pitch functions
     15  *
     16  */
     17 
     18 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_ESTIMATOR_H_
     19 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_ESTIMATOR_H_
     20 
     21 #include "structs.h"
     22 
     23 void WebRtcIsacfix_PitchAnalysis(const WebRtc_Word16 *in,               /* PITCH_FRAME_LEN samples */
     24                                  WebRtc_Word16 *outQ0,                  /* PITCH_FRAME_LEN+QLOOKAHEAD samples */
     25                                  PitchAnalysisStruct *State,
     26                                  WebRtc_Word16 *lagsQ7,
     27                                  WebRtc_Word16 *PitchGains_Q12);
     28 
     29 void WebRtcIsacfix_InitialPitch(const WebRtc_Word16 *in,
     30                                 PitchAnalysisStruct *State,
     31                                 WebRtc_Word16 *qlags);
     32 
     33 void WebRtcIsacfix_PitchFilter(WebRtc_Word16 *indatFix,
     34                                WebRtc_Word16 *outdatQQ,
     35                                PitchFiltstr *pfp,
     36                                WebRtc_Word16 *lagsQ7,
     37                                WebRtc_Word16 *gainsQ12,
     38                                WebRtc_Word16 type);
     39 
     40 void WebRtcIsacfix_PitchFilterCore(int loopNumber,
     41                                    WebRtc_Word16 gain,
     42                                    int index,
     43                                    WebRtc_Word16 sign,
     44                                    WebRtc_Word16* inputState,
     45                                    WebRtc_Word16* outputBuff2,
     46                                    const WebRtc_Word16* coefficient,
     47                                    WebRtc_Word16* inputBuf,
     48                                    WebRtc_Word16* outputBuf,
     49                                    int* index2);
     50 
     51 void WebRtcIsacfix_PitchFilterGains(const WebRtc_Word16 *indatQ0,
     52                                     PitchFiltstr *pfp,
     53                                     WebRtc_Word16 *lagsQ7,
     54                                     WebRtc_Word16 *gainsQ12);
     55 
     56 void WebRtcIsacfix_DecimateAllpass32(const WebRtc_Word16 *in,
     57                                      WebRtc_Word32 *state_in,        /* array of size: 2*ALLPASSSECTIONS+1 */
     58                                      WebRtc_Word16 N,                   /* number of input samples */
     59                                      WebRtc_Word16 *out);             /* array of size N/2 */
     60 
     61 #endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_PITCH_ESTIMATOR_H_ */
     62