Add modes Dc and Ec
[platform/upstream/libvorbis.git] / lib / modes / mode_44c_A.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_A.h,v 1.1 2001/08/13 07:43:15 xiphmont Exp $
15
16  ********************************************************************/
17
18 #ifndef _V_MODES_44c_A_H_
19 #define _V_MODES_44c_A_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_A_128aux.vqh"
53 #include "books/res_44c_A_1024aux.vqh"
54
55 #include "books/res_Ac_1.vqh"
56 #include "books/res_Ac_2.vqh"
57 #include "books/res_Ac_3.vqh"
58 #include "books/res_Ac_4.vqh"
59 #include "books/res_Ac_5.vqh"
60 #include "books/res_Ac_6.vqh"
61 #include "books/res_Ac_7.vqh"
62 #include "books/res_Ac_7a.vqh"
63 #include "books/res_Ac_8.vqh"
64 #include "books/res_Ac_8a.vqh"
65 #include "books/res_Ac_9.vqh"
66 #include "books/res_Ac_9a.vqh"
67 #include "books/res_Ac_9b.vqh"
68
69 #include "maskadj_A.h"
70
71 static vorbis_info_psy_global _psy_set_44c_AG={
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_A0[]={
83   {1.f,1.f,
84     {{24,    0,0,       0,0,      0,0},
85      {64,    0,0,   7.5f,12,     0,0},
86      {9999,  0,0,   7.5f,12,  2.5f,0}}
87   },
88 };
89
90 static vp_couple_pass _psy_pass_44c_A[]={
91   {1.f,1.f,
92     {{288,   0,0,       0,0,      0,0},
93      {512,   0,0,   7.5f,12,     0,0},
94      {9999,  0,0,   7.5f,12,  2.5f,0}}
95   }
96 };
97
98 static vorbis_info_psy _psy_set_44c_A0={
99   ATH_Bark_dB_lineaggressive,
100   -100.,-140.,
101
102   /* tonemaskp */
103   0.f, -40.f,&_vp_tonemask_consbass_A,
104   /* peakattp, curvelimitp */
105   1, 4, &_vp_peakatt_A,
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   {.9f,.9f,.9f,.9f,.9f,.8f,.8f,.6f,.6f,.6f,.6f,.6f,.7f,.8f,.89f,.9f,.9f},
115
116   95.f,  /* even decade + 5 is important; saves an rint() later in a
117             tight loop) */
118   1,
119   _psy_pass_44c_A0
120 };
121
122 static vorbis_info_psy _psy_set_44c_AT={
123   ATH_Bark_dB_lineaggressive,
124   -100.f,-140.f,
125
126   /* tonemask */
127   0.f,-40.f,&_vp_tonemask_consbass_A,
128   /* peakattp,curvelimitp */
129   1, 4,  &_vp_peakatt_A,
130
131   /*noisemaskp */
132   1,  -30.f,     /* suppress any noise curve over maxspec+n */
133       .4f,.4f,   /* low/high window */
134       10,10,100,
135
136   /*63     125     250     500      1k      2k      4k       8k     16k*/
137   {-30,-30,-30,-30,-30,-30,-30,-20,  0,  0,  0,  0,  0,   0,  0,  1,  2},
138   {.7f,.7f,.7f,.7f,.7f,.6f,.5f,.5f,.5f,.5f,.5f,.5f,.7f,.75f,.8f,.8f,.85f},
139
140   95.f,  /* even decade + 5 is important; saves an rint() later in a
141             tight loop) */
142   1,_psy_pass_44c_A
143 };
144
145 static vorbis_info_psy _psy_set_44c_A={
146   ATH_Bark_dB_lineaggressive,
147   -100.f,  -140.f,
148
149   /* tonemask */
150   0.f,-40.f,&_vp_tonemask_consbass_A,
151   /* peakattp, curvelimitp */
152   1, 4, &_vp_peakatt_A,
153
154   /*noisemaskp */
155   1,  -30.f,     /* suppress any noise curve over maxspec+n */
156       .4f,.4f,   /* low/high window */
157       10,10,100,
158
159   /*63     125     250     500      1k      2k      4k       8k     16k*/
160   {-20,-20,-20,-20,-20,-20,-10,  0,  0,  0,  0,  0,  0,   0,  0,  1,  2},
161   {.6f,.6f,.6f,.6f,.6f,.5f,.5f,.5f,.5f,.5f,.5f,.5f,.7f,.75f,.8f,.8f,.85f},
162
163   95.f,  /* even decade + 5 is important; saves an rint() later in a
164             tight loop) */
165   1,_psy_pass_44c_A
166 };
167
168 static vorbis_info_time0 _time_set_44c_A={0};
169
170 static vorbis_info_floor1 _floor_set_44c_A0={
171   6,
172   {0,1,1,1,2,2},
173   
174   {4,3,3},
175   {0,2,2},
176   {-1,0,1},
177   {{2},{-1,3,4,5},{-1,6,7,8}},
178   
179   4,
180   
181   {0,128,  
182    
183    6,17,30,58,
184    
185    2,1,4, 11,8,14, 23,20,26,
186    41,35,48, 84,69,103},
187   
188   60,30,500,
189   999,999,1,18.,
190   8,70,
191   96};
192
193
194 static vorbis_info_floor1 _floor_set_44c_A={
195   10,
196   {0,1,2,2,2,2,2, 3,3,3},
197   
198   {3,4,3,3},
199   {1,1,2,2},
200   {9,10,11,12},
201   {{13,14},
202    {15,16},
203    {-1,17,18,19},
204    {-1,20,21,22},
205   },
206   
207   4,
208   {0,1024,
209    
210    88,31,243,
211    
212    14,54,143,460,
213    
214    6,3,10, 22,18,26, 41,36,47, 
215    69,61,78, 112,99,126, 185,162,211,  
216    329,282,387, 672,553,825
217   },
218   
219   60,30,400,
220   20,8,1,18.,
221   20,600,
222   720};
223
224 static vorbis_info_residue0 _residue_set_44c_A0={
225   0,192, 8, 10,23,
226   {0,1,1,1,1,1,1,3,3,7},
227   {25, 26, 27, 28, 29, 30, 31,32, 33,34, 35,36,37},
228   {9999,9999,9999,9999,9999,9999,
229    9999,9999,9999,9999},
230   {.5f,
231    1.5f,1.5f,
232    2.5f,2.5f,2.5f,
233    4.5f,17.5f,80.5f},
234   {0},
235   {99,16,99,6,16,99,99,99,99,99},
236   {3}};
237
238 static vorbis_info_residue0 _residue_set_44c_A={
239   0,1536, 32,10,24,
240   {0,1,1,1,1,1,1,3,3,7},
241   {25, 26, 27, 28, 29, 30, 31,32, 33,34, 35,36,37},
242   {9999,9999,9999,9999,9999,9999,
243    9999,9999,9999,9999},
244   {.5f,
245    1.5f,1.5f,
246    2.5f,2.5f,2.5f,
247    4.5f,17.5f,80.f},
248   {0},
249   {99,32,99,18,32,99,99,99,99,99},
250   {3}};
251
252 static vorbis_info_mapping0 _mapping_set_44c_A0={
253   1, {0,0}, {0}, {0}, {0}, {0,0}, 1,{0},{1}};
254 static vorbis_info_mapping0 _mapping_set_44c_A={
255   1, {0,0}, {0}, {1}, {1}, {1,2}, 1,{0},{1}};
256
257 static vorbis_info_mode _mode_set_44c_A0={0,0,0,0};
258 static vorbis_info_mode _mode_set_44c_A={1,0,0,1};
259
260 codec_setup_info info_44c_A={
261
262   /* smallblock, largeblock */
263   {256, 2048}, 
264   /* modes,maps,times,floors,residues,books,psys */
265   2,          2,    1,     2,       2,   38,   3,
266   /* modes */
267   {&_mode_set_44c_A0,&_mode_set_44c_A},
268   /* maps */
269   {0,0},{&_mapping_set_44c_A0,&_mapping_set_44c_A},
270   /* times */
271   {0,0},{&_time_set_44c_A},
272   /* floors */
273   {1,1},{&_floor_set_44c_A0,&_floor_set_44c_A},
274   /* residue */
275   {2,2},{&_residue_set_44c_A0,&_residue_set_44c_A},
276   /* books */
277   
278   {  
279     &_huff_book_line_128x19_class1,
280     &_huff_book_line_128x19_class2, /* 1 */
281    
282     &_huff_book_line_128x19_0sub0,  /* 2 */
283     &_huff_book_line_128x19_1sub1,  /* 3 */
284     &_huff_book_line_128x19_1sub2,
285     &_huff_book_line_128x19_1sub3,  /* 5 */
286     &_huff_book_line_128x19_2sub1,
287     &_huff_book_line_128x19_2sub2,  /* 7 */
288     &_huff_book_line_128x19_2sub3, 
289     
290     &_huff_book_line_1024x31_class0,
291     &_huff_book_line_1024x31_class1, /* 10 */
292     &_huff_book_line_1024x31_class2,
293     &_huff_book_line_1024x31_class3, /* 12 */
294     
295     &_huff_book_line_1024x31_0sub0,
296     &_huff_book_line_1024x31_0sub1, /* 14 */
297     &_huff_book_line_1024x31_1sub0, 
298     &_huff_book_line_1024x31_1sub1,
299     &_huff_book_line_1024x31_2sub1,  
300     &_huff_book_line_1024x31_2sub2, /* 18 */
301     &_huff_book_line_1024x31_2sub3, 
302     &_huff_book_line_1024x31_3sub1,
303     &_huff_book_line_1024x31_3sub2,
304     &_huff_book_line_1024x31_3sub3, /* 22 */
305
306     &_huff_book_res_44c_A_128aux, 
307     &_huff_book_res_44c_A_1024aux,
308     
309     &_vq_book_res_Ac_1,
310     &_vq_book_res_Ac_2,
311     &_vq_book_res_Ac_3,
312     &_vq_book_res_Ac_4,
313     &_vq_book_res_Ac_5,
314     &_vq_book_res_Ac_6,
315     &_vq_book_res_Ac_7,
316     &_vq_book_res_Ac_7a,
317     &_vq_book_res_Ac_8,
318     &_vq_book_res_Ac_8a,
319     &_vq_book_res_Ac_9,
320     &_vq_book_res_Ac_9a,
321     &_vq_book_res_Ac_9b,
322
323
324   },
325   /* psy */
326   {&_psy_set_44c_A0,&_psy_set_44c_AT,&_psy_set_44c_A},
327   &_psy_set_44c_AG
328 };
329
330 #endif