add a thp-based huge page alloc fallback
[pcsx_rearmed.git] / plugins / dfsound / gauss_i.h
CommitLineData
ef79bbde
P
1/***************************************************************************\r
2 gauss_i.h - description\r
3 -----------------------\r
4 begin : Sun Feb 08 2003\r
5 copyright : (C) 2003 by Chris Moeller, eh, whatever\r
6 email : chris@kode54.tk\r
7 ***************************************************************************/\r
63646208 8 \r
ef79bbde
P
9/***************************************************************************\r
10 * *\r
11 * This program is free software; you can redistribute it and/or modify *\r
12 * it under the terms of the GNU General Public License as published by *\r
13 * the Free Software Foundation; either version 2 of the License, or *\r
14 * (at your option) any later version. See also the license.txt file for *\r
15 * additional informations. *\r
16 * *\r
17 ***************************************************************************/\r
18 \r
63646208
S
19//*************************************************************************//\r
20// History of changes:\r
21//\r
22// 2003/02/08 - kode54\r
23// - generated by interleaving table from gauss.h from the libopenspc\r
24// project; a gaussian bell curve table logged from the SPC-700,\r
25// though Neill says he logged the same curve from a PSX SPU. Also\r
26// says that interleaving the coefficients together runs faster. Meh.\r
27//\r
28//*************************************************************************//\r
29\r
ef79bbde
P
30#ifndef GAUSS_H\r
31#define GAUSS_H\r
32\r
63646208
S
33\r
34/*\r
35128 * 4 table\r
36- 0 = past #3\r
37- 1 = past #2\r
38- 2 = past #1\r
39- 3 = past #0\r
40\r
41\r
42offset 0\r
43for(0) + for(256) + rev(256) + rev(0)\r
44*/\r
45\r
46\r
47// NOTE: Dr. Hell\r
48// - Excel NORMDIST($A6,2,0.567,FALSE) [0-4] = 98%\r
49\r
50\r
51// Mednafen's table (PSX) 99-100%\r
52const int gauss[]={\r
53 0x12c7, 0x59b3, 0x1307, 0xffffffff, \r
54 0x1288, 0x59b2, 0x1347, 0xffffffff, \r
55 0x1249, 0x59b0, 0x1388, 0xffffffff, \r
56 0x120b, 0x59ad, 0x13c9, 0xffffffff, \r
57 0x11cd, 0x59a9, 0x140b, 0xffffffff, \r
58 0x118f, 0x59a4, 0x144d, 0xffffffff, \r
59 0x1153, 0x599e, 0x1490, 0xffffffff, \r
60 0x1116, 0x5997, 0x14d4, 0xffffffff, \r
61 0x10db, 0x598f, 0x1517, 0xffffffff, \r
62 0x109f, 0x5986, 0x155c, 0xffffffff, \r
63 0x1065, 0x597c, 0x15a0, 0xffffffff, \r
64 0x102a, 0x5971, 0x15e6, 0xffffffff, \r
65 0x0ff1, 0x5965, 0x162c, 0xffffffff, \r
66 0x0fb7, 0x5958, 0x1672, 0xffffffff, \r
67 0x0f7f, 0x5949, 0x16b9, 0xffffffff, \r
68 0x0f46, 0x593a, 0x1700, 0xffffffff, \r
69 0x0f0f, 0x592a, 0x1747, 0x0000, \r
70 0x0ed7, 0x5919, 0x1790, 0x0000, \r
71 0x0ea1, 0x5907, 0x17d8, 0x0000, \r
72 0x0e6b, 0x58f4, 0x1821, 0x0000, \r
73 0x0e35, 0x58e0, 0x186b, 0x0000, \r
74 0x0e00, 0x58cb, 0x18b5, 0x0000, \r
75 0x0dcb, 0x58b5, 0x1900, 0x0000, \r
76 0x0d97, 0x589e, 0x194b, 0x0001, \r
77 0x0d63, 0x5886, 0x1996, 0x0001, \r
78 0x0d30, 0x586d, 0x19e2, 0x0001, \r
79 0x0cfd, 0x5853, 0x1a2e, 0x0001, \r
80 0x0ccb, 0x5838, 0x1a7b, 0x0002, \r
81 0x0c99, 0x581c, 0x1ac8, 0x0002, \r
82 0x0c68, 0x57ff, 0x1b16, 0x0002, \r
83 0x0c38, 0x57e2, 0x1b64, 0x0003, \r
84 0x0c07, 0x57c3, 0x1bb3, 0x0003, \r
85 0x0bd8, 0x57a3, 0x1c02, 0x0003, \r
86 0x0ba9, 0x5782, 0x1c51, 0x0004, \r
87 0x0b7a, 0x5761, 0x1ca1, 0x0004, \r
88 0x0b4c, 0x573e, 0x1cf1, 0x0005, \r
89 0x0b1e, 0x571b, 0x1d42, 0x0005, \r
90 0x0af1, 0x56f6, 0x1d93, 0x0006, \r
91 0x0ac4, 0x56d1, 0x1de5, 0x0007, \r
92 0x0a98, 0x56ab, 0x1e37, 0x0007, \r
93 0x0a6c, 0x5684, 0x1e89, 0x0008, \r
94 0x0a40, 0x565b, 0x1edc, 0x0009, \r
95 0x0a16, 0x5632, 0x1f2f, 0x0009, \r
96 0x09eb, 0x5609, 0x1f82, 0x000a, \r
97 0x09c1, 0x55de, 0x1fd6, 0x000b, \r
98 0x0998, 0x55b2, 0x202a, 0x000c, \r
99 0x096f, 0x5585, 0x207f, 0x000d, \r
100 0x0946, 0x5558, 0x20d4, 0x000e, \r
101 0x091e, 0x5529, 0x2129, 0x000f, \r
102 0x08f7, 0x54fa, 0x217f, 0x0010, \r
103 0x08d0, 0x54ca, 0x21d5, 0x0011, \r
104 0x08a9, 0x5499, 0x222c, 0x0012, \r
105 0x0883, 0x5467, 0x2282, 0x0013, \r
106 0x085d, 0x5434, 0x22da, 0x0015, \r
107 0x0838, 0x5401, 0x2331, 0x0016, \r
108 0x0813, 0x53cc, 0x2389, 0x0018, \r
109 0x07ef, 0x5397, 0x23e1, 0x0019, \r
110 0x07cb, 0x5361, 0x2439, 0x001b, \r
111 0x07a7, 0x532a, 0x2492, 0x001c, \r
112 0x0784, 0x52f3, 0x24eb, 0x001e, \r
113 0x0762, 0x52ba, 0x2545, 0x0020, \r
114 0x0740, 0x5281, 0x259e, 0x0021, \r
115 0x071e, 0x5247, 0x25f8, 0x0023, \r
116 0x06fd, 0x520c, 0x2653, 0x0025, \r
117 0x06dc, 0x51d0, 0x26ad, 0x0027, \r
118 0x06bb, 0x5194, 0x2708, 0x0029, \r
119 0x069b, 0x5156, 0x2763, 0x002c, \r
120 0x067c, 0x5118, 0x27be, 0x002e, \r
121 0x065c, 0x50da, 0x281a, 0x0030, \r
122 0x063e, 0x509a, 0x2876, 0x0033, \r
123 0x061f, 0x505a, 0x28d2, 0x0035, \r
124 0x0601, 0x5019, 0x292e, 0x0038, \r
125 0x05e4, 0x4fd7, 0x298b, 0x003a, \r
126 0x05c7, 0x4f95, 0x29e7, 0x003d, \r
127 0x05aa, 0x4f52, 0x2a44, 0x0040, \r
128 0x058e, 0x4f0e, 0x2aa1, 0x0043, \r
129 0x0572, 0x4ec9, 0x2aff, 0x0046, \r
130 0x0556, 0x4e84, 0x2b5c, 0x0049, \r
131 0x053b, 0x4e3e, 0x2bba, 0x004d, \r
132 0x0520, 0x4df7, 0x2c18, 0x0050, \r
133 0x0506, 0x4db0, 0x2c76, 0x0054, \r
134 0x04ec, 0x4d68, 0x2cd4, 0x0057, \r
135 0x04d2, 0x4d20, 0x2d33, 0x005b, \r
136 0x04b9, 0x4cd7, 0x2d91, 0x005f, \r
137 0x04a0, 0x4c8d, 0x2df0, 0x0063, \r
138 0x0488, 0x4c42, 0x2e4f, 0x0067, \r
139 0x0470, 0x4bf7, 0x2eae, 0x006b, \r
140 0x0458, 0x4bac, 0x2f0d, 0x006f, \r
141 0x0441, 0x4b5f, 0x2f6c, 0x0074, \r
142 0x042a, 0x4b13, 0x2fcc, 0x0078, \r
143 0x0413, 0x4ac5, 0x302b, 0x007d, \r
144 0x03fc, 0x4a77, 0x308b, 0x0082, \r
145 0x03e7, 0x4a29, 0x30ea, 0x0087, \r
146 0x03d1, 0x49d9, 0x314a, 0x008c, \r
147 0x03bc, 0x498a, 0x31aa, 0x0091, \r
148 0x03a7, 0x493a, 0x3209, 0x0096, \r
149 0x0392, 0x48e9, 0x3269, 0x009c, \r
150 0x037e, 0x4898, 0x32c9, 0x00a1, \r
151 0x036a, 0x4846, 0x3329, 0x00a7, \r
152 0x0356, 0x47f4, 0x3389, 0x00ad, \r
153 0x0343, 0x47a1, 0x33e9, 0x00b3, \r
154 0x0330, 0x474e, 0x3449, 0x00ba, \r
155 0x031d, 0x46fa, 0x34a9, 0x00c0, \r
156 0x030b, 0x46a6, 0x3509, 0x00c7, \r
157 0x02f9, 0x4651, 0x3569, 0x00cd, \r
158 0x02e7, 0x45fc, 0x35c9, 0x00d4, \r
159 0x02d6, 0x45a6, 0x3629, 0x00db, \r
160 0x02c4, 0x4550, 0x3689, 0x00e3, \r
161 0x02b4, 0x44fa, 0x36e8, 0x00ea, \r
162 0x02a3, 0x44a3, 0x3748, 0x00f2, \r
163 0x0293, 0x444c, 0x37a8, 0x00fa, \r
164 0x0283, 0x43f4, 0x3807, 0x0101, \r
165 0x0273, 0x439c, 0x3867, 0x010a, \r
166 0x0264, 0x4344, 0x38c6, 0x0112, \r
167 0x0255, 0x42eb, 0x3926, 0x011b, \r
168 0x0246, 0x4292, 0x3985, 0x0123, \r
169 0x0237, 0x4239, 0x39e4, 0x012c, \r
170 0x0229, 0x41df, 0x3a43, 0x0135, \r
171 0x021b, 0x4185, 0x3aa2, 0x013f, \r
172 0x020d, 0x412a, 0x3b00, 0x0148, \r
173 0x0200, 0x40d0, 0x3b5f, 0x0152, \r
174 0x01f2, 0x4074, 0x3bbd, 0x015c, \r
175 0x01e5, 0x4019, 0x3c1b, 0x0166, \r
176 0x01d9, 0x3fbd, 0x3c79, 0x0171, \r
177 0x01cc, 0x3f62, 0x3cd7, 0x017b, \r
178 0x01c0, 0x3f05, 0x3d35, 0x0186, \r
179 0x01b4, 0x3ea9, 0x3d92, 0x0191, \r
180 0x01a8, 0x3e4c, 0x3def, 0x019c, \r
181 0x019c, 0x3def, 0x3e4c, 0x01a8, \r
182 0x0191, 0x3d92, 0x3ea9, 0x01b4, \r
183 0x0186, 0x3d35, 0x3f05, 0x01c0, \r
184 0x017b, 0x3cd7, 0x3f62, 0x01cc, \r
185 0x0171, 0x3c79, 0x3fbd, 0x01d9, \r
186 0x0166, 0x3c1b, 0x4019, 0x01e5, \r
187 0x015c, 0x3bbd, 0x4074, 0x01f2, \r
188 0x0152, 0x3b5f, 0x40d0, 0x0200, \r
189 0x0148, 0x3b00, 0x412a, 0x020d, \r
190 0x013f, 0x3aa2, 0x4185, 0x021b, \r
191 0x0135, 0x3a43, 0x41df, 0x0229, \r
192 0x012c, 0x39e4, 0x4239, 0x0237, \r
193 0x0123, 0x3985, 0x4292, 0x0246, \r
194 0x011b, 0x3926, 0x42eb, 0x0255, \r
195 0x0112, 0x38c6, 0x4344, 0x0264, \r
196 0x010a, 0x3867, 0x439c, 0x0273, \r
197 0x0101, 0x3807, 0x43f4, 0x0283, \r
198 0x00fa, 0x37a8, 0x444c, 0x0293, \r
199 0x00f2, 0x3748, 0x44a3, 0x02a3, \r
200 0x00ea, 0x36e8, 0x44fa, 0x02b4, \r
201 0x00e3, 0x3689, 0x4550, 0x02c4, \r
202 0x00db, 0x3629, 0x45a6, 0x02d6, \r
203 0x00d4, 0x35c9, 0x45fc, 0x02e7, \r
204 0x00cd, 0x3569, 0x4651, 0x02f9, \r
205 0x00c7, 0x3509, 0x46a6, 0x030b, \r
206 0x00c0, 0x34a9, 0x46fa, 0x031d, \r
207 0x00ba, 0x3449, 0x474e, 0x0330, \r
208 0x00b3, 0x33e9, 0x47a1, 0x0343, \r
209 0x00ad, 0x3389, 0x47f4, 0x0356, \r
210 0x00a7, 0x3329, 0x4846, 0x036a, \r
211 0x00a1, 0x32c9, 0x4898, 0x037e, \r
212 0x009c, 0x3269, 0x48e9, 0x0392, \r
213 0x0096, 0x3209, 0x493a, 0x03a7, \r
214 0x0091, 0x31aa, 0x498a, 0x03bc, \r
215 0x008c, 0x314a, 0x49d9, 0x03d1, \r
216 0x0087, 0x30ea, 0x4a29, 0x03e7, \r
217 0x0082, 0x308b, 0x4a77, 0x03fc, \r
218 0x007d, 0x302b, 0x4ac5, 0x0413, \r
219 0x0078, 0x2fcc, 0x4b13, 0x042a, \r
220 0x0074, 0x2f6c, 0x4b5f, 0x0441, \r
221 0x006f, 0x2f0d, 0x4bac, 0x0458, \r
222 0x006b, 0x2eae, 0x4bf7, 0x0470, \r
223 0x0067, 0x2e4f, 0x4c42, 0x0488, \r
224 0x0063, 0x2df0, 0x4c8d, 0x04a0, \r
225 0x005f, 0x2d91, 0x4cd7, 0x04b9, \r
226 0x005b, 0x2d33, 0x4d20, 0x04d2, \r
227 0x0057, 0x2cd4, 0x4d68, 0x04ec, \r
228 0x0054, 0x2c76, 0x4db0, 0x0506, \r
229 0x0050, 0x2c18, 0x4df7, 0x0520, \r
230 0x004d, 0x2bba, 0x4e3e, 0x053b, \r
231 0x0049, 0x2b5c, 0x4e84, 0x0556, \r
232 0x0046, 0x2aff, 0x4ec9, 0x0572, \r
233 0x0043, 0x2aa1, 0x4f0e, 0x058e, \r
234 0x0040, 0x2a44, 0x4f52, 0x05aa, \r
235 0x003d, 0x29e7, 0x4f95, 0x05c7, \r
236 0x003a, 0x298b, 0x4fd7, 0x05e4, \r
237 0x0038, 0x292e, 0x5019, 0x0601, \r
238 0x0035, 0x28d2, 0x505a, 0x061f, \r
239 0x0033, 0x2876, 0x509a, 0x063e, \r
240 0x0030, 0x281a, 0x50da, 0x065c, \r
241 0x002e, 0x27be, 0x5118, 0x067c, \r
242 0x002c, 0x2763, 0x5156, 0x069b, \r
243 0x0029, 0x2708, 0x5194, 0x06bb, \r
244 0x0027, 0x26ad, 0x51d0, 0x06dc, \r
245 0x0025, 0x2653, 0x520c, 0x06fd, \r
246 0x0023, 0x25f8, 0x5247, 0x071e, \r
247 0x0021, 0x259e, 0x5281, 0x0740, \r
248 0x0020, 0x2545, 0x52ba, 0x0762, \r
249 0x001e, 0x24eb, 0x52f3, 0x0784, \r
250 0x001c, 0x2492, 0x532a, 0x07a7, \r
251 0x001b, 0x2439, 0x5361, 0x07cb, \r
252 0x0019, 0x23e1, 0x5397, 0x07ef, \r
253 0x0018, 0x2389, 0x53cc, 0x0813, \r
254 0x0016, 0x2331, 0x5401, 0x0838, \r
255 0x0015, 0x22da, 0x5434, 0x085d, \r
256 0x0013, 0x2282, 0x5467, 0x0883, \r
257 0x0012, 0x222c, 0x5499, 0x08a9, \r
258 0x0011, 0x21d5, 0x54ca, 0x08d0, \r
259 0x0010, 0x217f, 0x54fa, 0x08f7, \r
260 0x000f, 0x2129, 0x5529, 0x091e, \r
261 0x000e, 0x20d4, 0x5558, 0x0946, \r
262 0x000d, 0x207f, 0x5585, 0x096f, \r
263 0x000c, 0x202a, 0x55b2, 0x0998, \r
264 0x000b, 0x1fd6, 0x55de, 0x09c1, \r
265 0x000a, 0x1f82, 0x5609, 0x09eb, \r
266 0x0009, 0x1f2f, 0x5632, 0x0a16, \r
267 0x0009, 0x1edc, 0x565b, 0x0a40, \r
268 0x0008, 0x1e89, 0x5684, 0x0a6c, \r
269 0x0007, 0x1e37, 0x56ab, 0x0a98, \r
270 0x0007, 0x1de5, 0x56d1, 0x0ac4, \r
271 0x0006, 0x1d93, 0x56f6, 0x0af1, \r
272 0x0005, 0x1d42, 0x571b, 0x0b1e, \r
273 0x0005, 0x1cf1, 0x573e, 0x0b4c, \r
274 0x0004, 0x1ca1, 0x5761, 0x0b7a, \r
275 0x0004, 0x1c51, 0x5782, 0x0ba9, \r
276 0x0003, 0x1c02, 0x57a3, 0x0bd8, \r
277 0x0003, 0x1bb3, 0x57c3, 0x0c07, \r
278 0x0003, 0x1b64, 0x57e2, 0x0c38, \r
279 0x0002, 0x1b16, 0x57ff, 0x0c68, \r
280 0x0002, 0x1ac8, 0x581c, 0x0c99, \r
281 0x0002, 0x1a7b, 0x5838, 0x0ccb, \r
282 0x0001, 0x1a2e, 0x5853, 0x0cfd, \r
283 0x0001, 0x19e2, 0x586d, 0x0d30, \r
284 0x0001, 0x1996, 0x5886, 0x0d63, \r
285 0x0001, 0x194b, 0x589e, 0x0d97, \r
286 0x0000, 0x1900, 0x58b5, 0x0dcb, \r
287 0x0000, 0x18b5, 0x58cb, 0x0e00, \r
288 0x0000, 0x186b, 0x58e0, 0x0e35, \r
289 0x0000, 0x1821, 0x58f4, 0x0e6b, \r
290 0x0000, 0x17d8, 0x5907, 0x0ea1, \r
291 0x0000, 0x1790, 0x5919, 0x0ed7, \r
292 0x0000, 0x1747, 0x592a, 0x0f0f, \r
293 0xffffffff, 0x1700, 0x593a, 0x0f46, \r
294 0xffffffff, 0x16b9, 0x5949, 0x0f7f, \r
295 0xffffffff, 0x1672, 0x5958, 0x0fb7, \r
296 0xffffffff, 0x162c, 0x5965, 0x0ff1, \r
297 0xffffffff, 0x15e6, 0x5971, 0x102a, \r
298 0xffffffff, 0x15a0, 0x597c, 0x1065, \r
299 0xffffffff, 0x155c, 0x5986, 0x109f, \r
300 0xffffffff, 0x1517, 0x598f, 0x10db, \r
301 0xffffffff, 0x14d4, 0x5997, 0x1116, \r
302 0xffffffff, 0x1490, 0x599e, 0x1153, \r
303 0xffffffff, 0x144d, 0x59a4, 0x118f, \r
304 0xffffffff, 0x140b, 0x59a9, 0x11cd, \r
305 0xffffffff, 0x13c9, 0x59ad, 0x120b, \r
306 0xffffffff, 0x1388, 0x59b0, 0x1249, \r
307 0xffffffff, 0x1347, 0x59b2, 0x1288, \r
308 0xffffffff, 0x1307, 0x59b3, 0x12c7, \r
309};\r
310\r
311#endif