diff options
| author | Dave Chapman <dave@dchapman.com> | 2007-06-10 08:55:16 +0000 |
|---|---|---|
| committer | Dave Chapman <dave@dchapman.com> | 2007-06-10 08:55:16 +0000 |
| commit | 601ede7f9cc88cc40e074cc9d9cfdc2c0ba46d4c (patch) | |
| tree | c0366c2ce8ff0932db0873e3e27ac00e91cc50a4 /apps/codecs/demac/libdemac/decoder.c | |
| parent | 57440d52920f5ad76063089edd73c09f35951a87 (diff) | |
| download | rockbox-601ede7f9cc88cc40e074cc9d9cfdc2c0ba46d4c.zip rockbox-601ede7f9cc88cc40e074cc9d9cfdc2c0ba46d4c.tar.gz rockbox-601ede7f9cc88cc40e074cc9d9cfdc2c0ba46d4c.tar.bz2 rockbox-601ede7f9cc88cc40e074cc9d9cfdc2c0ba46d4c.tar.xz | |
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
Diffstat (limited to 'apps/codecs/demac/libdemac/decoder.c')
| -rw-r--r-- | apps/codecs/demac/libdemac/decoder.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/codecs/demac/libdemac/decoder.c b/apps/codecs/demac/libdemac/decoder.c index ba8c393..4f4a583 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 */ |