1 /* ------------------------------------------------------------------
2 * Copyright (C) 1998-2009 PacketVideo
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14 * See the License for the specific language governing permissions
15 * and limitations under the License.
16 * -------------------------------------------------------------------
18 /****************************************************************************************
19 Portions of this file are derived from the following 3GPP standard:
22 ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
23 Available from http://www.3gpp.org
25 (C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
26 Permission to distribute, modify and use this file under the standard license
27 terms listed above has been obtained from the copyright holder.
28 ****************************************************************************************/
30 ------------------------------------------------------------------------------
36 ------------------------------------------------------------------------------
40 Purpose : Performs adaptive postfiltering on the synthesis
43 ------------------------------------------------------------------------------
48 #define pstfilt_h "$Id $"
50 /*----------------------------------------------------------------------------
52 ----------------------------------------------------------------------------*/
59 /*--------------------------------------------------------------------------*/
65 /*----------------------------------------------------------------------------
67 ; [Define module specific macros here]
68 ----------------------------------------------------------------------------*/
70 /*----------------------------------------------------------------------------
72 ; [Include all pre-processor statements here.]
73 ----------------------------------------------------------------------------*/
75 /*----------------------------------------------------------------------------
76 ; EXTERNAL VARIABLES REFERENCES
77 ; [Declare variables used in this module but defined elsewhere]
78 ----------------------------------------------------------------------------*/
80 /*----------------------------------------------------------------------------
82 ----------------------------------------------------------------------------*/
84 /*----------------------------------------------------------------------------
85 ; ENUMERATED TYPEDEF'S
86 ----------------------------------------------------------------------------*/
88 /*----------------------------------------------------------------------------
89 ; STRUCTURES TYPEDEF'S
90 ----------------------------------------------------------------------------*/
94 Word16 mem_syn_pst[M];
95 preemphasisState preemph_state;
97 Word16 synth_buf[M + L_FRAME];
100 /*----------------------------------------------------------------------------
101 ; GLOBAL FUNCTION DEFINITIONS
102 ; [List function prototypes here]
103 ----------------------------------------------------------------------------*/
104 Word16 Post_Filter_reset(Post_FilterState *st);
105 /* reset post filter (i.e. set state memory to zero)
110 Post_FilterState *st, /* i/o : post filter states */
111 enum Mode mode, /* i : AMR mode */
112 Word16 *syn, /* i/o : synthesis speech (postfiltered is output) */
113 Word16 *Az_4, /* i : interpolated LPC parameters in all subfr. */
116 /* filters the signal syn using the parameters in Az_4 to calculate filter
118 The filter must be set up using Post_Filter_init prior to the first call
119 to Post_Filter. Post_FilterState is updated to mirror the current state
129 #endif /* _PSTFILT_H_ */