OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / frameworks / base / media / libstagefright / codecs / amrnb / enc / src / inter_36_tab.cpp
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 /****************************************************************************************
19 Portions of this file are derived from the following 3GPP standard:
20
21     3GPP TS 26.073
22     ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
23     Available from http://www.3gpp.org
24
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 ****************************************************************************************/
29 /*
30 ------------------------------------------------------------------------------
31
32  Pathname: .audio/gsm-amr/c/src/inter_36_tab.c
33
34      Date: 02/01/2002
35
36 ------------------------------------------------------------------------------
37  REVISION HISTORY
38
39  Description: Changed tables from static const to just const.
40
41  Description: Added #ifdef __cplusplus and removed "extern" from table
42               definition. Removed corresponding header file from Include
43               section.
44
45  Description: Put "extern" back.
46
47  Description:
48
49 ------------------------------------------------------------------------------
50  INPUT AND OUTPUT DEFINITIONS
51
52  Inputs:
53     None
54
55  Local Stores/Buffers/Pointers Needed:
56     None
57
58  Global Stores/Buffers/Pointers Needed:
59     None
60
61  Outputs:
62     None
63
64  Pointers and Buffers Modified:
65     None
66
67  Local Stores Modified:
68     None
69
70  Global Stores Modified:
71     None
72
73 ------------------------------------------------------------------------------
74  FUNCTION DESCRIPTION
75
76       File             : inter_36.tab
77       Purpose          : Tables for interpolating the normalized correlation
78                          with 1/3 or 1/6 resolution.
79
80
81 ------------------------------------------------------------------------------
82  REQUIREMENTS
83
84  None
85
86 ------------------------------------------------------------------------------
87  REFERENCES
88
89  None
90
91 ------------------------------------------------------------------------------
92  PSEUDO-CODE
93
94
95 ------------------------------------------------------------------------------
96  RESOURCES USED
97    When the code is written for a specific target processor the
98      the resources used should be documented below.
99
100  STACK USAGE: [stack count for this module] + [variable to represent
101           stack usage for each subroutine called]
102
103      where: [stack usage variable] = stack usage for [subroutine
104          name] (see [filename].ext)
105
106  DATA MEMORY USED: x words
107
108  PROGRAM MEMORY USED: x words
109
110  CLOCK CYCLES: [cycle count equation for this module] + [variable
111            used to represent cycle count for each subroutine
112            called]
113
114      where: [cycle count variable] = cycle count for [subroutine
115         name] (see [filename].ext)
116
117 ------------------------------------------------------------------------------
118 */
119
120
121 /*----------------------------------------------------------------------------
122 ; INCLUDES
123 ----------------------------------------------------------------------------*/
124 #include    "typedef.h"
125 #include    "cnst.h"
126
127 /*--------------------------------------------------------------------------*/
128 #ifdef __cplusplus
129 extern "C"
130 {
131 #endif
132
133     /*----------------------------------------------------------------------------
134     ; MACROS
135     ; Define module specific macros here
136     ----------------------------------------------------------------------------*/
137
138
139     /*----------------------------------------------------------------------------
140     ; DEFINES
141     ; Include all pre-processor statements here. Include conditional
142     ; compile variables also.
143     ----------------------------------------------------------------------------*/
144 #define UP_SAMP_MAX  6
145 #define FIR_SIZE     (UP_SAMP_MAX*L_INTER_SRCH+1)
146
147     /*----------------------------------------------------------------------------
148     ; LOCAL FUNCTION DEFINITIONS
149     ; Function Prototype declaration
150     ----------------------------------------------------------------------------*/
151
152
153     /*----------------------------------------------------------------------------
154     ; LOCAL STORE/BUFFER/POINTER DEFINITIONS
155     ; Variable declaration - defined here and used outside this module
156     ----------------------------------------------------------------------------*/
157     /* 1/6 resolution interpolation filter  (-3 dB at 3600 Hz) */
158     /* Note: The IS641 (7.4) 1/3 resolution filter is simply a subsampled
159              version of the 1/6 resolution filter, i.e. it uses
160              every second coefficient:
161
162              inter_3[k] = inter_6[2*k], 0 <= k <= 3*L_INTER_SRCH
163      */
164
165     extern const Word16 inter_6[FIR_SIZE] =
166     {
167         29519,
168         28316, 24906, 19838, 13896, 7945, 2755,
169         -1127, -3459, -4304, -3969, -2899, -1561,
170         -336, 534, 970, 1023, 823, 516,
171         220, 0, -131, -194, -215, 0
172     };
173
174     /*----------------------------------------------------------------------------
175     ; EXTERNAL FUNCTION REFERENCES
176     ; Declare functions defined elsewhere and referenced in this module
177     ----------------------------------------------------------------------------*/
178
179
180     /*----------------------------------------------------------------------------
181     ; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES
182     ; Declare variables used in this module but defined elsewhere
183     ----------------------------------------------------------------------------*/
184
185
186     /*--------------------------------------------------------------------------*/
187 #ifdef __cplusplus
188 }
189 #endif
190
191 /*----------------------------------------------------------------------------
192 ; FUNCTION CODE
193 ----------------------------------------------------------------------------*/
194
195 /*----------------------------------------------------------------------------
196 ; Define all local variables
197 ----------------------------------------------------------------------------*/
198
199
200 /*----------------------------------------------------------------------------
201 ; Function body here
202 ----------------------------------------------------------------------------*/
203
204
205 /*----------------------------------------------------------------------------
206 ; Return nothing or data or data pointer
207 ----------------------------------------------------------------------------*/
208
209
210
211
212