• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.173
22     ANSI-C code for the Adaptive Multi-Rate - Wideband (AMR-WB) speech codec
23     Available from http://www.3gpp.org
24 
25 (C) 2007, 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  *                         qisf_ns_tab.cpp
31  *
32  * Quantization tables for split by 5 VQ of ISFs for a background
33  * noise database
34  * Version whith no prediction
35  */
36 
37 /*----------------------------------------------------------------------------
38 ; INCLUDES
39 ----------------------------------------------------------------------------*/
40 
41 #include "qisf_ns.h"
42 
43 
44 /* means of ISFs */
45 const int16 mean_isf_noise[ORDER] =
46 {
47 
48     478,  1100,  2213,  3267,  4219,  5222,  6198,  7240,
49     8229,  9153, 10098, 11108, 12144, 13184, 14165,  3803
50 };
51 
52 
53 /* 28 bits */
54 /*
55  *  isf codebooks:  split-by-5 VQ
56  *
57  *  codebook   vector dimension    number of vectors
58  *  ~~~~~~~~   ~~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~
59  *     1            2                  64
60  *     2            3                  64
61  *     3            3                  64
62  *     4            4                  32
63  *     5            4                  32
64  */
65 
66 /*
67  * 1st split:   isf0 to isf1
68  */
69 
70 
71 const int16 dico1_isf_noise[SIZE_BK_NOISE1*2] =
72 {
73 
74     -269,  -673,
75     -222,  -537,
76     -233,  -430,
77     -138,  -451,
78     -212,  -331,
79     -192,  -241,
80     -87,  -231,
81     -191,  -128,
82     -70,  -106,
83     -164,    -6,
84     74,  -179,
85     27,   -33,
86     -102,    74,
87     -162,   115,
88     -94,   172,
89     -6,   130,
90     -143,   234,
91     14,   218,
92     -65,   270,
93     88,   182,
94     -124,   341,
95     -44,   381,
96     38,   335,
97     117,   274,
98     -112,   454,
99     74,   431,
100     -5,   488,
101     175,   384,
102     -83,   561,
103     122,   529,
104     21,   601,
105     229,   481,
106     231,   303,
107     226,   608,
108     300,   372,
109     210,   187,
110     306,   265,
111     328,   473,
112     382,   331,
113     371,   132,
114     139,    58,
115     365,    21,
116     250,   -82,
117     443,   218,
118     483,   110,
119     426,   415,
120     579,   222,
121     518,   333,
122     573,   448,
123     455,   529,
124     685,   329,
125     332,   580,
126     595,   593,
127     468,   645,
128     762,   517,
129     326,   709,
130     485,   793,
131     130,   684,
132     671,   737,
133     354,   876,
134     88,   806,
135     -65,   706,
136     -35,  1016,
137     266,  1123
138 };
139 
140 
141 /*
142  * 2nd split:   isf2 to isf4
143  */
144 
145 const int16 dico2_isf_noise[SIZE_BK_NOISE2*3] =
146 {
147 
148     -824,  -884,  -949,
149     -805,  -456,  -418,
150     -442,  -438,  -541,
151     -217,  -578,  -793,
152     -168,  -444,  -582,
153     -287,  -492,  -274,
154     -552,  -297,  -300,
155     -163,  -333,  -358,
156     -370,  -232,  -232,
157     -175,  -358,  -159,
158     -381,   -21,  -357,
159     -184,  -159,  -162,
160     -53,  -191,  -280,
161     18,  -267,  -215,
162     -138,    61,  -283,
163     71,   -95,  -294,
164     13,  -156,  -546,
165     0,   -83,   -79,
166     44,    97,  -316,
167     178,   -52,  -213,
168     222,  -261,  -422,
169     237,  -118,   -44,
170     141,   145,  -132,
171     363,    81,  -287,
172     213,    65,    34,
173     -107,    94,    -5,
174     91,   -29,   126,
175     -355,    51,   -41,
176     -219,   -76,   145,
177     -63,   100,   244,
178     -719,    44,    27,
179     -572,  -124,   155,
180     -423,   133,   315,
181     -917,    71,   224,
182     -268,   318,   131,
183     -93,  -190,   420,
184     -97,   122,   491,
185     -79,   317,   355,
186     130,   100,   325,
187     86,  -293,   210,
188     133,   258,   161,
189     176,   -73,   465,
190     195,   300,   384,
191     348,    22,   221,
192     376,   183,   409,
193     377,   286,   202,
194     242,   213,   659,
195     257,   565,   248,
196     344,   408,   -76,
197     405,   440,   509,
198     612,   385,   379,
199     536,   607,   216,
200     -56,   582,   192,
201     100,   517,   567,
202     -365,   448,   445,
203     728,   347,    10,
204     505,   357,   759,
205     636,   582,   658,
206     335,   517,   852,
207     378,   809,   572,
208     -195,   878,   829,
209     529,   707,   987,
210     918,   726,   392,
211     1250,   997,  1063
212 };
213 
214 /*
215  * 3rd split:   isf5 to isf7
216  */
217 
218 const int16 dico3_isf_noise[SIZE_BK_NOISE3*3] =
219 {
220 
221     -805,  -838,  -774,
222     -522,  -627,  -828,
223     -477,  -486,  -603,
224     -295,  -481,  -634,
225     -366,  -384,  -393,
226     -186,  -414,  -396,
227     -237,  -394,  -106,
228     -252,  -202,  -275,
229     -61,  -177,  -442,
230     -84,  -198,  -199,
231     -179,  -125,   -31,
232     -72,   -47,  -163,
233     -298,  -220,   215,
234     -64,  -168,   251,
235     -133,   156,   -59,
236     -30,    -2,   127,
237     54,    66,   -61,
238     -233,    21,   251,
239     209,   -50,    32,
240     33,   194,   136,
241     -117,   -18,   475,
242     202,    46,   309,
243     256,   185,    53,
244     35,   200,   390,
245     200,   263,   242,
246     -216,   302,   294,
247     128,   358,     0,
248     19,   431,   287,
249     224,   447,   280,
250     367,   165,   213,
251     397,   314,   319,
252     383,   379,    75,
253     277,   325,   462,
254     394,   505,   334,
255     251,    98,  -213,
256     450,   153,   448,
257     565,   226,    76,
258     470,   383,   502,
259     635,   390,   278,
260     237,   135,   620,
261     342,   401,   649,
262     331,   551,   518,
263     130,   418,   592,
264     531,   306,   737,
265     729,   389,   580,
266     497,   557,   699,
267     296,   383,   874,
268     283,   624,   759,
269     126,   622,   476,
270     559,   595,   472,
271     382,   770,   616,
272     719,   613,   745,
273     540,   639,   928,
274     517,   826,   801,
275     684,   811,   604,
276     752,   786,   857,
277     933,   661,   350,
278     694,   450,  1061,
279     562,   911,  1051,
280     824,   813,  1104,
281     758,  1047,   882,
282     1140,   917,   889,
283     1039,  1246,  1426,
284     1483,  1666,  1876
285 };
286 
287 /*
288  * 4th split:   isf8 to isf11
289  */
290 
291 const int16 dico4_isf_noise[SIZE_BK_NOISE4*4] =
292 {
293 
294     -776,  -854,  -891,  -920,
295     -552,  -610,  -663,  -741,
296     -321,  -370,  -476,  -565,
297     274,  -160,  -456,   201,
298     265,    67,  -160,  -306,
299     -8,  -210,    79,   272,
300     163,   236,   307,   308,
301     578,   317,    64,   298,
302     -9,   197,   342,   620,
303     343,   232,   314,   622,
304     173,   149,   548,   527,
305     356,   370,   481,   376,
306     135,   444,   488,   556,
307     391,   471,   487,   653,
308     228,   424,   576,   835,
309     422,   372,   722,   682,
310     295,   673,   693,   635,
311     539,   596,   590,   449,
312     475,   618,   659,   818,
313     735,   517,   491,   673,
314     602,   346,   257,   877,
315     625,   635,   849,   720,
316     727,   818,   698,   595,
317     653,   481,   690,  1139,
318     814,   762,   704,   908,
319     507,   747,   898,   936,
320     848,   855,   924,   785,
321     646,  1037,   882,   795,
322     772,   845,  1024,  1151,
323     1133,   983,   818,   921,
324     940,  1068,  1252,  1302,
325     1588,  1767,  1718,  1513
326 };
327 
328 /*
329  * 5th split:   isf12 to isf15
330  */
331 
332 const int16 dico5_isf_noise[SIZE_BK_NOISE5*4] =
333 {
334     -810,  -879,  -945,  -254,
335     248,   184,   671,   128,
336     288,   703,   918,    99,
337     658,   558,   662,   219,
338     552,   585,   910,   208,
339     559,   804,   759,   119,
340     606,   774,   921,  -139,
341     782,   761,   748,   208,
342     756,   708,   983,    56,
343     544,   864,  1010,   152,
344     737,   698,   987,   299,
345     771,   924,   879,   103,
346     536,   785,   961,   405,
347     667,   916,   801,   328,
348     738,   705,   773,   439,
349     823,   871,   992,   355,
350     640,  1004,  1052,   369,
351     724,   822,   949,   597,
352     415,   655,   729,   482,
353     1009,   896,   793,   363,
354     908,   803,   687,   -25,
355     1016,   838,  1011,   189,
356     947,  1112,   942,   222,
357     914,  1049,   981,   527,
358     956,   987,  1011,  -120,
359     781,  1049,  1121,    92,
360     1178,  1053,   884,    47,
361     1123,  1059,  1182,   118,
362     933,   972,  1277,   357,
363     1109,   918,  1101,   503,
364     1039,  1286,  1220,   317,
365     1351,  1207,  1010,   326
366 };
367 
368