From 601ede7f9cc88cc40e074cc9d9cfdc2c0ba46d4c Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sun, 10 Jun 2007 08:55:16 +0000 Subject: C optimisations to the predictor decoding - create a single function for decoding stereo streams, and reorganise to minimise the number of variables used. My -c1000 test track now decodes at 93% realtime on PortalPlayer (was 78%), 187% on Coldfire (was 170%) and 447% on Gigabeat (was 408%). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13608 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/demac/libdemac/decoder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 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 ba8c393a67..4f4a583d00 100644 --- a/apps/codecs/demac/libdemac/decoder.c +++ b/apps/codecs/demac/libdemac/decoder.c @@ -47,7 +47,7 @@ void init_frame_decoder(struct ape_ctx_t* ape_ctx, //printf("CRC=0x%08x\n",ape_ctx->CRC); //printf("Flags=0x%08x\n",ape_ctx->frameflags); - init_predictor_decoder(ape_ctx); + init_predictor_decoder(&ape_ctx->predictor); switch (ape_ctx->compressiontype) { @@ -117,7 +117,7 @@ int decode_chunk(struct ape_ctx_t* ape_ctx, } /* Now apply the predictor decoding */ - predictor_decode_mono(ape_ctx,decoded0,count); + predictor_decode_mono(&ape_ctx->predictor,decoded0,count); if (ape_ctx->channels==2) { /* Pseudo-stereo - just copy left channel to right channel */ @@ -163,7 +163,7 @@ int decode_chunk(struct ape_ctx_t* ape_ctx, } /* Now apply the predictor decoding */ - predictor_decode_stereo(ape_ctx,decoded0,decoded1,count); + predictor_decode_stereo(&ape_ctx->predictor,decoded0,decoded1,count); if (ape_ctx->bps == 8) { /* TODO: Handle 8-bit streams */ -- cgit v1.2.3