HydrogenAudio

Lossless Audio Compression => WavPack => Topic started by: Valsu on 2017-08-28 21:20:44

Title: fixed: rare case of noise-shaping triggering a lossy mute
Post by: Valsu on 2017-08-28 21:20:44
So Wavpack < 5.1 was hit (again?) by lossy stuff creeping into lossless music. I converted quite some files with Wavpack 5.0. In the Git log it says
Quote
fix issue where noise-shaping falsely triggers lossy muting
    - only in very rare cases (detected with pathological testing)
How likely is it that any of my music has become affected by this bug?
Title: Re: fixed: rare case of noise-shaping triggering a lossy mute
Post by: bryant on 2017-08-29 00:00:26
How likely is it that any of my music has become affected by this bug?
Hi, and good question!

First of all, this does not affect lossless compression; neither the pure lossless mode nor the hybrid (dual file) lossless mode.

This just affects the hybrid mode in lossy (single file) playback, and I actually doubt that any real music could ever trigger this. I was able to make this happen using pathological test signals that I created intentionally to reveal potential problems like this.

So the answer to your question is “extremely unlikely”, but if you did use the hybrid mode (which from your question sounds like you didn't) and have any fear that you might have affected files, you can verify them with the “wvunpack -vi” command (the -i option forces lossy mode even if the correction file is present). This error will show up with that test.

The funny thing is that this failure is not actually in the encode/decode process at all, but is in the code that attempts to catch decode errors early during playback. In these rare cases that check was triggering on what it thought was corrupt data (and muting the output) when actually everything was fine. I designed this to prevent bursts of noise from being heard when corrupted files are decoded, but now that I have block checksums that are verified before any decoding, it might make sense to remove that additional check.
Title: Re: fixed: rare case of noise-shaping triggering a lossy mute
Post by: Valsu on 2017-08-29 16:30:08
Hi David, thanks for your quick and exhaustive response. I did indeed use lossless encoding without hybrid mode, so I'm glad this bug passed by without doing any harm. I'm now reencoding using hybrid though, as I finally got another audio player supporting Rockbox. Time to put that Wavpack support to good use again ;)
Title: Re: fixed: rare case of noise-shaping triggering a lossy mute
Post by: bryant on 2017-08-30 04:03:11
Time to put that Wavpack support to good use again ;)
Great...I'm glad to hear the Rockbox support is still being used by someone besides me (I have four Rockbox'd DAPs, including two iRiver H120s with upgraded HDs).