Add modes Dc and Ec
[platform/upstream/libvorbis.git] / lib / modes / mode_44c_C.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_C.h,v 1.2 2001/08/13 08:38:30 xiphmont Exp $
15
16  ********************************************************************/
17
18 #ifndef _V_MODES_44c_C_H_
19 #define _V_MODES_44c_C_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_C_128aux.vqh"
53 #include "books/res_44c_C_1024aux.vqh"
54
55 #include "books/res_Cc_1.vqh"
56 #include "books/res_Cc_2.vqh"
57 #include "books/res_Cc_3.vqh"
58 #include "books/res_Cc_4.vqh"
59 #include "books/res_Cc_5.vqh"
60 #include "books/res_Cc_6.vqh"
61 #include "books/res_Cc_7.vqh"
62 #include "books/res_Cc_8.vqh"
63 #include "books/res_Cc_8a.vqh"
64 #include "books/res_Cc_9.vqh"
65 #include "books/res_Cc_9a.vqh"
66 #include "books/res_Cc_9b.vqh"
67
68 #include "maskadj_A.h"
69
70 static vorbis_info_psy_global _psy_set_44c_CG={
71   0, /* decaydBpms */
72   8,   /* lines per eighth octave */
73   
74   /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
75   256, {26.f,26.f,26.f,30.f}, {-90.f,-90.f,-90.f,-90.f}, -90.f,
76   -6.f, 
77   
78   0,
79 };
80
81 static struct vp_couple_pass _psy_pass_44c_C0[]={
82   {1.f,1.f,
83    {{24,      0,0,       0,0,      0,0},
84     {9999,  4.5,0,      0,12,      0,0}}
85   },
86 };
87
88 static vp_couple_pass _psy_pass_44c_C[]={
89   {1.f,1.f,
90    {{512,   0,0,       0,0,      0,0},
91     {9999, 4.5,0,     0,12,  0,0}}
92   }
93 };
94
95 static vorbis_info_psy _psy_set_44c_C0={
96   ATH_Bark_dB_lineaggressive,
97   -100.,-140.,
98
99   /* tonemaskp */
100   -3.f, -40.f,&_vp_tonemask_consbass_A,
101   /* peakattp, curvelimitp */
102   1, 30, &_vp_peakatt_B,
103
104   /*noisemaskp */
105   1,-30.f,     /* suppress any noise curve over maxspec+n */
106   .6f, .6f,   /* low/high window */
107   5, 5, 10,
108
109   /*63     125     250     500      1k      2k      4k       8k     16k*/
110   {-30,-30,-30,-30,-30,-30,-20,-10,  0,  0,  0,  0,  0,  0,  0,  0,  0},
111   {.5f,.5f,.5f,.5f,.5f,.5f,.5f,.5f,.5f,.5f,.5f,.5f,.5f,.6f,.7f,.8f,.8f},
112
113   105.f,  /* even decade + 5 is important; saves an rint() later in a
114             tight loop) */
115   1,
116   _psy_pass_44c_C0
117 };
118
119 static vorbis_info_psy _psy_set_44c_CT={
120   ATH_Bark_dB_lineaggressive,
121   -100.f,-140.f,
122
123   /* tonemask */
124   -3.f,-40.f,&_vp_tonemask_consbass_A,
125   /* peakattp,curvelimitp */
126   1, 30,  &_vp_peakatt_B,
127
128   /*noisemaskp */
129   1,  -30.f,     /* suppress any noise curve over maxspec+n */
130       .4f,.4f,   /* low/high window */
131       10,10,100,
132
133   /*63     125     250     500      1k      2k      4k       8k     16k*/
134   {-30,-30,-30,-30,-30,-30,-30,-20, -6, -6, -6, -6,  0,   0,  0,  0,  0},
135   {.4f,.4f,.4f,.4f,.4f,.4f,.4f,.4f,.4f,.4f,.4f,.4f,.4f,.5f,.6f,.7f,.7f},
136
137   105.f,  /* even decade + 5 is important; saves an rint() later in a
138             tight loop) */
139   1,_psy_pass_44c_C
140 };
141
142 static vorbis_info_psy _psy_set_44c_C={
143   ATH_Bark_dB_lineaggressive,
144   -100.f,  -140.f,
145
146   /* tonemask */
147   -3.f,-40.f,&_vp_tonemask_consbass_A,
148   /* peakattp, curvelimitp */
149   1, 30, &_vp_peakatt_B,
150
151   /*noisemaskp */
152   1,  -30.f,     /* suppress any noise curve over maxspec+n */
153       .4f,.4f,   /* low/high window */
154       10,10,100,
155
156   /*63     125     250     500      1k      2k      4k       8k     16k*/
157   {  0,  0,  0,  0,  0,  0,  0,  0, -6, -6, -6, -6,  0,   0,  0,  0,  0},
158   {.4f,.4f,.4f,.4f,.4f,.4f,.4f,.4f,.4f,.4f,.4f,.4f,.4f,.5f,.6f,.7f,.7f},
159
160   105.f,  /* even decade + 5 is important; saves an rint() later in a
161             tight loop) */
162   1,_psy_pass_44c_C
163 };
164
165 static vorbis_info_time0 _time_set_44c_C={0};
166
167 static vorbis_info_floor1 _floor_set_44c_C0={
168   6,
169   {0,1,1,1,2,2},
170   
171   {4,3,3},
172   {0,2,2},
173   {-1,0,1},
174   {{2},{-1,3,4,5},{-1,6,7,8}},
175   
176   4,
177   
178   {0,128,  
179    
180    6,17,30,58,
181    
182    2,1,4, 11,8,14, 23,20,26,
183    41,35,48, 84,69,103},
184   
185   60,30,500,
186   999,999,1,18.,
187   8,70,
188   112};
189
190
191 static vorbis_info_floor1 _floor_set_44c_C={
192   10,
193   {0,1,2,2,2,2,2, 3,3,3},
194   
195   {3,4,3,3},
196   {1,1,2,2},
197   {9,10,11,12},
198   {{13,14},
199    {15,16},
200    {-1,17,18,19},
201    {-1,20,21,22},
202   },
203   
204   4,
205   {0,1024,
206    
207    88,31,243,
208    
209    14,54,143,460,
210    
211    6,3,10, 22,18,26, 41,36,47, 
212    69,61,78, 112,99,126, 185,162,211,  
213    329,282,387, 672,553,825
214   },
215   
216   60,30,400,
217   20,8,1,18.,
218   20,600,
219   896};
220
221 static vorbis_info_residue0 _residue_set_44c_C0={
222   0,256,16,10,23,
223   {0,1,1,1,1,1,1,1,3,7},
224   {25,
225    26,
226    27,
227    28,
228    29,
229    30,
230    31,32,
231    33,34,
232    35,36},
233   {9999,
234    9999,
235    12,9999,
236    18,9999,
237    28,9999,
238    9999,9999},
239   {.5f,
240    1.5f,
241    2.5f,2.5f,
242    4.5f,4.5,
243    16.5f,16.5,
244    84.5f},
245   {0},
246   {99,
247    99,
248    99,99,
249    99,99,
250    99,99,
251    99,99},
252   {3}};
253
254 static vorbis_info_residue0 _residue_set_44c_C={
255   0,2048, 32,10,24,
256   {0,1,1,1,1,1,1,1,3,7},
257   {25,
258    26,
259    27,
260    28,
261    29,
262    30,
263    31,
264    32,33,
265    34,35,36},
266   {9999,
267    9999,
268    22,9999,
269    34,9999,
270    64,999,
271    9999,9999},
272   {.5f,
273    1.5f,
274    2.5f,2.5f,
275    4.5f,4.5,
276    16.5f,16.5,
277    84.f},
278   {0},
279   {99,
280    99,
281    99,99,
282    99,99,
283    99,99,
284    99,99},
285   {3}};
286
287 static vorbis_info_mapping0 _mapping_set_44c_C0={
288   1, {0,0}, {0}, {0}, {0}, {0,0}, 1,{0},{1}};
289 static vorbis_info_mapping0 _mapping_set_44c_C={
290   1, {0,0}, {0}, {1}, {1}, {1,2}, 1,{0},{1}};
291
292 static vorbis_info_mode _mode_set_44c_C0={0,0,0,0};
293 static vorbis_info_mode _mode_set_44c_C={1,0,0,1};
294
295 codec_setup_info info_44c_C={
296
297   /* smallblock, largeblock */
298   {256, 2048}, 
299   /* modes,maps,times,floors,residues,books,psys */
300   2,          2,    1,     2,       2,   37,   3,
301   /* modes */
302   {&_mode_set_44c_C0,&_mode_set_44c_C},
303   /* maps */
304   {0,0},{&_mapping_set_44c_C0,&_mapping_set_44c_C},
305   /* times */
306   {0,0},{&_time_set_44c_C},
307   /* floors */
308   {1,1},{&_floor_set_44c_C0,&_floor_set_44c_C},
309   /* residue */
310   {2,2},{&_residue_set_44c_C0,&_residue_set_44c_C},
311   /* books */
312   
313   {  
314     &_huff_book_line_128x19_class1,
315     &_huff_book_line_128x19_class2, /* 1 */
316    
317     &_huff_book_line_128x19_0sub0,  /* 2 */
318     &_huff_book_line_128x19_1sub1,  /* 3 */
319     &_huff_book_line_128x19_1sub2,
320     &_huff_book_line_128x19_1sub3,  /* 5 */
321     &_huff_book_line_128x19_2sub1,
322     &_huff_book_line_128x19_2sub2,  /* 7 */
323     &_huff_book_line_128x19_2sub3, 
324     
325     &_huff_book_line_1024x31_class0,
326     &_huff_book_line_1024x31_class1, /* 10 */
327     &_huff_book_line_1024x31_class2,
328     &_huff_book_line_1024x31_class3, /* 12 */
329     
330     &_huff_book_line_1024x31_0sub0,
331     &_huff_book_line_1024x31_0sub1, /* 14 */
332     &_huff_book_line_1024x31_1sub0, 
333     &_huff_book_line_1024x31_1sub1,
334     &_huff_book_line_1024x31_2sub1,  
335     &_huff_book_line_1024x31_2sub2, /* 18 */
336     &_huff_book_line_1024x31_2sub3, 
337     &_huff_book_line_1024x31_3sub1,
338     &_huff_book_line_1024x31_3sub2,
339     &_huff_book_line_1024x31_3sub3, /* 22 */
340
341     &_huff_book_res_44c_C_128aux, 
342     &_huff_book_res_44c_C_1024aux,
343     
344     &_vq_book_res_Cc_1,
345     &_vq_book_res_Cc_2,
346     &_vq_book_res_Cc_3,
347     &_vq_book_res_Cc_4,
348     &_vq_book_res_Cc_5,
349     &_vq_book_res_Cc_6,
350     &_vq_book_res_Cc_7,
351     &_vq_book_res_Cc_8,
352     &_vq_book_res_Cc_8a,
353     &_vq_book_res_Cc_9,
354     &_vq_book_res_Cc_9a,
355     &_vq_book_res_Cc_9b,
356
357
358   },
359   /* psy */
360   {&_psy_set_44c_C0,&_psy_set_44c_CT,&_psy_set_44c_C},
361   &_psy_set_44c_CG
362 };
363
364 #endif