From 4096cb1830f4957da74e413d2488105e551fb507 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Sat, 10 Sep 2011 10:45:44 +0000 Subject: 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 --- apps/codecs/libgme/emutables.h | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'apps/codecs/libgme/emutables.h') 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[] = { 0, 0, }; -static const e_int32 pm_coeff[] = { +static const e_int16 pm_coeff[] = { 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, @@ -68,6 +68,46 @@ static const e_int32 pm_coeff[] = { 255, 255, 255, 255, }; +static const e_int8 am_coeff[] = { + 13, 13, 13, 13, 13, 14, 14, + 14, 14, 14, 15, 15, 15, 15, + 15, 16, 16, 16, 16, 16, 17, + 17, 17, 17, 17, 18, 18, 18, + 18, 18, 19, 19, 19, 19, 19, + 20, 20, 20, 20, 20, 21, 21, + 21, 21, 21, 22, 22, 22, 22, + 22, 23, 23, 23, 23, 23, 24, + 24, 24, 24, 24, 25, 25, 25, + 25, 26, 25, 25, 25, 25, 24, + 24, 24, 24, 24, 23, 23, 23, + 23, 23, 22, 22, 22, 22, 22, + 21, 21, 21, 21, 21, 20, 20, + 20, 20, 20, 19, 19, 19, 19, + 19, 18, 18, 18, 18, 18, 17, + 17, 17, 17, 17, 16, 16, 16, + 16, 16, 15, 15, 15, 15, 15, + 14, 14, 14, 14, 14, 13, 13, + 13, 13, 13, 12, 12, 12, 12, + 11, 11, 11, 11, 11, 10, 10, + 10, 10, 10, 9, 9, 9, 9, + 9, 8, 8, 8, 8, 8, 7, + 7, 7, 7, 7, 6, 6, 6, + 6, 6, 5, 5, 5, 5, 5, + 4, 4, 4, 4, 4, 3, 3, + 3, 3, 3, 2, 2, 2, 2, + 2, 1, 1, 1, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 3, 3, 3, + 3, 3, 4, 4, 4, 4, 4, + 5, 5, 5, 5, 5, 6, 6, + 6, 6, 6, 7, 7, 7, 7, + 7, 8, 8, 8, 8, 8, 9, + 9, 9, 9, 9, 10, 10, 10, + 10, 10, 11, 11, 11, 11, 11, + 12, 12, 12, 12, +}; + static const e_int16 db2lin_coeff[] = { 255, 249, 244, 239, 233, 228, 224, 219, 214, 209, 205, 201, 196, 192, -- cgit v1.2.3