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