diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-09-10 10:45:44 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-09-10 10:45:44 +0000 |
commit | 4096cb1830f4957da74e413d2488105e551fb507 (patch) | |
tree | f2720d043831e12f5676c690a49839efca471679 /apps/codecs/libgme/emutables.h | |
parent | e8dc7a6d0702c6724c4b3b9a4cf8efb7c6f712c9 (diff) | |
download | rockbox-4096cb1830f4957da74e413d2488105e551fb507.tar.gz rockbox-4096cb1830f4957da74e413d2488105e551fb507.zip |
Further work on libgme's emu2413. Fully remove floating point, introduce another precalculated table, directly use predefined tables instead of copying them. Reduces memory and codesize by several KB.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30494 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libgme/emutables.h')
-rw-r--r-- | apps/codecs/libgme/emutables.h | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/apps/codecs/libgme/emutables.h b/apps/codecs/libgme/emutables.h index 173ecd22c6..e34f100bc4 100644 --- a/apps/codecs/libgme/emutables.h +++ b/apps/codecs/libgme/emutables.h | |||
@@ -28,7 +28,7 @@ static const e_uint16 sin_coeff[] = { | |||
28 | 0, 0, | 28 | 0, 0, |
29 | }; | 29 | }; |
30 | 30 | ||
31 | static const e_int32 pm_coeff[] = { | 31 | static 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, |
@@ -68,6 +68,46 @@ static const e_int32 pm_coeff[] = { | |||
68 | 255, 255, 255, 255, | 68 | 255, 255, 255, 255, |
69 | }; | 69 | }; |
70 | 70 | ||
71 | static const e_int8 am_coeff[] = { | ||
72 | 13, 13, 13, 13, 13, 14, 14, | ||
73 | 14, 14, 14, 15, 15, 15, 15, | ||
74 | 15, 16, 16, 16, 16, 16, 17, | ||
75 | 17, 17, 17, 17, 18, 18, 18, | ||
76 | 18, 18, 19, 19, 19, 19, 19, | ||
77 | 20, 20, 20, 20, 20, 21, 21, | ||
78 | 21, 21, 21, 22, 22, 22, 22, | ||
79 | 22, 23, 23, 23, 23, 23, 24, | ||
80 | 24, 24, 24, 24, 25, 25, 25, | ||
81 | 25, 26, 25, 25, 25, 25, 24, | ||
82 | 24, 24, 24, 24, 23, 23, 23, | ||
83 | 23, 23, 22, 22, 22, 22, 22, | ||
84 | 21, 21, 21, 21, 21, 20, 20, | ||
85 | 20, 20, 20, 19, 19, 19, 19, | ||
86 | 19, 18, 18, 18, 18, 18, 17, | ||
87 | 17, 17, 17, 17, 16, 16, 16, | ||
88 | 16, 16, 15, 15, 15, 15, 15, | ||
89 | 14, 14, 14, 14, 14, 13, 13, | ||
90 | 13, 13, 13, 12, 12, 12, 12, | ||
91 | 11, 11, 11, 11, 11, 10, 10, | ||
92 | 10, 10, 10, 9, 9, 9, 9, | ||
93 | 9, 8, 8, 8, 8, 8, 7, | ||
94 | 7, 7, 7, 7, 6, 6, 6, | ||
95 | 6, 6, 5, 5, 5, 5, 5, | ||
96 | 4, 4, 4, 4, 4, 3, 3, | ||
97 | 3, 3, 3, 2, 2, 2, 2, | ||
98 | 2, 1, 1, 1, 1, 1, 0, | ||
99 | 0, 0, 0, 0, 0, 0, 0, | ||
100 | 0, 1, 1, 1, 1, 1, 2, | ||
101 | 2, 2, 2, 2, 3, 3, 3, | ||
102 | 3, 3, 4, 4, 4, 4, 4, | ||
103 | 5, 5, 5, 5, 5, 6, 6, | ||
104 | 6, 6, 6, 7, 7, 7, 7, | ||
105 | 7, 8, 8, 8, 8, 8, 9, | ||
106 | 9, 9, 9, 9, 10, 10, 10, | ||
107 | 10, 10, 11, 11, 11, 11, 11, | ||
108 | 12, 12, 12, 12, | ||
109 | }; | ||
110 | |||
71 | static const e_int16 db2lin_coeff[] = { | 111 | static const e_int16 db2lin_coeff[] = { |
72 | 255, 249, 244, 239, 233, 228, 224, | 112 | 255, 249, 244, 239, 233, 228, 224, |
73 | 219, 214, 209, 205, 201, 196, 192, | 113 | 219, 214, 209, 205, 201, 196, 192, |