• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /************************************************************************
2  * Copyright (C) 2002-2009, Xiph.org Foundation
3  * Copyright (C) 2010, Robin Watts for Pinknoise Productions Ltd
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  *     * Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  *     * Redistributions in binary form must reproduce the above
13  * copyright notice, this list of conditions and the following disclaimer
14  * in the documentation and/or other materials provided with the
15  * distribution.
16  *     * Neither the names of the Xiph.org Foundation nor Pinknoise
17  * Productions Ltd nor the names of its contributors may be used to
18  * endorse or promote products derived from this software without
19  * specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  ************************************************************************
33 
34   function: lookup data
35 
36  ************************************************************************/
37 
38 #ifndef _V_LOOKUP_DATA_H_
39 #define _V_LOOKUP_DATA_H_
40 
41 #include "os_types.h"
42 
43 #define INVSQ_LOOKUP_I_SHIFT 10
44 #define INVSQ_LOOKUP_I_MASK 1023
45 static const long INVSQ_LOOKUP_I[64+1]={
46 	   92682,   91966,   91267,   90583,
47 	   89915,   89261,   88621,   87995,
48 	   87381,   86781,   86192,   85616,
49 	   85051,   84497,   83953,   83420,
50 	   82897,   82384,   81880,   81385,
51 	   80899,   80422,   79953,   79492,
52 	   79039,   78594,   78156,   77726,
53 	   77302,   76885,   76475,   76072,
54 	   75674,   75283,   74898,   74519,
55 	   74146,   73778,   73415,   73058,
56 	   72706,   72359,   72016,   71679,
57 	   71347,   71019,   70695,   70376,
58 	   70061,   69750,   69444,   69141,
59 	   68842,   68548,   68256,   67969,
60 	   67685,   67405,   67128,   66855,
61 	   66585,   66318,   66054,   65794,
62 	   65536,
63 };
64 
65 static const long INVSQ_LOOKUP_IDel[64]={
66              716,     699,     684,     668,
67              654,     640,     626,     614,
68              600,     589,     576,     565,
69              554,     544,     533,     523,
70              513,     504,     495,     486,
71              477,     469,     461,     453,
72              445,     438,     430,     424,
73              417,     410,     403,     398,
74              391,     385,     379,     373,
75              368,     363,     357,     352,
76              347,     343,     337,     332,
77              328,     324,     319,     315,
78              311,     306,     303,     299,
79              294,     292,     287,     284,
80              280,     277,     273,     270,
81              267,     264,     260,     258,
82 };
83 
84 #define COS_LOOKUP_I_SHIFT 9
85 #define COS_LOOKUP_I_MASK 511
86 #define COS_LOOKUP_I_SZ 128
87 static const ogg_int32_t COS_LOOKUP_I[COS_LOOKUP_I_SZ+1]={
88 	   16384,   16379,   16364,   16340,
89 	   16305,   16261,   16207,   16143,
90 	   16069,   15986,   15893,   15791,
91 	   15679,   15557,   15426,   15286,
92 	   15137,   14978,   14811,   14635,
93 	   14449,   14256,   14053,   13842,
94 	   13623,   13395,   13160,   12916,
95 	   12665,   12406,   12140,   11866,
96 	   11585,   11297,   11003,   10702,
97 	   10394,   10080,    9760,    9434,
98 	    9102,    8765,    8423,    8076,
99 	    7723,    7366,    7005,    6639,
100 	    6270,    5897,    5520,    5139,
101 	    4756,    4370,    3981,    3590,
102 	    3196,    2801,    2404,    2006,
103 	    1606,    1205,     804,     402,
104 	       0,    -401,    -803,   -1204,
105 	   -1605,   -2005,   -2403,   -2800,
106 	   -3195,   -3589,   -3980,   -4369,
107 	   -4755,   -5138,   -5519,   -5896,
108 	   -6269,   -6638,   -7004,   -7365,
109 	   -7722,   -8075,   -8422,   -8764,
110 	   -9101,   -9433,   -9759,  -10079,
111 	  -10393,  -10701,  -11002,  -11296,
112 	  -11584,  -11865,  -12139,  -12405,
113 	  -12664,  -12915,  -13159,  -13394,
114 	  -13622,  -13841,  -14052,  -14255,
115 	  -14448,  -14634,  -14810,  -14977,
116 	  -15136,  -15285,  -15425,  -15556,
117 	  -15678,  -15790,  -15892,  -15985,
118 	  -16068,  -16142,  -16206,  -16260,
119 	  -16304,  -16339,  -16363,  -16378,
120 	  -16383,
121 };
122 
123 #endif
124 
125 
126 
127 
128 
129