Index: apps/codecs/libmad/SOURCES =================================================================== --- apps/codecs/libmad/SOURCES (revision 26731) +++ apps/codecs/libmad/SOURCES (working copy) @@ -14,6 +14,5 @@ #endif #if defined(CPU_ARM) imdct_l_arm.S -dct32_arm.S synth_full_arm.S #endif Index: apps/codecs/libmad/synth.c =================================================================== --- apps/codecs/libmad/synth.c (revision 26731) +++ apps/codecs/libmad/synth.c (working copy) @@ -67,7 +67,8 @@ } } -#ifdef FPM_ARM +#if 0 /* dct32 asm implementation is slower on current arm systems */ +/* #ifdef FPM_ARM */ void dct32(mad_fixed_t const in[32], unsigned int slot, mad_fixed_t lo[16][8], mad_fixed_t hi[16][8]); Index: apps/codecs/libmad/libmad.make =================================================================== --- apps/codecs/libmad/libmad.make (revision 26731) +++ apps/codecs/libmad/libmad.make (working copy) @@ -11,7 +11,18 @@ # (one for codec, one for mpegplayer) # so a little trickery is necessary -MADFLAGS = $(CODECFLAGS) -UDEBUG -DNDEBUG -O2 -I$(APPSDIR)/codecs/libmad -DHAVE_LIMITS_H +# Extract optimization level ('-O') from compile flags. Will be set later. +MADFLAGS = $(filter-out -O%,$(CODECFLAGS)) -I$(APPSDIR)/codecs/libmad +MADFLAGS += -UDEBUG -DNDEBUG -DHAVE_LIMITS_H + +# libmad is faster on ARM-targets with -O1 than -O2 +ifeq ($(CPU),arm) + MADFLAGS += -O1 +else + MADFLAGS += -O2 +endif + +# MPEGplayer MPEGMADFLAGS = $(MADFLAGS) -DMPEGPLAYER # libmad Index: apps/codecs/mpa.c =================================================================== --- apps/codecs/mpa.c (revision 26731) +++ apps/codecs/mpa.c (working copy) @@ -202,7 +202,7 @@ * Run the synthesis filter on the COProcessor */ -static int mad_synth_thread_stack[DEFAULT_STACK_SIZE/sizeof(int)/2] IBSS_ATTR; +static int mad_synth_thread_stack[DEFAULT_STACK_SIZE/sizeof(int)] IBSS_ATTR; static const unsigned char * const mad_synth_thread_name = "mp3dec"; static unsigned int mad_synth_thread_id = 0;