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_A.h,v 1.5 2000/11/14 00:07:57 xiphmont Exp $
17 ********************************************************************/
23 #include "vorbis/codec.h"
26 #include "books/lsp12_0.vqh"
27 #include "books/lsp30_0.vqh"
29 #include "books/res0_128_128aux.vqh"
30 #include "books/res0_128_1024aux.vqh"
32 #include "books/res0_128_128_1.vqh"
33 #include "books/res0_128_128_2.vqh"
34 #include "books/res0_128_128_3.vqh"
35 #include "books/res0_128_128_4.vqh"
36 #include "books/res0_128_128_5.vqh"
38 #include "books/res0_128_1024_1.vqh"
39 #include "books/res0_128_1024_2.vqh"
40 #include "books/res0_128_1024_3.vqh"
41 #include "books/res0_128_1024_4.vqh"
42 #include "books/res0_128_1024_5.vqh"
43 #include "books/res0_128_1024_6.vqh"
44 #include "books/res0_128_1024_7.vqh"
45 #include "books/res0_128_1024_8.vqh"
46 #include "books/res0_128_1024_9.vqh"
48 static vorbis_info_psy _psy_set_A={
57 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
58 /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
59 /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
62 /* 0 10 20 30 40 50 60 70 80 90 100 */
63 {{-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*63*/
64 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*88*/
65 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*125*/
66 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*175*/
67 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*250*/
68 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*350*/
69 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*500*/
70 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*700*/
71 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1000*/
72 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1400*/
73 {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2000*/
74 {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2800*/
75 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*4000*/
76 {-30.,-30.,-35.,-37.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*5600*/
77 {-20.,-25.,-30.,-35.,-35.,-50.,-60.,-70.,-80.,-90.,-100.}, /*8000*/
78 {-20.,-25.,-30.,-33.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*11500*/
79 {-20.,-24.,-26.,-32.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*16000*/
83 {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*63*/
84 {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*88*/
85 {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*125*/
86 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
87 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
88 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
89 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
90 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
91 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
92 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
93 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
94 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
95 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
96 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
97 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-16.,-17.}, /*8000*/
98 { -6., -7., -9., -9., -9., -9.,-10.,-11.,-12.,-13.,-14.}, /*11500*/
99 { -6., -6., -9., -9., -9., -9., -9., -9.,-10.,-11.,-12.}, /*16000*/
103 /* 0 10 20 30 40 50 60 70 80 90 100 */
104 {{-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*63*/
105 {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*88*/
106 {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*125*/
107 {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*175*/
108 {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*250*/
109 {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/
110 {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*500*/
111 { 6., 6., 6., 2., 2., 2., 2., 2., 2., 1., 0.}, /*700*/
113 { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*1000*/
114 { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*1400*/
115 { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*2000*/
116 { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*2800*/
117 { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*4000*/
118 { 10., 10., 10., 10., 10., 10., 8., 8., 6., 6., 6.}, /*5600*/
119 { 10., 10., 10., 10., 10., 10., 8., 8., 8., 8., 8.}, /*8000*/
120 { 10., 10., 10., 10., 10., 10., 10., 10., 10., 10., 10.}, /*11500*/
121 { 10., 10., 10., 10., 10., 10., 10., 10., 10., 10., 10.}, /*16000*/
126 -0., -.006 /* attack/decay control */
130 /* with GNUisms, this could be short and readable. Oh well */
131 static vorbis_info_time0 _time_set0A={0};
132 static vorbis_info_floor0 _floor_set0A={12, 44100, 64, 12,150, 1, {0} };
133 static vorbis_info_floor0 _floor_set1A={30, 44100, 256, 12,150, 1, {1} };
134 static vorbis_info_residue0 _residue_set0A={0,128, 32,6,2,
138 {0,99999,9999,9999,9999},
139 {99,1.5,2.5,6.5,12.5},
143 static vorbis_info_residue0 _residue_set1A={0,1024, 32,10,3,
144 {0,1,1,1,1,1,1,1,1,1},
145 {9,10,11,12,13,14,15,16,17},
149 {99,1.5,1.5,2.5,2.5,4,4,6.5,12.5},
151 {99,99,99,99,99,99,99,99,99}};
153 static vorbis_info_mapping0 _mapping_set0A={1, {0,0}, {0}, {0}, {0}, {0}};
154 static vorbis_info_mapping0 _mapping_set1A={1, {0,0}, {0}, {1}, {1}, {0}};
155 static vorbis_info_mode _mode_set0A={0,0,0,0};
156 static vorbis_info_mode _mode_set1A={1,0,0,1};
158 /* CD quality stereo, no channel coupling */
159 codec_setup_info info_A={
161 /* smallblock, largeblock */
163 /* modes,maps,times,floors,residues,books,psys */
164 2, 2, 1, 2, 2, 18, 1,
166 {&_mode_set0A,&_mode_set1A},
168 {0,0},{&_mapping_set0A,&_mapping_set1A},
170 {0,0},{&_time_set0A},
172 {0,0},{&_floor_set0A,&_floor_set1A},
174 {0,0},{&_residue_set0A,&_residue_set1A},
176 {&_vq_book_lsp12_0, /* 0 */
177 &_vq_book_lsp30_0, /* 1 */
179 &_huff_book_res0_128_128aux,
180 &_huff_book_res0_128_1024aux,
182 &_vq_book_res0_128_128_1,
183 &_vq_book_res0_128_128_2,
184 &_vq_book_res0_128_128_3,
185 &_vq_book_res0_128_128_4,
186 &_vq_book_res0_128_128_5,
188 &_vq_book_res0_128_1024_1,
189 &_vq_book_res0_128_1024_2,
190 &_vq_book_res0_128_1024_3,
191 &_vq_book_res0_128_1024_4,
192 &_vq_book_res0_128_1024_5,
193 &_vq_book_res0_128_1024_6,
194 &_vq_book_res0_128_1024_7,
195 &_vq_book_res0_128_1024_8,
196 &_vq_book_res0_128_1024_9,
201 /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
205 #define PREDEF_INFO_MAX 0