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 : Tone stabilization routines
42 ------------------------------------------------------------------------------
47 #define ton_stab_h "$Id $"
49 /*----------------------------------------------------------------------------
51 ----------------------------------------------------------------------------*/
56 /*--------------------------------------------------------------------------*/
62 /*----------------------------------------------------------------------------
64 ; Define module specific macros here
65 ----------------------------------------------------------------------------*/
67 /*----------------------------------------------------------------------------
69 ; Include all pre-processor statements here.
70 ----------------------------------------------------------------------------*/
72 /*----------------------------------------------------------------------------
73 ; EXTERNAL VARIABLES REFERENCES
74 ; Declare variables used in this module but defined elsewhere
75 ----------------------------------------------------------------------------*/
77 /*----------------------------------------------------------------------------
79 ----------------------------------------------------------------------------*/
85 /* gain history Q11 */
89 /*----------------------------------------------------------------------------
90 ; ENUMERATED TYPEDEF'S
91 ----------------------------------------------------------------------------*/
93 /*----------------------------------------------------------------------------
94 ; STRUCTURES TYPEDEF'S
95 ----------------------------------------------------------------------------*/
97 /*----------------------------------------------------------------------------
98 ; GLOBAL FUNCTION DEFINITIONS
99 ; Function Prototype declaration
100 ----------------------------------------------------------------------------*/
101 Word16 ton_stab_init(tonStabState **st);
102 /* initialize one instance of the pre processing state.
103 Stores pointer to filter status struct in *st. This pointer has to
104 be passed to ton_stab in each call.
108 Word16 ton_stab_reset(tonStabState *st);
109 /* reset of pre processing state (i.e. set state memory to zero)
113 void ton_stab_exit(tonStabState **st);
114 /* de-initialize pre processing state (i.e. free status struct)
118 Word16 check_lsp(tonStabState *st, /* i/o : State struct */
119 Word16 *lsp, /* i : unquantized LSP's */
123 Word16 check_gp_clipping(tonStabState *st, /* i/o : State struct */
124 Word16 g_pitch, /* i : pitch gain */
128 void update_gp_clipping(tonStabState *st, /* i/o : State struct */
129 Word16 g_pitch, /* i : pitch gain */
133 /*----------------------------------------------------------------------------
135 ----------------------------------------------------------------------------*/
140 #endif /* _TON_STAB_H_ */