]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/sound/OggVorbis/vorbissrc/modes/residue_44u.h
Various Mac OS X tweaks to get this to build. Probably breaking things.
[icculus/iodoom3.git] / neo / sound / OggVorbis / vorbissrc / modes / residue_44u.h
1 /********************************************************************
2  *                                                                  *
3  * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
4  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
5  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
6  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
7  *                                                                  *
8  * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
9  * by the XIPHOPHORUS Company http://www.xiph.org/                  *
10  *                                                                  *
11  ********************************************************************
12
13  function: toplevel residue templates for 32/44.1/48kHz uncoupled
14  last mod: $Id: residue_44u.h,v 1.3 2002/07/11 06:41:04 xiphmont Exp $
15
16  ********************************************************************/
17
18 #include "../vorbis/codec.h"
19 #include "backends.h"
20 #include "books/uncoupled/res_books_uncoupled.h"
21
22 /***** residue backends *********************************************/
23
24
25 static vorbis_info_residue0 _residue_44_low_un={
26   0,-1, -1, 8,-1,
27   {0},
28   {-1},
29   {  .5,  1.5,  1.5,  2.5,  2.5,  4.5, 28.5},
30   {  -1,   25,   -1,   45,   -1,   -1,   -1}
31 };
32
33 static vorbis_info_residue0 _residue_44_mid_un={
34   0,-1, -1, 10,-1,
35   /*  0     1     2     3     4     5     6     7     8     9 */
36   {0},
37   {-1},
38   {  .5,  1.5,  1.5,  2.5,  2.5,  4.5,  4.5, 16.5, 60.5},
39   {  -1,   30,   -1,   50,   -1,   80,   -1,   -1,   -1}
40 };
41
42 static vorbis_info_residue0 _residue_44_hi_un={
43   0,-1, -1, 10,-1,
44   /*  0     1     2     3     4     5     6     7     8     9 */
45   {0},
46   {-1},
47   {  .5,  1.5,  2.5,  4.5,  8.5, 16.5, 32.5, 71.5,157.5},
48   {  -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1}
49 };
50
51 /* mapping conventions:
52    only one submap (this would change for efficient 5.1 support for example)*/
53 /* Four psychoacoustic profiles are used, one for each blocktype */
54 static vorbis_info_mapping0 _map_nominal_u[2]={
55   {1, {0,0}, {0}, {0}, 0,{0},{0}},
56   {1, {0,0}, {1}, {1}, 0,{0},{0}}
57 };
58
59 static static_bookblock _resbook_44u_0={
60   {
61     {0},
62     {0,0,&_44u0__p1_0},
63     {0,0,&_44u0__p2_0},
64     {0,0,&_44u0__p3_0},
65     {0,0,&_44u0__p4_0},
66     {0,0,&_44u0__p5_0},
67     {&_44u0__p6_0,&_44u0__p6_1},
68     {&_44u0__p7_0,&_44u0__p7_1,&_44u0__p7_2}
69    }
70 };
71 static static_bookblock _resbook_44u_1={
72   {
73     {0},
74     {0,0,&_44u1__p1_0},
75     {0,0,&_44u1__p2_0},
76     {0,0,&_44u1__p3_0},
77     {0,0,&_44u1__p4_0},
78     {0,0,&_44u1__p5_0},
79     {&_44u1__p6_0,&_44u1__p6_1},
80     {&_44u1__p7_0,&_44u1__p7_1,&_44u1__p7_2}
81    }
82 };
83 static static_bookblock _resbook_44u_2={
84   {
85     {0},
86     {0,0,&_44u2__p1_0},
87     {0,0,&_44u2__p2_0},
88     {0,0,&_44u2__p3_0},
89     {0,0,&_44u2__p4_0},
90     {0,0,&_44u2__p5_0},
91     {&_44u2__p6_0,&_44u2__p6_1},
92     {&_44u2__p7_0,&_44u2__p7_1,&_44u2__p7_2}
93    }
94 };
95 static static_bookblock _resbook_44u_3={
96   {
97     {0},
98     {0,0,&_44u3__p1_0},
99     {0,0,&_44u3__p2_0},
100     {0,0,&_44u3__p3_0},
101     {0,0,&_44u3__p4_0},
102     {0,0,&_44u3__p5_0},
103     {&_44u3__p6_0,&_44u3__p6_1},
104     {&_44u3__p7_0,&_44u3__p7_1,&_44u3__p7_2}
105    }
106 };
107 static static_bookblock _resbook_44u_4={
108   {
109     {0},
110     {0,0,&_44u4__p1_0},
111     {0,0,&_44u4__p2_0},
112     {0,0,&_44u4__p3_0},
113     {0,0,&_44u4__p4_0},
114     {0,0,&_44u4__p5_0},
115     {&_44u4__p6_0,&_44u4__p6_1},
116     {&_44u4__p7_0,&_44u4__p7_1,&_44u4__p7_2}
117    }
118 };
119 static static_bookblock _resbook_44u_5={
120   {
121     {0},
122     {0,0,&_44u5__p1_0},
123     {0,0,&_44u5__p2_0},
124     {0,0,&_44u5__p3_0},
125     {0,0,&_44u5__p4_0},
126     {0,0,&_44u5__p5_0},
127     {0,0,&_44u5__p6_0},
128     {&_44u5__p7_0,&_44u5__p7_1},
129     {&_44u5__p8_0,&_44u5__p8_1},
130     {&_44u5__p9_0,&_44u5__p9_1,&_44u5__p9_2}
131    }
132 };
133 static static_bookblock _resbook_44u_6={
134   {
135     {0},
136     {0,0,&_44u6__p1_0},
137     {0,0,&_44u6__p2_0},
138     {0,0,&_44u6__p3_0},
139     {0,0,&_44u6__p4_0},
140     {0,0,&_44u6__p5_0},
141     {0,0,&_44u6__p6_0},
142     {&_44u6__p7_0,&_44u6__p7_1},
143     {&_44u6__p8_0,&_44u6__p8_1},
144     {&_44u6__p9_0,&_44u6__p9_1,&_44u6__p9_2}
145    }
146 };
147 static static_bookblock _resbook_44u_7={
148   {
149     {0},
150     {0,0,&_44u7__p1_0},
151     {0,0,&_44u7__p2_0},
152     {0,0,&_44u7__p3_0},
153     {0,0,&_44u7__p4_0},
154     {0,0,&_44u7__p5_0},
155     {0,0,&_44u7__p6_0},
156     {&_44u7__p7_0,&_44u7__p7_1},
157     {&_44u7__p8_0,&_44u7__p8_1},
158     {&_44u7__p9_0,&_44u7__p9_1,&_44u7__p9_2}
159    }
160 };
161 static static_bookblock _resbook_44u_8={
162   {
163     {0},
164     {0,0,&_44u8_p1_0},
165     {0,0,&_44u8_p2_0},
166     {0,0,&_44u8_p3_0},
167     {0,0,&_44u8_p4_0},
168     {&_44u8_p5_0,&_44u8_p5_1},
169     {&_44u8_p6_0,&_44u8_p6_1},
170     {&_44u8_p7_0,&_44u8_p7_1},
171     {&_44u8_p8_0,&_44u8_p8_1},
172     {&_44u8_p9_0,&_44u8_p9_1,&_44u8_p9_2}
173    }
174 };
175 static static_bookblock _resbook_44u_9={
176   {
177     {0},
178     {0,0,&_44u9_p1_0},
179     {0,0,&_44u9_p2_0},
180     {0,0,&_44u9_p3_0},
181     {0,0,&_44u9_p4_0},
182     {&_44u9_p5_0,&_44u9_p5_1},
183     {&_44u9_p6_0,&_44u9_p6_1},
184     {&_44u9_p7_0,&_44u9_p7_1},
185     {&_44u9_p8_0,&_44u9_p8_1},
186     {&_44u9_p9_0,&_44u9_p9_1,&_44u9_p9_2}
187    }
188 };
189
190 static vorbis_residue_template _res_44u_0[]={
191   {1,0,  &_residue_44_low_un,
192    &_huff_book__44u0__short,&_huff_book__44u0__short,
193    &_resbook_44u_0,&_resbook_44u_0},
194
195   {1,0,  &_residue_44_low_un,
196    &_huff_book__44u0__long,&_huff_book__44u0__long,
197    &_resbook_44u_0,&_resbook_44u_0}
198 };
199 static vorbis_residue_template _res_44u_1[]={
200   {1,0,  &_residue_44_low_un,
201    &_huff_book__44u1__short,&_huff_book__44u1__short,
202    &_resbook_44u_1,&_resbook_44u_1},
203
204   {1,0,  &_residue_44_low_un,
205    &_huff_book__44u1__long,&_huff_book__44u1__long,
206    &_resbook_44u_1,&_resbook_44u_1}
207 };
208 static vorbis_residue_template _res_44u_2[]={
209   {1,0,  &_residue_44_low_un,
210    &_huff_book__44u2__short,&_huff_book__44u2__short,
211    &_resbook_44u_2,&_resbook_44u_2},
212
213   {1,0,  &_residue_44_low_un,
214    &_huff_book__44u2__long,&_huff_book__44u2__long,
215    &_resbook_44u_2,&_resbook_44u_2}
216 };
217 static vorbis_residue_template _res_44u_3[]={
218   {1,0,  &_residue_44_low_un,
219    &_huff_book__44u3__short,&_huff_book__44u3__short,
220    &_resbook_44u_3,&_resbook_44u_3},
221
222   {1,0,  &_residue_44_low_un,
223    &_huff_book__44u3__long,&_huff_book__44u3__long,
224    &_resbook_44u_3,&_resbook_44u_3}
225 };
226 static vorbis_residue_template _res_44u_4[]={
227   {1,0,  &_residue_44_low_un,
228    &_huff_book__44u4__short,&_huff_book__44u4__short,
229    &_resbook_44u_4,&_resbook_44u_4},
230
231   {1,0,  &_residue_44_low_un,
232    &_huff_book__44u4__long,&_huff_book__44u4__long,
233    &_resbook_44u_4,&_resbook_44u_4}
234 };
235
236 static vorbis_residue_template _res_44u_5[]={
237   {1,0,  &_residue_44_mid_un,
238    &_huff_book__44u5__short,&_huff_book__44u5__short,
239    &_resbook_44u_5,&_resbook_44u_5},
240
241   {1,0,  &_residue_44_mid_un,
242    &_huff_book__44u5__long,&_huff_book__44u5__long,
243    &_resbook_44u_5,&_resbook_44u_5}
244 };
245
246 static vorbis_residue_template _res_44u_6[]={
247   {1,0,  &_residue_44_mid_un,
248    &_huff_book__44u6__short,&_huff_book__44u6__short,
249    &_resbook_44u_6,&_resbook_44u_6},
250
251   {1,0,  &_residue_44_mid_un,
252    &_huff_book__44u6__long,&_huff_book__44u6__long,
253    &_resbook_44u_6,&_resbook_44u_6}
254 };
255
256 static vorbis_residue_template _res_44u_7[]={
257   {1,0,  &_residue_44_mid_un,
258    &_huff_book__44u7__short,&_huff_book__44u7__short,
259    &_resbook_44u_7,&_resbook_44u_7},
260
261   {1,0,  &_residue_44_mid_un,
262    &_huff_book__44u7__long,&_huff_book__44u7__long,
263    &_resbook_44u_7,&_resbook_44u_7}
264 };
265
266 static vorbis_residue_template _res_44u_8[]={
267   {1,0,  &_residue_44_hi_un,
268    &_huff_book__44u8__short,&_huff_book__44u8__short,
269    &_resbook_44u_8,&_resbook_44u_8},
270
271   {1,0,  &_residue_44_hi_un,
272    &_huff_book__44u8__long,&_huff_book__44u8__long,
273    &_resbook_44u_8,&_resbook_44u_8}
274 };
275 static vorbis_residue_template _res_44u_9[]={
276   {1,0,  &_residue_44_hi_un,
277    &_huff_book__44u9__short,&_huff_book__44u9__short,
278    &_resbook_44u_9,&_resbook_44u_9},
279
280   {1,0,  &_residue_44_hi_un,
281    &_huff_book__44u9__long,&_huff_book__44u9__long,
282    &_resbook_44u_9,&_resbook_44u_9}
283 };
284
285 static vorbis_mapping_template _mapres_template_44_uncoupled[]={
286   { _map_nominal_u, _res_44u_0 }, /* 0 */
287   { _map_nominal_u, _res_44u_1 }, /* 1 */
288   { _map_nominal_u, _res_44u_2 }, /* 2 */
289   { _map_nominal_u, _res_44u_3 }, /* 3 */
290   { _map_nominal_u, _res_44u_4 }, /* 4 */
291   { _map_nominal_u, _res_44u_5 }, /* 5 */
292   { _map_nominal_u, _res_44u_6 }, /* 6 */
293   { _map_nominal_u, _res_44u_7 }, /* 7 */
294   { _map_nominal_u, _res_44u_8 }, /* 8 */
295   { _map_nominal_u, _res_44u_9 }, /* 9 */
296 };