Hydrogenaudio Forums

Lossless Audio Compression => WavPack => Topic started by: softrunner on 2013-03-22 02:34:29

Title: WavPack VBR (quality oriented) mode
Post by: softrunner on 2013-03-22 02:34:29
bryant, are you going to implement some quality mode in WavPack? Three years ago you wrote: "I would someday like to add a VBR “quality based” mode to WavPack hybrid (which would counter one advantage of LossyWAV)". Maybe the time for it has come? I do not see, how it is possible to be satisfied with ABR, because for some files 192 kbps is enough, and some needs 400+ kbps. Using 400+ kbps for all files hits file size, while using lower bitrate hits quality.
Title: WavPack VBR (quality oriented) mode
Post by: shadowking on 2013-03-24 08:55:59
I would like this too. I still think you will end up with 350..400k for normal signals but critical signals could get a lot more. Moreover, quality differences between the modes will be eliminated.

ABR is less flexible but not really worse than VBR in the higher bitrates. As you said 400+k would suffice but is wasteful. For lossywav I find that without noise shaping you also need a similar rate and 350k at the very least. I think with these codecs to cannot achieve consistently good quality and make it alternative to the TC: you need double the rate  - 300k or more.

Currently I find a setting of -b4 -x5 to be sufficient so far on my collection of 400 cd's. This yields 370k on average.
Title: WavPack VBR (quality oriented) mode
Post by: darkbyte on 2013-03-24 16:35:42
Although i'm testing Opus nowadays for portable use i vote for this. It would be still awesome if the achievements of LossyWAV could be more tightly intergrated with WavPack hybrid for example.
Title: WavPack VBR (quality oriented) mode
Post by: softrunner on 2013-03-25 02:22:06
Currently I find a setting of -b4 -x5 to be sufficient so far on my collection of 400 cd's. This yields 370k on average.

Do you remove .wvc files (permanently)?
Title: WavPack VBR (quality oriented) mode
Post by: bryant on 2013-03-28 05:36:11
I still would like to work on this as an enhancement to the lossy mode some day, but the problem is that I really don't know how to go about it. I tried a real psychoacoustic hearing model early on but abandoned it when it didn't work well. I have thought about adding some simple analysis that would tweak up or down the bitrate (maybe based on a tonality estimate) but I'm not sure if that would work well either. I don't have the time to get involved with the level of testing and tweaking that LossyWAV went through, and I don't think I can use the LossyWAV algorithm directly because I would end up with the exact same bitrate.

If anyone else wanted to give this a shot I would be happy to help and bounce ideas around, but at this point I don't have the spare time to put any effort into it myself.
Title: WavPack VBR (quality oriented) mode
Post by: shadowking on 2013-03-28 10:06:13
Currently I find a setting of -b4 -x5 to be sufficient so far on my collection of 400 cd's. This yields 370k on average.

Do you remove .wvc files (permanently)?



I think its not a bad idea to back them up (.WVC) to external HDD or optical media. Use only .WV as your main collection and include them in your backup routine.


To be clear I am usually happy with lame 150..200k as long as you don't use DSP, transcode, have unusual listening habit, have or listen to particular troublesome samples. In that sense lossless offers little to no benefit and ripping straight to Lame -V3 is fine with me. I would however like the ability to transcode to another format, bitrate or even CBR.  I would like high quality - some thing a bit more than mp3. At the same time like yourself I consider lossless excessive: 370k vs 870k. The ability to go lossless may also be important and mp3, mpc, acc ,ogg don't make that easy or possible at all.

-
Title: WavPack VBR (quality oriented) mode
Post by: softrunner on 2013-03-30 14:02:04
I still would like to work on this as an enhancement to the lossy mode some day, but the problem is that I really don't know how to go about it. I tried a real psychoacoustic hearing model early on but abandoned it when it didn't work well. I have thought about adding some simple analysis that would tweak up or down the bitrate (maybe based on a tonality estimate) but I'm not sure if that would work well either. I don't have the time to get involved with the level of testing and tweaking that LossyWAV went through, and I don't think I can use the LossyWAV algorithm directly because I would end up with the exact same bitrate.

If anyone else wanted to give this a shot I would be happy to help and bounce ideas around, but at this point I don't have the spare time to put any effort into it myself.

It is sad, because if you don't do it, probably nobody will. Some first step is needed, then, at least, some testing will be possible. Currently there is nothing to work with.

I think its not a bad idea to back them up (.WVC) to external HDD or optical media. Use only .WV as your main collection and include them in your backup routine.

This is not my case, I would like to drop it permanently.
Title: WavPack VBR (quality oriented) mode
Post by: shadowking on 2013-03-31 06:05:51
Perhaps making an experimental encoder using simple tonality estimation would be a start. Maybe if it works with the current DNS quality might be better than expected.
Title: WavPack VBR (quality oriented) mode
Post by: shadowking on 2013-03-31 06:34:40
Currently I find a setting of -b4 -x5 to be sufficient so far on my collection of 400 cd's. This yields 370k on average.

Do you remove .wvc files (permanently)?


I would too. But keeping them is not always for quality reasons. It just adds flexibility . One thing is that these days I am against using the -hh or even -h for lossy mode as I find a normal mode + -x to work better without altering decoding speed. I still have old encodes with -hh and cannot reverse it.

I find it easy to move the correction files to a zip archive dump that file offline.

I don't think one has to distrust ABR.  Its true that a proper tuned VBR is ideal, but the current system is also safe even for high demand using -b350x5 . The -x and -dns are doing constant analysis to prevent quality from falling too much. So there is a very basic 'psymodel' in place.
Title: WavPack VBR (quality oriented) mode
Post by: shadowking on 2013-07-31 15:54:47
I've experimented further this time with the aim to find *consistent* behavior at 'economical bitrates' < 400+k . The aim is high-extreme high quality for those who dont want to keep correction files, a possibility to transcode to mp3 or other lossy and a substitute to lossywav.

I arrived at -b320hhx6 as the lower end economy setting and -b380hhx6 as the top end setting. The lower setting is probably enough for nearly all commercial CD's . Bad cases may be a slight elevation of hiss probably not perceptible at normal listening situations  -b380hhx6 can be used for rare CD's or paranoid needs. Of course 500k will also do but the aim is economy and quality without correction files. -h may be used instead of -hh for those concerned with portable use. There may be a slight quality decrease. For PC archiving / use I'd go with -hh. -x5 also works well and can save %20 encode time. To minimize CPU load when multitasking , the -l switch can be used.  I also noted a positive improvement using -b320hhx6 --blocksize=4410.
Title: WavPack VBR (quality oriented) mode
Post by: bryant on 2013-08-03 22:22:17
I've experimented further this time with the aim to find *consistent* behavior at 'economical bitrates' < 400+k . The aim is high-extreme high quality for those who dont want to keep correction files, a possibility to transcode to mp3 or other lossy and a substitute to lossywav.

Thanks for documenting your experiments, shadowking! These pretty much match my expectations and matches what I use (except I use 384 kbps just because it's a “standard”, which is a little silly on my part because WavPack lossy does not hold the bitrates that tight anyway).

One thing interesting though is your observation about short blocks helping. I have suspected that the “extra” modes might benefit from shorter blocks because that would allow the predictors to be tuned more quickly to changing audio. However, you might want to check the actual resulting bitrates because the overhead associated with each block will be greater, especially with -hh (the higher modes have longer headers).

David
Title: WavPack VBR (quality oriented) mode
Post by: shadowking on 2013-08-04 14:31:53
I did some more tests. --blocksize=4410 adds 6 /8 / 9 kbps to normal / -h / -hh.  So yes its not a lot but the -hh seems to suffer more than default mode with bloat.  I started wondering about an alternative route using the normal mode. This decreases decoding overheads and allows faster encoding. I still want economical bitrates if possible. I know in the past I used an inflated bitrate to counter the quality loss going from high modes to normal.  I started with 350x6 and 410x6 as the upper limit.

I also tested the Atem lied sample again at medium volume. I could abx 320hhx6, 350hhx6 and the --blocksize=4410 variant. There is one spot that is not to hard to abx. I felt --blocksize=4410 was better but could not prove it with this sample. At 384hhx6 i was defeated several times in abx but -b384x6 was much inferior. Using my upper end alternative of -b415x6 was the solution. I tried -b415x4 and was equally impressed.  I tried -b384x6 which was easy to abx, this time with --blocksize=4410 and there was really an improvement. I arrived at 6/8 vs 9/10 for -b384x6.

My alternative [faster] but higher bitrate version using the normal mode:

350 ~ 415k using at least -x4.  --blocksize=4410 may also help - bitrate increases by 1.5 %.  Average bitrate is 367 ~ 433.
Title: WavPack VBR (quality oriented) mode
Post by: DARcode on 2013-08-11 13:14:59
At 384hhx6 i was defeated several times in abx but -b384x6 was much inferior. Using my upper end alternative of -b415x6 was the solution. I tried -b415x4 and was equally impressed.  I tried -b384x6 which was easy to abx, this time with --blocksize=4410 and there was really an improvement. I arrived at 6/8 vs 9/10 for -b384x6.
Very interesting indeed, thank you very much.
I know you're trying to steer clear of high modes, but do you think you could find the time to test -b384hx6 with default block size (or even better -b4hx6)?
That's what I'm using, since my Android smartphone can handle the workload with just a minor hit on battery life, and your ears are waaay better'n mine, thanks.
Title: WavPack VBR (quality oriented) mode
Post by: darkbyte on 2013-08-18 21:24:01
I wonder if it's feasible to achieve good quality with WavPack lossy in the 275-320kbps bitrate range on CD audio. That's what i am using for high quality lossy setting at the moment (lame3100k -V1 --cvbr 8 or Ogg Vorbis q8) and because i'm listening to more and more music with A2DP on my car headunit i thought i could achieve better sound quality by using a non transform codec encoded audio on my phone which doesn't do spectrum manipulation which propably makes the stupidly simple SBC codec's job harder. PowerAMP already decodes WavPack very well, i've used such lossy files in the past but maybe a 384kbps wv lossy is overkill in portable environment or in a noisy car, so i wonder how safe is to move lower in bitrate. From WavPack's doc i can see that a 256kbps WV is quality wise somewhere between a 160kbps and 192kbps mp3. Is that still true? How about a 275kbps wavpack? Can it achieve a quality of a 224kbps mp3? I know it's all theoritical without ABX-ing but maybe somebody already tried this.
Title: WavPack VBR (quality oriented) mode
Post by: shadowking on 2013-08-19 04:31:57
I think quality should be excellent down to 285k and similar to high VBR mp3. Experiment and use your own music rather than test signals. If encoding time isn't critical you can use a high -x setting alone or in conjunction with -h for additional headroom.
Title: WavPack VBR (quality oriented) mode
Post by: darkbyte on 2013-08-19 12:52:22
I'll give it a try, thanks.

I know the general opinion is to avoid -h when coding for portable devices but i wonder how big the penalty is when i use this switch? WavPack is a simpler codec than mp3 so decoding should be less CPU demanding. Using the -h switch should be still in the same or lower class than decoding and mp3, right? If i'm thinking right using the -h switch is not so evil considering the quality boost it provides on lossy encoding, especially on such low bitrates what we are talking about here.
Title: WavPack VBR (quality oriented) mode
Post by: DARcode on 2013-08-19 14:10:59
@darkbyte: As mentioned in my previous post I use -b4hx6 lossy files on my Android smartphone (HTC One SV) with a really minor hit on battery life.

@shadowking: I know you're trying to steer clear of high modes, but do you think you could find the time to test -b384hx6 with default block size (or even better -b4hx6)?
Title: WavPack VBR (quality oriented) mode
Post by: darkbyte on 2013-08-19 20:37:25
Thanks DARcode! I'll give it a try

Not closely related but i've wondered if it's possible to modify WavPack lossy in such way to allow different sampling rate in the lossy layer. Say i have a 88.2Khz 24bit audio file but i only want 44.1Khz in the lossy layer encoded with 4bits but keep the 88.2Khz 24bit audio with the correction applied. Currently i can't do this because the lossy layer's sample rate must match the correction file's one. This yields a lot higher bitrate in my case. I wonder if this difference could be handled somehow.
Title: WavPack VBR (quality oriented) mode
Post by: shadowking on 2013-08-20 03:24:55
At 384hhx6 i was defeated several times in abx but -b384x6 was much inferior. Using my upper end alternative of -b415x6 was the solution. I tried -b415x4 and was equally impressed.  I tried -b384x6 which was easy to abx, this time with --blocksize=4410 and there was really an improvement. I arrived at 6/8 vs 9/10 for -b384x6.
Very interesting indeed, thank you very much.
I know you're trying to steer clear of high modes, but do you think you could find the time to test -b384hx6 with default block size (or even better -b4hx6)?
That's what I'm using, since my Android smartphone can handle the workload with just a minor hit on battery life, and your ears are waaay better'n mine, thanks.



I've done some more tests and I'll report in the next few days.
Title: WavPack VBR (quality oriented) mode
Post by: shadowking on 2013-08-20 03:41:56
I'll give it a try, thanks.

I know the general opinion is to avoid -h when coding for portable devices but i wonder how big the penalty is when i use this switch? WavPack is a simpler codec than mp3 so decoding should be less CPU demanding. Using the -h switch should be still in the same or lower class than decoding and mp3, right? If i'm thinking right using the -h switch is not so evil considering the quality boost it provides on lossy encoding, especially on such low bitrates what we are talking about here.



I don't think adding -h will have a negative effect on any modern device. Bryant made it for portable use when -hh gave an ipod some trouble so the advice was to avoid -hh  . My old pentium 550mhz easily played wavpack lossy -hh and monkeys audio (high). I tested poweramp last year and -hh wavpack lossy was no problem at all (25 % vs 18 % normal mode cpu) . -h is probably somewhere in between. Transcoding is faster with normal and fast modes though . If I want to make quick mp3s the normal mode has the advantage.
Title: WavPack VBR (quality oriented) mode
Post by: shadowking on 2013-09-04 10:04:17
Ok I tested atemlied and other problem samples over the last few weeks. Taking into account the original goal of lowest possible bitrate for archiving - there is  concern at using 450..500k bitrates to achieve constant quality &  different settings for different samples.
I found that combining -h / -hh with -x6 / x5 brings much more stable quality across the board that becomes apparent starting from 380k. In other words extreme high quality kicks in at that level. Average bitrate is 390..400  . I believe even the worst cases are either eliminated or greatly reduced close to nil while normal signals are always perfect. For me that is acceptable for archiving. I

results of atemlied:

b4hx6 = 13/16
b384hx6 = 10/16
b380hhx5 = 11/16
b380hhx6 = 2/9
b380hhx4 = 11/16
Title: WavPack VBR (quality oriented) mode
Post by: DARcode on 2013-09-04 17:19:14
Thank you very much shadowking, appreciated.
Now let's see if I got it right: since you've never scored 12/16 or better with anything else besides b4hx6 it means all other settings produce actual transparency to your ears right?
b4hx6, my choice, and b384hx6 are pretty close in terms of average bitrate produced, so how come the difference you think?
Title: WavPack VBR (quality oriented) mode
Post by: shadowking on 2013-09-15 04:30:04
The 30kbit difference is around 2db noise. That could be significant when noise within hearing threshold.

I also tested the lower redesigned x-1 ~ 3. These were supposed to be used for daily tasks and offer a practical improvement in compression / speed / quality. I find that the defensive mechanisms kicks in at -x2 and its much faster than -x3 and yields similar quality or compression. In comparison to -x(1) -x2 is always better to my ears , compresses better and still fast.  It seems to work well with -h and -hh  .
Title: WavPack VBR (quality oriented) mode
Post by: darkbyte on 2013-10-29 16:24:48
Compression speed with b380hhx6  is very slow so i wonder how much bitrate should i spend if i like to use the fast mode instead but still achieve transparency in hybrid mode. I'm curious about fast mode because encoding my whole collection takes a lot time and i'm also working on a Wavpack decoder written in Dart and i can achieve considerably lower CPU usage by decoding fast mode encoded files.

I've tried b420fx4 yesterday and it gave a very good 45x compression speed on my computer instead of 6-12x compression speed with b380hhx6.
I wonder how transparent is this setting for you shadowking? In the final average bitrate it's only 40-50kbps higher for me than the what you suggested which is acceptable (around 448kbps for me) but it's a lot faster.
Title: WavPack VBR (quality oriented) mode
Post by: bryant on 2013-10-30 23:31:34
I would not presume to speak for shadowking, but my initial reaction would be to not recommend the “fast” mode if quality is a high concern (and that is definitely the point of shadowking's testing). The “fast” mode only provides two decorrelator passes for the “extra” mode to work with, so it's pretty limited in what it can do in difficult situations. However the default mode provides five, which gives it a lot more flexibility.

Without a comment from shadowking, my guess is that b420x4 would provide the same quality margin as his version, and still be reasonably fast to encode and easy to decode.
Title: WavPack VBR (quality oriented) mode
Post by: darkbyte on 2013-10-31 07:49:34
The “fast” mode only provides two decorrelator passes for the “extra” mode to work with, so it's pretty limited in what it can do in difficult situations.

It's sad that even if i had translated the Java code to Dart still don't understand how the codec works. Thanks for the info bryant!
Title: WavPack VBR (quality oriented) mode
Post by: shadowking on 2013-11-07 10:35:52
I tested  atemlied at lower bitrate using -hhx4. The quality is good down to 360kbit. At 350k I could start to detect it . Also lower volume helps more as you get less fatigued and less hearing loss.

b365hhx4 = 4/8

b360hhx4 = 2/8

b350hhx4 = 7/8


Title: WavPack VBR (quality oriented) mode
Post by: shadowking on 2013-11-07 11:05:53
Compression speed with b380hhx6  is very slow so i wonder how much bitrate should i spend if i like to use the fast mode instead but still achieve transparency in hybrid mode. I'm curious about fast mode because encoding my whole collection takes a lot time and i'm also working on a Wavpack decoder written in Dart and i can achieve considerably lower CPU usage by decoding fast mode encoded files.

I've tried b420fx4 yesterday and it gave a very good 45x compression speed on my computer instead of 6-12x compression speed with b380hhx6.
I wonder how transparent is this setting for you shadowking? In the final average bitrate it's only 40-50kbps higher for me than the what you suggested which is acceptable (around 448kbps for me) but it's a lot faster.



I depends what you are after - generally transparent with correction files or  extreme quality for perhaps lossy archiving. What David said is true although using -x4 with -f helps a lot. I think there are a few HF heavy samples that degrade with the -f mode much more than normal mode. Also -x6 is maybe overkill in most situations even tough ones.  On my pc -x4 is twice as fast and im not not sure i can abx between them. I think -x4 is the more 'practical' paranoid -x level .

In general for extreme quality use:


350~400k -hx4 or -hhx4
400~450k -x4
500~550 -fx4

Settings generally transparent for portable use & faster encoding :

300k or more -x3 or -hx
Title: WavPack VBR (quality oriented) mode
Post by: darkbyte on 2013-11-07 21:23:55
I depends what you are after - generally transparent with correction files or  extreme quality for perhaps lossy archiving.

I've come into that conclusion that encoding into ~448kbits hybrid (420kbit x4 normal + correction) gives a great compromise:
Title: WavPack VBR (quality oriented) mode
Post by: includemeout on 2013-12-27 10:57:54
I tested  atemlied at lower bitrate using -hhx4. The quality is good down to 360kbit. At 350k I could start to detect it . Also lower volume helps more as you get less fatigued and less hearing loss.

b365hhx4 = 4/8

b360hhx4 = 2/8

b350hhx4 = 7/8


shadowking, I've been carefully reading your excellent tests's results but, the way I see it,  there is just this single discrepancy between the ABX results for b360 and b365 above.

Assuming that is the case, what would you attribute that to? Margin of error pure and simple!?

Title: WavPack VBR (quality oriented) mode
Post by: includemeout on 2013-12-27 11:02:33
  • Tags and artwork are the same in the lossy and lossless version.
  • I don't have to maintain a lossless + lossy collection of the same tracks.


Amen! 

And that was the day my headaches stopped once and for all!
Title: WavPack VBR (quality oriented) mode
Post by: bryant on 2013-12-28 18:34:07
  • Tags and artwork are the same in the lossy and lossless version.
  • I don't have to maintain a lossless + lossy collection of the same tracks.


Amen! 

And that was the day my headaches stopped once and for all!

I'm glad that WavPack's hybrid mode is working out for you guys; that is exactly the use case it was intended for! 
Title: WavPack VBR (quality oriented) mode
Post by: DARcode on 2013-12-30 14:09:55
I'll stick with my über paranoid x6, and it's not like I've got a powerhouse of a CPU, matter of fact it's a mere AMD Quad-Core A8-4555M 1.6GHz, but I only encode a couple of albums per week and don't plan on re-encoding my lossless library sooner'n 10 years from now.
Title: WavPack VBR (quality oriented) mode
Post by: shadowking on 2014-01-16 11:31:51
I've done more testing to try to get a good command line closer to 300kbps. I think I've made progress. I used the high modes and -x4. Later I decided -x5 / 6 are more defensive. So I arrived at -b320hhx5

Several problem samples where slightly annoying. I decided to experiment with a static noise shaping value , pushing the noise higher up : s0.1 ~ s1.0.

I arrived at s0.7  The results are better than what i expected .  On furious, keys_1644, 41_sec its very close to the original or even transparent. Bibilolo is also good unless you turn the vol way up to ear pain levels. I still get 8/10 on some samples but its close and dont sound like an artifacts at all.

The downside is a bit worse lossless compression if using correction files, more objective noise the lossy file (may not matter from a psychoacoustic pov), possible inaccuracy leading to regressions in some samples. I tried to find problems but at 320k or more its too hard. Even classical music its really good. my feeling is that there is a difference (very small increase in HF hiss)  but doesn't reliably come up in abx tests. Its maybe that my HF hearing is a factor. It seems that s0.7 improves everything around 300k and even the difference is pleasing rather than sounding like artifacts. I am confident so far that any difference would not be heard outside of an abx and even if the was it would be not annoying with 320 hx5 s0.7
Title: WavPack VBR (quality oriented) mode
Post by: DARcode on 2014-01-16 19:27:43
Very interesting indeed, keep it up sk  !
Title: WavPack VBR (quality oriented) mode
Post by: includemeout on 2014-01-16 22:44:35
I still get 8/10 on some samples but its close and dont sound like an artifacts at all.


Artifacts? I thought all you could incur by not feeding lossy WavPack a bitrate high enough for a certain audio file, was quantization noise, as it is not a psychoacoustics-based encoder. Or am I mistaken?
Title: WavPack VBR (quality oriented) mode
Post by: bryant on 2014-01-19 00:46:04
It seems that s0.7 improves everything around 300k and even the difference is pleasing rather than sounding like artifacts. I am confident so far that any difference would not be heard outside of an abx and even if the was it would be not annoying with 320 hx5 s0.7

These are interesting results...thanks again shadowking for your continuing testing!

When I created the dynamic noise shaping, one of my primary testers had extraordinarily good HF hearing (some HA mambers will remember "den"). He could hear that HF "hiss" that you speak of and it bothered him, although like you say it was probably only noticeable with ABX testing (and I could never hear it).

I'm not sure I would have adopted the dynamic noise shaping just based on those results, but I also discovered the other thing you did that moving the quantization noise away from the extreme HF range improves the hybrid compression ratio. Also the results from EAQUAL indicated a consistent improvement from DNS. But yes, I can see why this might be less likely to have annoying artifacts, especially for those of us with degraded HF hearing.
Title: WavPack VBR (quality oriented) mode
Post by: bryant on 2014-01-19 00:49:34
I still get 8/10 on some samples but its close and dont sound like an artifacts at all.


Artifacts? I thought all you could incur by not feeding lossy WavPack a bitrate high enough for a certain audio file, was quantization noise, as it is not a psychoacoustics-based encoder. Or am I mistaken?

No, you are not mistaken. However, the quantization noise varies in amplitude (it's not just the constant hiss that you would get from a fixed quantization, like 8-bit PCM) and when dynamic noise shaping is used (the default) that quantization noise can be centered pretty low in frequency. This can sound more like "artifacts" or a "roughness" than pure hiss does, but if you subtract the original audio from the lossy version and look at the result, it will still be just pure noise.
Title: WavPack VBR (quality oriented) mode
Post by: includemeout on 2014-01-19 12:25:54
Thanks Bryant.

Though it's a very fine explanation, just so I finally understand it once and for all:

Thanks to the quantization noise's inherent variable amplitude, the only chance of ending up with pure white noise instead (not that I want to ) would be disabling dynamic noise shaping altogether? (sn = 0)
Title: WavPack VBR (quality oriented) mode
Post by: bryant on 2014-01-19 18:09:33
Thanks to the quantization noise's inherent variable amplitude, the only chance of ending up with pure white noise instead (not that I want to ) would be disabling dynamic noise shaping altogether? (sn = 0)

Well, sort of, but not exactly. The quantization noise's variable amplitude is always there no matter what setting is used. The WavPack format supports a fixed quantization level but there's no command line to generate files with it because it really doesn't provide any useful functionality (the noise would become audible during quiet passages, like when you truncate to 8-bit PCM).

If you specify flat quantization noise (-s0) then you will get pure white noise, but it will still jump up and down with the audio level (attempting to remain inaudible). Other values for the -s option cause the noise to be shifted up or down in frequency, but it's otherwise the same. Finally, the default setting (no -s) enables dynamic noise shaping which allows the shifting of the noise frequency to vary depending on the frequency content of the audio (again, in an attempt to remain inaudible).

If you had no hearing above 10 kHz, it might make sense to always use -s1 to shift as much noise as possible into the highest octave (this results in extremely low noise at lower frequencies). In fact, WavPack automatically does this with high sampling rates (>64 kHz) because nobody can hear the noise added above 20 kHz. I did spectrum analysis on some lossy-encoded 24/96 material at one point to demonstrate this here (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=63086&view=findpost&p=565821).
Title: WavPack VBR (quality oriented) mode
Post by: includemeout on 2014-01-19 23:15:53
Those spectrum analyses surely tell us a lot.

Now it becomes clear to me why I was able to ABX ~256kbps during some quiet passages.

As ever thanks a lot Bryant.
Title: WavPack VBR (quality oriented) mode
Post by: darkbyte on 2014-01-27 18:03:13
Does resampling the CD audio input before encoding to 48kHz helps lossy's efficiency? I would think that because the noisy shaping could shift noise to a higher region it does help, however i'm might be wrong about how Wavpack's lossy works.
Title: WavPack VBR (quality oriented) mode
Post by: saratoga on 2014-01-27 18:13:41
Does resampling the CD audio input before encoding to 48kHz helps lossy's efficiency? I would think that because the noisy shaping could shift noise to a higher region it does help, however i'm might be wrong about how Wavpack's lossy works.


I think this would be a very roundabout way of increasing the bitrate.  Rather then resample I'd just increase the bitrate.
Title: WavPack VBR (quality oriented) mode
Post by: includemeout on 2014-01-27 19:02:00
If memory doesn't fail me, doesn't WavPack automatically do that (increase bitrate) as you feed it in an input file with higher sampling rate/bit depth?



Title: WavPack VBR (quality oriented) mode
Post by: bryant on 2014-01-27 19:53:56
If memory doesn't fail me, doesn't WavPack automatically do that (increase bitrate) as you feed it in an input file with higher sampling rate/bit depth?

There are two different ways of specifying lossy bitrate on the WavPack command line. One is by specifying the actual bitrate (like 384 kbps). This is the same no matter what the sampling rate or number of channels.

The other is to specify bits per sample (like 3.5 bpS). This is probably what you are referring to because it will scale the final bitrate based on sampling rate and number of channels.

However, because WavPack lossy re-quantizes the audio, the input bit depth is irrelevant (all included bits are considered).

As for resampling up to 48 kHz, that would in theory be more efficient, but the increase in efficiency would not make up for the increased number of samples to be encoded. As Saratoga says, better to just up the bitrate.
SimplePortal 1.0.0 RC1 © 2008-2019