From d1b19be423ab5fc62a7d16b26813b9624bf57709 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Fri, 3 Oct 2008 21:40:32 +0000 Subject: Various speedups: (1) Put actual decoding functions into IRAM on PP5002. (2) Put the insane filter buffer into IRAM on coldfire and PP502x (just for completeness, as long as there's no better use). (3) Use the ARMv6 'ssat' instruction for saturation on Gigabeat S. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18701 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/demac/libdemac/decoder.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'apps/codecs/demac/libdemac/decoder.c') diff --git a/apps/codecs/demac/libdemac/decoder.c b/apps/codecs/demac/libdemac/decoder.c index 326e893ec4..f6c2451c0c 100644 --- a/apps/codecs/demac/libdemac/decoder.c +++ b/apps/codecs/demac/libdemac/decoder.c @@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA #include "predictor.h" #include "entropy.h" #include "filter.h" +#include "demac_iram.h" /* Statically allocate the filter buffers */ @@ -40,7 +41,7 @@ static int16_t filterbuf256[(256*3 + HISTORY_SIZE) * 2] /* 5120 bytes */ /* This is only needed for "insane" files, and no Rockbox targets can hope to decode them in realtime anyway. */ static int16_t filterbuf1280[(1280*3 + HISTORY_SIZE) * 2] /* 17408 bytes */ - __attribute__((aligned(16))); + IBSS_ATTR_DEMAC_INSANEBUF __attribute__((aligned(16))); void init_frame_decoder(struct ape_ctx_t* ape_ctx, unsigned char* inbuffer, int* firstbyte, @@ -74,11 +75,11 @@ void init_frame_decoder(struct ape_ctx_t* ape_ctx, } } -int decode_chunk(struct ape_ctx_t* ape_ctx, - unsigned char* inbuffer, int* firstbyte, - int* bytesconsumed, - int32_t* decoded0, int32_t* decoded1, - int count) +int ICODE_ATTR_DEMAC decode_chunk(struct ape_ctx_t* ape_ctx, + unsigned char* inbuffer, int* firstbyte, + int* bytesconsumed, + int32_t* decoded0, int32_t* decoded1, + int count) { int res; int32_t left, right; -- cgit v1.2.3