From b5b8f05aed7e23a675d09f0982082911f71fba93 Mon Sep 17 00:00:00 2001 From: Ryan Jackson Date: Fri, 15 Jul 2005 17:08:14 +0000 Subject: Removed calls to mcf5249_init_mac() from asm_mcf5249.h, added call for it to ov_read(). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7158 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/Tremor/asm_mcf5249.h | 10 ---------- apps/codecs/Tremor/vorbisfile.c | 4 ++++ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/apps/codecs/Tremor/asm_mcf5249.h b/apps/codecs/Tremor/asm_mcf5249.h index c9c2851e5a..3aaa66b4af 100644 --- a/apps/codecs/Tremor/asm_mcf5249.h +++ b/apps/codecs/Tremor/asm_mcf5249.h @@ -35,7 +35,6 @@ static inline void mcf5249_init_mac(void) { static inline ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) { - mcf5249_init_mac(); asm volatile ("mac.l %[x], %[y], %%acc0;" /* multiply & shift */ "movclr.l %%acc0, %[x];" /* move & clear acc */ "asr.l #1, %[x];" /* no overflow test */ @@ -47,7 +46,6 @@ static inline ogg_int32_t MULT32(ogg_int32_t x, ogg_int32_t y) { static inline ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) { - mcf5249_init_mac(); asm volatile ("mac.l %[x], %[y], %%acc0;" /* multiply */ "movclr.l %%acc0, %[x];" /* move and clear */ : [x] "+&r" (x) @@ -60,7 +58,6 @@ static inline ogg_int32_t MULT31(ogg_int32_t x, ogg_int32_t y) { static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) { ogg_int32_t r; - mcf5249_init_mac(); asm volatile ("mac.l %[x], %[y], %%acc0;" /* multiply */ "movclr.l %%acc0, %[r];" /* get higher half */ "mulu.l %[y], %[x];" /* get lower half */ @@ -81,7 +78,6 @@ void XPROD31(ogg_int32_t a, ogg_int32_t b, ogg_int32_t t, ogg_int32_t v, ogg_int32_t *x, ogg_int32_t *y) { - mcf5249_init_mac(); asm volatile ("mac.l %[a], %[t], %%acc0;" "mac.l %[b], %[v], %%acc0;" "mac.l %[b], %[t], %%acc1;" @@ -102,7 +98,6 @@ void XNPROD31(ogg_int32_t a, ogg_int32_t b, ogg_int32_t t, ogg_int32_t v, ogg_int32_t *x, ogg_int32_t *y) { - mcf5249_init_mac(); asm volatile ("mac.l %[a], %[t], %%acc0;" "msac.l %[b], %[v], %%acc0;" "mac.l %[b], %[t], %%acc1;" @@ -128,7 +123,6 @@ void XNPROD31(ogg_int32_t a, ogg_int32_t b, if anyone think they can hear a bug caused by this, please try the above version. */ #define XPROD32(_a, _b, _t, _v, _x, _y) \ - mcf5249_init_mac(); \ asm volatile ("mac.l %[a], %[t], %%acc0;" \ "mac.l %[b], %[v], %%acc0;" \ "mac.l %[b], %[t], %%acc1;" \ @@ -147,7 +141,6 @@ void XNPROD31(ogg_int32_t a, ogg_int32_t b, static inline void mcf5249_vect_add(ogg_int32_t *x, ogg_int32_t *y, int n) { - mcf5249_init_mac(); /* align to 16 bytes */ while(n>0 && (int)x&16) { *x++ += *y++; @@ -182,7 +175,6 @@ void mcf5249_vect_add(ogg_int32_t *x, ogg_int32_t *y, int n) static inline void mcf5249_vect_copy(ogg_int32_t *x, ogg_int32_t *y, int n) { - mcf5249_init_mac(); /* align to 16 bytes */ while(n>0 && (int)x&16) { *x++ = *y++; @@ -210,7 +202,6 @@ void mcf5249_vect_copy(ogg_int32_t *x, ogg_int32_t *y, int n) static inline void mcf5249_vect_mult_fw(ogg_int32_t *data, LOOKUP_T *window, int n) { - mcf5249_init_mac(); /* ensure data is aligned to 16-bytes */ while(n>0 && (int)data%16) { *data = MULT31(*data, *window); @@ -265,7 +256,6 @@ void mcf5249_vect_mult_fw(ogg_int32_t *data, LOOKUP_T *window, int n) static inline void mcf5249_vect_mult_bw(ogg_int32_t *data, LOOKUP_T *window, int n) { - mcf5249_init_mac(); /* ensure at least data is aligned to 16-bytes */ while(n>0 && (int)data%16) { *data = MULT31(*data, *window); diff --git a/apps/codecs/Tremor/vorbisfile.c b/apps/codecs/Tremor/vorbisfile.c index 9cc60c7978..bb069c8896 100644 --- a/apps/codecs/Tremor/vorbisfile.c +++ b/apps/codecs/Tremor/vorbisfile.c @@ -1548,6 +1548,10 @@ long ov_read(OggVorbis_File *vf,char *buffer,int bytes_req,int *bitstream){ if(vf->ready_stateready_state==INITSET){ samples=vorbis_synthesis_pcmout(&vf->vd,&pcm); -- cgit v1.2.3