diff options
| author | Ryan Jackson <rdjackso@rockbox.org> | 2005-07-15 17:08:14 +0000 |
|---|---|---|
| committer | Ryan Jackson <rdjackso@rockbox.org> | 2005-07-15 17:08:14 +0000 |
| commit | b5b8f05aed7e23a675d09f0982082911f71fba93 (patch) | |
| tree | 38ec65fdcf3dc11bf9994b676abdbe65e1f3cfe0 /apps/codecs | |
| parent | 34a25a6a3b117582efd49d893bd90e58be7148ca (diff) | |
| download | rockbox-b5b8f05aed7e23a675d09f0982082911f71fba93.zip rockbox-b5b8f05aed7e23a675d09f0982082911f71fba93.tar.gz rockbox-b5b8f05aed7e23a675d09f0982082911f71fba93.tar.bz2 rockbox-b5b8f05aed7e23a675d09f0982082911f71fba93.tar.xz | |
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
Diffstat (limited to 'apps/codecs')
| -rw-r--r-- | apps/codecs/Tremor/asm_mcf5249.h | 10 | ||||
| -rw-r--r-- | 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 c9c2851..3aaa66b 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 9cc60c7..bb069c8 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_state<OPENED)return(OV_EINVAL); +#if CONFIG_CPU == MCF5249 && !defined(SIMULATOR) + mcf5249_init_mac(); +#endif + while(1){ if(vf->ready_state==INITSET){ samples=vorbis_synthesis_pcmout(&vf->vd,&pcm); |