Add modes Dc and Ec
[platform/upstream/libvorbis.git] / lib / modes / mode_44c_B.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-2001             *
9  * by the XIPHOPHORUS Company http://www.xiph.org/                  *
10  *                                                                  *
11  ********************************************************************
12
13  function: predefined encoding modes; 44kHz stereo ~64kbps true VBR
14  last mod: $Id: mode_44c_B.h,v 1.1 2001/08/13 07:43:15 xiphmont Exp $
15
16  ********************************************************************/
17
18 #ifndef _V_MODES_44c_B_H_
19 #define _V_MODES_44c_B_H_
20
21 #include <stdio.h>
22 #include "vorbis/codec.h"
23 #include "backends.h"
24
25 #include "books/line_128x19_class1.vqh"
26 #include "books/line_128x19_class2.vqh"
27
28 #include "books/line_128x19_0sub0.vqh"
29 #include "books/line_128x19_1sub1.vqh"
30 #include "books/line_128x19_1sub2.vqh"
31 #include "books/line_128x19_1sub3.vqh"
32 #include "books/line_128x19_2sub1.vqh"
33 #include "books/line_128x19_2sub2.vqh"
34 #include "books/line_128x19_2sub3.vqh"
35
36 #include "books/line_1024x31_class0.vqh"
37 #include "books/line_1024x31_class1.vqh"
38 #include "books/line_1024x31_class2.vqh"
39 #include "books/line_1024x31_class3.vqh"
40
41 #include "books/line_1024x31_0sub0.vqh"
42 #include "books/line_1024x31_0sub1.vqh"
43 #include "books/line_1024x31_1sub0.vqh"
44 #include "books/line_1024x31_1sub1.vqh"
45 #include "books/line_1024x31_2sub1.vqh"
46 #include "books/line_1024x31_2sub2.vqh"
47 #include "books/line_1024x31_2sub3.vqh"
48 #include "books/line_1024x31_3sub1.vqh"
49 #include "books/line_1024x31_3sub2.vqh"
50 #include "books/line_1024x31_3sub3.vqh"
51
52 #include "books/res_44c_B_128aux.vqh"
53 #include "books/res_44c_B_1024aux.vqh"
54
55 #include "books/res_Bc_1.vqh"
56 #include "books/res_Bc_2.vqh"
57 #include "books/res_Bc_3.vqh"
58 #include "books/res_Bc_4.vqh"
59 #include "books/res_Bc_5.vqh"
60 #include "books/res_Bc_6.vqh"
61 #include "books/res_Bc_7.vqh"
62 #include "books/res_Bc_7a.vqh"
63 #include "books/res_Bc_8.vqh"
64 #include "books/res_Bc_8a.vqh"
65 #include "books/res_Bc_9.vqh"
66 #include "books/res_Bc_9a.vqh"
67 #include "books/res_Bc_9b.vqh"
68
69 #include "maskadj_A.h"
70
71 static vorbis_info_psy_global _psy_set_44c_BG={
72   0, /* decaydBpms */
73   8,   /* lines per eighth octave */
74   
75   /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
76   256, {26.f,26.f,26.f,30.f}, {-90.f,-90.f,-90.f,-90.f}, -90.f,
77   -6.f, 
78   
79   0,
80 };
81
82 static struct vp_couple_pass _psy_pass_44c_B0[]={
83   {1.f,1.f,
84     {{24,     0,0,       0,0,      0,0},
85      {64,    4.5,0,      0,12,      0,0},
86      {9999,  7.5,0,     4.5,12,   1.5,0}}
87   },
88 };
89
90 static vp_couple_pass _psy_pass_44c_B[]={
91   {1.f,1.f,
92     {{288,   0,0,       0,0,      0,0},
93      {512,  4.5,0,      0,12,     0,0},
94      {9999, 7.5,0,     4.5,12,  1.5,0}}
95   }
96 };
97
98 static vorbis_info_psy _psy_set_44c_B0={
99   ATH_Bark_dB_lineaggressive,
100   -100.,-140.,
101
102   /* tonemaskp */
103   -3.f, -40.f,&_vp_tonemask_consbass_A,
104   /* peakattp, curvelimitp */
105   1, 4, &_vp_peakatt_B,
106
107   /*noisemaskp */
108   1,-30.f,     /* suppress any noise curve over maxspec+n */
109   .6f, .6f,   /* low/high window */
110   5, 5, 10,
111
112   /*63     125     250     500      1k      2k      4k       8k     16k*/
113   {-30,-30,-30,-30,-30,-30,-20,-10,  0,  0,  0,  0,  0,  1,  1,  2,  3},
114   {.6f,.6f,.6f,.6f,.6f,.5f,.5f,.5f,.5f,.5f,.5f,.5f,.6f,.75f,.85f,.85f,.85f},
115
116
117   105.f,  /* even decade + 5 is important; saves an rint() later in a
118             tight loop) */
119   1,
120   _psy_pass_44c_B0
121 };
122
123 static vorbis_info_psy _psy_set_44c_BT={
124   ATH_Bark_dB_lineaggressive,
125   -100.f,-140.f,
126
127   /* tonemask */
128   -3.f,-40.f,&_vp_tonemask_consbass_A,
129   /* peakattp,curvelimitp */
130   1, 4,  &_vp_peakatt_B,
131
132   /*noisemaskp */
133   1,  -30.f,     /* suppress any noise curve over maxspec+n */
134       .4f,.4f,   /* low/high window */
135       10,10,100,
136
137   /*63     125     250     500      1k      2k      4k       8k     16k*/
138   {-30,-30,-30,-30,-30,-30,-30,-20, -6, -6, -6, -6,  0,   0,  0,  1,  2},
139   {.6f,.6f,.6f,.6f,.6f,.6f,.5f,.5f,.5f,.5f,.5f,.5f,.5f,.6f,.7f,.75f,.8f},
140
141   105.f,  /* even decade + 5 is important; saves an rint() later in a
142             tight loop) */
143   1,_psy_pass_44c_B
144 };
145
146 static vorbis_info_psy _psy_set_44c_B={
147   ATH_Bark_dB_lineaggressive,
148   -100.f,  -140.f,
149
150   /* tonemask */
151   -3.f,-40.f,&_vp_tonemask_consbass_A,
152   /* peakattp, curvelimitp */
153   1, 4, &_vp_peakatt_B,
154
155   /*noisemaskp */
156   1,  -30.f,     /* suppress any noise curve over maxspec+n */
157       .4f,.4f,   /* low/high window */
158       10,10,100,
159
160   /*63     125     250     500      1k      2k      4k       8k     16k*/
161   {-20,-20,-20,-20,-20,-20,-20,  0, -6, -6, -6, -6,  0,   0,  0,  1,  2},
162   {.6f,.6f,.6f,.6f,.6f,.6f,.5f,.5f,.5f,.5f,.5f,.5f,.5f,.6f,.7f,.75f,.8f},
163
164
165   105.f,  /* even decade + 5 is important; saves an rint() later in a
166             tight loop) */
167   1,_psy_pass_44c_B
168 };
169
170 static vorbis_info_time0 _time_set_44c_B={0};
171
172 static vorbis_info_floor1 _floor_set_44c_B0={
173   6,
174   {0,1,1,1,2,2},
175   
176   {4,3,3},
177   {0,2,2},
178   {-1,0,1},
179   {{2},{-1,3,4,5},{-1,6,7,8}},
180   
181   4,
182   
183   {0,128,  
184    
185    6,17,30,58,
186    
187    2,1,4, 11,8,14, 23,20,26,
188    41,35,48, 84,69,103},
189   
190   60,30,500,
191   999,999,1,18.,
192   8,70,
193   112};
194
195
196 static vorbis_info_floor1 _floor_set_44c_B={
197   10,
198   {0,1,2,2,2,2,2, 3,3,3},
199   
200   {3,4,3,3},
201   {1,1,2,2},
202   {9,10,11,12},
203   {{13,14},
204    {15,16},
205    {-1,17,18,19},
206    {-1,20,21,22},
207   },
208   
209   4,
210   {0,1024,
211    
212    88,31,243,
213    
214    14,54,143,460,
215    
216    6,3,10, 22,18,26, 41,36,47, 
217    69,61,78, 112,99,126, 185,162,211,  
218    329,282,387, 672,553,825
219   },
220   
221   60,30,400,
222   20,8,1,18.,
223   20,600,
224   896};
225
226 static vorbis_info_residue0 _residue_set_44c_B0={
227   0,224,16,10,23,
228   {0,1,1,1,1,1,1,3,3,7},
229   {25,
230    26,
231    27,
232    28,
233    29,
234    30,
235    31,32,
236    33,34,
237    35,36,37},
238   {9999,
239    7,9999,9999,
240    11,9999,
241    9999,9999,9999,9999},
242   {.5f,
243    1.5f,1.5f,1.5f,
244    2.5f,2.5f,
245    4.5f,16.5f,84.5f},
246   {0},
247   {99,
248    8,8,99,
249    99,99,
250    99,99,99,99},
251   {3}};
252
253 static vorbis_info_residue0 _residue_set_44c_B={
254   0,1792, 32,10,24,
255   {0,1,1,1,1,1,1,3,3,7},
256   {25,
257    26,
258    27,
259    28,
260    29,
261    30,
262    31,32,
263    33,34,
264    35,36,37},
265   {9999,
266    10,9999,9999,
267    20,9999,
268    9999,9999,9999,9999},
269   {.5f,
270    1.5f,1.5f,1.5f,
271    2.5f,2.5f,
272    4.5f,16.5f,84.f},
273   {0},
274   {99,
275    32,32,99,
276    99,99,
277    99,99,99,99},
278   {3}};
279
280 static vorbis_info_mapping0 _mapping_set_44c_B0={
281   1, {0,0}, {0}, {0}, {0}, {0,0}, 1,{0},{1}};
282 static vorbis_info_mapping0 _mapping_set_44c_B={
283   1, {0,0}, {0}, {1}, {1}, {1,2}, 1,{0},{1}};
284
285 static vorbis_info_mode _mode_set_44c_B0={0,0,0,0};
286 static vorbis_info_mode _mode_set_44c_B={1,0,0,1};
287
288 codec_setup_info info_44c_B={
289
290   /* smallblock, largeblock */
291   {256, 2048}, 
292   /* modes,maps,times,floors,residues,books,psys */
293   2,          2,    1,     2,       2,   38,   3,
294   /* modes */
295   {&_mode_set_44c_B0,&_mode_set_44c_B},
296   /* maps */
297   {0,0},{&_mapping_set_44c_B0,&_mapping_set_44c_B},
298   /* times */
299   {0,0},{&_time_set_44c_B},
300   /* floors */
301   {1,1},{&_floor_set_44c_B0,&_floor_set_44c_B},
302   /* residue */
303   {2,2},{&_residue_set_44c_B0,&_residue_set_44c_B},
304   /* books */
305   
306   {  
307     &_huff_book_line_128x19_class1,
308     &_huff_book_line_128x19_class2, /* 1 */
309    
310     &_huff_book_line_128x19_0sub0,  /* 2 */
311     &_huff_book_line_128x19_1sub1,  /* 3 */
312     &_huff_book_line_128x19_1sub2,
313     &_huff_book_line_128x19_1sub3,  /* 5 */
314     &_huff_book_line_128x19_2sub1,
315     &_huff_book_line_128x19_2sub2,  /* 7 */
316     &_huff_book_line_128x19_2sub3, 
317     
318     &_huff_book_line_1024x31_class0,
319     &_huff_book_line_1024x31_class1, /* 10 */
320     &_huff_book_line_1024x31_class2,
321     &_huff_book_line_1024x31_class3, /* 12 */
322     
323     &_huff_book_line_1024x31_0sub0,
324     &_huff_book_line_1024x31_0sub1, /* 14 */
325     &_huff_book_line_1024x31_1sub0, 
326     &_huff_book_line_1024x31_1sub1,
327     &_huff_book_line_1024x31_2sub1,  
328     &_huff_book_line_1024x31_2sub2, /* 18 */
329     &_huff_book_line_1024x31_2sub3, 
330     &_huff_book_line_1024x31_3sub1,
331     &_huff_book_line_1024x31_3sub2,
332     &_huff_book_line_1024x31_3sub3, /* 22 */
333
334     &_huff_book_res_44c_B_128aux, 
335     &_huff_book_res_44c_B_1024aux,
336     
337     &_vq_book_res_Bc_1,
338     &_vq_book_res_Bc_2,
339     &_vq_book_res_Bc_3,
340     &_vq_book_res_Bc_4,
341     &_vq_book_res_Bc_5,
342     &_vq_book_res_Bc_6,
343     &_vq_book_res_Bc_7,
344     &_vq_book_res_Bc_7a,
345     &_vq_book_res_Bc_8,
346     &_vq_book_res_Bc_8a,
347     &_vq_book_res_Bc_9,
348     &_vq_book_res_Bc_9a,
349     &_vq_book_res_Bc_9b,
350
351
352   },
353   /* psy */
354   {&_psy_set_44c_B0,&_psy_set_44c_BT,&_psy_set_44c_B},
355   &_psy_set_44c_BG
356 };
357
358 #endif