diff options
| author | Michael Giacomelli <giac2000@hotmail.com> | 2008-09-20 22:06:12 +0000 |
|---|---|---|
| committer | Michael Giacomelli <giac2000@hotmail.com> | 2008-09-20 22:06:12 +0000 |
| commit | 4e36a2b991d58a40d7ea12c9bf41e93736b8b024 (patch) | |
| tree | e26deeca8209a689bfebfcca18c4dad028d70260 /apps/plugins | |
| parent | 3d0d6d6bb25eb933d60ca5451b170eaae17dbb65 (diff) | |
| download | rockbox-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/plugins')
| -rw-r--r-- | apps/plugins/mpegplayer/Makefile | 2 | ||||
| -rw-r--r-- | apps/plugins/mpegplayer/audio_thread.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/apps/plugins/mpegplayer/Makefile b/apps/plugins/mpegplayer/Makefile index 66a6142..7f90cbc 100644 --- a/apps/plugins/mpegplayer/Makefile +++ b/apps/plugins/mpegplayer/Makefile @@ -10,7 +10,7 @@ INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(APPSDIR)/plugins/lib -I$(OUTDIR) -I$(BUILDDIR) CFLAGS = $(INCLUDES) $(GCCOPTS) -O2 $(TARGET) $(EXTRA_DEFINES) \ - -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN + -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN -DMPEGPLAYER ifdef APPEXTRA INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) diff --git a/apps/plugins/mpegplayer/audio_thread.c b/apps/plugins/mpegplayer/audio_thread.c index 838dcad..3515815 100644 --- a/apps/plugins/mpegplayer/audio_thread.c +++ b/apps/plugins/mpegplayer/audio_thread.c @@ -55,6 +55,9 @@ static struct mad_stream stream IBSS_ATTR; static struct mad_frame frame IBSS_ATTR; static struct mad_synth synth IBSS_ATTR; +/*sbsample buffer for mad_frame*/ +mad_fixed_t sbsample[2][36][32]; + /* 2567 bytes */ static unsigned char mad_main_data[MAD_BUFFER_MDLEN]; @@ -229,6 +232,10 @@ static int audio_buffer(struct stream *str, enum stream_parse_mode type) /* Initialise libmad */ static void init_mad(void) { + /*init the sbsample buffer*/ + frame.sbsample = &sbsample; + frame.sbsample_prev = &sbsample; + mad_stream_init(&stream); mad_frame_init(&frame); mad_synth_init(&synth); |