From 2640bdb262d07bf910a6ff614834d73713bdf4a4 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Thu, 18 Oct 2007 22:37:33 +0000 Subject: APE codec: Assembler optimised vector math routines for coldfire. -c2000 is now usable at 130% realtime (was 107%), -c3000 is near realtime (93%, was 64%). -c1000 doesn't change. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15194 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/demac/libdemac/decoder.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 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 4f4a583..326e893 100644 --- a/apps/codecs/demac/libdemac/decoder.c +++ b/apps/codecs/demac/libdemac/decoder.c @@ -32,12 +32,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA /* Statically allocate the filter buffers */ -static int16_t filterbuf32[(32*3 + HISTORY_SIZE) * 2] IBSS_ATTR; /* 4480 bytes */ -static int16_t filterbuf256[(256*3 + HISTORY_SIZE) * 2] IBSS_ATTR; /* 5120 bytes */ +static int16_t filterbuf32[(32*3 + HISTORY_SIZE) * 2] /* 4480 bytes */ + IBSS_ATTR __attribute__((aligned(16))); +static int16_t filterbuf256[(256*3 + HISTORY_SIZE) * 2] /* 5120 bytes */ + IBSS_ATTR __attribute__((aligned(16))); /* 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 */ +static int16_t filterbuf1280[(1280*3 + HISTORY_SIZE) * 2] /* 17408 bytes */ + __attribute__((aligned(16))); void init_frame_decoder(struct ape_ctx_t* ape_ctx, unsigned char* inbuffer, int* firstbyte, @@ -163,7 +166,7 @@ int decode_chunk(struct ape_ctx_t* ape_ctx, } /* Now apply the predictor decoding */ - predictor_decode_stereo(&ape_ctx->predictor,decoded0,decoded1,count); + predictor_decode_stereo(&ape_ctx->predictor,decoded0,decoded1,count); if (ape_ctx->bps == 8) { /* TODO: Handle 8-bit streams */ -- cgit v1.1