summaryrefslogtreecommitdiff
path: root/apps/codecs/libgme/emutables.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libgme/emutables.h')
-rw-r--r--apps/codecs/libgme/emutables.h420
1 files changed, 210 insertions, 210 deletions
diff --git a/apps/codecs/libgme/emutables.h b/apps/codecs/libgme/emutables.h
index e34f100bc4..739c8c390a 100644
--- a/apps/codecs/libgme/emutables.h
+++ b/apps/codecs/libgme/emutables.h
@@ -1,210 +1,210 @@
1#ifndef _EMUTABLES_H_ 1#ifndef _EMUTABLES_H_
2#define _EMUTABLES_H_ 2#define _EMUTABLES_H_
3 3
4/* Precalculated emu2413 tables for use in Rockbox, 4/* Precalculated emu2413 tables for use in Rockbox,
5 Calculated for 44Khz sampling rate */ 5 Calculated for 44Khz sampling rate */
6 6
7#include "emutypes.h" 7#include "emutypes.h"
8 8
9static const e_uint16 sin_coeff[] = { 9static const e_uint16 sin_coeff[] = {
10 255, 203, 171, 152, 139, 129, 120, 10 255, 203, 171, 152, 139, 129, 120,
11 113, 107, 102, 97, 92, 88, 85, 11 113, 107, 102, 97, 92, 88, 85,
12 81, 78, 75, 72, 70, 67, 65, 12 81, 78, 75, 72, 70, 67, 65,
13 63, 61, 59, 57, 55, 53, 52, 13 63, 61, 59, 57, 55, 53, 52,
14 50, 48, 47, 45, 44, 43, 41, 14 50, 48, 47, 45, 44, 43, 41,
15 40, 39, 38, 37, 35, 34, 33, 15 40, 39, 38, 37, 35, 34, 33,
16 32, 31, 30, 29, 28, 28, 27, 16 32, 31, 30, 29, 28, 28, 27,
17 26, 25, 24, 23, 23, 22, 21, 17 26, 25, 24, 23, 23, 22, 21,
18 21, 20, 19, 19, 18, 17, 17, 18 21, 20, 19, 19, 18, 17, 17,
19 16, 16, 15, 14, 14, 13, 13, 19 16, 16, 15, 14, 14, 13, 13,
20 12, 12, 11, 11, 11, 10, 10, 20 12, 12, 11, 11, 11, 10, 10,
21 9, 9, 8, 8, 8, 7, 7, 21 9, 9, 8, 8, 8, 7, 7,
22 7, 6, 6, 6, 5, 5, 5, 22 7, 6, 6, 6, 5, 5, 5,
23 4, 4, 4, 4, 3, 3, 3, 23 4, 4, 4, 4, 3, 3, 3,
24 3, 2, 2, 2, 2, 2, 2, 24 3, 2, 2, 2, 2, 2, 2,
25 1, 1, 1, 1, 1, 1, 1, 25 1, 1, 1, 1, 1, 1, 1,
26 0, 0, 0, 0, 0, 0, 0, 26 0, 0, 0, 0, 0, 0, 0,
27 0, 0, 0, 0, 0, 0, 0, 27 0, 0, 0, 0, 0, 0, 0,
28 0, 0, 28 0, 0,
29}; 29};
30 30
31static const e_int16 pm_coeff[] = { 31static const e_int16 pm_coeff[] = {
32 256, 256, 256, 256, 256, 256, 256, 32 256, 256, 256, 256, 256, 256, 256,
33 256, 256, 256, 256, 256, 256, 256, 33 256, 256, 256, 256, 256, 256, 256,
34 256, 256, 256, 256, 256, 256, 256, 34 256, 256, 256, 256, 256, 256, 256,
35 256, 256, 256, 256, 256, 256, 256, 35 256, 256, 256, 256, 256, 256, 256,
36 256, 256, 256, 256, 257, 257, 257, 36 256, 256, 256, 256, 257, 257, 257,
37 257, 257, 257, 257, 257, 257, 257, 37 257, 257, 257, 257, 257, 257, 257,
38 257, 257, 257, 257, 257, 257, 257, 38 257, 257, 257, 257, 257, 257, 257,
39 257, 257, 257, 257, 257, 257, 257, 39 257, 257, 257, 257, 257, 257, 257,
40 257, 257, 257, 257, 257, 257, 257, 40 257, 257, 257, 257, 257, 257, 257,
41 258, 258, 258, 257, 257, 257, 257, 41 258, 258, 258, 257, 257, 257, 257,
42 257, 257, 257, 257, 257, 257, 257, 42 257, 257, 257, 257, 257, 257, 257,
43 257, 257, 257, 257, 257, 257, 257, 43 257, 257, 257, 257, 257, 257, 257,
44 257, 257, 257, 257, 257, 257, 257, 44 257, 257, 257, 257, 257, 257, 257,
45 257, 257, 257, 257, 257, 257, 256, 45 257, 257, 257, 257, 257, 257, 256,
46 256, 256, 256, 256, 256, 256, 256, 46 256, 256, 256, 256, 256, 256, 256,
47 256, 256, 256, 256, 256, 256, 256, 47 256, 256, 256, 256, 256, 256, 256,
48 256, 256, 256, 256, 256, 256, 256, 48 256, 256, 256, 256, 256, 256, 256,
49 256, 256, 256, 256, 256, 256, 256, 49 256, 256, 256, 256, 256, 256, 256,
50 256, 256, 256, 255, 255, 255, 255, 50 256, 256, 256, 255, 255, 255, 255,
51 255, 255, 255, 255, 255, 255, 255, 51 255, 255, 255, 255, 255, 255, 255,
52 255, 255, 255, 255, 255, 255, 255, 52 255, 255, 255, 255, 255, 255, 255,
53 255, 255, 255, 255, 255, 255, 255, 53 255, 255, 255, 255, 255, 255, 255,
54 255, 255, 255, 255, 255, 255, 254, 54 255, 255, 255, 255, 255, 255, 254,
55 254, 254, 254, 254, 254, 254, 254, 55 254, 254, 254, 254, 254, 254, 254,
56 254, 254, 254, 254, 254, 254, 254, 56 254, 254, 254, 254, 254, 254, 254,
57 254, 254, 254, 254, 254, 254, 254, 57 254, 254, 254, 254, 254, 254, 254,
58 254, 254, 254, 254, 254, 254, 254, 58 254, 254, 254, 254, 254, 254, 254,
59 254, 254, 254, 253, 254, 254, 254, 59 254, 254, 254, 253, 254, 254, 254,
60 254, 254, 254, 254, 254, 254, 254, 60 254, 254, 254, 254, 254, 254, 254,
61 254, 254, 254, 254, 254, 254, 254, 61 254, 254, 254, 254, 254, 254, 254,
62 254, 254, 254, 254, 254, 254, 254, 62 254, 254, 254, 254, 254, 254, 254,
63 254, 254, 254, 254, 254, 254, 254, 63 254, 254, 254, 254, 254, 254, 254,
64 254, 255, 255, 255, 255, 255, 255, 64 254, 255, 255, 255, 255, 255, 255,
65 255, 255, 255, 255, 255, 255, 255, 65 255, 255, 255, 255, 255, 255, 255,
66 255, 255, 255, 255, 255, 255, 255, 66 255, 255, 255, 255, 255, 255, 255,
67 255, 255, 255, 255, 255, 255, 255, 67 255, 255, 255, 255, 255, 255, 255,
68 255, 255, 255, 255, 68 255, 255, 255, 255,
69}; 69};
70 70
71static const e_int8 am_coeff[] = { 71static const e_int8 am_coeff[] = {
72 13, 13, 13, 13, 13, 14, 14, 72 13, 13, 13, 13, 13, 14, 14,
73 14, 14, 14, 15, 15, 15, 15, 73 14, 14, 14, 15, 15, 15, 15,
74 15, 16, 16, 16, 16, 16, 17, 74 15, 16, 16, 16, 16, 16, 17,
75 17, 17, 17, 17, 18, 18, 18, 75 17, 17, 17, 17, 18, 18, 18,
76 18, 18, 19, 19, 19, 19, 19, 76 18, 18, 19, 19, 19, 19, 19,
77 20, 20, 20, 20, 20, 21, 21, 77 20, 20, 20, 20, 20, 21, 21,
78 21, 21, 21, 22, 22, 22, 22, 78 21, 21, 21, 22, 22, 22, 22,
79 22, 23, 23, 23, 23, 23, 24, 79 22, 23, 23, 23, 23, 23, 24,
80 24, 24, 24, 24, 25, 25, 25, 80 24, 24, 24, 24, 25, 25, 25,
81 25, 26, 25, 25, 25, 25, 24, 81 25, 26, 25, 25, 25, 25, 24,
82 24, 24, 24, 24, 23, 23, 23, 82 24, 24, 24, 24, 23, 23, 23,
83 23, 23, 22, 22, 22, 22, 22, 83 23, 23, 22, 22, 22, 22, 22,
84 21, 21, 21, 21, 21, 20, 20, 84 21, 21, 21, 21, 21, 20, 20,
85 20, 20, 20, 19, 19, 19, 19, 85 20, 20, 20, 19, 19, 19, 19,
86 19, 18, 18, 18, 18, 18, 17, 86 19, 18, 18, 18, 18, 18, 17,
87 17, 17, 17, 17, 16, 16, 16, 87 17, 17, 17, 17, 16, 16, 16,
88 16, 16, 15, 15, 15, 15, 15, 88 16, 16, 15, 15, 15, 15, 15,
89 14, 14, 14, 14, 14, 13, 13, 89 14, 14, 14, 14, 14, 13, 13,
90 13, 13, 13, 12, 12, 12, 12, 90 13, 13, 13, 12, 12, 12, 12,
91 11, 11, 11, 11, 11, 10, 10, 91 11, 11, 11, 11, 11, 10, 10,
92 10, 10, 10, 9, 9, 9, 9, 92 10, 10, 10, 9, 9, 9, 9,
93 9, 8, 8, 8, 8, 8, 7, 93 9, 8, 8, 8, 8, 8, 7,
94 7, 7, 7, 7, 6, 6, 6, 94 7, 7, 7, 7, 6, 6, 6,
95 6, 6, 5, 5, 5, 5, 5, 95 6, 6, 5, 5, 5, 5, 5,
96 4, 4, 4, 4, 4, 3, 3, 96 4, 4, 4, 4, 4, 3, 3,
97 3, 3, 3, 2, 2, 2, 2, 97 3, 3, 3, 2, 2, 2, 2,
98 2, 1, 1, 1, 1, 1, 0, 98 2, 1, 1, 1, 1, 1, 0,
99 0, 0, 0, 0, 0, 0, 0, 99 0, 0, 0, 0, 0, 0, 0,
100 0, 1, 1, 1, 1, 1, 2, 100 0, 1, 1, 1, 1, 1, 2,
101 2, 2, 2, 2, 3, 3, 3, 101 2, 2, 2, 2, 3, 3, 3,
102 3, 3, 4, 4, 4, 4, 4, 102 3, 3, 4, 4, 4, 4, 4,
103 5, 5, 5, 5, 5, 6, 6, 103 5, 5, 5, 5, 5, 6, 6,
104 6, 6, 6, 7, 7, 7, 7, 104 6, 6, 6, 7, 7, 7, 7,
105 7, 8, 8, 8, 8, 8, 9, 105 7, 8, 8, 8, 8, 8, 9,
106 9, 9, 9, 9, 10, 10, 10, 106 9, 9, 9, 9, 10, 10, 10,
107 10, 10, 11, 11, 11, 11, 11, 107 10, 10, 11, 11, 11, 11, 11,
108 12, 12, 12, 12, 108 12, 12, 12, 12,
109}; 109};
110 110
111static const e_int16 db2lin_coeff[] = { 111static const e_int16 db2lin_coeff[] = {
112 255, 249, 244, 239, 233, 228, 224, 112 255, 249, 244, 239, 233, 228, 224,
113 219, 214, 209, 205, 201, 196, 192, 113 219, 214, 209, 205, 201, 196, 192,
114 188, 184, 180, 176, 172, 169, 165, 114 188, 184, 180, 176, 172, 169, 165,
115 162, 158, 155, 151, 148, 145, 142, 115 162, 158, 155, 151, 148, 145, 142,
116 139, 136, 133, 130, 127, 125, 122, 116 139, 136, 133, 130, 127, 125, 122,
117 119, 117, 114, 112, 109, 107, 105, 117 119, 117, 114, 112, 109, 107, 105,
118 102, 100, 98, 96, 94, 92, 90, 118 102, 100, 98, 96, 94, 92, 90,
119 88, 86, 84, 82, 81, 79, 77, 119 88, 86, 84, 82, 81, 79, 77,
120 76, 74, 72, 71, 69, 68, 66, 120 76, 74, 72, 71, 69, 68, 66,
121 65, 64, 62, 61, 60, 58, 57, 121 65, 64, 62, 61, 60, 58, 57,
122 56, 55, 53, 52, 51, 50, 49, 122 56, 55, 53, 52, 51, 50, 49,
123 48, 47, 46, 45, 44, 43, 42, 123 48, 47, 46, 45, 44, 43, 42,
124 41, 40, 39, 38, 38, 37, 36, 124 41, 40, 39, 38, 38, 37, 36,
125 35, 34, 34, 33, 32, 32, 31, 125 35, 34, 34, 33, 32, 32, 31,
126 30, 30, 29, 28, 28, 27, 27, 126 30, 30, 29, 28, 28, 27, 27,
127 26, 25, 25, 24, 24, 23, 23, 127 26, 25, 25, 24, 24, 23, 23,
128 22, 22, 21, 21, 20, 20, 19, 128 22, 22, 21, 21, 20, 20, 19,
129 19, 19, 18, 18, 17, 17, 17, 129 19, 19, 18, 18, 17, 17, 17,
130 16, 16, 16, 15, 15, 15, 14, 130 16, 16, 16, 15, 15, 15, 14,
131 14, 14, 13, 13, 13, 12, 12, 131 14, 14, 13, 13, 13, 12, 12,
132 12, 12, 11, 11, 11, 11, 10, 132 12, 12, 11, 11, 11, 11, 10,
133 10, 10, 10, 10, 9, 9, 9, 133 10, 10, 10, 10, 9, 9, 9,
134 9, 8, 8, 8, 8, 8, 8, 134 9, 8, 8, 8, 8, 8, 8,
135 7, 7, 7, 7, 7, 7, 6, 135 7, 7, 7, 7, 7, 7, 6,
136 6, 6, 6, 6, 6, 6, 5, 136 6, 6, 6, 6, 6, 6, 5,
137 5, 5, 5, 5, 5, 5, 5, 137 5, 5, 5, 5, 5, 5, 5,
138 5, 4, 4, 4, 4, 4, 4, 138 5, 4, 4, 4, 4, 4, 4,
139 4, 4, 4, 4, 3, 3, 3, 139 4, 4, 4, 4, 3, 3, 3,
140 3, 3, 3, 3, 3, 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, 0,
185 0, 185 0,
186}; 186};
187 187
188static const e_uint16 ar_adjust_coeff[] = { 188static const e_uint16 ar_adjust_coeff[] = {
189 127, 108, 98, 90, 84, 80, 75, 189 127, 108, 98, 90, 84, 80, 75,
190 72, 69, 66, 64, 61, 59, 57, 190 72, 69, 66, 64, 61, 59, 57,
191 56, 54, 52, 51, 49, 48, 47, 191 56, 54, 52, 51, 49, 48, 47,
192 45, 44, 43, 42, 41, 40, 39, 192 45, 44, 43, 42, 41, 40, 39,
193 38, 37, 36, 36, 35, 34, 33, 193 38, 37, 36, 36, 35, 34, 33,
194 33, 32, 31, 30, 30, 29, 29, 194 33, 32, 31, 30, 30, 29, 29,
195 28, 27, 27, 26, 26, 25, 24, 195 28, 27, 27, 26, 26, 25, 24,
196 24, 23, 23, 22, 22, 21, 21, 196 24, 23, 23, 22, 22, 21, 21,
197 21, 20, 20, 19, 19, 18, 18, 197 21, 20, 20, 19, 19, 18, 18,
198 17, 17, 17, 16, 16, 15, 15, 198 17, 17, 17, 16, 16, 15, 15,
199 15, 14, 14, 14, 13, 13, 13, 199 15, 14, 14, 14, 13, 13, 13,
200 12, 12, 12, 11, 11, 11, 10, 200 12, 12, 12, 11, 11, 11, 10,
201 10, 10, 9, 9, 9, 9, 8, 201 10, 10, 9, 9, 9, 9, 8,
202 8, 8, 7, 7, 7, 7, 6, 202 8, 8, 7, 7, 7, 7, 6,
203 6, 6, 6, 5, 5, 5, 4, 203 6, 6, 6, 5, 5, 5, 4,
204 4, 4, 4, 4, 3, 3, 3, 204 4, 4, 4, 4, 3, 3, 3,
205 3, 2, 2, 2, 2, 1, 1, 205 3, 2, 2, 2, 2, 1, 1,
206 1, 1, 1, 0, 0, 0, 0, 206 1, 1, 1, 0, 0, 0, 0,
207 0, 207 0,
208}; 208};
209 209
210#endif 210#endif