Initial Skype commit taken from FreeSwitch, which got it from the IETF draft.
[opus.git] / src / SKP_Silk_tables_NLSF_CB1_10.c
1 /***********************************************************************\r
2 Copyright (c) 2006-2010, Skype Limited. All rights reserved. \r
3 Redistribution and use in source and binary forms, with or without \r
4 modification, (subject to the limitations in the disclaimer below) \r
5 are permitted provided that the following conditions are met:\r
6 - Redistributions of source code must retain the above copyright notice,\r
7 this list of conditions and the following disclaimer.\r
8 - Redistributions in binary form must reproduce the above copyright \r
9 notice, this list of conditions and the following disclaimer in the \r
10 documentation and/or other materials provided with the distribution.\r
11 - Neither the name of Skype Limited, nor the names of specific \r
12 contributors, may be used to endorse or promote products derived from \r
13 this software without specific prior written permission.\r
14 NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED \r
15 BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND \r
16 CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\r
17 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND \r
18 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE \r
19 COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, \r
20 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\r
21 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \r
22 USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \r
23 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
26 ***********************************************************************/\r
27 \r
28 /**********************************************/\r
29 /* This file has been automatically generated */\r
30 /*                                            */\r
31 /* ROM usage:    90+803 Words                 */\r
32 /**********************************************/\r
33 \r
34 #include "SKP_Silk_structs.h"\r
35 #include "SKP_Silk_tables_NLSF_CB1_10.h"\r
36 \r
37 const SKP_uint16 SKP_Silk_NLSF_MSVQ_CB1_10_CDF[ NLSF_MSVQ_CB1_10_VECTORS + NLSF_MSVQ_CB1_10_STAGES ] =\r
38 {\r
39             0,\r
40         17096,\r
41         24130,\r
42         28997,\r
43         33179,\r
44         36696,\r
45         40213,\r
46         42493,\r
47         44252,\r
48         45973,\r
49         47551,\r
50         49095,\r
51         50542,\r
52         51898,\r
53         53196,\r
54         54495,\r
55         55685,\r
56         56851,\r
57         57749,\r
58         58628,\r
59         59435,\r
60         60207,\r
61         60741,\r
62         61220,\r
63         61700,\r
64         62179,\r
65         62659,\r
66         63138,\r
67         63617,\r
68         64097,\r
69         64576,\r
70         65056,\r
71         65535,\r
72             0,\r
73         20378,\r
74         33032,\r
75         40395,\r
76         46721,\r
77         51707,\r
78         56585,\r
79         61157,\r
80         65535,\r
81             0,\r
82         15055,\r
83         25472,\r
84         35447,\r
85         42501,\r
86         48969,\r
87         54773,\r
88         60212,\r
89         65535,\r
90             0,\r
91         12069,\r
92         22440,\r
93         32812,\r
94         40145,\r
95         46870,\r
96         53595,\r
97         59630,\r
98         65535,\r
99             0,\r
100         10839,\r
101         19954,\r
102         27957,\r
103         35961,\r
104         43965,\r
105         51465,\r
106         58805,\r
107         65535,\r
108             0,\r
109          8933,\r
110         17674,\r
111         26415,\r
112         34785,\r
113         42977,\r
114         50820,\r
115         58496,\r
116         65535\r
117 };\r
118 \r
119 const SKP_uint16 * const SKP_Silk_NLSF_MSVQ_CB1_10_CDF_start_ptr[ NLSF_MSVQ_CB1_10_STAGES ] =\r
120 {\r
121      &SKP_Silk_NLSF_MSVQ_CB1_10_CDF[   0 ],\r
122      &SKP_Silk_NLSF_MSVQ_CB1_10_CDF[  33 ],\r
123      &SKP_Silk_NLSF_MSVQ_CB1_10_CDF[  42 ],\r
124      &SKP_Silk_NLSF_MSVQ_CB1_10_CDF[  51 ],\r
125      &SKP_Silk_NLSF_MSVQ_CB1_10_CDF[  60 ],\r
126      &SKP_Silk_NLSF_MSVQ_CB1_10_CDF[  69 ]\r
127 };\r
128 \r
129 const SKP_int SKP_Silk_NLSF_MSVQ_CB1_10_CDF_middle_idx[ NLSF_MSVQ_CB1_10_STAGES ] =\r
130 {\r
131        5,\r
132        3,\r
133        4,\r
134        4,\r
135        5,\r
136        5\r
137 };\r
138 \r
139 const SKP_int16 SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q5[ NLSF_MSVQ_CB1_10_VECTORS ] =\r
140 {\r
141                62,              103,\r
142               120,              127,\r
143               135,              135,\r
144               155,              167,\r
145               168,              172,\r
146               173,              176,\r
147               179,              181,\r
148               181,              185,\r
149               186,              198,\r
150               199,              203,\r
151               205,              222,\r
152               227,              227,\r
153               227,              227,\r
154               227,              227,\r
155               227,              227,\r
156               227,              227,\r
157                54,               76,\r
158               101,              108,\r
159               119,              120,\r
160               123,              125,\r
161                68,               85,\r
162                87,              103,\r
163               107,              112,\r
164               115,              116,\r
165                78,               85,\r
166                85,              101,\r
167               105,              105,\r
168               110,              111,\r
169                83,               91,\r
170                97,               97,\r
171                97,              100,\r
172               101,              105,\r
173                92,               93,\r
174                93,               95,\r
175                96,               98,\r
176                99,              103\r
177 };\r
178 \r
179 const SKP_int SKP_Silk_NLSF_MSVQ_CB1_10_ndelta_min_Q15[ 10 + 1 ] =\r
180 {\r
181               462,\r
182                 3,\r
183                64,\r
184                74,\r
185                98,\r
186                50,\r
187                97,\r
188                68,\r
189               120,\r
190                53,\r
191               639\r
192 };\r
193 \r
194 const SKP_int16 SKP_Silk_NLSF_MSVQ_CB1_10_Q15[ 10 * NLSF_MSVQ_CB1_10_VECTORS ] =\r
195 {\r
196              1877,             4646,\r
197              7712,            10745,\r
198             13964,            17028,\r
199             20239,            23182,\r
200             26471,            29287,\r
201              1612,             3278,\r
202              7086,             9975,\r
203             13228,            16264,\r
204             19596,            22690,\r
205             26037,            28965,\r
206              2169,             3830,\r
207              6460,             8958,\r
208             11960,            14750,\r
209             18408,            21659,\r
210             25018,            28043,\r
211              3680,             6024,\r
212              8986,            12256,\r
213             15201,            18188,\r
214             21741,            24460,\r
215             27484,            30059,\r
216              2584,             5187,\r
217              7799,            10902,\r
218             13179,            15765,\r
219             19017,            22431,\r
220             25891,            28698,\r
221              3731,             5751,\r
222              8650,            11742,\r
223             15090,            17407,\r
224             20391,            23421,\r
225             26228,            29247,\r
226              2107,             6323,\r
227              8915,            12226,\r
228             14775,            17791,\r
229             20664,            23679,\r
230             26829,            29353,\r
231              1677,             2870,\r
232              5386,             8077,\r
233             11817,            15176,\r
234             18657,            22006,\r
235             25513,            28689,\r
236              2111,             3625,\r
237              7027,            10588,\r
238             14059,            17193,\r
239             21137,            24260,\r
240             27577,            30036,\r
241              2428,             4010,\r
242              5765,             9376,\r
243             13805,            15821,\r
244             19444,            22389,\r
245             25295,            29310,\r
246              2256,             4628,\r
247              8377,            12441,\r
248             15283,            19462,\r
249             22257,            25551,\r
250             28432,            30304,\r
251              2352,             3675,\r
252              6129,            11868,\r
253             14551,            16655,\r
254             19624,            21883,\r
255             26526,            28849,\r
256              5243,             7248,\r
257             10558,            13269,\r
258             15651,            17919,\r
259             21141,            23827,\r
260             27102,            29519,\r
261              4422,             6725,\r
262             10449,            13273,\r
263             16124,            19921,\r
264             22826,            26061,\r
265             28763,            30583,\r
266              4508,             6291,\r
267              9504,            11809,\r
268             13827,            15950,\r
269             19077,            22084,\r
270             25740,            28658,\r
271              2540,             4297,\r
272              8579,            13578,\r
273             16634,            19101,\r
274             21547,            23887,\r
275             26777,            29146,\r
276              3377,             6358,\r
277             10224,            14518,\r
278             17905,            21056,\r
279             23637,            25784,\r
280             28161,            30109,\r
281              4177,             5942,\r
282              8159,            10108,\r
283             12130,            15470,\r
284             20191,            23326,\r
285             26782,            29359,\r
286              2492,             3801,\r
287              6144,             9825,\r
288             16000,            18671,\r
289             20893,            23663,\r
290             25899,            28974,\r
291              3011,             4727,\r
292              6834,            10505,\r
293             12465,            14496,\r
294             17065,            20052,\r
295             25265,            28057,\r
296              4149,             7197,\r
297             12338,            15076,\r
298             18002,            20190,\r
299             22187,            24723,\r
300             27083,            29125,\r
301              2975,             4578,\r
302              6448,             8378,\r
303              9671,            13225,\r
304             19502,            22277,\r
305             26058,            28850,\r
306              4102,             5760,\r
307              7744,             9484,\r
308             10744,            12308,\r
309             14677,            19607,\r
310             24841,            28381,\r
311              4931,             9287,\r
312             12477,            13395,\r
313             13712,            14351,\r
314             16048,            19867,\r
315             24188,            28994,\r
316              4141,             7867,\r
317             13140,            17720,\r
318             20064,            21108,\r
319             21692,            22722,\r
320             23736,            27449,\r
321              4011,             8720,\r
322             13234,            16206,\r
323             17601,            18289,\r
324             18524,            19689,\r
325             23234,            27882,\r
326              3420,             5995,\r
327             11230,            15117,\r
328             15907,            16783,\r
329             17762,            23347,\r
330             26898,            29946,\r
331              3080,             6786,\r
332             10465,            13676,\r
333             18059,            23615,\r
334             27058,            29082,\r
335             29563,            29905,\r
336              3038,             5620,\r
337              9266,            12870,\r
338             18803,            19610,\r
339             20010,            20802,\r
340             23882,            29306,\r
341              3314,             6420,\r
342              9046,            13262,\r
343             15869,            23117,\r
344             23667,            24215,\r
345             24487,            25915,\r
346              3469,             6963,\r
347             10103,            15282,\r
348             20531,            23240,\r
349             25024,            26021,\r
350             26736,            27255,\r
351              3041,             6459,\r
352              9777,            12896,\r
353             16315,            19410,\r
354             24070,            29353,\r
355             31795,            32075,\r
356              -200,             -134,\r
357              -113,             -204,\r
358              -347,             -440,\r
359              -352,             -211,\r
360              -418,             -172,\r
361              -313,               59,\r
362               495,              772,\r
363               721,              614,\r
364               334,              444,\r
365               225,              242,\r
366               161,               16,\r
367               274,              564,\r
368               -73,             -188,\r
369              -395,             -171,\r
370               777,              508,\r
371              1340,             1145,\r
372               699,              196,\r
373               223,              173,\r
374                90,               25,\r
375               -26,               18,\r
376               133,             -105,\r
377              -360,             -277,\r
378               859,              634,\r
379                41,             -557,\r
380              -768,             -926,\r
381              -601,            -1021,\r
382             -1189,             -365,\r
383               225,              107,\r
384               374,              -50,\r
385               433,              417,\r
386               156,               39,\r
387              -597,            -1397,\r
388             -1594,             -592,\r
389              -485,             -292,\r
390               253,               87,\r
391                -0,               -6,\r
392               -25,             -345,\r
393              -240,              120,\r
394              1261,              946,\r
395               166,             -277,\r
396               241,              167,\r
397               170,              429,\r
398               518,              714,\r
399               602,              254,\r
400               134,               92,\r
401              -152,             -324,\r
402              -394,               49,\r
403              -151,             -304,\r
404              -724,             -657,\r
405              -162,             -369,\r
406               -35,                3,\r
407                -2,             -312,\r
408              -200,              -92,\r
409              -227,              242,\r
410               628,              565,\r
411              -124,             1056,\r
412               770,              101,\r
413               -84,              -33,\r
414                 4,             -192,\r
415              -272,                5,\r
416              -627,             -977,\r
417               419,              472,\r
418                53,             -103,\r
419               145,              322,\r
420               -95,              -31,\r
421              -100,             -303,\r
422              -560,            -1067,\r
423              -413,              714,\r
424               283,                2,\r
425              -223,             -367,\r
426               523,              360,\r
427               -38,             -115,\r
428               378,             -591,\r
429              -718,              448,\r
430              -481,             -274,\r
431               180,              -88,\r
432              -581,             -157,\r
433              -696,            -1265,\r
434               394,             -479,\r
435               -23,              124,\r
436               -43,               19,\r
437              -113,             -236,\r
438              -412,             -659,\r
439              -200,                2,\r
440               -69,             -342,\r
441               199,               55,\r
442                58,              -36,\r
443               -51,              -62,\r
444               507,              507,\r
445               427,              442,\r
446                36,              601,\r
447              -141,               68,\r
448               274,              274,\r
449                68,              -12,\r
450                -4,               71,\r
451              -193,             -464,\r
452              -425,             -383,\r
453               408,              203,\r
454              -337,              236,\r
455               410,              -59,\r
456               -25,             -341,\r
457              -449,               28,\r
458                -9,               90,\r
459               332,              -14,\r
460              -905,               96,\r
461              -540,             -242,\r
462               679,              -59,\r
463               192,              -24,\r
464                60,             -217,\r
465                 5,              -37,\r
466               179,              -20,\r
467               311,              519,\r
468               274,               72,\r
469              -326,            -1030,\r
470              -262,              213,\r
471               380,               82,\r
472               328,              411,\r
473              -540,              574,\r
474              -283,              151,\r
475               181,             -402,\r
476              -278,             -240,\r
477              -110,             -227,\r
478              -264,              -89,\r
479              -250,             -259,\r
480               -27,              106,\r
481              -239,              -98,\r
482              -390,              118,\r
483                61,              104,\r
484               294,              532,\r
485                92,              -13,\r
486                60,             -233,\r
487               335,              541,\r
488               307,              -26,\r
489              -110,              -91,\r
490              -231,             -460,\r
491               170,              201,\r
492                96,             -372,\r
493               132,              435,\r
494              -302,              216,\r
495              -279,              -41,\r
496                74,              190,\r
497               368,              273,\r
498              -186,             -608,\r
499              -157,              159,\r
500                12,              278,\r
501               245,              307,\r
502                25,             -187,\r
503               -16,               55,\r
504                30,             -163,\r
505               548,             -307,\r
506               106,               -5,\r
507                27,              330,\r
508              -416,              475,\r
509               438,             -235,\r
510               104,              137,\r
511                21,               -5,\r
512              -300,             -468,\r
513               521,             -347,\r
514               170,             -200,\r
515              -219,              308,\r
516              -122,             -133,\r
517               219,              -16,\r
518               359,              412,\r
519               -89,             -111,\r
520                48,              322,\r
521               142,              177,\r
522              -286,             -127,\r
523               -39,              -63,\r
524               -42,             -451,\r
525               160,              308,\r
526               -57,              193,\r
527               -48,               74,\r
528              -346,               59,\r
529               -27,               27,\r
530              -469,             -277,\r
531              -344,              282,\r
532               262,              122,\r
533               171,             -249,\r
534                27,              258,\r
535               188,               -3,\r
536                67,             -206,\r
537              -284,              291,\r
538              -117,              -88,\r
539              -477,              375,\r
540                50,              106,\r
541                99,             -182,\r
542               438,             -376,\r
543              -401,              -49,\r
544               119,              -23,\r
545               -10,              -48,\r
546              -116,             -200,\r
547              -310,              121,\r
548                73,                7,\r
549               237,             -226,\r
550               139,             -456,\r
551               397,               35,\r
552                 3,             -108,\r
553               323,              -75,\r
554               332,              198,\r
555               -99,              -21\r
556 };\r
557 \r
558 const SKP_Silk_NLSF_CBS SKP_Silk_NLSF_CB1_10_Stage_info[ NLSF_MSVQ_CB1_10_STAGES ] =\r
559 {\r
560         {  32, &SKP_Silk_NLSF_MSVQ_CB1_10_Q15[ 10 *   0 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q5[   0 ] },\r
561         {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q15[ 10 *  32 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q5[  32 ] },\r
562         {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q15[ 10 *  40 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q5[  40 ] },\r
563         {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q15[ 10 *  48 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q5[  48 ] },\r
564         {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q15[ 10 *  56 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q5[  56 ] },\r
565         {   8, &SKP_Silk_NLSF_MSVQ_CB1_10_Q15[ 10 *  64 ], &SKP_Silk_NLSF_MSVQ_CB1_10_rates_Q5[  64 ] }\r
566 };\r
567 \r
568 const SKP_Silk_NLSF_CB_struct SKP_Silk_NLSF_CB1_10 =\r
569 {\r
570         NLSF_MSVQ_CB1_10_STAGES,\r
571         SKP_Silk_NLSF_CB1_10_Stage_info,\r
572         SKP_Silk_NLSF_MSVQ_CB1_10_ndelta_min_Q15,\r
573         SKP_Silk_NLSF_MSVQ_CB1_10_CDF,\r
574         SKP_Silk_NLSF_MSVQ_CB1_10_CDF_start_ptr,\r
575         SKP_Silk_NLSF_MSVQ_CB1_10_CDF_middle_idx\r
576 };\r
577 \r