summaryrefslogtreecommitdiff
path: root/apps/codecs/libmad/layer12.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/layer12.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/layer12.c')
-rw-r--r--apps/codecs/libmad/layer12.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/codecs/libmad/layer12.c b/apps/codecs/libmad/layer12.c
index c71c005..ccac392 100644
--- a/apps/codecs/libmad/layer12.c
+++ b/apps/codecs/libmad/layer12.c
@@ -185,7 +185,7 @@ int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame)
for (sb = 0; sb < bound; ++sb) {
for (ch = 0; ch < nch; ++ch) {
nb = allocation[ch][sb];
- frame->sbsample[ch][s][sb] = nb ?
+ (*frame->sbsample)[ch][s][sb] = nb ?
mad_f_mul(I_sample(&stream->ptr, nb),
sf_table[scalefactor[ch][sb]]) : 0;
}
@@ -198,13 +198,13 @@ int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame)
sample = I_sample(&stream->ptr, nb);
for (ch = 0; ch < nch; ++ch) {
- frame->sbsample[ch][s][sb] =
+ (*frame->sbsample)[ch][s][sb] =
mad_f_mul(sample, sf_table[scalefactor[ch][sb]]);
}
}
else {
for (ch = 0; ch < nch; ++ch)
- frame->sbsample[ch][s][sb] = 0;
+ (*frame->sbsample)[ch][s][sb] = 0;
}
}
}
@@ -492,13 +492,13 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
II_samples(&stream->ptr, &qc_table[index], samples);
for (s = 0; s < 3; ++s) {
- frame->sbsample[ch][3 * gr + s][sb] =
+ (*frame->sbsample)[ch][3 * gr + s][sb] =
mad_f_mul(samples[s], sf_table[scalefactor[ch][sb][gr / 4]]);
}
}
else {
for (s = 0; s < 3; ++s)
- frame->sbsample[ch][3 * gr + s][sb] = 0;
+ (*frame->sbsample)[ch][3 * gr + s][sb] = 0;
}
}
}
@@ -512,7 +512,7 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
for (ch = 0; ch < nch; ++ch) {
for (s = 0; s < 3; ++s) {
- frame->sbsample[ch][3 * gr + s][sb] =
+ (*frame->sbsample)[ch][3 * gr + s][sb] =
mad_f_mul(samples[s], sf_table[scalefactor[ch][sb][gr / 4]]);
}
}
@@ -520,7 +520,7 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
else {
for (ch = 0; ch < nch; ++ch) {
for (s = 0; s < 3; ++s)
- frame->sbsample[ch][3 * gr + s][sb] = 0;
+ (*frame->sbsample)[ch][3 * gr + s][sb] = 0;
}
}
}
@@ -528,7 +528,7 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
for (ch = 0; ch < nch; ++ch) {
for (s = 0; s < 3; ++s) {
for (sb = sblimit; sb < 32; ++sb)
- frame->sbsample[ch][3 * gr + s][sb] = 0;
+ (*frame->sbsample)[ch][3 * gr + s][sb] = 0;
}
}
}