doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
residue_44.h
Go to the documentation of this file.
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
14  last mod: $Id: residue_44.h,v 1.16 2002/07/11 06:41:04 xiphmont Exp $
15 
16  ********************************************************************/
17 
18 #include "../vorbis/codec.h"
19 #include "backends.h"
21 
22 /***** residue backends *********************************************/
23 
24 static vorbis_info_residue0 _residue_44_mid={
25  0,-1, -1, 10,-1,
26  /* 0 1 2 3 4 5 6 7 8 */
27  {0},
28  {-1},
29  { .5, 1.5, 1.5, 2.5, 2.5, 4.5, 8.5, 16.5, 32.5},
30  { .5, .5, 999., .5, 999., 4.5, 8.5, 16.5, 32.5},
31 };
32 
33 static vorbis_info_residue0 _residue_44_high={
34  0,-1, -1, 10,-1,
35  /* 0 1 2 3 4 5 6 7 8 */
36  {0},
37  {-1},
38  { .5, 1.5, 2.5, 4.5, 8.5, 16.5, 32.5, 71.5,157.5},
39  { .5, 1.5, 2.5, 3.5, 4.5, 8.5, 16.5, 71.5,157.5},
40 };
41 
42 static static_bookblock _resbook_44s_0={
43  {
44  {0},{0,0,&_44c0_s_p1_0},{0,0,&_44c0_s_p2_0},{0,0,&_44c0_s_p3_0},
45  {0,0,&_44c0_s_p4_0},{0,0,&_44c0_s_p5_0},{0,0,&_44c0_s_p6_0},
46  {&_44c0_s_p7_0,&_44c0_s_p7_1},{&_44c0_s_p8_0,&_44c0_s_p8_1},
47  {&_44c0_s_p9_0,&_44c0_s_p9_1,&_44c0_s_p9_2}
48  }
49 };
50 static static_bookblock _resbook_44sm_0={
51  {
52  {0},{0,0,&_44c0_sm_p1_0},{0,0,&_44c0_sm_p2_0},{0,0,&_44c0_sm_p3_0},
53  {0,0,&_44c0_sm_p4_0},{0,0,&_44c0_sm_p5_0},{0,0,&_44c0_sm_p6_0},
54  {&_44c0_sm_p7_0,&_44c0_sm_p7_1},{&_44c0_sm_p8_0,&_44c0_sm_p8_1},
55  {&_44c0_sm_p9_0,&_44c0_sm_p9_1,&_44c0_sm_p9_2}
56  }
57 };
58 static static_bookblock _resbook_44s_1={
59  {
60  {0},{0,0,&_44c1_s_p1_0},{0,0,&_44c1_s_p2_0},{0,0,&_44c1_s_p3_0},
61  {0,0,&_44c1_s_p4_0},{0,0,&_44c1_s_p5_0},{0,0,&_44c1_s_p6_0},
62  {&_44c1_s_p7_0,&_44c1_s_p7_1},{&_44c1_s_p8_0,&_44c1_s_p8_1},
63  {&_44c1_s_p9_0,&_44c1_s_p9_1,&_44c1_s_p9_2}
64  }
65 };
66 static static_bookblock _resbook_44sm_1={
67  {
68  {0},{0,0,&_44c1_sm_p1_0},{0,0,&_44c1_sm_p2_0},{0,0,&_44c1_sm_p3_0},
69  {0,0,&_44c1_sm_p4_0},{0,0,&_44c1_sm_p5_0},{0,0,&_44c1_sm_p6_0},
70  {&_44c1_sm_p7_0,&_44c1_sm_p7_1},{&_44c1_sm_p8_0,&_44c1_sm_p8_1},
71  {&_44c1_sm_p9_0,&_44c1_sm_p9_1,&_44c1_sm_p9_2}
72  }
73 };
74 static static_bookblock _resbook_44s_2={
75  {
76  {0},{0,0,&_44c2_s_p1_0},{0,0,&_44c2_s_p2_0},{0,0,&_44c2_s_p3_0},
77  {0,0,&_44c2_s_p4_0},{0,0,&_44c2_s_p5_0},{0,0,&_44c2_s_p6_0},
78  {&_44c2_s_p7_0,&_44c2_s_p7_1},{&_44c2_s_p8_0,&_44c2_s_p8_1},
79  {&_44c2_s_p9_0,&_44c2_s_p9_1,&_44c2_s_p9_2}
80  }
81 };
82 static static_bookblock _resbook_44s_3={
83  {
84  {0},{0,0,&_44c3_s_p1_0},{0,0,&_44c3_s_p2_0},{0,0,&_44c3_s_p3_0},
85  {0,0,&_44c3_s_p4_0},{0,0,&_44c3_s_p5_0},{0,0,&_44c3_s_p6_0},
86  {&_44c3_s_p7_0,&_44c3_s_p7_1},{&_44c3_s_p8_0,&_44c3_s_p8_1},
87  {&_44c3_s_p9_0,&_44c3_s_p9_1,&_44c3_s_p9_2}
88  }
89 };
90 static static_bookblock _resbook_44s_4={
91  {
92  {0},{0,0,&_44c4_s_p1_0},{0,0,&_44c4_s_p2_0},{0,0,&_44c4_s_p3_0},
93  {0,0,&_44c4_s_p4_0},{0,0,&_44c4_s_p5_0},{0,0,&_44c4_s_p6_0},
94  {&_44c4_s_p7_0,&_44c4_s_p7_1},{&_44c4_s_p8_0,&_44c4_s_p8_1},
95  {&_44c4_s_p9_0,&_44c4_s_p9_1,&_44c4_s_p9_2}
96  }
97 };
98 static static_bookblock _resbook_44s_5={
99  {
100  {0},{0,0,&_44c5_s_p1_0},{0,0,&_44c5_s_p2_0},{0,0,&_44c5_s_p3_0},
101  {0,0,&_44c5_s_p4_0},{0,0,&_44c5_s_p5_0},{0,0,&_44c5_s_p6_0},
102  {&_44c5_s_p7_0,&_44c5_s_p7_1},{&_44c5_s_p8_0,&_44c5_s_p8_1},
103  {&_44c5_s_p9_0,&_44c5_s_p9_1,&_44c5_s_p9_2}
104  }
105 };
106 static static_bookblock _resbook_44s_6={
107  {
108  {0},{0,0,&_44c6_s_p1_0},{0,0,&_44c6_s_p2_0},{0,0,&_44c6_s_p3_0},
109  {0,0,&_44c6_s_p4_0},
110  {&_44c6_s_p5_0,&_44c6_s_p5_1},
111  {&_44c6_s_p6_0,&_44c6_s_p6_1},
112  {&_44c6_s_p7_0,&_44c6_s_p7_1},
113  {&_44c6_s_p8_0,&_44c6_s_p8_1},
114  {&_44c6_s_p9_0,&_44c6_s_p9_1,&_44c6_s_p9_2}
115  }
116 };
117 static static_bookblock _resbook_44s_7={
118  {
119  {0},{0,0,&_44c7_s_p1_0},{0,0,&_44c7_s_p2_0},{0,0,&_44c7_s_p3_0},
120  {0,0,&_44c7_s_p4_0},
121  {&_44c7_s_p5_0,&_44c7_s_p5_1},
122  {&_44c7_s_p6_0,&_44c7_s_p6_1},
123  {&_44c7_s_p7_0,&_44c7_s_p7_1},
124  {&_44c7_s_p8_0,&_44c7_s_p8_1},
125  {&_44c7_s_p9_0,&_44c7_s_p9_1,&_44c7_s_p9_2}
126  }
127 };
128 static static_bookblock _resbook_44s_8={
129  {
130  {0},{0,0,&_44c8_s_p1_0},{0,0,&_44c8_s_p2_0},{0,0,&_44c8_s_p3_0},
131  {0,0,&_44c8_s_p4_0},
132  {&_44c8_s_p5_0,&_44c8_s_p5_1},
133  {&_44c8_s_p6_0,&_44c8_s_p6_1},
134  {&_44c8_s_p7_0,&_44c8_s_p7_1},
135  {&_44c8_s_p8_0,&_44c8_s_p8_1},
136  {&_44c8_s_p9_0,&_44c8_s_p9_1,&_44c8_s_p9_2}
137  }
138 };
139 static static_bookblock _resbook_44s_9={
140  {
141  {0},{0,0,&_44c9_s_p1_0},{0,0,&_44c9_s_p2_0},{0,0,&_44c9_s_p3_0},
142  {0,0,&_44c9_s_p4_0},
143  {&_44c9_s_p5_0,&_44c9_s_p5_1},
144  {&_44c9_s_p6_0,&_44c9_s_p6_1},
145  {&_44c9_s_p7_0,&_44c9_s_p7_1},
146  {&_44c9_s_p8_0,&_44c9_s_p8_1},
147  {&_44c9_s_p9_0,&_44c9_s_p9_1,&_44c9_s_p9_2}
148  }
149 };
150 
151 
152 static vorbis_residue_template _res_44s_0[]={
153  {2,0, &_residue_44_mid,
154  &_huff_book__44c0_s_short,&_huff_book__44c0_sm_short,
155  &_resbook_44s_0,&_resbook_44sm_0},
156 
157  {2,0, &_residue_44_mid,
158  &_huff_book__44c0_s_long,&_huff_book__44c0_sm_long,
159  &_resbook_44s_0,&_resbook_44sm_0}
160 };
161 static vorbis_residue_template _res_44s_1[]={
162  {2,0, &_residue_44_mid,
163  &_huff_book__44c1_s_short,&_huff_book__44c1_sm_short,
164  &_resbook_44s_1,&_resbook_44sm_1},
165 
166  {2,0, &_residue_44_mid,
167  &_huff_book__44c1_s_long,&_huff_book__44c1_sm_long,
168  &_resbook_44s_1,&_resbook_44sm_1}
169 };
170 static vorbis_residue_template _res_44s_2[]={
171  {2,0, &_residue_44_mid,
172  &_huff_book__44c2_s_short,&_huff_book__44c2_s_short,
173  &_resbook_44s_2,&_resbook_44s_2},
174 
175  {2,0, &_residue_44_mid,
176  &_huff_book__44c2_s_long,&_huff_book__44c2_s_long,
177  &_resbook_44s_2,&_resbook_44s_2}
178 };
179 static vorbis_residue_template _res_44s_3[]={
180  {2,0, &_residue_44_mid,
181  &_huff_book__44c3_s_short,&_huff_book__44c3_s_short,
182  &_resbook_44s_3,&_resbook_44s_3},
183 
184  {2,0, &_residue_44_mid,
185  &_huff_book__44c3_s_long,&_huff_book__44c3_s_long,
186  &_resbook_44s_3,&_resbook_44s_3}
187 };
188 static vorbis_residue_template _res_44s_4[]={
189  {2,0, &_residue_44_mid,
190  &_huff_book__44c4_s_short,&_huff_book__44c4_s_short,
191  &_resbook_44s_4,&_resbook_44s_4},
192 
193  {2,0, &_residue_44_mid,
194  &_huff_book__44c4_s_long,&_huff_book__44c4_s_long,
195  &_resbook_44s_4,&_resbook_44s_4}
196 };
197 static vorbis_residue_template _res_44s_5[]={
198  {2,0, &_residue_44_mid,
199  &_huff_book__44c5_s_short,&_huff_book__44c5_s_short,
200  &_resbook_44s_5,&_resbook_44s_5},
201 
202  {2,0, &_residue_44_mid,
203  &_huff_book__44c5_s_long,&_huff_book__44c5_s_long,
204  &_resbook_44s_5,&_resbook_44s_5}
205 };
206 static vorbis_residue_template _res_44s_6[]={
207  {2,0, &_residue_44_high,
208  &_huff_book__44c6_s_short,&_huff_book__44c6_s_short,
209  &_resbook_44s_6,&_resbook_44s_6},
210 
211  {2,0, &_residue_44_high,
212  &_huff_book__44c6_s_long,&_huff_book__44c6_s_long,
213  &_resbook_44s_6,&_resbook_44s_6}
214 };
215 static vorbis_residue_template _res_44s_7[]={
216  {2,0, &_residue_44_high,
217  &_huff_book__44c7_s_short,&_huff_book__44c7_s_short,
218  &_resbook_44s_7,&_resbook_44s_7},
219 
220  {2,0, &_residue_44_high,
221  &_huff_book__44c7_s_long,&_huff_book__44c7_s_long,
222  &_resbook_44s_7,&_resbook_44s_7}
223 };
224 static vorbis_residue_template _res_44s_8[]={
225  {2,0, &_residue_44_high,
226  &_huff_book__44c8_s_short,&_huff_book__44c8_s_short,
227  &_resbook_44s_8,&_resbook_44s_8},
228 
229  {2,0, &_residue_44_high,
230  &_huff_book__44c8_s_long,&_huff_book__44c8_s_long,
231  &_resbook_44s_8,&_resbook_44s_8}
232 };
233 static vorbis_residue_template _res_44s_9[]={
234  {2,0, &_residue_44_high,
235  &_huff_book__44c9_s_short,&_huff_book__44c9_s_short,
236  &_resbook_44s_9,&_resbook_44s_9},
237 
238  {2,0, &_residue_44_high,
239  &_huff_book__44c9_s_long,&_huff_book__44c9_s_long,
240  &_resbook_44s_9,&_resbook_44s_9}
241 };
242 
243 static vorbis_mapping_template _mapres_template_44_stereo[]={
244  { _map_nominal, _res_44s_0 }, /* 0 */
245  { _map_nominal, _res_44s_1 }, /* 1 */
246  { _map_nominal, _res_44s_2 }, /* 2 */
247  { _map_nominal, _res_44s_3 }, /* 3 */
248  { _map_nominal, _res_44s_4 }, /* 4 */
249  { _map_nominal, _res_44s_5 }, /* 5 */
250  { _map_nominal, _res_44s_6 }, /* 6 */
251  { _map_nominal, _res_44s_7 }, /* 7 */
252  { _map_nominal, _res_44s_8 }, /* 8 */
253  { _map_nominal, _res_44s_9 }, /* 9 */
254 };