Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11235 - libmad asm tweaks for ARM9 and above

Attached to Project: Rockbox
Opened by MichaelGiacomelli (saratoga) - Sunday, 02 May 2010, 08:30 GMT+2
Last edited by MichaelGiacomelli (saratoga) - Monday, 29 November 2010, 23:41 GMT+2
Task Type Patches
Category Codecs
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Release 3.4
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

libmad is full of code that doesn't take into account pipeline interlocks on ARM9 and above. This fixes a bit of it, and gives a ~200kHz improvement.

Additionally, I noticed some of the ASM defines (PROD_ODDBACK_A, etc) are never used. Looking at the SVN logs, they probably never should have been committed. Anyone have an idea about them?
   libmadasmv1.patch (10.9 KiB)
 apps/codecs/libmad/synth.c |  144 ++++++++++++++++++++++-----------------------
 1 file changed, 72 insertions(+), 72 deletions(-)

This task depends upon

Closed by  MichaelGiacomelli (saratoga)
Monday, 29 November 2010, 23:41 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  Committed in r28624 and r28710. ASM is now fairly close to optimal for arm9. Further improvements will require algorithmic changes, see: FS#11759.
Comment by Andree Buschmann (Buschel) - Wednesday, 12 May 2010, 08:18 GMT+2
Merged against r25938.

Edit: Tested on PP502x -> 0.1 MHz slower. Sounds like we need compile options for <=ARMV4 and >ARMV4.
   libmadasmv2.patch (2.8 KiB)
 apps/codecs/libmad/synth.c |   36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

Comment by Dave Hooper (stripwax) - Wednesday, 19 May 2010, 15:12 GMT+2
What if you use r12 instead of r5 ; does that improve anything on PP502x?
Comment by Andree Buschmann (Buschel) - Monday, 24 May 2010, 13:44 GMT+2
Dave, interestingly decoding is exactly as fast as svn when using r12 instead of r5.
   libmadasmv3.patch (2.9 KiB)
 apps/codecs/libmad/synth.c |   36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

Comment by MichaelGiacomelli (saratoga) - Saturday, 20 November 2010, 22:38 GMT+2
Committed libmadasmv3.patch.

----

New patch performs the above scheduling on all of synth_full_arm.S. Saves about 2 MHz on arm9. Still needs some clean up and testing.

Edit: verified on amsv1, amsv2, and nano2g. 2MHz speed up on each.
   libmad_arv4.patch (7.4 KiB)
 apps/codecs/libmad/synth_full_arm.S |  182 ++++++++++++++++++------------------
 1 file changed, 94 insertions(+), 88 deletions(-)

Loading...