From d5c082598d2b5b552578e6c638d88452581e6f9c Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Tue, 21 Dec 2010 14:08:41 +0000 Subject: libwavpack: put some lookup tables in iram, speedup of 8-10% on coldfire (h300). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28873 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libwavpack/words.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/codecs/libwavpack/words.c b/apps/codecs/libwavpack/words.c index c3ae50dcf4..3d9e753e4b 100644 --- a/apps/codecs/libwavpack/words.c +++ b/apps/codecs/libwavpack/words.c @@ -66,7 +66,7 @@ ///////////////////////////// local table storage //////////////////////////// -const char nbits_table [] = { +static const char nbits_table [] ICONST_ATTR = { 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, // 0 - 15 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, // 16 - 31 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, // 32 - 47 @@ -104,7 +104,7 @@ static const uchar log2_table [] = { 0xf4, 0xf5, 0xf6, 0xf7, 0xf7, 0xf8, 0xf9, 0xf9, 0xfa, 0xfb, 0xfc, 0xfc, 0xfd, 0xfe, 0xff, 0xff }; -static const uchar exp2_table [] = { +static const uchar exp2_table [] ICONST_ATTR = { 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x08, 0x09, 0x0a, 0x0b, 0x0b, 0x0c, 0x0d, 0x0e, 0x0e, 0x0f, 0x10, 0x10, 0x11, 0x12, 0x13, 0x13, 0x14, 0x15, 0x16, 0x16, 0x17, 0x18, 0x19, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1d, 0x1e, 0x1f, 0x20, 0x20, 0x21, 0x22, 0x23, @@ -123,7 +123,7 @@ static const uchar exp2_table [] = { 0xea, 0xec, 0xed, 0xee, 0xf0, 0xf1, 0xf2, 0xf4, 0xf5, 0xf6, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xff }; -static const char ones_count_table [] = { +static const char ones_count_table [] ICONST_ATTR = { 0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5, 0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6, 0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5, -- cgit v1.2.3