Update of /cvsroot/rockbox/apps/codecs/libmad
In directory labb:/tmp/cvs-serv3976/apps/codecs/libmad
Modified Files:
imdct_mcf5249.S layer3.c synth.c
Log Message:
Adapted codecs and DSP system to having MACSR saved in thread context.
Index: synth.c
===================================================================
RCS file: /cvsroot/rockbox/apps/codecs/libmad/synth.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- synth.c 9 Jun 2005 14:13:09 -0000 1.5
+++ synth.c 7 Sep 2005 00:24:27 -0000 1.6
@@ -42,6 +42,11 @@
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 @@
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];
Index: imdct_mcf5249.S
===================================================================
RCS file: /cvsroot/rockbox/apps/codecs/libmad/imdct_mcf5249.S,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- imdct_mcf5249.S 25 May 2005 13:32:53 -0000 1.2
+++ imdct_mcf5249.S 7 Sep 2005 00:24:27 -0000 1.3
@@ -32,7 +32,6 @@
* 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 */
Index: layer3.c
===================================================================
RCS file: /cvsroot/rockbox/apps/codecs/libmad/layer3.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- layer3.c 18 Jul 2005 13:09:05 -0000 1.10
+++ layer3.c 7 Sep 2005 00:24:27 -0000 1.11
@@ -1775,8 +1775,6 @@
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"
_______________________________________________
http://cool.haxx.se/mailman/listinfo/rockbox-cvs