Rockbox

Tasklist

FS#10470 - Vorbis decoder glitches

Attached to Project: Rockbox
Opened by Christopher Williams (christop) - Tuesday, 28 July 2009, 04:02 GMT
Last edited by Andree Buschmann (Buschel) - Thursday, 03 February 2011, 19:59 GMT
Task Type Bugs
Category Codecs
Status Closed
Assigned To No-one
Operating System Sansa e200
Severity Low
Priority Normal
Reported Version Version 3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

While playing Michael Jackson's "Beat It" encoded as Ogg Vorbis (quality 2.0), I noticed some subtle clicks in the left channel at some points in the song. I played around with all sorts of audio settings (volume, bass, treble, crossfeed, etc) to try to get rid of it, but it still exists with all of those. Then I enabled the equalizer and changed the Precut to -3.0dB. This got rid of the clicks.

I recorded the left channel output of my Sansa to my computer at 96k sample rate with different levels of Equalizer Precut. All of the audio settings besides Precut are set to 0 or are disabled. I attached a screenshot of the waveform, and I highlighted the waveform of one "click" to make it glaringly obvious. The -2.0dB and -3.0dB recordings look fairly close to the original ogg, with a bit of smoothing.

I also attached a 10-second sample of the song (encoded in ogg vorbis, quality 2.0) which triggers this glitch for me. The click is at about 8.1 seconds into the sample. This happens in the "S" sound in the words "So beat it" (only in the left channel).

It should be noted that I also played an mp3 and a WAV (or Wavpack) encoded version of the same song, also on my Sansa, and I couldn't hear any clicks in them. I also played the Ogg file on my computer and couldn't hear any clicks there either. I also tried different encoding qualities, and at lower qualities (-1.0) the clicking was worse. I haven't tried higher qualities. I can record those samples as well if someone is interested.

From what I can tell, there is probably some numeric overflow in the vorbis decoder. I haven't had much chance lately to look at the code to say for sure, though.
This task depends upon

Closed by  Andree Buschmann (Buschel)
Thursday, 03 February 2011, 19:59 GMT
Reason for closing:  Out of Date
Additional comments about closing:  Outdated, no feedback since 9 months. No file available for further investigation.
Comment by Magnus Holmgren (learman) - Tuesday, 28 July 2009, 09:29 GMT
Well, at the 8.1 second mark, there's a fair amount of clipping, even when decoded by Foobar or Audacity, but maybe there are other things that make it worse. Given that the problem disappear with pre-cut suggests that the problem isn't in the decoder, but in some later stage (you can check that, if you can compile the test_codec plugin and use it to convert the file to wav). From the waveform plot, it looks like negative values aren't clipped properly.

I recently noticed similar subtle clicks on an AAC track, but those disappeared when I used test_codec (and they didn't show up on the Vorbis version). That track wasn't close to clip though (even without ReplayGain on)...
Comment by Christopher Williams (christop) - Tuesday, 28 July 2009, 18:51 GMT
Magnus, I ran test_codec on the sample file as you suggested. I didn't even know there was a test_codec plugin before you mentioned it. :) The output file from test_codec is test.wav.

I recorded the output of test.wav with Precut levels of 0.0dB and -3.0dB. I also included the ogg sample file at 0.0dB, which I recorded earlier, for reference. Playing the test.wav file gives very similar clipping results to the ogg file. For completeness I also decoded the ogg sample file to WAV on my computer and played it at 0dB and -3dB precut, and it exhibits the same behavior (though I didn't record those samples). It appears the Rockbox vorbis decoder works great, and I think you're right about the problem being at some later stage than the decoder itself. As that appears to be the case, can some admin change the bug's summary to something more accurate (if it really matters)?

I attached a test.wv file, which is the test.wav file from the test_codec plugin, compressed losslessly as wavpack for a smaller file size.
   test.png (68.8 KiB)
   test.wv (1.09 MiB)
Comment by Magnus Holmgren (learman) - Sunday, 06 September 2009, 10:19 GMT
The test codec can now include DSP processing as well. I ran the above ogg file through it with and without the DSP (with all effects off) and there was no difference between the resulting files. So, the question is, what processing are you using? Pretty much everything except volume under the Sounds menu goes via the DSP on e200:s.
Comment by Dave Hooper (stripwax) - Friday, 19 March 2010, 23:39 GMT
I will close this issue if no response from original poster is received.

Loading...