Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
9564 turbocat 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-2009             *
9
 * by the Xiph.Org Foundation https://xiph.org/                     *
10
 *                                                                  *
11
 ********************************************************************
12
 
13
 function: key floor settings
14
 
15
 ********************************************************************/
16
 
17
#include "vorbis/codec.h"
18
#include "backends.h"
19
#include "books/floor/floor_books.h"
20
 
21
static const static_codebook*const _floor_128x4_books[]={
22
  &_huff_book_line_128x4_class0,
23
  &_huff_book_line_128x4_0sub0,
24
  &_huff_book_line_128x4_0sub1,
25
  &_huff_book_line_128x4_0sub2,
26
  &_huff_book_line_128x4_0sub3,
27
};
28
static const static_codebook*const _floor_256x4_books[]={
29
  &_huff_book_line_256x4_class0,
30
  &_huff_book_line_256x4_0sub0,
31
  &_huff_book_line_256x4_0sub1,
32
  &_huff_book_line_256x4_0sub2,
33
  &_huff_book_line_256x4_0sub3,
34
};
35
static const static_codebook*const _floor_128x7_books[]={
36
  &_huff_book_line_128x7_class0,
37
  &_huff_book_line_128x7_class1,
38
 
39
  &_huff_book_line_128x7_0sub1,
40
  &_huff_book_line_128x7_0sub2,
41
  &_huff_book_line_128x7_0sub3,
42
  &_huff_book_line_128x7_1sub1,
43
  &_huff_book_line_128x7_1sub2,
44
  &_huff_book_line_128x7_1sub3,
45
};
46
static const static_codebook*const _floor_256x7_books[]={
47
  &_huff_book_line_256x7_class0,
48
  &_huff_book_line_256x7_class1,
49
 
50
  &_huff_book_line_256x7_0sub1,
51
  &_huff_book_line_256x7_0sub2,
52
  &_huff_book_line_256x7_0sub3,
53
  &_huff_book_line_256x7_1sub1,
54
  &_huff_book_line_256x7_1sub2,
55
  &_huff_book_line_256x7_1sub3,
56
};
57
static const static_codebook*const _floor_128x11_books[]={
58
  &_huff_book_line_128x11_class1,
59
  &_huff_book_line_128x11_class2,
60
  &_huff_book_line_128x11_class3,
61
 
62
  &_huff_book_line_128x11_0sub0,
63
  &_huff_book_line_128x11_1sub0,
64
  &_huff_book_line_128x11_1sub1,
65
  &_huff_book_line_128x11_2sub1,
66
  &_huff_book_line_128x11_2sub2,
67
  &_huff_book_line_128x11_2sub3,
68
  &_huff_book_line_128x11_3sub1,
69
  &_huff_book_line_128x11_3sub2,
70
  &_huff_book_line_128x11_3sub3,
71
};
72
static const static_codebook*const _floor_128x17_books[]={
73
  &_huff_book_line_128x17_class1,
74
  &_huff_book_line_128x17_class2,
75
  &_huff_book_line_128x17_class3,
76
 
77
  &_huff_book_line_128x17_0sub0,
78
  &_huff_book_line_128x17_1sub0,
79
  &_huff_book_line_128x17_1sub1,
80
  &_huff_book_line_128x17_2sub1,
81
  &_huff_book_line_128x17_2sub2,
82
  &_huff_book_line_128x17_2sub3,
83
  &_huff_book_line_128x17_3sub1,
84
  &_huff_book_line_128x17_3sub2,
85
  &_huff_book_line_128x17_3sub3,
86
};
87
static const static_codebook*const _floor_256x4low_books[]={
88
  &_huff_book_line_256x4low_class0,
89
  &_huff_book_line_256x4low_0sub0,
90
  &_huff_book_line_256x4low_0sub1,
91
  &_huff_book_line_256x4low_0sub2,
92
  &_huff_book_line_256x4low_0sub3,
93
};
94
static const static_codebook*const _floor_1024x27_books[]={
95
  &_huff_book_line_1024x27_class1,
96
  &_huff_book_line_1024x27_class2,
97
  &_huff_book_line_1024x27_class3,
98
  &_huff_book_line_1024x27_class4,
99
 
100
  &_huff_book_line_1024x27_0sub0,
101
  &_huff_book_line_1024x27_1sub0,
102
  &_huff_book_line_1024x27_1sub1,
103
  &_huff_book_line_1024x27_2sub0,
104
  &_huff_book_line_1024x27_2sub1,
105
  &_huff_book_line_1024x27_3sub1,
106
  &_huff_book_line_1024x27_3sub2,
107
  &_huff_book_line_1024x27_3sub3,
108
  &_huff_book_line_1024x27_4sub1,
109
  &_huff_book_line_1024x27_4sub2,
110
  &_huff_book_line_1024x27_4sub3,
111
};
112
static const static_codebook*const _floor_2048x27_books[]={
113
  &_huff_book_line_2048x27_class1,
114
  &_huff_book_line_2048x27_class2,
115
  &_huff_book_line_2048x27_class3,
116
  &_huff_book_line_2048x27_class4,
117
 
118
  &_huff_book_line_2048x27_0sub0,
119
  &_huff_book_line_2048x27_1sub0,
120
  &_huff_book_line_2048x27_1sub1,
121
  &_huff_book_line_2048x27_2sub0,
122
  &_huff_book_line_2048x27_2sub1,
123
  &_huff_book_line_2048x27_3sub1,
124
  &_huff_book_line_2048x27_3sub2,
125
  &_huff_book_line_2048x27_3sub3,
126
  &_huff_book_line_2048x27_4sub1,
127
  &_huff_book_line_2048x27_4sub2,
128
  &_huff_book_line_2048x27_4sub3,
129
};
130
 
131
static const static_codebook*const _floor_512x17_books[]={
132
  &_huff_book_line_512x17_class1,
133
  &_huff_book_line_512x17_class2,
134
  &_huff_book_line_512x17_class3,
135
 
136
  &_huff_book_line_512x17_0sub0,
137
  &_huff_book_line_512x17_1sub0,
138
  &_huff_book_line_512x17_1sub1,
139
  &_huff_book_line_512x17_2sub1,
140
  &_huff_book_line_512x17_2sub2,
141
  &_huff_book_line_512x17_2sub3,
142
  &_huff_book_line_512x17_3sub1,
143
  &_huff_book_line_512x17_3sub2,
144
  &_huff_book_line_512x17_3sub3,
145
};
146
 
147
static const static_codebook*const _floor_Xx0_books[]={
148
 
149
};
150
 
151
static const static_codebook*const *const _floor_books[11]={
152
  _floor_128x4_books,
153
  _floor_256x4_books,
154
  _floor_128x7_books,
155
  _floor_256x7_books,
156
  _floor_128x11_books,
157
  _floor_128x17_books,
158
  _floor_256x4low_books,
159
  _floor_1024x27_books,
160
  _floor_2048x27_books,
161
  _floor_512x17_books,
162
  _floor_Xx0_books,
163
};
164
 
165
static const vorbis_info_floor1 _floor[11]={
166
  /* 0: 128 x 4 */
167
  {
168
    1,{0},{4},{2},{0},
169
    {{1,2,3,4}},
170
    4,{0,128, 33,8,16,70},
171
 
172
    60,30,500,   1.,18.,  128
173
  },
174
  /* 1: 256 x 4 */
175
  {
176
    1,{0},{4},{2},{0},
177
    {{1,2,3,4}},
178
    4,{0,256, 66,16,32,140},
179
 
180
    60,30,500,   1.,18.,  256
181
  },
182
  /* 2: 128 x 7 */
183
  {
184
    2,{0,1},{3,4},{2,2},{0,1},
185
    {{-1,2,3,4},{-1,5,6,7}},
186
    4,{0,128, 14,4,58, 2,8,28,90},
187
 
188
    60,30,500,   1.,18.,  128
189
  },
190
  /* 3: 256 x 7 */
191
  {
192
    2,{0,1},{3,4},{2,2},{0,1},
193
    {{-1,2,3,4},{-1,5,6,7}},
194
    4,{0,256, 28,8,116, 4,16,56,180},
195
 
196
    60,30,500,   1.,18.,  256
197
  },
198
  /* 4: 128 x 11 */
199
  {
200
    4,{0,1,2,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
201
    {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
202
 
203
    2,{0,128,  8,33,  4,16,70,  2,6,12,  23,46,90},
204
 
205
     60,30,500,   1,18.,  128
206
  },
207
  /* 5: 128 x 17 */
208
  {
209
    6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
210
    {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
211
    2,{0,128,  12,46,  4,8,16,  23,33,70,  2,6,10,  14,19,28,  39,58,90},
212
 
213
    60,30,500,    1,18.,  128
214
  },
215
  /* 6: 256 x 4 (low bitrate version) */
216
  {
217
    1,{0},{4},{2},{0},
218
    {{1,2,3,4}},
219
    4,{0,256, 66,16,32,140},
220
 
221
    60,30,500,   1.,18.,  256
222
  },
223
  /* 7: 1024 x 27 */
224
  {
225
    8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3},
226
    {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}},
227
    2,{0,1024,   93,23,372, 6,46,186,750,  14,33,65, 130,260,556,
228
       3,10,18,28,  39,55,79,111,  158,220,312,  464,650,850},
229
 
230
    60,30,500,    3,18.,  1024
231
  },
232
  /* 8: 2048 x 27 */
233
  {
234
    8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3},
235
    {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}},
236
    2,{0,2048,   186,46,744, 12,92,372,1500,  28,66,130, 260,520,1112,
237
       6,20,36,56,  78,110,158,222,  316,440,624,  928,1300,1700},
238
 
239
    60,30,500,    3,18.,  2048
240
  },
241
  /* 9: 512 x 17 */
242
  {
243
    6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
244
    {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
245
    2,{0,512,  46,186,  16,33,65,  93,130,278,
246
       7,23,39,  55,79,110,  156,232,360},
247
 
248
    60,30,500,    1,18.,  512
249
  },
250
 
251
  /* 10: X x 0 (LFE floor; edge posts only) */
252
  {
253
    0,{0}, {0},{0},{-1},
254
    {{-1}},
255
    2,{0,12},
256
    60,30,500,   1.,18.,  10
257
  },
258
 
259
};