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 ****************************************************************************************/
33 ------------------------------------------------------------------------------
36 This file contains all the constant definitions and prototype definitions
37 needed by the q_plsf_3.c and q_plsf_5.c
39 ------------------------------------------------------------------------------
42 /*----------------------------------------------------------------------------
43 ; CONTINUE ONLY IF NOT ALREADY DEFINED
44 ----------------------------------------------------------------------------*/
46 #define q_plsf_h "$Id $"
48 /*----------------------------------------------------------------------------
50 ----------------------------------------------------------------------------*/
55 /*--------------------------------------------------------------------------*/
61 /*----------------------------------------------------------------------------
63 ; Define module specific macros here
64 ----------------------------------------------------------------------------*/
66 /*----------------------------------------------------------------------------
68 ; Include all pre-processor statements here.
69 ----------------------------------------------------------------------------*/
70 #define MR795_1_SIZE 512
71 #define PAST_RQ_INIT_SIZE 8
73 #define DICO1_SIZE 256
74 #define DICO2_SIZE 512
75 #define DICO3_SIZE 512
77 #define DICO1_5_SIZE 128
78 #define DICO2_5_SIZE 256
79 #define DICO3_5_SIZE 256
80 #define DICO4_5_SIZE 256
81 #define DICO5_5_SIZE 64
83 #define MR515_3_SIZE 128
85 /*----------------------------------------------------------------------------
86 ; EXTERNAL VARIABLES REFERENCES
87 ; Declare variables used in this module but defined elsewhere
88 ----------------------------------------------------------------------------*/
90 /*----------------------------------------------------------------------------
92 ----------------------------------------------------------------------------*/
94 /*----------------------------------------------------------------------------
95 ; ENUMERATED TYPEDEF'S
96 ----------------------------------------------------------------------------*/
98 /*----------------------------------------------------------------------------
99 ; STRUCTURES TYPEDEF'S
100 ----------------------------------------------------------------------------*/
103 Word16 past_rq[M]; /* Past quantized prediction error, Q15 */
107 /*----------------------------------------------------------------------------
108 ; GLOBAL FUNCTION DEFINITIONS
109 ; Function Prototype declaration
110 ----------------------------------------------------------------------------*/
112 Word16 Q_plsf_init(Q_plsfState **st);
113 /* initialize one instance of the state.
114 Stores pointer to filter status struct in *st. This pointer has to
115 be passed to Q_plsf_5 / Q_plsf_3 in each call.
119 Word16 Q_plsf_reset(Q_plsfState *st);
120 /* reset of state (i.e. set state memory to zero)
124 void Q_plsf_exit(Q_plsfState **st);
125 /* de-initialize state (i.e. free status struct)
129 OSCL_IMPORT_REF void Q_plsf_3(
130 Q_plsfState *st, /* i/o: state struct */
131 enum Mode mode, /* i : coder mode */
132 Word16 *lsp1, /* i : 1st LSP vector Q15 */
133 Word16 *lsp1_q, /* o : quantized 1st LSP vector Q15 */
134 Word16 *indice, /* o : quantization indices of 3 vectors Q0 */
135 Word16 *pred_init_i,/* o : init index for MA prediction in DTX mode */
136 Flag *pOverflow /* o : Flag set when overflow occurs */
139 OSCL_IMPORT_REF void Q_plsf_5(
141 Word16 *lsp1, /* i : 1st LSP vector, Q15 */
142 Word16 *lsp2, /* i : 2nd LSP vector, Q15 */
143 Word16 *lsp1_q, /* o : quantized 1st LSP vector, Q15 */
144 Word16 *lsp2_q, /* o : quantized 2nd LSP vector, Q15 */
145 Word16 *indice, /* o : quantization indices of 5 matrices, Q0 */
146 Flag *pOverflow /* o : Flag set when overflow occurs */
148 /*----------------------------------------------------------------------------
150 ----------------------------------------------------------------------------*/
155 #endif /* _Q_PLSF_H_ */