summaryrefslogtreecommitdiffstats
path: root/apps/codecs/libmad
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2005-09-07 00:24:27 +0000
committerThom Johansen <thomj@rockbox.org>2005-09-07 00:24:27 +0000
commit735208a541df024f1cd3b9624054b6ed9724ad1e (patch)
tree01b8b91e8f473207553e2c94a5f6f00a6f60f3b4 /apps/codecs/libmad
parent4cd06c41f62c217681ec91557e89dc4461bab6d3 (diff)
downloadrockbox-735208a541df024f1cd3b9624054b6ed9724ad1e.tar.gz
rockbox-735208a541df024f1cd3b9624054b6ed9724ad1e.zip
Adapted codecs and DSP system to having MACSR saved in thread context.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7485 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libmad')
-rw-r--r--apps/codecs/libmad/imdct_mcf5249.S1
-rw-r--r--apps/codecs/libmad/layer3.c2
-rw-r--r--apps/codecs/libmad/synth.c7
3 files changed, 5 insertions, 5 deletions
diff --git a/apps/codecs/libmad/imdct_mcf5249.S b/apps/codecs/libmad/imdct_mcf5249.S
index 62b33c3f07..1afd910fa8 100644
--- a/apps/codecs/libmad/imdct_mcf5249.S
+++ b/apps/codecs/libmad/imdct_mcf5249.S
@@ -32,7 +32,6 @@ III_imdct_s:
* get more low bits out of the accext01 register _before_ doing the
* movclrs.
*/
- move.l #0xb0, %macsr /* frac mode, saturation, rounding */
sub.l %a0, %a0 /* clear loop variable */
.imdctloop: /* outer loop label */
lea.l imdct_s, %a1 /* load pointer to imdct coefs in a1 */
diff --git a/apps/codecs/libmad/layer3.c b/apps/codecs/libmad/layer3.c
index b5fa2be6f5..6d528ea52c 100644
--- a/apps/codecs/libmad/layer3.c
+++ b/apps/codecs/libmad/layer3.c
@@ -1775,8 +1775,6 @@ void imdct36(mad_fixed_t const X[18], mad_fixed_t x[36])
mad_fixed_t t[16];
/* assumes FRACBITS = 28 */
asm volatile (
- "move.l #0xb0, %%d0\n\t" /* frac. mode, saturate, round */
- "move.l %%d0, %%macsr\n\t"
"move.l (4*4, %[X]), %%d0\n\t"
"move.l #0x0ec835e8, %%d1\n\t"
"mac.l %%d0, %%d1, (13*4, %[X]), %%d0, %%acc0\n\t"
diff --git a/apps/codecs/libmad/synth.c b/apps/codecs/libmad/synth.c
index bdec4258fb..4315e239e8 100644
--- a/apps/codecs/libmad/synth.c
+++ b/apps/codecs/libmad/synth.c
@@ -42,6 +42,11 @@ void mad_synth_init(struct mad_synth *synth)
synth->pcm.samplerate = 0;
synth->pcm.channels = 0;
synth->pcm.length = 0;
+ #if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+ /* init the emac unit here, since this function should always be called
+ before using libmad */
+ coldfire_set_macsr(EMAC_FRACTIONAL | EMAC_SATURATE | EMAC_ROUND);
+ #endif
}
/*
@@ -582,8 +587,6 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame,
mad_fixed_t const (*Dptr)[32];
mad_fixed64hi_t hi;
- asm volatile("move.l #0x20, %macsr"); /* fractional mode */
-
for (ch = 0; ch < nch; ++ch) {
sbsample = &frame->sbsample[ch];
filter = &synth->filter[ch];