Rockbox

Tasklist

FS#10174 - Distortion in AAC playback in Rockbox versions after 3.0

Attached to Project: Rockbox
Opened by Eric Wasylishen (ericw) - Tuesday, 28 April 2009, 20:14 GMT
Last edited by MichaelGiacomelli (saratoga) - Wednesday, 29 April 2009, 17:44 GMT
Task Type Bugs
Category Codecs
Status Closed
Assigned To No-one
Operating System iPod Nano
Severity Low
Priority Normal
Reported Version Version 3.2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi,
I think I've found a bug in Rockbox's AAC decoding which causes the output to be slightly (but audibly) distorted. I started to notice this on all of my AAC files while using 3.1, and found that switching back to 3.0, the problem went away.

Here are some samples which make the problem easier to see/hear:
-sampleFLAC.flac is a flac encoding of a bell sound, which sounds correct on my PC and all versions of Rockbox.
-sampleAAC.aac is the same sample encoded with iTunes, using the iTunes Plus setting (256kbps VBR 44.1khz). It sounds identical to sampleFLAC on my PC and on Rockbox 3.0, but the sample is distorted on Rockbox 3.1 and 3.2.

I made recordings in Audacity by hooking my ipod up to my computer's line in, and playing my two sample files on different versions of Rockbox. I used the default settings except changed the volume to 0db to make the recordings.

rockbox-3.0-sampleAAC.flac (sampleAAC played on rockbox 3.0 - not distorted)
rockbox-3.0-sampleFLAC.flac (sampleFLAC played on rockbox 3.0 - not distorted)
rockbox-3.1-sampleAAC.flac (sampleAAC played on rockbox 3.1 - distorted)
rockbox-3.1-sampleFLAC.flac (sampleFLAC played on rockbox 3.1 - not distorted)
rockbox-3.2-sampleAAC.flac (sampleAAC played on rockbox 3.2 - distorted)
rockbox-3.2-sampleFLAC.flac (sampleFLAC played on rockbox 3.2 - not distorted)

You can see the distortion quite easily in Audacity.

This is a guess, but I wonder if r18412 is responsible? It looks like one of the only changes to libfaad that made between 3.0 and 3.1.

Thanks,
Eric
This task depends upon

Closed by  MichaelGiacomelli (saratoga)
Wednesday, 29 April 2009, 17:44 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in r20812.
Comment by MichaelGiacomelli (saratoga) - Wednesday, 29 April 2009, 01:46 GMT
Good catch. I had to use the test_codec plugin to dump wav's of the rockbox output and then compare sample to sample to find anything wrong, but it does look like accuracy went down a bit when I merged the IMDCT from Vorbis. The actual problem is probably this:

http://svn.rockbox.org/viewvc.cgi/trunk/apps/codecs/libfaad/filtbank.c?annotate=18412&diff_format=l&pathrev=18412#l234

I don't think I should have hard coded which window types to use. I'll try and fix that when i have more free time.

Loading...