1 /********************************************************************
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. *
8 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
9 * by the XIPHOPHORUS Company http://www.xiph.org/ *
11 ********************************************************************
13 function: predefined encoding modes
14 last mod: $Id: mode_Za.h,v 1.2 2001/08/13 01:37:14 xiphmont Exp $
16 ********************************************************************/
18 #ifndef _V_MODES_ZA_H_
19 #define _V_MODES_ZA_H_
22 #include "vorbis/codec.h"
25 #include "books/line0_class1.vqh"
26 #include "books/line0_class2.vqh"
27 #include "books/line1_class0.vqh"
28 #include "books/line1_class1.vqh"
29 #include "books/line1_class2.vqh"
30 #include "books/line1_class3.vqh"
32 #include "books/line0_0sub0.vqh"
33 #include "books/line0_1sub1.vqh"
34 #include "books/line0_1sub2.vqh"
35 #include "books/line0_1sub3.vqh"
36 #include "books/line0_2sub1.vqh"
37 #include "books/line0_2sub2.vqh"
38 #include "books/line0_2sub3.vqh"
40 #include "books/line1_0sub0.vqh"
41 #include "books/line1_0sub1.vqh"
42 #include "books/line1_1sub0.vqh"
43 #include "books/line1_1sub1.vqh"
44 #include "books/line1_2sub1.vqh"
45 #include "books/line1_2sub2.vqh"
46 #include "books/line1_2sub3.vqh"
47 #include "books/line1_3sub1.vqh"
48 #include "books/line1_3sub2.vqh"
49 #include "books/line1_3sub3.vqh"
51 #include "books/res0_128_128aux.vqh"
52 #include "books/res0_128_1024aux.vqh"
54 #include "books/res0_128_1024_1.vqh"
55 #include "books/res0_128_1024_2.vqh"
56 #include "books/res0_128_1024_3.vqh"
57 #include "books/res0_128_1024_4.vqh"
58 #include "books/res0_128_1024_5.vqh"
59 #include "books/res0_128_1024_5a.vqh"
60 #include "books/res0_128_1024_5b.vqh"
63 static vorbis_info_psy_global _psy_set_ZaG={
65 8, /* lines per eighth octave */
67 /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
68 256, {26.f,26.f,26.f,30.f}, {-90.f,-90.f,-90.f,-90.f}, -90.f,
74 static struct vp_couple_pass _psy_passZa0[]={
77 {9999, 0,0, 12.5f,12, 4.5f,0}}
81 static vp_couple_pass _psy_passZa[]={
83 {{288, 0,0, 0,0, 0,0},
84 {9999, 0,0, 12.5f,12, 4.5f,0}}
88 static vp_attenblock _vp_tonemask_consbass_Za={
91 {-30.f,-30.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*63*/
92 {-30.f,-30.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f},
93 {-30.f,-30.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*125*/
95 {-30.f,-30.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f},
96 {-30.f,-30.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f}, /*250*/
97 {-30.f,-30.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f,-110.f},
99 {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*500*/
100 {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*700*/
101 {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1000*/
102 {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1400*/
103 {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2000*/
104 {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2800*/
105 {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*4000*/
107 {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*5600*/
109 {-30.f,-30.f,-33.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*8000*/
110 {-30.f,-30.f,-33.f,-35.f,-40.f,-45.f,-50.f,-60.f,-70.f,-85.f,-100.f}, /*11500*/
111 {-24.f,-24.f,-26.f,-32.f,-32.f,-42.f,-50.f,-60.f,-70.f,-85.f,-100.f}, /*16000*/
114 static vp_attenblock _vp_tonemask_Za={
116 {{-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*63*/
117 {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*88*/
118 {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*125*/
121 {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*175*/
122 {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*250*/
123 {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*350*/
124 {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*500*/
125 {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*700*/
126 {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1000*/
127 {-30.f,-30.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1400*/
128 {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2000*/
129 {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2800*/
130 {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*4000*/
132 {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*5600*/
134 {-30.f,-30.f,-33.f,-35.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*8000*/
135 {-30.f,-30.f,-33.f,-35.f,-40.f,-45.f,-50.f,-60.f,-70.f,-85.f,-100.f}, /*11500*/
136 {-24.f,-24.f,-26.f,-32.f,-32.f,-42.f,-50.f,-60.f,-70.f,-85.f,-100.f}, /*16000*/
139 static vp_attenblock _vp_peakatt_Za={
140 {{-14.f,-20.f,-20.f,-20.f,-26.f,-22.f,-22.f,-22.f,-22.f,-22.f,-22.f},/*63*/
141 {-14.f,-20.f,-20.f,-20.f,-26.f,-22.f,-22.f,-22.f,-22.f,-22.f,-22.f},/*88*/
142 {-14.f,-20.f,-20.f,-20.f,-26.f,-22.f,-22.f,-22.f,-22.f,-22.f,-22.f},/*125*/
143 {-14.f,-20.f,-20.f,-20.f,-26.f,-22.f,-22.f,-22.f,-22.f,-22.f,-22.f},/*175*/
144 {-14.f,-20.f,-20.f,-20.f,-26.f,-22.f,-22.f,-22.f,-22.f,-22.f,-22.f},/*250*/
145 {-14.f,-20.f,-20.f,-20.f,-26.f,-22.f,-22.f,-22.f,-22.f,-22.f,-22.f},/*350*/
146 {-14.f,-20.f,-20.f,-20.f,-26.f,-22.f,-22.f,-22.f,-22.f,-22.f,-22.f},/*500*/
147 {-10.f,-10.f,-10.f,-10.f,-14.f,-14.f,-14.f,-20.f,-26.f,-22.f,-22.f},/*700*/
148 {-10.f,-10.f,-10.f,-10.f,-14.f,-14.f,-14.f,-20.f,-22.f,-22.f,-22.f},/*1000*/
149 {-10.f,-10.f,-10.f,-10.f,-14.f,-14.f,-16.f,-20.f,-22.f,-22.f,-22.f},/*1400*/
150 {-10.f,-10.f,-10.f,-10.f,-14.f,-14.f,-16.f,-20.f,-22.f,-22.f,-22.f},/*2000*/
151 {-10.f,-10.f,-10.f,-10.f,-14.f,-14.f,-16.f,-20.f,-22.f,-30.f,-30.f},/*2400*/
152 {-10.f,-10.f,-10.f,-10.f,-14.f,-14.f,-16.f,-20.f,-22.f,-30.f,-30.f},/*4000*/
153 {-10.f,-10.f,-10.f,-10.f,-10.f,-11.f,-12.f,-13.f,-22.f,-30.f,-30.f},/*5600*/
154 {-10.f,-10.f,-10.f,-10.f,-10.f,-11.f,-12.f,-13.f,-22.f,-30.f,-30.f},/*8000*/
155 {-10.f,-10.f,-10.f,-10.f,-10.f,-10.f,-10.f,-11.f,-22.f,-30.f,-30.f},/*11500*/
156 {-10.f,-10.f,-10.f,-10.f,-10.f,-10.f,-10.f,-10.f,-20.f,-30.f,-30.f},/*16000*/
159 static vorbis_info_psy _psy_set_Za0={
160 ATH_Bark_dB_lineaggressive,
166 0.f, -20.f,&_vp_tonemask_consbass_Za,
172 1,-20.f, /* suppress any noise curve over absolute dB */
173 .6f, .6f, /* low/high window */
176 /*63 125 250 500 1k 2k 4k 8k 16k*/
177 {-30,-30,-30,-30,-30,-20,-20,-10,-10,-10,-10,-10, -3, 1, 2, 3, 6},
178 {.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f},
180 95.f, /* even decade + 5 is important; saves an rint() later in a
186 static vorbis_info_psy _psy_set_Za={
187 ATH_Bark_dB_lineaggressive,
193 0.f,-20.f,&_vp_tonemask_Za,
198 1, -20.f, /* suppress any noise curve over maxspec+n */
199 .4f,.4f, /* low/high window */
202 /*63 125 250 500 1k 2k 4k 8k 16k*/
203 {-6,-6,-6,-6,-6,-6, -6, -6,-10,-10,-10,-10,-3, -1, 1, 2, 3},
204 {.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f},
206 95.f, /* even decade + 5 is important; saves an rint() later in a
211 static vorbis_info_psy _psy_set_ZaT={
212 ATH_Bark_dB_lineaggressive,
218 0.f,-20.f,&_vp_tonemask_Za,
223 1, -20.f, /* suppress any noise curve over maxspec+n */
224 .4f,.4f, /* low/high window */
227 /*63 125 250 500 1k 2k 4k 8k 16k*/
228 {-30,-30,-30,-30,-30,-20, -6,-6,-10,-10,-10,-10, -3, -1, 1, 2, 3},
229 {.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f,.9f},
231 95.f, /* even decade + 5 is important; saves an rint() later in a
236 /* with GNUisms, this could be short and readable. Oh well */
237 static vorbis_info_time0 _time_set0Za={0};
238 /*static vorbis_info_floor0 _floor_set0A={9, 44100, 64, 10,130, 2, {0,1},
240 /*static vorbis_info_floor0 _floor_set1A={30, 44100, 256, 12,150, 2, {2,3},
243 static vorbis_info_floor1 _floor_set0Zc={3,
249 {{2},{-1,3,4,5},{-1,6,7,8}},
266 static vorbis_info_floor1 _floor_set1Za={10,
267 {0,1,2,2,2,2,2, 3,3,3},
285 6,3,10, 22,18,26, 41,36,47,
286 69,61,78, 112,99,126, 185,162,211,
287 329,282,387, 672,553,825
295 static vorbis_info_residue0 _residue_set0Za={0,192,16,5,23,
315 static vorbis_info_residue0 _residue_set1Za={0,1408, 32,5,24,
335 static vorbis_info_mapping0 _mapping_set0Za={1, {0,0}, {0}, {0}, {0}, {0,0},
337 static vorbis_info_mapping0 _mapping_set1Za={1, {0,0}, {0}, {1}, {1}, {1,2},
339 static vorbis_info_mode _mode_set0Za={0,0,0,0};
340 static vorbis_info_mode _mode_set1Za={1,0,0,1};
342 /* CD quality stereo, no channel coupling */
343 codec_setup_info info_Za={
345 /* smallblock, largeblock */
347 /* modes,maps,times,floors,residues,books,psys */
348 2, 2, 1, 2, 2, 32, 3,
350 {&_mode_set0Za,&_mode_set1Za},
352 {0,0},{&_mapping_set0Za,&_mapping_set1Za},
354 {0,0},{&_time_set0Za},
356 {1,1},{&_floor_set0Za,&_floor_set1Za},
358 {2,2},{&_residue_set0Za,&_residue_set1Za},
362 &_huff_book_line0_class1,
363 &_huff_book_line0_class2, /* 1 */
365 &_huff_book_line0_0sub0, /* 2 */
366 &_huff_book_line0_1sub1, /* 3 */
367 &_huff_book_line0_1sub2,
368 &_huff_book_line0_1sub3, /* 5 */
369 &_huff_book_line0_2sub1,
370 &_huff_book_line0_2sub2, /* 7 */
371 &_huff_book_line0_2sub3,
373 &_huff_book_line1_class0,
374 &_huff_book_line1_class1, /* 10 */
375 &_huff_book_line1_class2,
376 &_huff_book_line1_class3, /* 12 */
378 &_huff_book_line1_0sub0,
379 &_huff_book_line1_0sub1, /* 14 */
380 &_huff_book_line1_1sub0,
381 &_huff_book_line1_1sub1,
382 &_huff_book_line1_2sub1,
383 &_huff_book_line1_2sub2, /* 18 */
384 &_huff_book_line1_2sub3,
385 &_huff_book_line1_3sub1,
386 &_huff_book_line1_3sub2,
387 &_huff_book_line1_3sub3, /* 22 */
389 &_huff_book_res0_128_128aux,
390 &_huff_book_res0_128_1024aux,
392 &_vq_book_res0_128_1024_1,
393 &_vq_book_res0_128_1024_2,
394 &_vq_book_res0_128_1024_3,
395 &_vq_book_res0_128_1024_4,
396 &_vq_book_res0_128_1024_5,
397 &_vq_book_res0_128_1024_5a,
398 &_vq_book_res0_128_1024_5b,
402 {&_psy_set_Za0,&_psy_set_ZaT,&_psy_set_Za},