summaryrefslogtreecommitdiff
path: root/apps/codecs/libmad/synth.c
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2008-09-20 22:06:12 +0000
committerMichael Giacomelli <giac2000@hotmail.com>2008-09-20 22:06:12 +0000
commit4e36a2b991d58a40d7ea12c9bf41e93736b8b024 (patch)
treee26deeca8209a689bfebfcca18c4dad028d70260 /apps/codecs/libmad/synth.c
parent3d0d6d6bb25eb933d60ca5451b170eaae17dbb65 (diff)
downloadrockbox-4e36a2b991d58a40d7ea12c9bf41e93736b8b024.zip
rockbox-4e36a2b991d58a40d7ea12c9bf41e93736b8b024.tar.gz
rockbox-4e36a2b991d58a40d7ea12c9bf41e93736b8b024.tar.bz2
rockbox-4e36a2b991d58a40d7ea12c9bf41e93736b8b024.tar.xz
Commit FS#9318 - MP3 synthesis filter on COP. Loads the MP3 synth filer on to the CoProcessor on all PortalPlayer devices, resulting in an ~90% speedup according to test_codec on the Sansa. Real world improvement is somewhat less, but still considerable. Allows MP3 decoding at 30MHz without boosting, or use of more DSP/EQ with less boosting/skipping, thus improving battery life. Minor changes to mpegplayer to retain compatibility with libmad changes. Should be no significant changes for other targets or codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18557 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libmad/synth.c')
-rw-r--r--apps/codecs/libmad/synth.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/codecs/libmad/synth.c b/apps/codecs/libmad/synth.c
index c023f01..b1a8491 100644
--- a/apps/codecs/libmad/synth.c
+++ b/apps/codecs/libmad/synth.c
@@ -592,14 +592,14 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame,
int sb;
unsigned int phase, ch, s, p;
mad_fixed_t *pcm, (*filter)[2][2][16][8];
- mad_fixed_t const (*sbsample)[36][32];
+ mad_fixed_t (*sbsample)[36][32];
mad_fixed_t (*fe)[8], (*fx)[8], (*fo)[8];
mad_fixed_t const (*D0ptr)[32];
mad_fixed_t const (*D1ptr)[32];
mad_fixed64hi_t hi0, hi1;
for (ch = 0; ch < nch; ++ch) {
- sbsample = &frame->sbsample[ch];
+ sbsample = &*frame->sbsample_prev[ch];
filter = &synth->filter[ch];
phase = synth->phase;
pcm = synth->pcm.samples[ch];
@@ -1053,7 +1053,7 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame,
int p;
unsigned int phase, ch, s;
mad_fixed_t *pcm, (*filter)[2][2][16][8];
- mad_fixed_t const (*sbsample)[36][32];
+ mad_fixed_t (*sbsample)[36][32];
mad_fixed_t (*fe)[8], (*fx)[8], (*fo)[8];
mad_fixed_t const (*D0ptr)[32], *ptr;
mad_fixed_t const (*D1ptr)[32];
@@ -1061,7 +1061,7 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame,
mad_fixed64lo_t lo;
for (ch = 0; ch < nch; ++ch) {
- sbsample = &frame->sbsample[ch];
+ sbsample = &(*frame->sbsample_prev)[ch];
filter = &synth->filter[ch];
phase = synth->phase;
pcm = synth->pcm.samples[ch];
@@ -1202,7 +1202,7 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame,
mad_fixed64lo_t lo;
for (ch = 0; ch < nch; ++ch) {
- sbsample = &frame->sbsample[ch];
+ sbsample = &frame->sbsample_prev[ch];
filter = &synth->filter[ch];
phase = synth->phase;
pcm = synth->pcm.samples[ch];
@@ -1403,14 +1403,14 @@ void synth_half(struct mad_synth *synth, struct mad_frame const *frame,
{
unsigned int phase, ch, s, sb, pe, po;
mad_fixed_t *pcm1, *pcm2, (*filter)[2][2][16][8];
- mad_fixed_t const (*sbsample)[36][32];
+ mad_fixed_t (*sbsample)[36][32];
register mad_fixed_t (*fe)[8], (*fx)[8], (*fo)[8];
register mad_fixed_t const (*Dptr)[32], *ptr;
register mad_fixed64hi_t hi;
register mad_fixed64lo_t lo;
for (ch = 0; ch < nch; ++ch) {
- sbsample = &frame->sbsample[ch];
+ sbsample = &(*frame->sbsample_prev)[ch];
filter = &synth->filter[ch];
phase = synth->phase;
pcm1 = synth->pcm.samples[ch];