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 /*
12  * pitch_estimator.h
13  *
14  * Pitch functions
15  *
16  */
17 
18 #ifndef MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_ESTIMATOR_H_
19 #define MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_ESTIMATOR_H_
20 
21 #include "structs.h"
22 
23 
24 
25 void WebRtcIsac_PitchAnalysis(const double *in,               /* PITCH_FRAME_LEN samples */
26                               double *out,                    /* PITCH_FRAME_LEN+QLOOKAHEAD samples */
27                               PitchAnalysisStruct *State,
28                               double *lags,
29                               double *gains);
30 
31 void WebRtcIsac_InitializePitch(const double *in,
32                                 const double old_lag,
33                                 const double old_gain,
34                                 PitchAnalysisStruct *State,
35                                 double *lags);
36 
37 void WebRtcIsac_PitchfilterPre(double *indat,
38                                double *outdat,
39                                PitchFiltstr *pfp,
40                                double *lags,
41                                double *gains);
42 
43 void WebRtcIsac_PitchfilterPost(double *indat,
44                                 double *outdat,
45                                 PitchFiltstr *pfp,
46                                 double *lags,
47                                 double *gains);
48 
49 void WebRtcIsac_PitchfilterPre_la(double *indat,
50                                   double *outdat,
51                                   PitchFiltstr *pfp,
52                                   double *lags,
53                                   double *gains);
54 
55 void WebRtcIsac_PitchfilterPre_gains(double *indat,
56                                      double *outdat,
57                                      double out_dG[][PITCH_FRAME_LEN + QLOOKAHEAD],
58                                      PitchFiltstr *pfp,
59                                      double *lags,
60                                      double *gains);
61 
62 void WebRtcIsac_WeightingFilter(const double *in, double *weiout, double *whiout, WeightFiltstr *wfdata);
63 
64 void WebRtcIsac_Highpass(const double *in,
65                          double *out,
66                          double *state,
67                          size_t N);
68 
69 void WebRtcIsac_DecimateAllpass(const double *in,
70                                 double *state_in,  /* array of size:
71                                                     *     2*ALLPASSSECTIONS+1 */
72                                 size_t N,          /* number of input samples */
73                                 double *out);      /* array of size N/2 */
74 
75 #endif /* MODULES_AUDIO_CODING_CODECS_ISAC_MAIN_SOURCE_PITCH_ESTIMATOR_H_ */
76