mono modes
[platform/upstream/libvorbis.git] / lib / modes / mode_22c_Z.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; 22kHz stereo ~32kbps true VBR
14  last mod: $Id: mode_22c_Z.h,v 1.1 2001/08/13 11:30:59 xiphmont Exp $
15
16  ********************************************************************/
17
18 #ifndef _V_MODES_22c_Z_H_
19 #define _V_MODES_22c_Z_H_
20
21 #include <stdio.h>
22 #include "vorbis/codec.h"
23 #include "backends.h"
24
25 #include "books/line_128x7_class1.vqh"
26 #include "books/line_128x7_class2.vqh"
27
28 #include "books/line_128x7_0sub0.vqh"
29 #include "books/line_128x7_1sub1.vqh"
30 #include "books/line_128x7_1sub2.vqh"
31 #include "books/line_128x7_1sub3.vqh"
32 #include "books/line_128x7_2sub1.vqh"
33 #include "books/line_128x7_2sub2.vqh"
34 #include "books/line_128x7_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_22c_Z_128aux.vqh"
53 #include "books/res_22c_Z_1024aux.vqh"
54
55 #include "books/res_Zc_1.vqh"
56 #include "books/res_Zc_2.vqh"
57 #include "books/res_Zc_3.vqh"
58 #include "books/res_Zc_4.vqh"
59 #include "books/res_Zc_5.vqh"
60 #include "books/res_Zc_6.vqh"
61 #include "books/res_Zc_7.vqh"
62 #include "books/res_Zc_8.vqh"
63 #include "books/res_Zc_9.vqh"
64 #include "books/res_Zc_9a.vqh"
65 #include "books/res_Zc_9b.vqh"
66
67 #include "maskadj_Z.h"
68
69 static vorbis_info_psy_global _psy_set_22c_ZG={
70   0, /* decaydBpms */
71   8,   /* lines per eighth octave */
72   
73   /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
74   256, {26.f,26.f,26.f,30.f}, {-90.f,-90.f,-90.f,-90.f}, -90.f,
75   -6.f, 
76   
77   0,
78 };
79
80 static struct vp_couple_pass _psy_pass_22c_Z0[]={
81   {1.f,1.f,
82     {{48,    0,0,       0,0,      0,0},
83      {9999,  0,0,   7.5f,12,  7.5f,0}}
84   },
85 };
86
87 static vp_couple_pass _psy_pass_22c_Z[]={
88   {1.f,1.f,
89     {{384,   0,0,       0,0,      0,0},
90      {9999,  0,0,   7.5f,12,  7.5f,0}}
91   }
92 };
93
94 static vorbis_info_psy _psy_set_22c_Z0={
95   ATH_Bark_dB_lineaggressive,
96   -90.,-110.,
97
98   /* tonemaskp */
99   -99.f, -24.f,&_vp_tonemask_consbass_Z,
100   /* peakattp, curvelimitp */
101   0, 0, &_vp_peakatt_Z,
102
103   /*noisemaskp */
104   1,-24.f,     /* suppress any noise curve over maxspec+n */
105   1.f, 1.f,   /* low/high window */
106   2, 2, -1,
107
108   /*63     125     250     500      1k      2k      4k       8k     16k*/
109   {-20,-20,-20,-20,-20,-20,-20, -26,-25,-25,-25,-25,-25, -26,-27,-20,-20},
110   //{-20,-20,-20,-20,-20,-10,-10, -5,  3,  3,  5,  5,  5,  6,  7, 10,  10},
111   {1.f,1.f,1.f,1.f,1.f,1.f,.8f,.7f,.7f,.7f,.7f,.7f,.8f,.88f,.89f,.9f,.9f},
112
113   95.f,  /* even decade + 5 is important; saves an rint() later in a
114             tight loop) */
115   1,
116   _psy_pass_22c_Z0
117 };
118
119 static vorbis_info_psy _psy_set_22c_ZT={
120   ATH_Bark_dB_lineaggressive,
121   -90.f,-110.f,
122
123   /* tonemask */
124   -99.f,-20.f,&_vp_tonemask_consbass_Z,
125   /* peakattp,curvelimitp */
126   0, 0,  &_vp_peakatt_Z,
127
128   /*noisemaskp */
129   1,  -24.f,     /* suppress any noise curve over maxspec+n */
130       .5f,.5f,   /* low/high window */
131       10,10,100,
132
133   /*63     125     250     500      1k      2k      4k       8k     16k*/
134   {-20,-20,-20,-20,-20,-20,-20, -26,-25,-25,-25,-25,-25, -26,-27,-20,-20},
135   //{-20,-20,-20,-20,-20,-10,-10, -6,  5,  5,  5,  5,  5,   6,  7, 10, 10},
136   //{1.f,1.f,1.f,1.f,1.f,1.f,.8f,.8f,.8f,.8f,.8f,.8f,.8f,.88f,.89f,.9f,.9f},
137
138   //{-20,-20,-20,-20,-20,-20,-20,-6,  -3, -3,  0,  0,  0,   3,  5, 10, 10},
139   //{-20,-20,-15,-15,-15,-15,-10,-3,  -3, 0,  0,  0,  2,   4,  6, 10, 10},
140   {1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f},
141
142
143   95.f,  /* even decade + 5 is important; saves an rint() later in a
144             tight loop) */
145   1,_psy_pass_22c_Z
146 };
147
148 static vorbis_info_psy _psy_set_22c_Z={
149   ATH_Bark_dB_lineaggressive,
150   -90.f,  -110.f,
151
152   /* tonemask */
153   3.f,-20.f,&_vp_tonemask_Z,
154   /* peakattp, curvelimitp */
155   1, 0, &_vp_peakatt_Z,
156
157   /*noisemaskp */
158   1,  -24.f,     /* suppress any noise curve over maxspec+n */
159       .5f,.5f,   /* low/high window */
160       4,4,60,
161
162   /*63     125     250     500      1k      2k      4k       8k     16k*/
163   {-20,-20,-15,-15,-15,-15,-10, 3,  3,  3,  3,  3,  3,   4,  4, 10, 10},
164   {1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f,1.f},
165
166   95.f,  /* even decade + 5 is important; saves an rint() later in a
167             tight loop) */
168   1,_psy_pass_22c_Z
169 };
170
171 static vorbis_info_time0 _time_set_22c_Z={0};
172
173 static vorbis_info_floor1 _floor_set_22c_Z0={
174   3,
175   {0,1,2},
176   
177   {1,3,3},
178   {0,2,2},
179   {-1,0,1},
180   {{2},{-1,3,4,5},{-1,6,7,8}},
181   
182   4,
183   
184   {0,128,  
185    
186    7,
187    
188    2,1,4,
189    23,13,45},
190   
191   60,30,500,
192   999,999,0,18.,
193   8,70,
194   128};
195
196 static vorbis_info_floor1 _floor_set_22c_Z={
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   1024};
225
226 static vorbis_info_residue0 _residue_set_22c_Z0={
227   0,256, 16, 10,23,
228   {0,1,1,1,1,1,1,1,1,7},
229   {25, 26, 27, 28, 29, 30, 31, 32, 33,34,35},
230   {9999, 9999, 9999, 9999, 2,9999, 9999, 9999, 9999, 9999},
231   {.5, 1.5, 2.5f, 7.5, 1.5f,1.5, 2.5, 7.5, 22.5f},
232   {0},
233   {99, 8, 8, 8, 99,99, 99, 99, 99},
234   {3}};
235
236 static vorbis_info_residue0 _residue_set_22c_Z={
237   0,2048, 32, 10,24,
238   {0,1,1,1,1,1,1,1,1,7},
239   {25, 26, 27, 28, 29, 30, 31, 32, 33,34,35},
240   {9999, 9999, 9999, 9999, 3,9999, 9999, 9999, 9999, 9999},
241   {.5, 1.5, 2.5f, 7.5, 1.5f,1.5, 2.5, 7.5, 22.5f},
242   {0},
243   {99, 24, 24, 24, 99,99, 99, 99, 99},
244   {3}};
245
246 static vorbis_info_mapping0 _mapping_set_22c_Z0={
247   1, {0,0}, {0}, {0}, {0}, {0,0}, 1,{0},{1}};
248 static vorbis_info_mapping0 _mapping_set_22c_Z={
249   1, {0,0}, {0}, {1}, {1}, {1,2}, 1,{0},{1}};
250
251 static vorbis_info_mode _mode_set_22c_Z0={0,0,0,0};
252 static vorbis_info_mode _mode_set_22c_Z={1,0,0,1};
253
254 codec_setup_info info_22c_Z={
255
256   /* smallblock, largeblock */
257   {256, 2048}, 
258   /* modes,maps,times,floors,residues,books,psys */
259   2,          2,    1,     2,       2,   36,   3,
260   /* modes */
261   {&_mode_set_22c_Z0,&_mode_set_22c_Z},
262   /* maps */
263   {0,0},{&_mapping_set_22c_Z0,&_mapping_set_22c_Z},
264   /* times */
265   {0,0},{&_time_set_22c_Z},
266   /* floors */
267   {1,1},{&_floor_set_22c_Z0,&_floor_set_22c_Z},
268   /* residue */
269   {2,2},{&_residue_set_22c_Z0,&_residue_set_22c_Z},
270   /* books */
271     
272   {  
273    &_huff_book_line_128x7_class1,
274    &_huff_book_line_128x7_class2, /* 1 */
275    
276    &_huff_book_line_128x7_0sub0,  /* 2 */
277    &_huff_book_line_128x7_1sub1,  /* 3 */
278    &_huff_book_line_128x7_1sub2,
279    &_huff_book_line_128x7_1sub3,  /* 5 */
280    &_huff_book_line_128x7_2sub1,
281    &_huff_book_line_128x7_2sub2,  /* 7 */
282    &_huff_book_line_128x7_2sub3, 
283
284    &_huff_book_line_1024x31_class0,
285    &_huff_book_line_1024x31_class1, /* 10 */
286    &_huff_book_line_1024x31_class2,
287    &_huff_book_line_1024x31_class3, /* 12 */
288
289    &_huff_book_line_1024x31_0sub0,
290    &_huff_book_line_1024x31_0sub1, /* 14 */
291    &_huff_book_line_1024x31_1sub0, 
292    &_huff_book_line_1024x31_1sub1,
293    &_huff_book_line_1024x31_2sub1,  
294    &_huff_book_line_1024x31_2sub2, /* 18 */
295    &_huff_book_line_1024x31_2sub3, 
296    &_huff_book_line_1024x31_3sub1,
297    &_huff_book_line_1024x31_3sub2,
298    &_huff_book_line_1024x31_3sub3, /* 22 */
299
300    &_huff_book_res_22c_Z_128aux, 
301    &_huff_book_res_22c_Z_1024aux,
302
303    &_vq_book_res_Zc_1,
304    &_vq_book_res_Zc_2,
305    &_vq_book_res_Zc_3,
306    &_vq_book_res_Zc_4,
307    &_vq_book_res_Zc_5,
308    &_vq_book_res_Zc_6,
309    &_vq_book_res_Zc_7,
310    &_vq_book_res_Zc_8,
311    &_vq_book_res_Zc_9,
312    &_vq_book_res_Zc_9a,
313    &_vq_book_res_Zc_9b,
314
315   },
316   /* psy */
317   {&_psy_set_22c_Z0,&_psy_set_22c_ZT,&_psy_set_22c_Z},
318   &_psy_set_22c_ZG
319 };
320
321 #endif