Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Noise reduction in WavPack lossy (Read 3185 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Noise reduction in WavPack lossy

I'm a really big fan of WavPack lossless, and like to experiment... So I tried setting up some strange tests for the hybrid mode.

First, I hear that hybrid mode sounds much better than most other codecs for transcoding (thanks for all that work, den), but has a distinct noise floor that lowers as the bitrate increases.

So... I WaveGain'd my wave file before I encoded it in WavPack... I used the Strong Noise Shaping to hopefully get the most masked dither noise possible, and here are my findings... The only thing that would keep me from using the hybrid mode is that 320kbps is a bit too high to achieve a sufficiently low noise floor...  But I digress. =P

And yes, I know the minimum is 265kbps... I wanted it to try to hit minimum bitrate.

First, here are the values for the original .wav (Jack Johnson - The Horizon Has Been Defeated)
Code: [Select]
wavpack -n -h -b256 -j0 : -37.75 dB average, -18.52 dB peak
wavpack -n -h -b256 -j1 : -37.78 dB average, -18.25 dB peak

From what I understand, that's pretty bad... Now, if 320 is sufficient, here's what we should be looking for:
Code: [Select]
wavpack -n -h -b320 -j0 : -41.40 dB average, -24.77 dB peak
wavpack -n -h -b320 -j1 : -44.83 dB average, -27.69 dB peak

So, here come the WaveGain'd (Dither with Strong Noise Shaping) .wavs...
Code: [Select]
wavpack -n -h -b256 -j0 : -45.61 dB average, -27.26 dB peak
wavpack -n -h -b256 -j1 : -45.66 dB average, -27.65 dB peak

Comes out better than 320kbps... o.O

A few things...

1.  I realize that this is WavPack's quantization error that's reported... But that shouldn't be a problem, because the original quantization (dither, actually) is supposed to be masked by its noise shaping... so it shouldn't be a problem.  It seems to me that the dither actually focuses the noise in the perfect places that WavPack would have to add it, therefore making WavPack's percieved impact on the sound quality minimal.

2.  This really goes under another thread, but... this tells me that WavPack 4, if it had some better-tuned noise selection algorithms (i.e. where to distribute the quantization noise spectrally), it could have some amazing potential.

If you all see anything wrong with my reasoning or method, please lemme know...  And if not...  This is great news to me. =D

Noise reduction in WavPack lossy

Reply #1
Virtually the whole of the difference you're seeing is because of the use of WaveGain. Try testing using wave files that have been passed through WaveGain with No Dither, Dither without Noise Shaping, etc. You'll see that the major part of the difference is down to WaveGain and not the type of dither applied.

Noise reduction in WavPack lossy

Reply #2
Ahh... I see. =P

So, more or less, it's pointless?  Statistically, it seems to help, but doesn't really?  That's what I'm seeing. =/

Just being hopeful, but maybe the dither helps mask the quantization nosie a bit more? =/  Den should test that... I certainly don't have the ears for it.

Danke for the correction, john33.

EDIT: Changed the whole thing... thinking on 2 hours of sleep leads to terrible conclusions.

Noise reduction in WavPack lossy

Reply #3
Hey John, thanks for covering for me when I'm busy sleeping! 

John's right, all the difference you were seeing was due to the "gain" part of WaveGain. I believe that the dither that WaveGain adds would be down about -96 dB, so it would make absolutely no difference to the relatively high levels of noise introduced by WavPack. But, if you shift the level of the wav down (for example) 10 dB, you will see the reported WavPack noise drop exactly 10 dB.

This is why those noise figures are only useful for comparing different modes and bitrates on the same file; they really are useless for determining anything else.

Noise reduction in WavPack lossy

Reply #4
Alright, I understand... I was under the impression that the "noise" values reported by WavGain were a measure of the quantization error noise introduced by the encoder, not the overall track noise.

That would explain it. ;D