1 /********************************************************************
3 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
5 * THE GNU LESSER/LIBRARY PUBLIC LICENSE, WHICH IS INCLUDED WITH *
6 * THIS SOURCE. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
8 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2000 *
9 * by Monty <monty@xiph.org> and the XIPHOPHORUS Company *
10 * http://www.xiph.org/ *
12 ********************************************************************
14 function: predefined encoding modes
15 last mod: $Id: mode_AA.h,v 1.3 2000/12/21 21:04:47 xiphmont Exp $
17 ********************************************************************/
19 #ifndef _V_MODES_AA_H_
20 #define _V_MODES_AA_H_
23 #include "vorbis/codec.h"
26 #include "books/lsp12_0.vqh"
27 #include "books/lsp30_0.vqh"
29 #include "books/res0_96_128aux.vqh"
31 #include "books/res0_96_128_1.vqh"
32 #include "books/res0_96_128_2.vqh"
33 #include "books/res0_96_128_3.vqh"
34 #include "books/res0_96_128_4.vqh"
35 #include "books/res0_96_128_5.vqh"
37 #include "books/res0_96_1024aux.vqh"
39 #include "books/res0_96_1024_1.vqh"
40 #include "books/res0_96_1024_2.vqh"
41 #include "books/res0_96_1024_3.vqh"
42 #include "books/res0_96_1024_4.vqh"
43 #include "books/res0_96_1024_5.vqh"
44 #include "books/res0_96_1024_6.vqh"
45 #include "books/res0_96_1024_7.vqh"
47 static vorbis_info_psy _psy_set_AA={
56 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
57 /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
58 /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
61 /* 0 10 20 30 40 50 60 70 80 90 100 */
62 {{-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*63*/
63 {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*88*/
64 {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*125*/
65 {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*175*/
66 {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*250*/
67 {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*350*/
68 {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*500*/
69 {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*700*/
70 {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1000*/
71 {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*1400*/
72 {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2000*/
73 {-40.f,-40.f,-40.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*2800*/
74 {-30.f,-35.f,-35.f,-40.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*4000*/
75 {-30.f,-30.f,-35.f,-37.f,-40.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*5600*/
76 {-20.f,-25.f,-30.f,-35.f,-35.f,-50.f,-60.f,-70.f,-80.f,-90.f,-100.f}, /*8000*/
77 {-20.f,-25.f,-30.f,-33.f,-35.f,-45.f,-55.f,-65.f,-75.f,-90.f,-100.f}, /*11500*/
78 {-20.f,-24.f,-26.f,-32.f,-35.f,-45.f,-55.f,-65.f,-75.f,-90.f,-100.f}, /*16000*/
82 {{-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*63*/
83 {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*88*/
84 {-14.f,-16.f,-18.f,-19.f,-20.f,-21.f,-22.f,-22.f,-22.f,-22.f,-22.f}, /*125*/
85 { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*175*/
86 { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*250*/
87 { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*350*/
88 { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*500*/
89 { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*700*/
90 { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*1000*/
91 { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*1400*/
92 { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*2000*/
93 { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*2800*/
94 { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*4000*/
95 { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-18.f,-20.f}, /*5600*/
96 { -7.f, -8.f, -9.f,-10.f,-10.f,-11.f,-12.f,-13.f,-15.f,-16.f,-17.f}, /*8000*/
97 { -6.f, -7.f, -9.f, -9.f, -9.f, -9.f,-10.f,-11.f,-12.f,-13.f,-14.f}, /*11500*/
98 { -6.f, -6.f, -9.f, -9.f, -9.f, -9.f, -9.f, -9.f,-10.f,-11.f,-12.f}, /*16000*/
102 /* 0 10 20 30 40 50 60 70 80 90 100 */
103 {{-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*63*/
104 {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*88*/
105 {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*125*/
106 {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*175*/
107 {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*250*/
108 {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*350*/
109 {-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-99.f,-199.f,-199.f,-199.f,-199.f}, /*500*/
110 { 6.f, 6.f, 6.f, 2.f, 2.f, 2.f, 2.f, 2.f, 2.f, 1.f, 0.f}, /*700*/
112 { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*1000*/
113 { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*1400*/
114 { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*2000*/
115 { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*2800*/
116 { 6.f, 6.f, 6.f, 5.f, 5.f, 5.f, 5.f, 5.f, 5.f, 4.f, 3.f}, /*4000*/
117 { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 8.f, 8.f, 6.f, 6.f, 6.f}, /*5600*/
118 { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 8.f, 8.f, 8.f, 8.f, 8.f}, /*8000*/
119 { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f}, /*11500*/
120 { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f, 10.f}, /*16000*/
125 -0.f, -.004f /* attack/decay control */
129 /* with GNUisms, this could be short and readable. Oh well */
130 static vorbis_info_time0 _time_set0AA={0};
131 static vorbis_info_floor0 _floor_set0AA={12, 44100, 64, 12,150, 1, {0} };
132 static vorbis_info_floor0 _floor_set1AA={30, 44100, 256, 12,150, 1, {1} };
133 static vorbis_info_residue0 _residue_set0AA={0,128, 32,6,2,
137 {0,99999,9999,9999,9999},
138 {99.f,1.5f,2.5f,6.5f,12.5f},
143 static vorbis_info_residue0 _residue_set1AA={0,1024, 32,8,3,
145 {9,10,11,12,13,14,15},
149 {99.f,2.f,2.f,4.f,4.f,9.5f,15.5f},
151 {99,99,99,99,99,99,99}};
153 static vorbis_info_mapping0 _mapping_set0AA={1, {0,0}, {0}, {0}, {0}, {0}};
154 static vorbis_info_mapping0 _mapping_set1AA={1, {0,0}, {0}, {1}, {1}, {0}};
155 static vorbis_info_mode _mode_set0AA={0,0,0,0};
156 static vorbis_info_mode _mode_set1AA={1,0,0,1};
158 /* CD quality stereo, no channel coupling */
159 codec_setup_info info_AA={
161 /* smallblock, largeblock */
163 /* modes,maps,times,floors,residues,books,psys */
164 2, 2, 1, 2, 2, 16, 1,
166 {&_mode_set0AA,&_mode_set1AA},
168 {0,0},{&_mapping_set0AA,&_mapping_set1AA},
170 {0,0},{&_time_set0AA},
172 {0,0},{&_floor_set0AA,&_floor_set1AA},
174 {0,0},{&_residue_set0AA,&_residue_set1AA},
176 {&_vq_book_lsp12_0, /* 0 */
177 &_vq_book_lsp30_0, /* 1 */
179 &_huff_book_res0_96_128aux,
180 &_huff_book_res0_96_1024aux,
182 &_vq_book_res0_96_128_1,
183 &_vq_book_res0_96_128_2,
184 &_vq_book_res0_96_128_3,
185 &_vq_book_res0_96_128_4,
186 &_vq_book_res0_96_128_5,
188 &_vq_book_res0_96_1024_1,
189 &_vq_book_res0_96_1024_2,
190 &_vq_book_res0_96_1024_3,
191 &_vq_book_res0_96_1024_4,
192 &_vq_book_res0_96_1024_5,
193 &_vq_book_res0_96_1024_6,
194 &_vq_book_res0_96_1024_7,
199 /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
200 256, 32.f, 6.f, -96.f
203 #define PREDEF_INFO_MAX 0