FS#6058 - AAC decoder tuning (ColdFire mainly).

Attached to Project: Rockbox
Opened by Magnus Holmgren (learman) - Sunday, 24 September 2006, 13:35 GMT
Task Type Patches
Category Codecs
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


This patch modifies the IRAM usage in the AAC decoder (the libfaad part).

For ColdFire targets, this improves speed noticably. A 160 kbps (stereo) test track that previously did not decode in realtime now does so, with a boost ratio of about 70% (on an iRiver H140, with crossfeed and 2 equalizer bands enabled). Worth noting is that without moving the Z1 array to IRAM in mdct.c:faad_imdct(), the decoding is just about realtime.

As I don't have any ARM target to test on, the changes are provided here, so that others can test.

Note that the patch also reconfigures libfaad to only support LC AAC (this does not remove support for HE AAC, but I haven't tested such tracks).
This task depends upon

Closed by  Magnus Holmgren (learman)
Sunday, 24 September 2006, 19:52 GMT
Reason for closing:  Accepted
Comment by Dave Chapman (linuxstb) - Sunday, 24 September 2006, 16:02 GMT
I've just tested your patch on my 5g ipod with good results.

My 128kbps test file needs 100% boost without your patch, and the PCM buffer was never more than about half full. With your patch, it's playing at around 60%-65% boost with the PCM buffer staying full.
Comment by Steve Bavin (pondlife) - Sunday, 24 September 2006, 16:48 GMT
On my H340 this now enables realtime playback for the first time of my test AAC file!
Comment by Ben Keroack (bk) - Sunday, 24 September 2006, 19:55 GMT
On the X5, 128k and 192k VBR files play realtime with boost at about 80-85%. A 320kbps file plays nearly realtime at 100% boost (skips every 30 seconds or so). One 'enhanced' AAC podcast I tried refused to play, the WPS displaying "No file!".

The bug described here still exists:

The 66kbps/32000Hz test file plays at about 70% boost, with the audio pitch-shifted up.