doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
floor_all.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: key floor settings
14  last mod: $Id: floor_all.h,v 1.1 2002/07/11 06:41:04 xiphmont Exp $
15 
16  ********************************************************************/
17 
18 #include "../vorbis/codec.h"
19 #include "backends.h"
21 
22 static static_codebook *_floor_128x4_books[]={
23  &_huff_book_line_128x4_class0,
24  &_huff_book_line_128x4_0sub0,
25  &_huff_book_line_128x4_0sub1,
26  &_huff_book_line_128x4_0sub2,
27  &_huff_book_line_128x4_0sub3,
28 };
29 static static_codebook *_floor_256x4_books[]={
30  &_huff_book_line_256x4_class0,
31  &_huff_book_line_256x4_0sub0,
32  &_huff_book_line_256x4_0sub1,
33  &_huff_book_line_256x4_0sub2,
34  &_huff_book_line_256x4_0sub3,
35 };
36 static static_codebook *_floor_128x7_books[]={
37  &_huff_book_line_128x7_class0,
38  &_huff_book_line_128x7_class1,
39 
40  &_huff_book_line_128x7_0sub1,
41  &_huff_book_line_128x7_0sub2,
42  &_huff_book_line_128x7_0sub3,
43  &_huff_book_line_128x7_1sub1,
44  &_huff_book_line_128x7_1sub2,
45  &_huff_book_line_128x7_1sub3,
46 };
47 static static_codebook *_floor_256x7_books[]={
48  &_huff_book_line_256x7_class0,
49  &_huff_book_line_256x7_class1,
50 
51  &_huff_book_line_256x7_0sub1,
52  &_huff_book_line_256x7_0sub2,
53  &_huff_book_line_256x7_0sub3,
54  &_huff_book_line_256x7_1sub1,
55  &_huff_book_line_256x7_1sub2,
56  &_huff_book_line_256x7_1sub3,
57 };
58 static static_codebook *_floor_128x11_books[]={
59  &_huff_book_line_128x11_class1,
60  &_huff_book_line_128x11_class2,
61  &_huff_book_line_128x11_class3,
62 
63  &_huff_book_line_128x11_0sub0,
64  &_huff_book_line_128x11_1sub0,
65  &_huff_book_line_128x11_1sub1,
66  &_huff_book_line_128x11_2sub1,
67  &_huff_book_line_128x11_2sub2,
68  &_huff_book_line_128x11_2sub3,
69  &_huff_book_line_128x11_3sub1,
70  &_huff_book_line_128x11_3sub2,
71  &_huff_book_line_128x11_3sub3,
72 };
73 static static_codebook *_floor_128x17_books[]={
74  &_huff_book_line_128x17_class1,
75  &_huff_book_line_128x17_class2,
76  &_huff_book_line_128x17_class3,
77 
78  &_huff_book_line_128x17_0sub0,
79  &_huff_book_line_128x17_1sub0,
80  &_huff_book_line_128x17_1sub1,
81  &_huff_book_line_128x17_2sub1,
82  &_huff_book_line_128x17_2sub2,
83  &_huff_book_line_128x17_2sub3,
84  &_huff_book_line_128x17_3sub1,
85  &_huff_book_line_128x17_3sub2,
86  &_huff_book_line_128x17_3sub3,
87 };
88 static static_codebook *_floor_512x17_books[]={
89  &_huff_book_line_512x17_class1,
90  &_huff_book_line_512x17_class2,
91  &_huff_book_line_512x17_class3,
92 
93  &_huff_book_line_512x17_0sub0,
94  &_huff_book_line_512x17_1sub0,
95  &_huff_book_line_512x17_1sub1,
96  &_huff_book_line_512x17_2sub1,
97  &_huff_book_line_512x17_2sub2,
98  &_huff_book_line_512x17_2sub3,
99  &_huff_book_line_512x17_3sub1,
100  &_huff_book_line_512x17_3sub2,
101  &_huff_book_line_512x17_3sub3,
102 };
103 static static_codebook *_floor_1024x27_books[]={
104  &_huff_book_line_1024x27_class1,
105  &_huff_book_line_1024x27_class2,
106  &_huff_book_line_1024x27_class3,
107  &_huff_book_line_1024x27_class4,
108 
109  &_huff_book_line_1024x27_0sub0,
110  &_huff_book_line_1024x27_1sub0,
111  &_huff_book_line_1024x27_1sub1,
112  &_huff_book_line_1024x27_2sub0,
113  &_huff_book_line_1024x27_2sub1,
114  &_huff_book_line_1024x27_3sub1,
115  &_huff_book_line_1024x27_3sub2,
116  &_huff_book_line_1024x27_3sub3,
117  &_huff_book_line_1024x27_4sub1,
118  &_huff_book_line_1024x27_4sub2,
119  &_huff_book_line_1024x27_4sub3,
120 };
121 
122 static static_codebook **_floor_books[10]={
123  _floor_128x4_books,
124  _floor_256x4_books,
125  _floor_128x7_books,
126  _floor_256x7_books,
127  _floor_128x11_books,
128  _floor_128x17_books,
129  _floor_128x17_books,
130  _floor_1024x27_books,
131  _floor_1024x27_books,
132  _floor_512x17_books,
133 };
134 
135 static vorbis_info_floor1 _floor[10]={
136  /* 128 x 4 */
137  {
138  1,{0},{4},{2},{0},
139  {{1,2,3,4}},
140  4,{0,128, 33,8,16,70},
141 
142  60,30,500, 1.,18., -1
143  },
144  /* 256 x 4 */
145  {
146  1,{0},{4},{2},{0},
147  {{1,2,3,4}},
148  4,{0,256, 66,16,32,140},
149 
150  60,30,500, 1.,18., -1
151  },
152  /* 128 x 7 */
153  {
154  2,{0,1},{3,4},{2,2},{0,1},
155  {{-1,2,3,4},{-1,5,6,7}},
156  4,{0,128, 14,4,58, 2,8,28,90},
157 
158  60,30,500, 1.,18., -1
159  },
160  /* 256 x 7 */
161  {
162  2,{0,1},{3,4},{2,2},{0,1},
163  {{-1,2,3,4},{-1,5,6,7}},
164  4,{0,256, 28,8,116, 4,16,56,180},
165 
166  60,30,500, 1.,18., -1
167  },
168 
169  /* 128 x 11 */
170  {
171  4,{0,1,2,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
172  {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
173 
174  2,{0,128, 8,33, 4,16,70, 2,6,12, 23,46,90},
175 
176  60,30,500, 1,18., -1
177  },
178 
179  /* 128 x 17 */
180  {
181  6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
182  {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
183  2,{0,128, 12,46, 4,8,16, 23,33,70, 2,6,10, 14,19,28, 39,58,90},
184 
185  60,30,500, 1,18., -1
186  },
187 
188  /* 1024 x 17 */
189  {
190  6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
191  {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
192  2,{0,1024, 93,372, 33,65,130, 186,260,556,
193  14,46,79, 111,158,220, 312,464,720},
194 
195  60,30,500, 1,18., -1 /* lowpass! */
196  },
197  /* 1024 x 27 */
198  {
199  8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3},
200  {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}},
201  2,{0,1024, 93,23,372, 6,46,186,750, 14,33,65, 130,260,556,
202  3,10,18,28, 39,55,79,111, 158,220,312, 464,650,850},
203 
204  60,30,500, 3,18., -1 /* lowpass */
205  },
206  /* 2048 x 27 */
207  {
208  8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3},
209  {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}},
210  2,{0,2048, 186,46,744, 12,92,372,1500, 28,66,130, 260,520,1112,
211  6,20,36,56, 78,110,158,222, 316,440,624, 928,1300,1700},
212 
213  60,30,500, 3,18., -1 /* lowpass */
214  },
215  /* 512 x 17 */
216  {
217  6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
218  {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
219  2,{0,512, 46,186, 16,33,65, 93,130,278,
220  7,23,39, 55,79,110, 156,232,360},
221 
222  60,30,500, 1,18., -1 /* lowpass! */
223  },
224 
225 };
226