• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2/*
3 ** Copyright 2003-2010, VisualOn, Inc.
4 **
5 ** Licensed under the Apache License, Version 2.0 (the "License");
6 ** you may not use this file except in compliance with the License.
7 ** You may obtain a copy of the License at
8 **
9 **     http://www.apache.org/licenses/LICENSE-2.0
10 **
11 ** Unless required by applicable law or agreed to in writing, software
12 ** distributed under the License is distributed on an "AS IS" BASIS,
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 ** See the License for the specific language governing permissions and
15 ** limitations under the License.
16 */
17
18
19/*------------------------------------------------------*
20 * Tables for function q_gain2()                        *
21 *                                                      *
22 *  g_pitch(Q14),  g_code(Q11)                          *
23 *                                                      *
24 * pitch gain are ordered in table to reduce complexity *
25 * during quantization of gains.                        *
26 *------------------------------------------------------*/
27
28#define nb_qua_gain6b  64     /* Number of quantization level */
29#define nb_qua_gain7b  128    /* Number of quantization level */
30
31
32static Word16 t_qua_gain6b[64*2] = {
33   1566,  1332,
34   1577,  3557,
35   3071,  6490,
36   4193, 10163,
37   4496,  2534,
38   5019,  4488,
39   5586, 15614,
40   5725,  1422,
41   6453,   580,
42   6724,  6831,
43   7657,  3527,
44   8072,  2099,
45   8232,  5319,
46   8827,  8775,
47   9740,  2868,
48   9856,  1465,
49  10087, 12488,
50  10241,  4453,
51  10859,  6618,
52  11321,  3587,
53  11417,  1800,
54  11643,  2428,
55  11718,   988,
56  12312,  5093,
57  12523,  8413,
58  12574, 26214,
59  12601,  3396,
60  13172,  1623,
61  13285,  2423,
62  13418,  6087,
63  13459, 12810,
64  13656,  3607,
65  14111,  4521,
66  14144,  1229,
67  14425,  1871,
68  14431,  7234,
69  14445,  2834,
70  14628, 10036,
71  14860, 17496,
72  15161,  3629,
73  15209,  5819,
74  15299,  2256,
75  15518,  4722,
76  15663,  1060,
77  15759,  7972,
78  15939, 11964,
79  16020,  2996,
80  16086,  1707,
81  16521,  4254,
82  16576,  6224,
83  16894,  2380,
84  16906,   681,
85  17213,  8406,
86  17610,  3418,
87  17895,  5269,
88  18168, 11748,
89  18230,  1575,
90  18607, 32767,
91  18728, 21684,
92  19137,  2543,
93  19422,  6577,
94  19446,  4097,
95  19450,  9056,
96  20371, 14885};
97
98static Word16 t_qua_gain7b[128*2] = {
99    204,   441,
100    464,  1977,
101    869,  1077,
102   1072,  3062,
103   1281,  4759,
104   1647,  1539,
105   1845,  7020,
106   1853,   634,
107   1995,  2336,
108   2351, 15400,
109   2661,  1165,
110   2702,  3900,
111   2710, 10133,
112   3195,  1752,
113   3498,  2624,
114   3663,   849,
115   3984,  5697,
116   4214,  3399,
117   4415,  1304,
118   4695,  2056,
119   5376,  4558,
120   5386,   676,
121   5518, 23554,
122   5567,  7794,
123   5644,  3061,
124   5672,  1513,
125   5957,  2338,
126   6533,  1060,
127   6804,  5998,
128   6820,  1767,
129   6937,  3837,
130   7277,   414,
131   7305,  2665,
132   7466, 11304,
133   7942,   794,
134   8007,  1982,
135   8007,  1366,
136   8326,  3105,
137   8336,  4810,
138   8708,  7954,
139   8989,  2279,
140   9031,  1055,
141   9247,  3568,
142   9283,  1631,
143   9654,  6311,
144   9811,  2605,
145  10120,   683,
146  10143,  4179,
147  10245,  1946,
148  10335,  1218,
149  10468,  9960,
150  10651,  3000,
151  10951,  1530,
152  10969,  5290,
153  11203,  2305,
154  11325,  3562,
155  11771,  6754,
156  11839,  1849,
157  11941,  4495,
158  11954,  1298,
159  11975, 15223,
160  11977,   883,
161  11986,  2842,
162  12438,  2141,
163  12593,  3665,
164  12636,  8367,
165  12658,  1594,
166  12886,  2628,
167  12984,  4942,
168  13146,  1115,
169  13224,   524,
170  13341,  3163,
171  13399,  1923,
172  13549,  5961,
173  13606,  1401,
174  13655,  2399,
175  13782,  3909,
176  13868, 10923,
177  14226,  1723,
178  14232,  2939,
179  14278,  7528,
180  14439,  4598,
181  14451,   984,
182  14458,  2265,
183  14792,  1403,
184  14818,  3445,
185  14899,  5709,
186  15017, 15362,
187  15048,  1946,
188  15069,  2655,
189  15405,  9591,
190  15405,  4079,
191  15570,  7183,
192  15687,  2286,
193  15691,  1624,
194  15699,  3068,
195  15772,  5149,
196  15868,  1205,
197  15970,   696,
198  16249,  3584,
199  16338,  1917,
200  16424,  2560,
201  16483,  4438,
202  16529,  6410,
203  16620, 11966,
204  16839,  8780,
205  17030,  3050,
206  17033, 18325,
207  17092,  1568,
208  17123,  5197,
209  17351,  2113,
210  17374,   980,
211  17566, 26214,
212  17609,  3912,
213  17639, 32767,
214  18151,  7871,
215  18197,  2516,
216  18202,  5649,
217  18679,  3283,
218  18930,  1370,
219  19271, 13757,
220  19317,  4120,
221  19460,  1973,
222  19654, 10018,
223  19764,  6792,
224  19912,  5135,
225  20040,  2841,
226  21234, 19833};
227
228
229