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/lag_wind_tab.c
33 
34      Date: 01/29/2002
35 
36 ------------------------------------------------------------------------------
37  REVISION HISTORY
38 
39  Description: Added #ifdef __cplusplus and removed "extern" from table
40               definition. Removed corresponding header file from Include
41               section.
42 
43  Description: Put "extern" back.
44 
45  Description:
46 
47 ------------------------------------------------------------------------------
48  INPUT AND OUTPUT DEFINITIONS
49 
50  Inputs:
51     None
52 
53  Local Stores/Buffers/Pointers Needed:
54     None
55 
56  Global Stores/Buffers/Pointers Needed:
57     None
58 
59  Outputs:
60     None
61 
62  Pointers and Buffers Modified:
63     None
64 
65  Local Stores Modified:
66     None
67 
68  Global Stores Modified:
69     None
70 
71 ------------------------------------------------------------------------------
72  FUNCTION DESCRIPTION
73 
74       File             : lag_wind.tab
75       Purpose          : Table of lag_window for autocorrelation.
76 
77  *-----------------------------------------------------*
78  | Table of lag_window for autocorrelation.            |
79  |                                                     |
80  | noise floor = 1.0001   = (0.9999  on r[1] ..r[10])  |
81  | Bandwitdh expansion = 60 Hz                         |
82  |                                                     |
83  |                                                     |
84  | lag_wind[0] =  1.00000000    (not stored)           |
85  | lag_wind[1] =  0.99879038                           |
86  | lag_wind[2] =  0.99546897                           |
87  | lag_wind[3] =  0.98995781                           |
88  | lag_wind[4] =  0.98229337                           |
89  | lag_wind[5] =  0.97252619                           |
90  | lag_wind[6] =  0.96072036                           |
91  | lag_wind[7] =  0.94695264                           |
92  | lag_wind[8] =  0.93131179                           |
93  | lag_wind[9] =  0.91389757                           |
94  | lag_wind[10]=  0.89481968                           |
95  -------------------------------------------------------
96 
97 ------------------------------------------------------------------------------
98  REQUIREMENTS
99 
100  None
101 
102 ------------------------------------------------------------------------------
103  REFERENCES
104 
105  None
106 
107 ------------------------------------------------------------------------------
108  PSEUDO-CODE
109 
110 
111 ------------------------------------------------------------------------------
112  RESOURCES USED
113    When the code is written for a specific target processor the
114      the resources used should be documented below.
115 
116  STACK USAGE: [stack count for this module] + [variable to represent
117           stack usage for each subroutine called]
118 
119      where: [stack usage variable] = stack usage for [subroutine
120          name] (see [filename].ext)
121 
122  DATA MEMORY USED: x words
123 
124  PROGRAM MEMORY USED: x words
125 
126  CLOCK CYCLES: [cycle count equation for this module] + [variable
127            used to represent cycle count for each subroutine
128            called]
129 
130      where: [cycle count variable] = cycle count for [subroutine
131         name] (see [filename].ext)
132 
133 ------------------------------------------------------------------------------
134 */
135 
136 
137 /*----------------------------------------------------------------------------
138 ; INCLUDES
139 ----------------------------------------------------------------------------*/
140 #include    "typedef.h"
141 #include    "lag_wind_tab.h"
142 
143 /*--------------------------------------------------------------------------*/
144 #ifdef __cplusplus
145 extern "C"
146 {
147 #endif
148 
149     /*----------------------------------------------------------------------------
150     ; MACROS
151     ; Define module specific macros here
152     ----------------------------------------------------------------------------*/
153 
154 
155     /*----------------------------------------------------------------------------
156     ; DEFINES
157     ; Include all pre-processor statements here. Include conditional
158     ; compile variables also.
159     ----------------------------------------------------------------------------*/
160 
161     /*----------------------------------------------------------------------------
162     ; LOCAL FUNCTION DEFINITIONS
163     ; Function Prototype declaration
164     ----------------------------------------------------------------------------*/
165 
166 
167     /*----------------------------------------------------------------------------
168     ; LOCAL STORE/BUFFER/POINTER DEFINITIONS
169     ; Variable declaration - defined here and used outside this module
170     ----------------------------------------------------------------------------*/
171     const Word16 lag_h[10] =
172     {
173         32728,
174         32619,
175         32438,
176         32187,
177         31867,
178         31480,
179         31029,
180         30517,
181         29946,
182         29321
183     };
184 
185     const Word16 lag_l[10] =
186     {
187         11904,
188         17280,
189         30720,
190         25856,
191         24192,
192         28992,
193         24384,
194         7360,
195         19520,
196         14784
197     };
198 
199     /*----------------------------------------------------------------------------
200     ; EXTERNAL FUNCTION REFERENCES
201     ; Declare functions defined elsewhere and referenced in this module
202     ----------------------------------------------------------------------------*/
203 
204 
205     /*----------------------------------------------------------------------------
206     ; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES
207     ; Declare variables used in this module but defined elsewhere
208     ----------------------------------------------------------------------------*/
209 
210 
211     /*--------------------------------------------------------------------------*/
212 #ifdef __cplusplus
213 }
214 #endif
215 
216 /*----------------------------------------------------------------------------
217 ; FUNCTION CODE
218 ----------------------------------------------------------------------------*/
219 
220 /*----------------------------------------------------------------------------
221 ; Define all local variables
222 ----------------------------------------------------------------------------*/
223 
224 
225 /*----------------------------------------------------------------------------
226 ; Function body here
227 ----------------------------------------------------------------------------*/
228 
229 
230 /*----------------------------------------------------------------------------
231 ; Return nothing or data or data pointer
232 ----------------------------------------------------------------------------*/
233 
234