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-2007 * |
---|
9 | * by the Xiph.Org Foundation http://www.xiph.org/ * |
---|
10 | * * |
---|
11 | ******************************************************************** |
---|
12 | |
---|
13 | function: key psychoacoustic settings for 44.1/48kHz |
---|
14 | last mod: $Id: psych_44.h 13293 2007-07-24 00:09:47Z xiphmont $ |
---|
15 | |
---|
16 | ********************************************************************/ |
---|
17 | |
---|
18 | |
---|
19 | /* preecho trigger settings *****************************************/ |
---|
20 | |
---|
21 | static vorbis_info_psy_global _psy_global_44[5]={ |
---|
22 | |
---|
23 | {8, /* lines per eighth octave */ |
---|
24 | {20.f,14.f,12.f,12.f,12.f,12.f,12.f}, |
---|
25 | {-60.f,-30.f,-40.f,-40.f,-40.f,-40.f,-40.f}, 2,-75.f, |
---|
26 | -6.f, |
---|
27 | {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} |
---|
28 | }, |
---|
29 | {8, /* lines per eighth octave */ |
---|
30 | {14.f,10.f,10.f,10.f,10.f,10.f,10.f}, |
---|
31 | {-40.f,-30.f,-25.f,-25.f,-25.f,-25.f,-25.f}, 2,-80.f, |
---|
32 | -6.f, |
---|
33 | {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} |
---|
34 | }, |
---|
35 | {8, /* lines per eighth octave */ |
---|
36 | {12.f,10.f,10.f,10.f,10.f,10.f,10.f}, |
---|
37 | {-20.f,-20.f,-15.f,-15.f,-15.f,-15.f,-15.f}, 0,-80.f, |
---|
38 | -6.f, |
---|
39 | {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} |
---|
40 | }, |
---|
41 | {8, /* lines per eighth octave */ |
---|
42 | {10.f,8.f,8.f,8.f,8.f,8.f,8.f}, |
---|
43 | {-20.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-80.f, |
---|
44 | -6.f, |
---|
45 | {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} |
---|
46 | }, |
---|
47 | {8, /* lines per eighth octave */ |
---|
48 | {10.f,6.f,6.f,6.f,6.f,6.f,6.f}, |
---|
49 | {-15.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-85.f, |
---|
50 | -6.f, |
---|
51 | {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} |
---|
52 | }, |
---|
53 | }; |
---|
54 | |
---|
55 | /* noise compander lookups * low, mid, high quality ****************/ |
---|
56 | static compandblock _psy_compand_44[6]={ |
---|
57 | /* sub-mode Z short */ |
---|
58 | {{ |
---|
59 | 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ |
---|
60 | 8, 9,10,11,12,13,14, 15, /* 15dB */ |
---|
61 | 16,17,18,19,20,21,22, 23, /* 23dB */ |
---|
62 | 24,25,26,27,28,29,30, 31, /* 31dB */ |
---|
63 | 32,33,34,35,36,37,38, 39, /* 39dB */ |
---|
64 | }}, |
---|
65 | /* mode_Z nominal short */ |
---|
66 | {{ |
---|
67 | 0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */ |
---|
68 | 7, 7, 7, 7, 6, 6, 6, 7, /* 15dB */ |
---|
69 | 7, 8, 9,10,11,12,13, 14, /* 23dB */ |
---|
70 | 15,16,17,17,17,18,18, 19, /* 31dB */ |
---|
71 | 19,19,20,21,22,23,24, 25, /* 39dB */ |
---|
72 | }}, |
---|
73 | /* mode A short */ |
---|
74 | {{ |
---|
75 | 0, 1, 2, 3, 4, 5, 5, 5, /* 7dB */ |
---|
76 | 6, 6, 6, 5, 4, 4, 4, 4, /* 15dB */ |
---|
77 | 4, 4, 5, 5, 5, 6, 6, 6, /* 23dB */ |
---|
78 | 7, 7, 7, 8, 8, 8, 9, 10, /* 31dB */ |
---|
79 | 11,12,13,14,15,16,17, 18, /* 39dB */ |
---|
80 | }}, |
---|
81 | /* sub-mode Z long */ |
---|
82 | {{ |
---|
83 | 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ |
---|
84 | 8, 9,10,11,12,13,14, 15, /* 15dB */ |
---|
85 | 16,17,18,19,20,21,22, 23, /* 23dB */ |
---|
86 | 24,25,26,27,28,29,30, 31, /* 31dB */ |
---|
87 | 32,33,34,35,36,37,38, 39, /* 39dB */ |
---|
88 | }}, |
---|
89 | /* mode_Z nominal long */ |
---|
90 | {{ |
---|
91 | 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ |
---|
92 | 8, 9,10,11,12,12,13, 13, /* 15dB */ |
---|
93 | 13,14,14,14,15,15,15, 15, /* 23dB */ |
---|
94 | 16,16,17,17,17,18,18, 19, /* 31dB */ |
---|
95 | 19,19,20,21,22,23,24, 25, /* 39dB */ |
---|
96 | }}, |
---|
97 | /* mode A long */ |
---|
98 | {{ |
---|
99 | 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ |
---|
100 | 8, 8, 7, 6, 5, 4, 4, 4, /* 15dB */ |
---|
101 | 4, 4, 5, 5, 5, 6, 6, 6, /* 23dB */ |
---|
102 | 7, 7, 7, 8, 8, 8, 9, 10, /* 31dB */ |
---|
103 | 11,12,13,14,15,16,17, 18, /* 39dB */ |
---|
104 | }} |
---|
105 | }; |
---|
106 | |
---|
107 | /* tonal masking curve level adjustments *************************/ |
---|
108 | |
---|
109 | static vp_adjblock _vp_tonemask_adj_longblock[12]={ |
---|
110 | |
---|
111 | /* 63 125 250 500 1 2 4 8 16 */ |
---|
112 | |
---|
113 | {{ -3, -8,-13,-15,-10,-10,-10,-10,-10,-10,-10, 0, 0, 0, 0, 0, 0}}, /* -1 */ |
---|
114 | |
---|
115 | /* {{-15,-15,-15,-15,-10, -8, -4, -2, 0, 0, 0, 10, 0, 0, 0, 0, 0}}, 0 */ |
---|
116 | {{ -4,-10,-14,-16,-15,-14,-13,-12,-12,-12,-11, -1, -1, -1, -1, -1, 0}}, /* 0 */ |
---|
117 | |
---|
118 | /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 5, 0, 0, 0, 0, 0}}, 1 */ |
---|
119 | {{ -6,-12,-14,-16,-15,-15,-14,-13,-13,-12,-12, -2, -2, -1, -1, -1, 0}}, /* 1 */ |
---|
120 | |
---|
121 | /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 2 */ |
---|
122 | {{-12,-13,-14,-16,-16,-16,-15,-14,-13,-12,-12, -6, -3, -1, -1, -1, 0}}, /* 2 */ |
---|
123 | |
---|
124 | /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 3 */ |
---|
125 | {{-15,-15,-15,-16,-16,-16,-16,-14,-13,-13,-13,-10, -4, -2, -1, -1, 0}}, /* 3 */ |
---|
126 | |
---|
127 | /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, *//* 4 */ |
---|
128 | {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 4 */ |
---|
129 | |
---|
130 | /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 5 */ |
---|
131 | {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 5 */ |
---|
132 | |
---|
133 | /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 6 */ |
---|
134 | {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -8, -4, -2, -2, 0}}, /* 6 */ |
---|
135 | |
---|
136 | /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 7 */ |
---|
137 | {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 7 */ |
---|
138 | |
---|
139 | /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 8 */ |
---|
140 | {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 8 */ |
---|
141 | |
---|
142 | /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 9 */ |
---|
143 | {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 9 */ |
---|
144 | |
---|
145 | /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 10 */ |
---|
146 | {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 10 */ |
---|
147 | }; |
---|
148 | |
---|
149 | static vp_adjblock _vp_tonemask_adj_otherblock[12]={ |
---|
150 | /* 63 125 250 500 1 2 4 8 16 */ |
---|
151 | |
---|
152 | {{ -3, -8,-13,-15,-10,-10, -9, -9, -9, -9, -9, 1, 1, 1, 1, 1, 1}}, /* -1 */ |
---|
153 | |
---|
154 | /* {{-20,-20,-20,-20,-14,-12,-10, -8, -4, 0, 0, 10, 0, 0, 0, 0, 0}}, 0 */ |
---|
155 | {{ -4,-10,-14,-16,-14,-13,-12,-12,-11,-11,-10, 0, 0, 0, 0, 0, 0}}, /* 0 */ |
---|
156 | |
---|
157 | /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 5, 0, 0, 0, 0, 0}}, 1 */ |
---|
158 | {{ -6,-12,-14,-16,-15,-15,-14,-13,-13,-12,-12, -2, -2, -1, 0, 0, 0}}, /* 1 */ |
---|
159 | |
---|
160 | /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 2 */ |
---|
161 | {{-12,-13,-14,-16,-16,-16,-15,-14,-13,-12,-12, -5, -2, -1, 0, 0, 0}}, /* 2 */ |
---|
162 | |
---|
163 | /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 3 */ |
---|
164 | {{-15,-15,-15,-16,-16,-16,-16,-14,-13,-13,-13,-10, -4, -2, 0, 0, 0}}, /* 3 */ |
---|
165 | |
---|
166 | /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 4 */ |
---|
167 | {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 4 */ |
---|
168 | |
---|
169 | /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 5 */ |
---|
170 | {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 5 */ |
---|
171 | |
---|
172 | /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 6 */ |
---|
173 | {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -8, -4, -2, -2, 0}}, /* 6 */ |
---|
174 | |
---|
175 | /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 7 */ |
---|
176 | {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 7 */ |
---|
177 | |
---|
178 | /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 8 */ |
---|
179 | {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 8 */ |
---|
180 | |
---|
181 | /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 9 */ |
---|
182 | {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 9 */ |
---|
183 | |
---|
184 | /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 10 */ |
---|
185 | {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 10 */ |
---|
186 | }; |
---|
187 | |
---|
188 | /* noise bias (transition block) */ |
---|
189 | static noise3 _psy_noisebias_trans[12]={ |
---|
190 | /* 63 125 250 500 1k 2k 4k 8k 16k*/ |
---|
191 | /* -1 */ |
---|
192 | {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, |
---|
193 | {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, |
---|
194 | {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, |
---|
195 | /* 0 |
---|
196 | {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, |
---|
197 | {-30,-30,-30,-30,-26,-22,-20,-14, -8, -4, 0, 0, 0, 0, 2, 4, 10}, |
---|
198 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ |
---|
199 | {{{-15,-15,-15,-15,-15,-12, -6, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, |
---|
200 | {-30,-30,-30,-30,-26,-22,-20,-14, -8, -4, 0, 0, 0, 0, 2, 3, 6}, |
---|
201 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}}, |
---|
202 | /* 1 |
---|
203 | {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, |
---|
204 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 8}, |
---|
205 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/ |
---|
206 | {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, |
---|
207 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 1, 4}, |
---|
208 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}}, |
---|
209 | /* 2 |
---|
210 | {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, |
---|
211 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 6}, |
---|
212 | {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, */ |
---|
213 | {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, |
---|
214 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -2, -1, 0, 3}, |
---|
215 | {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -7, -4}}}, |
---|
216 | /* 3 |
---|
217 | {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, |
---|
218 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 6}, |
---|
219 | {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ |
---|
220 | {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, |
---|
221 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 2}, |
---|
222 | {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, |
---|
223 | /* 4 |
---|
224 | {{{-20,-20,-20,-20,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, |
---|
225 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 5}, |
---|
226 | {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ |
---|
227 | {{{-20,-20,-20,-20,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, |
---|
228 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, -1, 1}, |
---|
229 | {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, |
---|
230 | /* 5 |
---|
231 | {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, |
---|
232 | {-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -4, -4, -4, -4, -2, -1, 2}, |
---|
233 | {-34,-34,-34,-34,-30,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}}, */ |
---|
234 | {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, |
---|
235 | {-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -4, -4, -4, -4, -3, -1, 0}, |
---|
236 | {-34,-34,-34,-34,-30,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}}, |
---|
237 | /* 6 |
---|
238 | {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, |
---|
239 | {-32,-32,-32,-32,-28,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2, 1}, |
---|
240 | {-34,-34,-34,-34,-30,-26,-24,-18,-17,-15,-15,-15,-15,-13,-13,-12, -8}}},*/ |
---|
241 | {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, |
---|
242 | {-32,-32,-32,-32,-28,-24,-24,-18,-14, -8, -6, -6, -6, -6, -5, -2, 0}, |
---|
243 | {-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}}, |
---|
244 | /* 7 |
---|
245 | {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, |
---|
246 | {-32,-32,-32,-32,-28,-24,-24,-18,-14,-12,-10, -8, -8, -8, -6, -4, 0}, |
---|
247 | {-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}},*/ |
---|
248 | {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, |
---|
249 | {-32,-32,-32,-32,-28,-24,-24,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2}, |
---|
250 | {-34,-34,-34,-34,-30,-26,-26,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}}, |
---|
251 | /* 8 |
---|
252 | {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, |
---|
253 | {-36,-36,-36,-36,-30,-30,-30,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2}, |
---|
254 | {-36,-36,-36,-36,-34,-30,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},*/ |
---|
255 | {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, |
---|
256 | {-36,-36,-36,-36,-30,-30,-30,-24,-20,-16,-16,-16,-16,-14,-12,-10, -7}, |
---|
257 | {-36,-36,-36,-36,-34,-30,-28,-26,-24,-30,-30,-30,-30,-30,-30,-24,-20}}}, |
---|
258 | /* 9 |
---|
259 | {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, |
---|
260 | {-36,-36,-36,-36,-34,-32,-32,-28,-20,-16,-16,-16,-16,-14,-12,-10, -7}, |
---|
261 | {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},*/ |
---|
262 | {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, |
---|
263 | {-38,-38,-38,-38,-36,-34,-34,-30,-24,-20,-20,-20,-20,-18,-16,-12,-10}, |
---|
264 | {-40,-40,-40,-40,-40,-40,-40,-38,-35,-35,-35,-35,-35,-35,-35,-35,-30}}}, |
---|
265 | /* 10 */ |
---|
266 | {{{-30,-30,-30,-30,-30,-30,-30,-28,-20,-14,-14,-14,-14,-14,-14,-12,-10}, |
---|
267 | {-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-30,-30,-30,-30,-30,-30,-20}, |
---|
268 | {-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}}, |
---|
269 | }; |
---|
270 | |
---|
271 | /* noise bias (long block) */ |
---|
272 | static noise3 _psy_noisebias_long[12]={ |
---|
273 | /*63 125 250 500 1k 2k 4k 8k 16k*/ |
---|
274 | /* -1 */ |
---|
275 | {{{-10,-10,-10,-10,-10, -4, 0, 0, 0, 6, 6, 6, 6, 10, 10, 12, 20}, |
---|
276 | {-20,-20,-20,-20,-20,-20,-10, -2, 0, 0, 0, 0, 0, 2, 4, 6, 15}, |
---|
277 | {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}}, |
---|
278 | |
---|
279 | /* 0 */ |
---|
280 | /* {{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10}, |
---|
281 | {-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 0, 2, 4, 10}, |
---|
282 | {-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ |
---|
283 | {{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10}, |
---|
284 | {-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 0, 2, 3, 6}, |
---|
285 | {-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}}, |
---|
286 | /* 1 */ |
---|
287 | /* {{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, |
---|
288 | {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 8}, |
---|
289 | {-20,-20,-20,-20,-20,-20,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/ |
---|
290 | {{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, |
---|
291 | {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 1, 4}, |
---|
292 | {-20,-20,-20,-20,-20,-20,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}}, |
---|
293 | /* 2 */ |
---|
294 | /* {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, |
---|
295 | {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 6}, |
---|
296 | {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ |
---|
297 | {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, |
---|
298 | {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -2, -1, 0, 3}, |
---|
299 | {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, |
---|
300 | /* 3 */ |
---|
301 | /* {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, |
---|
302 | {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 6}, |
---|
303 | {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ |
---|
304 | {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, |
---|
305 | {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 2}, |
---|
306 | {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -5}}}, |
---|
307 | /* 4 */ |
---|
308 | /* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, |
---|
309 | {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 5}, |
---|
310 | {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ |
---|
311 | {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, |
---|
312 | {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, -1, 1}, |
---|
313 | {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -7}}}, |
---|
314 | /* 5 */ |
---|
315 | /* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, |
---|
316 | {-22,-22,-22,-22,-22,-22,-22,-16,-12, -6, -4, -4, -4, -4, -2, -1, 2}, |
---|
317 | {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}},*/ |
---|
318 | {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, |
---|
319 | {-22,-22,-22,-22,-22,-22,-22,-16,-12, -6, -4, -4, -4, -4, -3, -1, 0}, |
---|
320 | {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -8}}}, |
---|
321 | /* 6 */ |
---|
322 | /* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, |
---|
323 | {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2, 1}, |
---|
324 | {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12, -8}}},*/ |
---|
325 | {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, |
---|
326 | {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -5, -2, 0}, |
---|
327 | {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12,-10}}}, |
---|
328 | /* 7 */ |
---|
329 | {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, |
---|
330 | {-24,-24,-24,-24,-24,-24,-24,-18,-14,-10, -8, -8, -8, -8, -6, -4, 0}, |
---|
331 | {-26,-26,-26,-26,-26,-26,-26,-22,-20,-19,-19,-19,-19,-18,-17,-16,-12}}}, |
---|
332 | /* 8 */ |
---|
333 | {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 0, 0, 0, 0, 1, 2, 3, 7}, |
---|
334 | {-26,-26,-26,-26,-26,-26,-26,-20,-16,-12,-10,-10,-10,-10, -8, -6, -2}, |
---|
335 | {-28,-28,-28,-28,-28,-28,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}}, |
---|
336 | /* 9 */ |
---|
337 | {{{-22,-22,-22,-22,-22,-22,-22,-18,-14, -8, -4, -4, -4, -4, -4, -2, 2}, |
---|
338 | {-26,-26,-26,-26,-26,-26,-26,-22,-18,-16,-16,-16,-16,-14,-12,-10, -7}, |
---|
339 | {-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, |
---|
340 | /* 10 */ |
---|
341 | {{{-24,-24,-24,-24,-24,-24,-24,-24,-24,-18,-14,-14,-14,-14,-14,-12,-10}, |
---|
342 | {-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-20}, |
---|
343 | {-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}}, |
---|
344 | }; |
---|
345 | |
---|
346 | /* noise bias (impulse block) */ |
---|
347 | static noise3 _psy_noisebias_impulse[12]={ |
---|
348 | /* 63 125 250 500 1k 2k 4k 8k 16k*/ |
---|
349 | /* -1 */ |
---|
350 | {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, |
---|
351 | {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, |
---|
352 | {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, |
---|
353 | |
---|
354 | /* 0 */ |
---|
355 | /* {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20}, |
---|
356 | {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 4, 10}, |
---|
357 | {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ |
---|
358 | {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20}, |
---|
359 | {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 3, 6}, |
---|
360 | {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, |
---|
361 | /* 1 */ |
---|
362 | {{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20}, |
---|
363 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -4, -4, -2, -2, -2, -2, 2}, |
---|
364 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8,-10,-10, -8, -8, -8, -6, -4}}}, |
---|
365 | /* 2 */ |
---|
366 | {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, |
---|
367 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, |
---|
368 | {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, |
---|
369 | /* 3 */ |
---|
370 | {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 6, 8, 8, 14}, |
---|
371 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, |
---|
372 | {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, |
---|
373 | /* 4 */ |
---|
374 | {{{-16,-16,-16,-16,-16,-12,-10, -6, -2, 0, 0, 0, 0, 4, 6, 6, 12}, |
---|
375 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, |
---|
376 | {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, |
---|
377 | /* 5 */ |
---|
378 | {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, |
---|
379 | {-32,-32,-32,-32,-28,-24,-22,-16,-10, -6, -8, -8, -6, -6, -6, -4, -2}, |
---|
380 | {-34,-34,-34,-34,-30,-26,-24,-18,-14,-12,-12,-12,-12,-12,-10, -9, -5}}}, |
---|
381 | /* 6 |
---|
382 | {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, |
---|
383 | {-34,-34,-34,-34,-30,-30,-24,-20,-12,-12,-14,-14,-10, -9, -8, -6, -4}, |
---|
384 | {-34,-34,-34,-34,-34,-30,-26,-20,-16,-15,-15,-15,-15,-15,-13,-12, -8}}},*/ |
---|
385 | {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, |
---|
386 | {-34,-34,-34,-34,-30,-30,-30,-24,-16,-16,-16,-16,-16,-16,-14,-14,-12}, |
---|
387 | {-36,-36,-36,-36,-36,-34,-28,-24,-20,-20,-20,-20,-20,-20,-20,-18,-16}}}, |
---|
388 | /* 7 */ |
---|
389 | /* {{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11}, |
---|
390 | {-34,-34,-34,-34,-30,-30,-24,-20,-14,-14,-16,-16,-14,-12,-10,-10,-10}, |
---|
391 | {-34,-34,-34,-34,-32,-32,-30,-24,-20,-19,-19,-19,-19,-19,-17,-16,-12}}},*/ |
---|
392 | {{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11}, |
---|
393 | {-34,-34,-34,-34,-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-24,-22}, |
---|
394 | {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}}, |
---|
395 | /* 8 */ |
---|
396 | /* {{{-24,-24,-24,-24,-24,-22,-14,-10, -6, -1, -1, -1, -1, 3, 3, 5, 10}, |
---|
397 | {-34,-34,-34,-34,-30,-30,-30,-24,-20,-20,-20,-20,-20,-18,-16,-16,-14}, |
---|
398 | {-36,-36,-36,-36,-36,-34,-28,-24,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},*/ |
---|
399 | {{{-24,-24,-24,-24,-24,-22,-14,-10, -6, -1, -1, -1, -1, 3, 3, 5, 10}, |
---|
400 | {-34,-34,-34,-34,-34,-32,-32,-30,-26,-26,-26,-26,-26,-26,-26,-26,-24}, |
---|
401 | {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}}, |
---|
402 | /* 9 */ |
---|
403 | /* {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, |
---|
404 | {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-22,-20,-20,-18}, |
---|
405 | {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},*/ |
---|
406 | {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, |
---|
407 | {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26}, |
---|
408 | {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, |
---|
409 | /* 10 */ |
---|
410 | {{{-30,-30,-30,-30,-30,-26,-24,-24,-24,-20,-16,-16,-16,-16,-16,-14,-12}, |
---|
411 | {-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-30,-30,-30,-30,-30,-30,-26}, |
---|
412 | {-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}}, |
---|
413 | }; |
---|
414 | |
---|
415 | /* noise bias (padding block) */ |
---|
416 | static noise3 _psy_noisebias_padding[12]={ |
---|
417 | /* 63 125 250 500 1k 2k 4k 8k 16k*/ |
---|
418 | |
---|
419 | /* -1 */ |
---|
420 | {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, |
---|
421 | {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, |
---|
422 | {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, |
---|
423 | |
---|
424 | /* 0 */ |
---|
425 | {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, |
---|
426 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, 2, 3, 6, 6, 8, 10}, |
---|
427 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -4, -4, -4, -4, -2, 0, 2}}}, |
---|
428 | /* 1 */ |
---|
429 | {{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20}, |
---|
430 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8}, |
---|
431 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -6, -4, -2, 0}}}, |
---|
432 | /* 2 */ |
---|
433 | /* {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, |
---|
434 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8}, |
---|
435 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}},*/ |
---|
436 | {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, |
---|
437 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, 0, 0, 2, 6}, |
---|
438 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, |
---|
439 | /* 3 */ |
---|
440 | {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 6, 8, 8, 14}, |
---|
441 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, 0, 0, 2, 6}, |
---|
442 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, |
---|
443 | /* 4 */ |
---|
444 | {{{-16,-16,-16,-16,-16,-12,-10, -6, -2, 0, 0, 0, 0, 4, 6, 6, 12}, |
---|
445 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, -1, 0, 2, 6}, |
---|
446 | {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, |
---|
447 | /* 5 */ |
---|
448 | {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12}, |
---|
449 | {-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -3, -3, -3, -3, -2, 0, 4}, |
---|
450 | {-34,-34,-34,-34,-30,-26,-24,-18,-14,-10,-10,-10,-10,-10, -8, -5, -3}}}, |
---|
451 | /* 6 */ |
---|
452 | {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12}, |
---|
453 | {-34,-34,-34,-34,-30,-30,-24,-20,-14, -8, -4, -4, -4, -4, -3, -1, 4}, |
---|
454 | {-34,-34,-34,-34,-34,-30,-26,-20,-16,-13,-13,-13,-13,-13,-11, -8, -6}}}, |
---|
455 | /* 7 */ |
---|
456 | {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12}, |
---|
457 | {-34,-34,-34,-34,-30,-30,-30,-24,-16,-10, -8, -6, -6, -6, -5, -3, 1}, |
---|
458 | {-34,-34,-34,-34,-32,-32,-28,-22,-18,-16,-16,-16,-16,-16,-14,-12,-10}}}, |
---|
459 | /* 8 */ |
---|
460 | {{{-22,-22,-22,-22,-22,-20,-14,-10, -4, 0, 0, 0, 0, 3, 5, 5, 11}, |
---|
461 | {-34,-34,-34,-34,-30,-30,-30,-24,-16,-12,-10, -8, -8, -8, -7, -5, -2}, |
---|
462 | {-36,-36,-36,-36,-36,-34,-28,-22,-20,-20,-20,-20,-20,-20,-20,-16,-14}}}, |
---|
463 | /* 9 */ |
---|
464 | {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -2, -2, -2, -2, 0, 2, 6}, |
---|
465 | {-36,-36,-36,-36,-34,-32,-32,-24,-16,-12,-12,-12,-12,-12,-10, -8, -5}, |
---|
466 | {-40,-40,-40,-40,-40,-40,-40,-32,-26,-24,-24,-24,-24,-24,-24,-20,-18}}}, |
---|
467 | /* 10 */ |
---|
468 | {{{-30,-30,-30,-30,-30,-26,-24,-24,-24,-20,-12,-12,-12,-12,-12,-10, -8}, |
---|
469 | {-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-25,-25,-25,-25,-25,-25,-15}, |
---|
470 | {-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}}, |
---|
471 | }; |
---|
472 | |
---|
473 | |
---|
474 | static noiseguard _psy_noiseguards_44[4]={ |
---|
475 | {3,3,15}, |
---|
476 | {3,3,15}, |
---|
477 | {10,10,100}, |
---|
478 | {10,10,100}, |
---|
479 | }; |
---|
480 | |
---|
481 | static int _psy_tone_suppress[12]={ |
---|
482 | -20,-20,-20,-20,-20,-24,-30,-40,-40,-45,-45,-45, |
---|
483 | }; |
---|
484 | static int _psy_tone_0dB[12]={ |
---|
485 | 90,90,95,95,95,95,105,105,105,105,105,105, |
---|
486 | }; |
---|
487 | static int _psy_noise_suppress[12]={ |
---|
488 | -20,-20,-24,-24,-24,-24,-30,-40,-40,-45,-45,-45, |
---|
489 | }; |
---|
490 | |
---|
491 | static vorbis_info_psy _psy_info_template={ |
---|
492 | /* blockflag */ |
---|
493 | -1, |
---|
494 | /* ath_adjatt, ath_maxatt */ |
---|
495 | -140.,-140., |
---|
496 | /* tonemask att boost/decay,suppr,curves */ |
---|
497 | {0.f,0.f,0.f}, 0.,0., -40.f, {0.}, |
---|
498 | |
---|
499 | /*noisemaskp,supp, low/high window, low/hi guard, minimum */ |
---|
500 | 1, -0.f, .5f, .5f, 0,0,0, |
---|
501 | /* noiseoffset*3, noisecompand, max_curve_dB */ |
---|
502 | {{-1},{-1},{-1}},{-1},105.f, |
---|
503 | /* noise normalization - channel_p, point_p, start, partition, thresh. */ |
---|
504 | 0,0,-1,-1,0., |
---|
505 | }; |
---|
506 | |
---|
507 | /* ath ****************/ |
---|
508 | |
---|
509 | static int _psy_ath_floater[12]={ |
---|
510 | -100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120, |
---|
511 | }; |
---|
512 | static int _psy_ath_abs[12]={ |
---|
513 | -130,-130,-130,-130,-140,-140,-140,-140,-140,-140,-140,-150, |
---|
514 | }; |
---|
515 | |
---|
516 | /* stereo setup. These don't map directly to quality level, there's |
---|
517 | an additional indirection as several of the below may be used in a |
---|
518 | single bitmanaged stream |
---|
519 | |
---|
520 | ****************/ |
---|
521 | |
---|
522 | /* various stereo possibilities */ |
---|
523 | |
---|
524 | /* stereo mode by base quality level */ |
---|
525 | static adj_stereo _psy_stereo_modes_44[12]={ |
---|
526 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -1 */ |
---|
527 | {{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, |
---|
528 | { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 4, 3}, |
---|
529 | { 1, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 8, 8}, |
---|
530 | { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}}, |
---|
531 | |
---|
532 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 */ |
---|
533 | /*{{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, |
---|
534 | { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 4, 3}, |
---|
535 | { 1, 2, 3, 4, 5, 5, 6, 6, 6, 6, 6, 7, 8, 8, 8}, |
---|
536 | { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}},*/ |
---|
537 | {{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0, 0, 0, 0, 0}, |
---|
538 | { 8, 8, 8, 8, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3}, |
---|
539 | { 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8}, |
---|
540 | { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}}, |
---|
541 | |
---|
542 | |
---|
543 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 */ |
---|
544 | {{ 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, 0, 0, 0, 0}, |
---|
545 | { 8, 8, 8, 8, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3}, |
---|
546 | { 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8}, |
---|
547 | { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, |
---|
548 | |
---|
549 | |
---|
550 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 */ |
---|
551 | /* {{ 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 0, 0, 0, 0, 0}, |
---|
552 | { 8, 8, 8, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1}, |
---|
553 | { 3, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8}, |
---|
554 | { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, */ |
---|
555 | {{ 3, 3, 3, 3, 3, 3, 3, 2, 1, 1, 0, 0, 0, 0, 0}, |
---|
556 | { 8, 8, 6, 6, 5, 5, 4, 4, 4, 4, 4, 4, 3, 2, 1}, |
---|
557 | { 3, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8}, |
---|
558 | { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, |
---|
559 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 */ |
---|
560 | {{ 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, |
---|
561 | { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1}, |
---|
562 | { 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 10, 10, 10, 10, 10}, |
---|
563 | { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, |
---|
564 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 */ |
---|
565 | {{ 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
566 | { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 2, 1, 0}, |
---|
567 | { 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10}, |
---|
568 | { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, |
---|
569 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 */ |
---|
570 | /* {{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
571 | { 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0}, |
---|
572 | { 6, 6, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10}, |
---|
573 | { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ |
---|
574 | {{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
575 | { 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0}, |
---|
576 | { 6, 7, 8, 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12}, |
---|
577 | { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, |
---|
578 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 */ |
---|
579 | /* {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
580 | { 3, 3, 3, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
581 | { 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, |
---|
582 | { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, */ |
---|
583 | {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
584 | { 3, 3, 3, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
585 | { 8, 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, |
---|
586 | { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, |
---|
587 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 */ |
---|
588 | /* {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
589 | { 3, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
590 | { 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, |
---|
591 | { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ |
---|
592 | {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
593 | { 3, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
594 | { 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, |
---|
595 | { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, |
---|
596 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 */ |
---|
597 | /* {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
598 | { 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
599 | { 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, |
---|
600 | { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ |
---|
601 | {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
602 | { 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
603 | { 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, |
---|
604 | { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, |
---|
605 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 */ |
---|
606 | {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
607 | { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
608 | { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, |
---|
609 | { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, |
---|
610 | /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 */ |
---|
611 | {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
612 | { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, |
---|
613 | { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, |
---|
614 | { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, |
---|
615 | }; |
---|
616 | |
---|
617 | /* tone master attenuation by base quality mode and bitrate tweak */ |
---|
618 | static att3 _psy_tone_masteratt_44[12]={ |
---|
619 | {{ 35, 21, 9}, 0, 0}, /* -1 */ |
---|
620 | {{ 30, 20, 8}, -2, 1.25}, /* 0 */ |
---|
621 | /* {{ 25, 14, 4}, 0, 0}, *//* 1 */ |
---|
622 | {{ 25, 12, 2}, 0, 0}, /* 1 */ |
---|
623 | /* {{ 20, 10, -2}, 0, 0}, *//* 2 */ |
---|
624 | {{ 20, 9, -3}, 0, 0}, /* 2 */ |
---|
625 | {{ 20, 9, -4}, 0, 0}, /* 3 */ |
---|
626 | {{ 20, 9, -4}, 0, 0}, /* 4 */ |
---|
627 | {{ 20, 6, -6}, 0, 0}, /* 5 */ |
---|
628 | {{ 20, 3, -10}, 0, 0}, /* 6 */ |
---|
629 | {{ 18, 1, -14}, 0, 0}, /* 7 */ |
---|
630 | {{ 18, 0, -16}, 0, 0}, /* 8 */ |
---|
631 | {{ 18, -2, -16}, 0, 0}, /* 9 */ |
---|
632 | {{ 12, -2, -20}, 0, 0}, /* 10 */ |
---|
633 | }; |
---|
634 | |
---|
635 | /* lowpass by mode **************/ |
---|
636 | static double _psy_lowpass_44[12]={ |
---|
637 | /* 15.1,15.8,16.5,17.9,20.5,48.,999.,999.,999.,999.,999. */ |
---|
638 | 13.9,15.1,15.8,16.5,17.2,18.9,20.1,48.,999.,999.,999.,999. |
---|
639 | }; |
---|
640 | |
---|
641 | /* noise normalization **********/ |
---|
642 | |
---|
643 | static int _noise_start_short_44[11]={ |
---|
644 | /* 16,16,16,16,32,32,9999,9999,9999,9999 */ |
---|
645 | 32,16,16,16,32,9999,9999,9999,9999,9999,9999 |
---|
646 | }; |
---|
647 | static int _noise_start_long_44[11]={ |
---|
648 | /* 128,128,128,256,512,512,9999,9999,9999,9999 */ |
---|
649 | 256,128,128,256,512,9999,9999,9999,9999,9999,9999 |
---|
650 | }; |
---|
651 | |
---|
652 | static int _noise_part_short_44[11]={ |
---|
653 | 8,8,8,8,8,8,8,8,8,8,8 |
---|
654 | }; |
---|
655 | static int _noise_part_long_44[11]={ |
---|
656 | 32,32,32,32,32,32,32,32,32,32,32 |
---|
657 | }; |
---|
658 | |
---|
659 | static double _noise_thresh_44[11]={ |
---|
660 | /* .2,.2,.3,.4,.5,.5,9999.,9999.,9999.,9999., */ |
---|
661 | .2,.2,.2,.4,.6,9999.,9999.,9999.,9999.,9999.,9999., |
---|
662 | }; |
---|
663 | |
---|
664 | static double _noise_thresh_5only[2]={ |
---|
665 | .5,.5, |
---|
666 | }; |
---|