1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Michael Giacomelli 2008-09-20 22:06:12 +00:00
parent 3d0d6d6bb2
commit 4e36a2b991
9 changed files with 180 additions and 32 deletions

View file

@ -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;
}
}
}