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_C.h,v 1.4 2000/11/08 13:16:33 xiphmont Exp $
17 ********************************************************************/
23 #include "vorbis/codec.h"
26 #include "books/lsp12_0.vqh"
27 #include "books/lsp30_0.vqh"
29 #include "books/res0_192_128aux.vqh"
30 #include "books/res0_192_1024aux.vqh"
32 #include "books/res0_192_128_1.vqh"
33 #include "books/res0_192_128_2.vqh"
34 #include "books/res0_192_128_3.vqh"
35 #include "books/res0_192_128_4.vqh"
36 #include "books/res0_192_128_5.vqh"
38 #include "books/res0_192_1024_1.vqh"
39 #include "books/res0_192_1024_2.vqh"
40 #include "books/res0_192_1024_3.vqh"
41 #include "books/res0_192_1024_4.vqh"
42 #include "books/res0_192_1024_5.vqh"
44 static vorbis_info_psy _psy_set_C={
53 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
54 /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
55 /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
58 /* 0 10 20 30 40 50 60 70 80 90 100 */
59 {{-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*63*/
60 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*88*/
61 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*125*/
62 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*175*/
63 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*250*/
64 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*350*/
65 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*500*/
66 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*700*/
67 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1000*/
68 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1400*/
69 {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2000*/
70 {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2800*/
71 {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*4000*/
72 {-30.,-30.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*5600*/
73 {-30.,-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*8000*/
74 {-30.,-30.,-35.,-33.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*11500*/
75 {-30.,-28.,-30.,-32.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*16000*/
79 {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*63*/
80 {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*88*/
81 {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*125*/
82 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
83 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
84 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
85 { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
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.,-16.,-17.}, /*8000*/
94 { -6., -7., -9., -9., -9., -9.,-10.,-11.,-12.,-13.,-14.}, /*11500*/
95 { -6., -6., -9., -9., -9., -9., -9., -9.,-10.,-11.,-12.}, /*16000*/
99 /* 0 10 20 30 40 50 60 70 80 90 100 */
100 {{-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*63*/
101 {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*88*/
102 {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*125*/
103 {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*175*/
104 {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*250*/
105 {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/
106 {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*500*/
107 {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*700*/
108 {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*1000*/
109 {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*1400*/
111 { 0., -4., -4., -4., -6., -6., -6., -6., -6., -6., -6.}, /*2000*/
112 { 0., -3., -4., -4., -4., -5., -6., -6., -6., -6., -6.}, /*2800*/
113 { 0., -2., -2., -2., -2., -2., -2., -2., -4., -4., -4.}, /*4000*/
114 { 0., -0., -0., -0., -0., -2., -2., -2., -2., -2., -2.}, /*5600*/
115 { 0., 0., 0., 0., 0., 0., 0., 0., 0., -2., -4.}, /*8000*/
116 { 2., 2., 2., 2., 2., 2., 0., 0., 0., 0., 0.}, /*11500*/
117 { 2., 2., 2., 2., 2., 4., 4., 4., 4., 4., 4.}, /*16000*/
122 -6., -.006 /* attack/decay control */
125 /* with GNUisms, this could be short and readable. Oh well */
126 static vorbis_info_time0 _time_set0C={0};
127 static vorbis_info_floor0 _floor_set0C={12, 44100, 64, 12,150, 1, {0} };
128 static vorbis_info_floor0 _floor_set1C={30, 44100, 256, 12,150, 1, {1} };
129 static vorbis_info_residue0 _residue_set0C={0,128, 32,6,2,
133 {0,99999,9999,9999,9999},
134 {99,1.5,2.5,6.5,12.5},
138 static vorbis_info_residue0 _residue_set1C={0,1024, 32,6,3,
142 {0,99999,9999,9999,9999},
143 {99,1.5,2.5,6.5,12.5},
147 static vorbis_info_mapping0 _mapping_set0C={1, {0,0}, {0}, {0}, {0}, {0}};
148 static vorbis_info_mapping0 _mapping_set1C={1, {0,0}, {0}, {1}, {1}, {0}};
149 static vorbis_info_mode _mode_set0C={0,0,0,0};
150 static vorbis_info_mode _mode_set1C={1,0,0,1};
152 /* CD quality stereo, no channel coupling */
153 codec_setup_info info_C={
155 /* smallblock, largeblock */
157 /* modes,maps,times,floors,residues,books,psys */
158 2, 2, 1, 2, 2, 14, 1,
160 {&_mode_set0C,&_mode_set1C},
162 {0,0},{&_mapping_set0C,&_mapping_set1C},
164 {0,0},{&_time_set0C},
166 {0,0},{&_floor_set0C,&_floor_set1C},
168 {0,0},{&_residue_set0C,&_residue_set1C},
170 {&_vq_book_lsp12_0, /* 0 */
171 &_vq_book_lsp30_0, /* 1 */
173 &_huff_book_res0_192_128aux,
174 &_huff_book_res0_192_1024aux,
176 &_vq_book_res0_192_128_1,
177 &_vq_book_res0_192_128_2,
178 &_vq_book_res0_192_128_3,
179 &_vq_book_res0_192_128_4,
180 &_vq_book_res0_192_128_5,
182 &_vq_book_res0_192_1024_1,
183 &_vq_book_res0_192_1024_2,
184 &_vq_book_res0_192_1024_3,
185 &_vq_book_res0_192_1024_4,
186 &_vq_book_res0_192_1024_5,
191 /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
195 #define PREDEF_INFO_MAX 0