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 ------------------------------------------------------------------------------
39 This file contains all the constant definitions and prototype definitions
40 needed by the cl_ltp.c
42 ------------------------------------------------------------------------------
45 /*----------------------------------------------------------------------------
46 ; CONTINUE ONLY IF NOT ALREADY DEFINED
47 ----------------------------------------------------------------------------*/
49 #define cl_ltp_h "$Id $"
52 /*----------------------------------------------------------------------------
54 ----------------------------------------------------------------------------*/
60 /*--------------------------------------------------------------------------*/
66 /*----------------------------------------------------------------------------
68 ; Define module specific macros here
69 ----------------------------------------------------------------------------*/
71 /*----------------------------------------------------------------------------
73 ; Include all pre-processor statements here.
74 ----------------------------------------------------------------------------*/
76 /*----------------------------------------------------------------------------
77 ; EXTERNAL VARIABLES REFERENCES
78 ; Declare variables used in this module but defined elsewhere
79 ----------------------------------------------------------------------------*/
81 /*----------------------------------------------------------------------------
83 ----------------------------------------------------------------------------*/
85 /*----------------------------------------------------------------------------
86 ; ENUMERATED TYPEDEF'S
87 ----------------------------------------------------------------------------*/
89 /*----------------------------------------------------------------------------
90 ; STRUCTURES TYPEDEF'S
91 ----------------------------------------------------------------------------*/
96 Pitch_frState *pitchSt;
99 /*----------------------------------------------------------------------------
100 ; GLOBAL FUNCTION DEFINITIONS
101 ; Function Prototype declaration
102 ----------------------------------------------------------------------------*/
103 Word16 cl_ltp_init(clLtpState **st);
104 /* initialize one instance of the pre processing state.
105 Stores pointer to filter status struct in *st. This pointer has to
106 be passed to cl_ltp in each call.
110 Word16 cl_ltp_reset(clLtpState *st);
111 /* reset of pre processing state (i.e. set state memory to zero)
114 void cl_ltp_exit(clLtpState **st);
115 /* de-initialize pre processing state (i.e. free status struct)
120 clLtpState *clSt, /* i/o : State struct */
121 tonStabState *tonSt, /* i/o : State struct */
122 enum Mode mode, /* i : coder mode */
123 Word16 frameOffset, /* i : Offset to subframe */
124 Word16 T_op[], /* i : Open loop pitch lags */
125 Word16 *h1, /* i : Impulse response vector Q12 */
126 Word16 *exc, /* i/o : Excitation vector Q0 */
127 Word16 res2[], /* i/o : Long term prediction residual Q0 */
128 Word16 xn[], /* i : Target vector for pitch search Q0 */
129 Word16 lsp_flag, /* i : LSP resonance flag */
130 Word16 xn2[], /* o : Target vector for codebook search Q0 */
131 Word16 y1[], /* o : Filtered adaptive excitation Q0 */
132 Word16 *T0, /* o : Pitch delay (integer part) */
133 Word16 *T0_frac, /* o : Pitch delay (fractional part) */
134 Word16 *gain_pit, /* o : Pitch gain Q14 */
135 Word16 g_coeff[], /* o : Correlations between xn, y1, & y2 */
136 Word16 **anap, /* o : Analysis parameters */
137 Word16 *gp_limit, /* o : pitch gain limit */
138 const Word16* qua_gain_pitch_ptr, /* i : ptr to read-only table */
139 Flag *pOverflow /* o : overflow indicator */
142 /*----------------------------------------------------------------------------
144 ----------------------------------------------------------------------------*/
149 #endif /* _CL_LTP_H_ */