IPB

Welcome Guest ( Log In | Register )

lossyWAV 1.3.0 released, Added noise WAV bitdepth reduction method.
Nick.C
post Aug 6 2011, 21:50
Post #1


lossyWAV Developer


Group: Developer
Posts: 1790
Joined: 11-April 07
From: Wherever here is
Member No.: 42400



lossyWAV 1.3.0 is released.

lossyWAV is a near lossless audio processor which dynamically reduces the bitdepth of the signal on a block-by-block basis. Bitdepth reduction adds noise to the processed output. The added noise is adaptively shaped by default and can alternatively be fixed noise shaped or white noise depending on command line parameters. When lossyWAV processed output is compressed with certain lossless codecs (FLAC, Wavpack, Tak, LPAC, MPEG-4 ALS and WMA-Lossless) the bitrate of the output file is significantly* reduced compared to the lossless original.

Changes from 1.2.0b:
  • Adaptive noise shaping method kindly provided by SebastianG introduced and enabled by default;
  • Fixed noise shaping reworked to allow effective shaping of samplerates other than 44.1kHz / 48kHz.
  • Revised quality presets;
  • Enhanced information output options;
  • Major code cleanup.
Download* on average, depending on content.

This post has been edited by Nick.C: Aug 10 2011, 21:12


--------------------
lossyWAV -q X -a 4 --feedback 4| FLAC -8 ~= 320kbps
Go to the top of the page
+Quote Post
 
Start new topic
Replies
Dynamic
post Aug 19 2012, 16:35
Post #2





Group: Members
Posts: 810
Joined: 17-September 06
Member No.: 35307



I had a read of the original thread on the lossyFLAC idea (via link from foot of LossyWAV Wiki page) and it got me thinking, though I admit it's around the limits of my knowledge, so I could do with a sanity-check.

The crux of the issue is whether or not the adaptive noise shaping algorithm's influence on the rounding decision takes account of the actual error signal from neighbouring samples (including the enlarged negative-going error signal caused by lossyWAV's form of clipping and might therefore compensate for much of that error and its spectral and DC-bias effects in the rounding decisions made over a number of subsequent samples). My supposition is that it does use the actual error, but if it instead assumes, say, a typical statistical distribution of rounding errors, for example, my thoughts might be completely misguided. I suspect Nick.C or SebastianG will be best placed to put me right on this issue.

Early on, 2Bdecided spotted the issue with clipping of positive values near full scale that cannot be rounded up to +32768 because that number cannot be represented in 16-bit signed binary and we can't use +32767 and still keep the zeroed LSBs across the block to provide coding efficiency to the lossless encoder that recognises unused-bits.

There's a Max Clips Per Block variable in Nick.C's lossyWAV to limit the number of clippings allowed in any single codec block. If there are too many clips, the Bits To Remove value for that block of 512 samples is reduced and the block is re-processed to see if Max Clips Per Block is no longer exceeded or if Bits To Remove needs to be lowered again. The choice of Max Clips Per Block is decided by the quality preset or by user over-ride.

This helps statistically limit the amount of net DC offset that might be introduced into the added noise within the 512-sample block and helps ensure the energy of the additional error spikes must remain spread over a relatively broad-spectrum (i.e. short duration provides little power per spectral bin) and contribute only a small amount of total noise energy over the 512-sample block compared to the noise that should have been added by the lossyWAV rounding procedure when operating without clipping.

I'm wondering (and not sure if SebastianG or Nick.C is best placed to answer) whether the Adaptive Noise Shaping (ANS) enabled in version 1.3, involving the carrying-forward of rounding/truncation errors in such a way that they are spectrally-shaped, actually might have mitigated a lot of the original "clipping" concern (so long as there aren't an enormous number of clips, occuring at very periodic intervals to force a tonal error signal that might be unmasked).

In other words the fact that the round up or round down decision is biased by the errors in other samples in the 512-sample block and the spectral shape of the signal that the residual noise can be masked behind, may help prevent clipping errors from accumulating across the block as a whole and might even offset any DC bias by the end of the block.

My interpretation might be naive, in thinking of it a little like graphical bit-depth reduction, specifically Error Diffusion image dithering where rounding error is carried over to bias the rounding decision in subsequent pixels. Clearly in the lossyWAV ANS case, the error signal is also spectrally shaped by influencing the decision to round up rather than down or down rather than up according to the shaping filter.

Is it the case that the actual rounding error introduced is considered over the duration of the shaping filter so that for a sample where clipping occurs, the resulting negative DC offset and the additional error magnitude would tend to be counteracted by contributing to the rounding and noise-shaping decisions of numerous other samples in the same codec block rather than resulting in a net DC offset for the block and a spectrally-spread additional noise contribution (assuming each clipping error in brief, so resembles a Dirac Delta Function (negative-going one-sample spike with white spectrum or low power spectral density).

Then I thought to search on the issue and found this, so maybe I'm wrong:
In the 1.3 Development Thread, NickC wrote:
QUOTE (Nick.C @ Apr 17 2011, 19:45) *
Thinking of reducing maximum clips-per-channel-per-codec-block to zero when adaptive shaping is active to reduce the possibility of the current method which allows a certain number of clips from "overloading" the noise-shaping filter(s).


If my interpretation is right, however, I wonder if the Maximum Clips Per Block value should actually be allowed to increase further when ANS is enabled or should a different measure of the residual (lwcdf) spectrum be used instead when forced down-rounding of high positive values has been detected in a block, for example to ensure that it's a reasonable match to the target noise spectrum without too much of a DC offset or any large spectral peaks above that targetted noise spectrum?

If I'm being hopelessly naive, I don't insist you explain it so that I understand. You're welcome to tell me that it just doesn't work like that (e.g. it doesn't take into account the actual error signal, just a statistical assumption). You probably have more important things to do with your time. My serious knowledge of digital signal processing stuff is limited to what I needed in work on very high rate single-bit discriminated instrumentation, rather than audio file manipulation / post-processing and didn't include noise shaping filters.
Go to the top of the page
+Quote Post

Posts in this topic
- Nick.C   lossyWAV 1.3.0 released   Aug 6 2011, 21:50
- - Nick.C   CODElossyWAV 1.3.0, Copyright (C) 2007-201...   Aug 6 2011, 21:53
- - Steve Forte Rio   BRAVO!   Aug 7 2011, 08:35
- - halb27   Great work! Thank you, Nick.   Aug 7 2011, 09:37
- - TBeck   Really cool! Thank you!   Aug 11 2011, 01:11
- - punkrockdude   Nick.C: Do you play FLAC/LossyWAV with your Androi...   Aug 11 2011, 16:11
- - vvneagleone   Nice work! For what purposes do you think this...   Aug 11 2011, 16:20
|- - Nick.C   QUOTE (punkrockdude @ Aug 11 2011, 16:11)...   Aug 11 2011, 17:44
|- - punkrockdude   QUOTE (Nick.C @ Aug 11 2011, 18:44) QUOTE...   Aug 11 2011, 20:21
- - larryfine   Great! Thank you very much!   Aug 11 2011, 22:35
- - Nick.C   I've just completed a full music collection tr...   Aug 14 2011, 11:44
- - zerowalker   Is this a Almost Lossless compression? As that is ...   Aug 17 2011, 04:16
|- - bryant   QUOTE (zerowalker @ Aug 16 2011, 20:16) I...   Aug 17 2011, 06:40
|- - zerowalker   QUOTE (bryant @ Aug 17 2011, 07:40) QUOTE...   Aug 17 2011, 19:29
- - Nick.C   The settings for foobar2000 conversion to lossyFLA...   Aug 17 2011, 19:38
|- - punkrockdude   QUOTE (Nick.C @ Aug 17 2011, 20:38) The s...   Aug 18 2011, 00:37
- - Nowings69   Congratulations   Aug 18 2011, 08:29
- - punkrockdude   As an intrigued fan of LossyWAV may I ask what you...   Aug 21 2011, 21:15
- - Anakunda   HI! I'm curious what listening configurati...   Aug 21 2011, 21:17
- - drumliner   just tried lossywav to create some lossy.flac file...   Aug 21 2011, 23:41
- - Nick.C   @punkrockdude: I'm not active developing at th...   Aug 22 2011, 07:48
- - drumliner   thanks Nick. working properly now   Aug 22 2011, 13:05
- - Nick.C   Added: foobar2000 settings for producing lossyWMAL...   Sep 4 2011, 21:22
- - chrizoo   I updated from 1.1.0c (which the wiki currently po...   Sep 19 2011, 14:43
|- - Northpack   QUOTE (chrizoo @ Sep 19 2011, 14:43) I up...   Sep 19 2011, 15:13
- - chrizoo   thank you Northpack. This increases speed to 9x, b...   Sep 19 2011, 16:53
|- - lvqcl   QUOTE (chrizoo @ Sep 19 2011, 19:53) than...   Sep 19 2011, 18:38
|- - chrizoo   QUOTE (lvqcl @ Sep 19 2011, 17:38) Make s...   Sep 19 2011, 20:30
- - chrizoo   another issue I came across: I always thought tha...   Sep 19 2011, 17:50
- - Northpack   QUOTE (chrizoo @ Sep 19 2011, 15:53) than...   Sep 19 2011, 18:30
|- - DonP   QUOTE (Northpack @ Sep 19 2011, 12:30) No...   Dec 16 2012, 17:40
|- - Nick.C   QUOTE (DonP @ Dec 16 2012, 16:40) Maybe t...   Dec 16 2012, 20:15
- - b66pak   indeed is faster with libfftw3-3.dll in lossyWAV f...   Sep 19 2011, 20:09
- - chrizoo   edit: QUOTE I always thought that there is NO unsu...   Sep 19 2011, 20:11
- - Nick.C   Regarding processing speed, there are three things...   Sep 19 2011, 20:40
- - chrizoo   QUOTE (Nick.C @ Sep 19 2011, 19:40) Regar...   Sep 19 2011, 20:43
- - Nick.C   @ chrizoo: Please post a 30 second clip to allow c...   Sep 19 2011, 20:47
- - Nick.C   Chris, Thanks for taking the time to provide me w...   Sep 21 2011, 20:23
|- - chrizoo   sorry for the late reply, I was gone. Thank you fo...   Oct 5 2011, 19:55
- - Nick.C   From lossyWAV long help: "Process Description...   Oct 5 2011, 21:40
|- - chrizoo   first of all I'm sorry that I raised the issue...   Oct 5 2011, 22:32
|- - botface   QUOTE (chrizoo @ Oct 5 2011, 22:32) What ...   Oct 6 2011, 09:49
- - 2Bdecided   You'll also get zero bits removed if there are...   Oct 6 2011, 12:54
- - uncajesse   I fully updated this to work with v1.3, if anyone ...   Nov 19 2011, 11:55
- - FreaqyFrequency   Hey Nick/all involved parties, This is an absolut...   Feb 17 2012, 02:01
- - Nick.C   Hi Sean, You could try using scaling to reduce th...   Feb 17 2012, 21:23
- - softrunner   Is it possible to get lower quaity (and bitrate) t...   Jul 27 2012, 02:12
|- - halb27   IMO the 'not fully transparent' statement ...   Jul 28 2012, 09:15
- - Nick.C   As Horst has said, the aim during lossyWAV develop...   Jul 29 2012, 19:30
|- - Dynamic   QUOTE (Nick.C @ Jul 29 2012, 19:30) Probl...   Jul 30 2012, 10:03
- - Dynamic   I had a read of the original thread on the lossyFL...   Aug 19 2012, 16:35
- - tycho   FYI. I've started translating the lossyWAV 1.3...   Aug 21 2012, 22:53
- - Nick.C   Hi Tycho, Many thanks for tackling the conversion...   Aug 22 2012, 19:15
- - LoRd_MuldeR   What about Unicode support for lossyWAV? http://w...   Aug 29 2012, 22:37
|- - tycho   QUOTE (LoRd_MuldeR @ Aug 29 2012, 13:37) ...   Aug 30 2012, 09:07
|- - LoRd_MuldeR   QUOTE (tycho @ Aug 30 2012, 09:07) Thanks...   Aug 30 2012, 14:29
- - tycho   QUOTE (LoRd_MuldeR @ Aug 30 2012, 05:29) ...   Aug 30 2012, 15:16
- - LoRd_MuldeR   I have hacked a Unicode support into a large numbe...   Aug 30 2012, 15:39
- - Adagio   A question more related to the foobar2000 converte...   Feb 23 2013, 00:48
- - Nick.C   When creating correction files, --stdout cannot be...   Feb 23 2013, 13:53
- - ozok   I've been trying to add lossyWAV support to TA...   Jun 19 2013, 12:49
|- - Nick.C   Hi ozok, I'm not sure. From memory, the Delph...   Jun 19 2013, 20:52
- - ozok   Thanks for the quick reply Nick.C. I don't us...   Jun 19 2013, 22:01
- - Mardel   What's wrong with this? (Foobar2000 v1.2.9) ...   Sep 10 2013, 23:37
- - db1989   Just the first thing I saw, but try adding the mis...   Sep 11 2013, 01:08
|- - Mardel   QUOTE (db1989 @ Sep 11 2013, 02:08) Just ...   Sep 11 2013, 20:35
- - Nick.C   Hi Mardel, Could Drive C: be full? foobar2000 som...   Sep 11 2013, 20:57
|- - Mardel   QUOTE (Nick.C @ Sep 11 2013, 21:57) Hi Ma...   Sep 11 2013, 22:47
- - Nick.C   If you are using a beta version, please download t...   Sep 12 2013, 13:20
- - Mardel   I used this 1.3.0 stable version.   Sep 12 2013, 18:58
- - Nick.C   Hmmm.... Could you please try removing the FLAC po...   Sep 13 2013, 18:54
|- - Mardel   QUOTE (Nick.C @ Sep 13 2013, 19:54) Hmmm....   Sep 13 2013, 21:18
- - Nick.C   Thanks Mardel, glad to hear that you have solved t...   Sep 13 2013, 21:49
- - darkbyte   I wonder if anyone thought about doing an ~320kbps...   Sep 14 2013, 14:57
- - sundance   Hello Nick, seems I've got a similar issue lik...   Sep 14 2013, 18:51
|- - lvqcl   QUOTE (sundance @ Sep 14 2013, 21:51) Any...   Sep 14 2013, 18:56
|- - Mardel   QUOTE (sundance @ Sep 14 2013, 19:51) ......   Sep 14 2013, 19:05
- - sundance   @lvqcl: Tried that, but fb2k complains about inval...   Sep 14 2013, 19:04
|- - lvqcl   QUOTE (sundance @ Sep 14 2013, 22:04) Tri...   Sep 14 2013, 19:15
- - Nick.C   There is.... Try "--stdinname %d". Th...   Sep 14 2013, 19:31
|- - sundance   QUOTE (Nick.C @ Sep 14 2013, 20:31) Also,...   Sep 15 2013, 07:31
|- - sidewalking   QUOTE (sundance @ Sep 15 2013, 00:31) QUO...   Mar 18 2014, 20:58
|- - akin0780   This should work: Place lossyWAV.exe and wavpack....   Mar 18 2014, 21:20
|- - Nick.C   QUOTE (sidewalking @ Mar 18 2014, 19:58) ...   Mar 18 2014, 21:58
|- - sidewalking   QUOTE (Nick.C @ Mar 18 2014, 14:58) QUOTE...   Mar 20 2014, 02:11
- - weepy   Hi there - wonderful project, I was wondering if ...   Jan 8 2014, 11:24
- - halb27   I did a personal listening test a while ago with v...   Jun 22 2014, 22:08


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd September 2014 - 21:10