Skip to main content

Notice

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: The lossy compression of Wavpack4 (Read 6694 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

The lossy compression of Wavpack4

Hi David, Hi Roberto,

can you explain here quickly how the lossy compression of Wavpack4 is working ? In fact, i have a couple of questions i am interested in :

1. Is it wavelet based, or normal DCT/MDCT ?

2. ( if 1. is true : ) On how many samples is DCT performed on ?

3. How does that compare to Vorbis / AAC ?

4. How can you switch from lossy to lossless on a per-block basis ?

Thanks in advance for your answers !

The lossy compression of Wavpack4

Reply #1
Quote
1. Is it wavelet based, or normal DCT/MDCT ?

Neither of them. It's pure quantization. (Think of it as ADPCM on steroids)

Quote
3. How does that compare to Vorbis / AAC ?


It requires quite higher bitrates to reach transparency. But there are much fewer problem cases, since it doesn't apply any psychoacoustic processing nor (M)DCT, and the only artifact you'll ever find is quantization noise, also known as hissing. There will be no pre-echo, smearing, dropouts...

Quote
4. How can you switch from lossy to lossless on a per-block basis ?


This question is for David

Regards;

Roberto.

The lossy compression of Wavpack4

Reply #2
Quote
It requires quite higher bitrates to reach transparency. But there are much fewer problem cases, since it doesn't apply any psychoacoustic processing nor (M)DCT, and the only artifact you'll ever find is quantization noise, also known as hissing. There will be no pre-echo, smearing, dropouts...

Yeah !
That's make me think WavPack - hybrid mode - is the best lossy codec if you accept to go up to ~ 320/350 kbps. 

The lossy compression of Wavpack4

Reply #3
Quote
.. since it doesn't apply any psychoacoustic processing nor (M)DCT ....

What a pitty  ..... i was just about to ask Frank if he doesnt want to join Wavpack development with his psy model, as obviously all the other stuff he wants to implement into MPC for SV8 is already existing in Wavpack4, like multichannel, a nice framing, an existing library, a way to write single blocks into other containers, etc.  .....

The lossy compression of Wavpack4

Reply #4
Quote
What a pitty  ..... i was just about to ask Frank if he doesnt want to join Wavpack development with his psy model, as obviously all the other stuff he wants to implement into MPC for SV8 is already existing in Wavpack4, like multichannel, a nice framing, an existing library, a way to write single blocks into other containers, etc.   .....

I don't think that is a good idea. First, because WavPack already has a niche as being a hard-to-break (in the sense of making it output artifacts) codec due to it's simplicity. Once you start adding all kinds of fancy bitrate reduction techniques (MDCT, psychoacoustics, lossy stereo coding, etc.), problem samples start appearing at a fast pace.

Second because, according to David, the more complex the codec, the bigger is the overhead in the correction file. You can check that by doing something like encoding a file to MP3 or AAC, decode it, inverse-paste the stream on CoolEdit, and encode the inverse with a lossless codec.

Third because WavPack is very few supported. In that aspect, AAC would be much more interesting since it's already supported in several platforms, hardware support is promising and has several secondary tools (TNS, SBR, etc.) that would probably help Klemm improve quality even more.

Regards;

Roberto.


 

The lossy compression of Wavpack4

Reply #6
Quote
AAC[...] has several secondary tools (TNS, SBR, etc.) that would probably help Klemm improve quality even more.

Regards;

Roberto.

  I hate to disagree with Roberto, he's right most of the time.
but i'm not sure TNS or SBR can improve the quality.

Those tools are targeted for low bitrate, right ?
I think MPC's most advantage is to be used @high bitrate to provide highest quality as possible.
But for those low rates, TNS/SBR will improve the quality for sure, let's say under 128 kbps.
Please correct me if i'm wrong 
Nick

The lossy compression of Wavpack4

Reply #7
ChristianHJW:
When you mentioned that Frank Klemm had said that subband coding and transform coding would achieve the same performance if they use the same psy model, I had the thought that maybe simple quantization could also achieve the same performance. It might be that all three are mathematically equivalent ways of solving the same problem. In the case of simple quantization, the psy model would generate the coefficients for high-order noise shaping that would be applied to the broadband quantization error signal. Interesting...

As for WavPack's lossy mode, Roberto is correct in that there is currently no psy model used. However, the VBR mode will use a simple one to determine the required bitrate and first-order noise shaping to achieve the desired transparency. Because of the simplicity, it will still not be able to approach the quality of other codecs at low bitrates (it doesn't ever go below 192 kbps), but also because of the simplicity I hope to have a mode that is always transparent at some average bitrate well short of lossless.

In WavPack 4.0, each block can have a different bitrate, so to achieve a lossless block you just crank up the bitrate for that block. This is not inefficient like it sounds because the encoder will never use more bits than it needs.

The lossy compression of Wavpack4

Reply #8
Quote
Those tools are targeted for low bitrate, right ?

Nope. you are confusing TNS with PNS

TNS = Temporal Noise Shaping. It's a wonderful tool that helps kill pre-echo, at any bitrate.
PNS = Perceptual Noise Substitution. Improves quality at low bitrates.

Quote
I think MPC's most advantage is to be used @high bitrate to provide highest quality as possible.


Right. So let's make it (morphed into AAC) advantageous at low bitrates too

SBR already proved (check my 64kbps listening test) how amazingly advantageous it can be to the underlying codec - just compare QuickTime to HE AAC and FhG MP3 to MP3pro.

Regards;

Roberto.

The lossy compression of Wavpack4

Reply #9
Quote
That's make me think WavPack - hybrid mode - is the best lossy codec if you accept to go up to ~ 320/350 kbps

Don't forget about OptimFrog lossy