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 Filename: qgain475_tab.cpp
35 ------------------------------------------------------------------------------
38 ------------------------------------------------------------------------------
41 /*----------------------------------------------------------------------------
43 ----------------------------------------------------------------------------*/
44 #include "qgain475_tab.h"
46 /*--------------------------------------------------------------------------*/
52 /*----------------------------------------------------------------------------
54 ; [Define module specific macros here]
55 ----------------------------------------------------------------------------*/
57 /*----------------------------------------------------------------------------
59 ; [Include all pre-processor statements here. Include conditional
60 ; compile variables also.]
61 ----------------------------------------------------------------------------*/
63 /*----------------------------------------------------------------------------
64 ; LOCAL FUNCTION DEFINITIONS
65 ; [List function prototypes here]
66 ----------------------------------------------------------------------------*/
68 /*----------------------------------------------------------------------------
69 ; LOCAL VARIABLE DEFINITIONS
70 ; [Variable declaration - defined here and used outside this module]
71 ----------------------------------------------------------------------------*/
73 /* The table contains the following data:
75 * g_pitch(0) (Q14) // for sub-
76 * g_fac(0) (Q12) // frame 0 and 2
77 * g_pitch(1) (Q14) // for sub-
78 * g_fac(2) (Q12) // frame 1 and 3
81 const Word16 table_gain_MR475[MR475_VQ_SIZE*4] =
83 /*g_pit(0), g_fac(0), g_pit(1), g_fac(1) */
85 2873, 1135, 2266, 3402,
86 2067, 563, 12677, 647,
87 4132, 1798, 5601, 5285,
89 10912, 2638, 11807, 2494,
90 20490, 797, 5218, 675,
91 6724, 8354, 5282, 1696,
93 5332, 4072, 3583, 1268,
94 2469, 901, 15894, 1005,
95 14982, 3271, 10331, 4858,
96 3635, 2021, 2596, 835,
97 12360, 4892, 12206, 1704,
98 13432, 1604, 9118, 2341,
99 3968, 1538, 5479, 9936,
100 3795, 417, 1359, 414,
101 3640, 1569, 7995, 3541,
102 11405, 645, 8552, 635,
103 4056, 1377, 16608, 6124,
104 11420, 700, 2007, 607,
105 12415, 1578, 11119, 4654,
106 13680, 1708, 11990, 1229,
107 7996, 7297, 13231, 5715,
108 2428, 1159, 2073, 1941,
109 6218, 6121, 3546, 1804,
110 8925, 1802, 8679, 1580,
111 13935, 3576, 13313, 6237,
112 6142, 1130, 5994, 1734,
113 14141, 4662, 11271, 3321,
114 12226, 1551, 13931, 3015,
115 5081, 10464, 9444, 6706,
116 1689, 683, 1436, 1306,
117 7212, 3933, 4082, 2713,
118 7793, 704, 15070, 802,
119 6299, 5212, 4337, 5357,
120 6676, 541, 6062, 626,
121 13651, 3700, 11498, 2408,
122 16156, 716, 12177, 751,
123 8065, 11489, 6314, 2256,
124 4466, 496, 7293, 523,
125 10213, 3833, 8394, 3037,
126 8403, 966, 14228, 1880,
127 8703, 5409, 16395, 4863,
128 7420, 1979, 6089, 1230,
129 9371, 4398, 14558, 3363,
130 13559, 2873, 13163, 1465,
131 5534, 1678, 13138, 14771,
132 7338, 600, 1318, 548,
133 4252, 3539, 10044, 2364,
134 10587, 622, 13088, 669,
135 14126, 3526, 5039, 9784,
136 15338, 619, 3115, 590,
137 16442, 3013, 15542, 4168,
138 15537, 1611, 15405, 1228,
139 16023, 9299, 7534, 4976,
140 1990, 1213, 11447, 1157,
141 12512, 5519, 9475, 2644,
142 7716, 2034, 13280, 2239,
143 16011, 5093, 8066, 6761,
144 10083, 1413, 5002, 2347,
145 12523, 5975, 15126, 2899,
146 18264, 2289, 15827, 2527,
147 16265, 10254, 14651, 11319,
148 1797, 337, 3115, 397,
149 3510, 2928, 4592, 2670,
150 7519, 628, 11415, 656,
151 5946, 2435, 6544, 7367,
152 8238, 829, 4000, 863,
153 10032, 2492, 16057, 3551,
154 18204, 1054, 6103, 1454,
155 5884, 7900, 18752, 3468,
156 1864, 544, 9198, 683,
157 11623, 4160, 4594, 1644,
158 3158, 1157, 15953, 2560,
159 12349, 3733, 17420, 5260,
160 6106, 2004, 2917, 1742,
161 16467, 5257, 16787, 1680,
162 17205, 1759, 4773, 3231,
163 7386, 6035, 14342, 10012,
164 4035, 442, 4194, 458,
165 9214, 2242, 7427, 4217,
166 12860, 801, 11186, 825,
167 12648, 2084, 12956, 6554,
168 9505, 996, 6629, 985,
169 10537, 2502, 15289, 5006,
170 12602, 2055, 15484, 1653,
171 16194, 6921, 14231, 5790,
172 2626, 828, 5615, 1686,
173 13663, 5778, 3668, 1554,
174 11313, 2633, 9770, 1459,
175 14003, 4733, 15897, 6291,
176 6278, 1870, 7910, 2285,
177 16978, 4571, 16576, 3849,
178 15248, 2311, 16023, 3244,
179 14459, 17808, 11847, 2763,
180 1981, 1407, 1400, 876,
181 4335, 3547, 4391, 4210,
182 5405, 680, 17461, 781,
183 6501, 5118, 8091, 7677,
184 7355, 794, 8333, 1182,
185 15041, 3160, 14928, 3039,
186 20421, 880, 14545, 852,
187 12337, 14708, 6904, 1920,
188 4225, 933, 8218, 1087,
189 10659, 4084, 10082, 4533,
190 2735, 840, 20657, 1081,
191 16711, 5966, 15873, 4578,
192 10871, 2574, 3773, 1166,
193 14519, 4044, 20699, 2627,
194 15219, 2734, 15274, 2186,
195 6257, 3226, 13125, 19480,
196 7196, 930, 2462, 1618,
197 4515, 3092, 13852, 4277,
198 10460, 833, 17339, 810,
199 16891, 2289, 15546, 8217,
200 13603, 1684, 3197, 1834,
201 15948, 2820, 15812, 5327,
202 17006, 2438, 16788, 1326,
203 15671, 8156, 11726, 8556,
204 3762, 2053, 9563, 1317,
205 13561, 6790, 12227, 1936,
206 8180, 3550, 13287, 1778,
207 16299, 6599, 16291, 7758,
208 8521, 2551, 7225, 2645,
209 18269, 7489, 16885, 2248,
210 17882, 2884, 17265, 3328,
211 9417, 20162, 11042, 8320,
212 1286, 620, 1431, 583,
213 5993, 2289, 3978, 3626,
214 5144, 752, 13409, 830,
215 5553, 2860, 11764, 5908,
216 10737, 560, 5446, 564,
217 13321, 3008, 11946, 3683,
218 19887, 798, 9825, 728,
219 13663, 8748, 7391, 3053,
220 2515, 778, 6050, 833,
221 6469, 5074, 8305, 2463,
222 6141, 1865, 15308, 1262,
223 14408, 4547, 13663, 4515,
224 3137, 2983, 2479, 1259,
225 15088, 4647, 15382, 2607,
226 14492, 2392, 12462, 2537,
227 7539, 2949, 12909, 12060,
228 5468, 684, 3141, 722,
229 5081, 1274, 12732, 4200,
230 15302, 681, 7819, 592,
231 6534, 2021, 16478, 8737,
232 13364, 882, 5397, 899,
233 14656, 2178, 14741, 4227,
234 14270, 1298, 13929, 2029,
235 15477, 7482, 15815, 4572,
236 2521, 2013, 5062, 1804,
237 5159, 6582, 7130, 3597,
238 10920, 1611, 11729, 1708,
239 16903, 3455, 16268, 6640,
240 9306, 1007, 9369, 2106,
241 19182, 5037, 12441, 4269,
242 15919, 1332, 15357, 3512,
243 11898, 14141, 16101, 6854,
244 2010, 737, 3779, 861,
245 11454, 2880, 3564, 3540,
246 9057, 1241, 12391, 896,
247 8546, 4629, 11561, 5776,
248 8129, 589, 8218, 588,
249 18728, 3755, 12973, 3149,
250 15729, 758, 16634, 754,
251 15222, 11138, 15871, 2208,
252 4673, 610, 10218, 678,
253 15257, 4146, 5729, 3327,
254 8377, 1670, 19862, 2321,
255 15450, 5511, 14054, 5481,
256 5728, 2888, 7580, 1346,
257 14384, 5325, 16236, 3950,
258 15118, 3744, 15306, 1435,
259 14597, 4070, 12301, 15696,
260 7617, 1699, 2170, 884,
261 4459, 4567, 18094, 3306,
262 12742, 815, 14926, 907,
263 15016, 4281, 15518, 8368,
264 17994, 1087, 2358, 865,
265 16281, 3787, 15679, 4596,
266 16356, 1534, 16584, 2210,
267 16833, 9697, 15929, 4513,
268 3277, 1085, 9643, 2187,
269 11973, 6068, 9199, 4462,
270 8955, 1629, 10289, 3062,
271 16481, 5155, 15466, 7066,
272 13678, 2543, 5273, 2277,
273 16746, 6213, 16655, 3408,
274 20304, 3363, 18688, 1985,
275 14172, 12867, 15154, 15703,
276 4473, 1020, 1681, 886,
277 4311, 4301, 8952, 3657,
278 5893, 1147, 11647, 1452,
279 15886, 2227, 4582, 6644,
280 6929, 1205, 6220, 799,
281 12415, 3409, 15968, 3877,
282 19859, 2109, 9689, 2141,
283 14742, 8830, 14480, 2599,
284 1817, 1238, 7771, 813,
285 19079, 4410, 5554, 2064,
286 3687, 2844, 17435, 2256,
287 16697, 4486, 16199, 5388,
288 8028, 2763, 3405, 2119,
289 17426, 5477, 13698, 2786,
290 19879, 2720, 9098, 3880,
291 18172, 4833, 17336, 12207,
292 5116, 996, 4935, 988,
293 9888, 3081, 6014, 5371,
294 15881, 1667, 8405, 1183,
295 15087, 2366, 19777, 7002,
296 11963, 1562, 7279, 1128,
297 16859, 1532, 15762, 5381,
298 14708, 2065, 20105, 2155,
299 17158, 8245, 17911, 6318,
300 5467, 1504, 4100, 2574,
301 17421, 6810, 5673, 2888,
302 16636, 3382, 8975, 1831,
303 20159, 4737, 19550, 7294,
304 6658, 2781, 11472, 3321,
305 19397, 5054, 18878, 4722,
306 16439, 2373, 20430, 4386,
307 11353, 26526, 11593, 3068,
308 2866, 1566, 5108, 1070,
309 9614, 4915, 4939, 3536,
310 7541, 878, 20717, 851,
311 6938, 4395, 16799, 7733,
312 10137, 1019, 9845, 964,
313 15494, 3955, 15459, 3430,
314 18863, 982, 20120, 963,
315 16876, 12887, 14334, 4200,
316 6599, 1220, 9222, 814,
317 16942, 5134, 5661, 4898,
318 5488, 1798, 20258, 3962,
319 17005, 6178, 17929, 5929,
320 9365, 3420, 7474, 1971,
321 19537, 5177, 19003, 3006,
322 16454, 3788, 16070, 2367,
323 8664, 2743, 9445, 26358,
324 10856, 1287, 3555, 1009,
325 5606, 3622, 19453, 5512,
326 12453, 797, 20634, 911,
327 15427, 3066, 17037, 10275,
328 18883, 2633, 3913, 1268,
329 19519, 3371, 18052, 5230,
330 19291, 1678, 19508, 3172,
331 18072, 10754, 16625, 6845,
332 3134, 2298, 10869, 2437,
333 15580, 6913, 12597, 3381,
334 11116, 3297, 16762, 2424,
335 18853, 6715, 17171, 9887,
336 12743, 2605, 8937, 3140,
337 19033, 7764, 18347, 3880,
338 20475, 3682, 19602, 3380,
339 13044, 19373, 10526, 23124
343 /*--------------------------------------------------------------------------*/
349 ------------------------------------------------------------------------------
351 ------------------------------------------------------------------------------
352 INPUT AND OUTPUT DEFINITIONS
363 Global Variables Used:
366 Local Variables Needed:
369 ------------------------------------------------------------------------------
374 ------------------------------------------------------------------------------
379 ------------------------------------------------------------------------------
382 [1] qua_gain.tab, UMTS GSM AMR speech codec,
383 R99 - Version 3.2.0, March 2, 2001
385 ------------------------------------------------------------------------------
389 ------------------------------------------------------------------------------
391 [State any special notes, constraints or cautions for users of this function]
393 ------------------------------------------------------------------------------
396 /*----------------------------------------------------------------------------
398 ----------------------------------------------------------------------------*/