lossyWAV 1.2.0 Development Thread, Added noise WAV bitdepth reduction method |
lossyWAV 1.2.0 Development Thread, Added noise WAV bitdepth reduction method |
Aug 25 2008, 12:16
Post
#1
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
Following the release of lossyWAV 1.1.0b, I feel it is (again) time to kick off development of the next minor release.
Items currently on the list for inclusion in 1.x.0: 1.3If you have any ideas, suggestions, code optimisations, etc, please post them here. Link to the hydrogenaudio wiki article lossyFLAC resultant bitrates: CODE 10 Album Test Set +-------+----------+----------+----------+----------+----------+----------+----------+----------+----------+ |Version| Settings | FLAC -5 |--insane |--extreme |--standard|--portable| --zero | --nasty | --awful | +-------+----------+----------+----------+----------+----------+----------+----------+----------+----------+ |v1.0.0b| default | 854kbit/s| 626kbit/s| 539kbit/s| 452kbit/s| 365kbit/s| 295kbit/s| -------- | -------- | +-------+----------+----------+----------+----------+----------+----------+----------+----------+----------+ |v1.1.0c| default | 854kbit/s| 632kbit/s| 548kbit/s| 463kbit/s| 376kbit/s| 285kbit/s| -------- | -------- | +-------+----------+----------+----------+----------+----------+----------+----------+----------+----------+ |v1.2.0 | default | 854kbit/s| 627kbit/s| 544kbit/s| 460kbit/s| 376kbit/s| 288kbit/s| -------- | -------- | |v1.2.0 | -t | 854kbit/s| 582kbit/s| 514kbit/s| 450kbit/s| 385kbit/s| 341kbit/s| 310kbit/s| 283kbit/s| +-------+----------+----------+----------+----------+----------+----------+----------+----------+----------+ 55 Problem Sample Set +-------+----------+----------+----------+----------+----------+----------+----------+----------+----------+ |Version| Settings | FLAC -5 |--insane |--extreme |--standard|--portable| --zero | --nasty | --awful | +-------+----------+----------+----------+----------+----------+----------+----------+----------+----------+ |v1.0.0b| default | 780kbit/s| 655kbit/s| 582kbit/s| 503kbit/s| 417kbit/s| 330kbit/s| -------- | -------- | +-------+----------+----------+----------+----------+----------+----------+----------+----------+----------+ |v1.1.0c| default | 780kbit/s| 654kbit/s| 583kbit/s| 508kbit/s| 425kbit/s| 321kbit/s| -------- | -------- | +-------+----------+----------+----------+----------+----------+----------+----------+----------+----------+ |v1.2.0 | default | 780kbit/s| 654kbit/s| 585kbit/s| 510kbit/s| 427kbit/s| 325kbit/s| -------- | -------- | |v1.2.0 | -t | 780kbit/s| 623kbit/s| 565kbit/s| 506kbit/s| 441kbit/s| 391kbit/s| 354kbit/s| 322kbit/s| +-------+----------+----------+----------+----------+----------+----------+----------+----------+----------+ Suggested foobar2000 converter setup: lossyFLAC: CODE Encoder: c:\windows\system32\cmd.exe lossyTAK:Extension: lossy.flac Parameters: /d /c c:\"program files"\bin\lossywav - --standard --silent --stdout|c:\"program files"\bin\flac - -b 512 -5 -f -o%d Format is: lossless or hybrid Highest BPS mode supported: 24 CODE Encoder: c:\windows\system32\cmd.exe lossyWV:Extension: lossy.tak Parameters: /d /c c:\"program files"\bin\lossywav - --standard --silent --stdout|c:\"program files"\bin\takc -e -p2m -fsl512 -ihs - %d Format is: lossless or hybrid Highest BPS mode supported: 24 CODE Encoder: c:\windows\system32\cmd.exe Extension: lossy.wv Parameters: /d /c c:\"program files"\bin\lossywav - --standard --silent --stdout|c:\"program files"\bin\wavpack -hm --blocksize=512 --merge-blocks -i - %d Format is: lossless or hybrid Highest BPS mode supported: 24 There is a known problem within foobar2000 (although more likely to do with cmd.exe itself) when running an executable within the cmd.exe command line from a path which includes spaces. The suggested fix for this is to enclose the element of the path which contains spaces within double quotation marks ("), e.g. c:\"program files"\directory_where_executable_is\executable_name Change log 1.2.0: 16/12/09 Code optimisation; Removal of negative -q values in default mode. Quality range for --altpreset remains -4 to 10 (--quality -4 --altpreset == --quality 0 --limit 15159). Change log 1.1.5c: 21/11/09 Minor revision to internal setting for --altpreset. Change log 1.1.5b: 20/11/09 Major revision to internal setting for --altpreset. Change log 1.1.5a: 18/11/09 Bugfix: Correction to high sample-rate processing. Change log 1.1.4s: 07/11/09 Bugfix: manual --limit setting not working as it should. Change log 1.1.4r: 03/11/09 Bugfix: shaping in altpreset mode was artificially limited to 50% (only affected -q 6.5 and above). Change log 1.1.4q: 02/11/09 Reversion to use of previous noise pre-calculated constant; Shaping now OFF by default. To enable shaping use -s or --shaping, without a parameter for automatic shaping or with a value 0<=n<=1 for user specified shaping. Change log 1.1.4p: 22/10/09 Mutual exclusivity of shaping, hilimit and altpreset removed; Added noise pre-calculated constant removed in favour of improved derived formula; --altpreset parameter now also -t. Change log 1.1.4n: 27/09/09 Mutual exclusivity of shaping, hilimit and altpreset corrected. Change log 1.1.4m: 26/09/09 --postanalyse function removed; --limit changed to --hilimit and --lolimit; --altpreset parameter introduced which changes default behaviour for shaping and hilimit. [shaping = 0.5*(max(0,q/10)+max(0,q/10)^2.584962)) -q 0 = 0; -q 5 = 0.3333; -q 10 = 1] [hilimit = round(14000 + 2000 * max(0,q/10)) / samplerate * 64) * (64/samplerate)] Change log 1.1.4k: 24/08/09 --postanalyse function modified to use existing spreading function. Change log 1.1.4j: 23/08/09 --limit lower range changed to 10000Hz. Change log 1.1.4h: 22/08/09 --limit lower range changed to 14500Hz. Change log 1.1.4g: 20/08/09 --maxsnr removed. -p or --postanalyse parameter implemented. Using this parameter checks the noise level of the correction data and compares to the low value derived from the associated source audio. If the correction noise (i.e. that of the difference signal) is greater than the source audio low value then the bits_to_remove value is reduced for the codec-block until the added noise is lower. Code further tidied. -F or --fftw parameter removed as FFTW dll is now automatically used if found (slight speed-up makes this the fastest way to go). Stack error fixed which occurs when libfftw3-3.dll v3.2.2 is used (newly released). Change log 1.1.4f: 24/07/09 Bug in --maxsnr parameter fixed. Bug in pure Delphi compile fixed. Change log 1.1.4e: 22/07/09 Major code redevelopment - more units, hopefully clearer. New parameter: -Y, --maxsnr <n> which allows specification of difference between maximum FFT result and added noise. Maxsnr works with both default spreading and --sortspread. Link to FFTW Windows DLL download page. Change log 1.1.4d: 07/06/09 Bug fixed whereby lossyWAV would crash if 'libfftw3-3.dll' could not be initialised. If --fftw parameter is used and the DLL cannot be found then lossyWAV will revert to the existing FFT routines and output a warning. Link to FFTW Windows DLL download page. Change log 1.1.4c: 05/06/09 FFTW can now be optionally used for FFT analyses in lossyWAV. Use of FFTW requires the presence of "libfftw3-3.dll" on the host computer, somewhere on the path and the addition of -F or --fftw to the lossyWAV command line. FFT (Delphi and assembler) further optimised. General code tidy-up. Link to FFTW Windows DLL download page. Change log 1.1.4b: 14/05/09 FFT (Delphi and assembler) further optimised. Radix-4 FFT implemented in assembler and Delphi and Radix-8 in Delphi. Significant speedup of Delphi FFT throughput. General code tidy-up. Change log 1.1.4a: 05/05/09 --sorspread parameter no longer takes an additional parameter, now on/off; spreading function changed slightly - now properly computes old and new averages separately; FFT Real routine corrected as was giving wrong signs of some complex output values (did not affect magnitude of results); Change log 1.1.3k: 30/04/09 Fault-finding release #1 to attempt to determine cause of WINE incompatibility. (Successful!! Change log 1.1.3j: 15/04/09 --sortspread parameter modified (again), now takes a parameter between 0 and 7, 2 is equivalent to beta 1.1.3i. --centre parameter removed. Reference_threshold tables removed in favour of direct calculation of the level of added noise due to bitdepth reduction using derived formula. Change log 1.1.3i: 07/04/09 New --sortspread parameter modified (again). Bitrate matched with default spreading for my 55 problem sample set. Will revise table for my 10 Album Test Set. New --sortspread parameter modified. Change log 1.1.3g: 02/04/09 New --sortspread parameter introduced for testing purposes. Change log 1.1.3f: 31/03/09 New --centre and --underlap <n> parameters introduced for testing purposes; Revised source. Change log 1.1.3e: 18/03/09 Removal of old and new spreading functions in favour of variant; Code tidy up - speed improvements for pure delphi compile; Revised source. Change log 1.1.3d: 05/03/09 Bug fix (would crash with a range error sometimes); Speedup of --varspread code. Revised source. Change log 1.1.3c: 24/02/09 Introduction of -V or --varspread parameter to enable variant spreading function - a hybrid between the old and the new. Revised source. Change log 1.1.3b: 23/02/09 Bug-fix: high sample rates with 1.1.3 would cause a range-check error or random results. Revised source. Change log 1.1.3: 22/02/09 Integration of data structures used in new and old spreading functions. Source release. Change log 1.1.2j: 18/02/09 Implementation of -O or --oldspread parameter to enable the use of the spreading function used in v1.1.0b instead of the revised version currently under development. This gives very slightly different results to v1.1.0b as is to be expected due to the revision of the reference-threshold constants at beta v1.1.1d. Change log 1.1.2i: 12/02/09 Addition of a -N or --nasty (-q -2.0) and -A or --awful (-q -4.0) to allow extremely low quality levels to be explored. Addition of a -N or --nasty (-q -2.0) to allow extremely low quality levels to be explored. Change log 1.1.2g: 10/02/09 Addition of a -r or --randombits parameter to randomise the zeroed lsbs. Change log 1.1.2f: 09/02/09 Further modification to the spreading_function. Change log 1.1.2e: 06/02/09 Further modification to the noise shaping process - first attempt to attenuate noise-shaping where bits_to_remove is zero for a particular codec block. Change log 1.1.2d: 05/02/09 Further modification to the noise shaping process - audio data now no longer scaled prior to noiseshaping. Change log 1.1.2c: 04/02/09 Further modification to the noise shaping process - noise shaping performed even when no bits removed. Change log 1.1.2b: 03/02/09 Repair of the noise shaping process - now continuous for each channel rather than treating each codec-block totally separately; Change log 1.1.2: 28/01/09 Code optimisations and data optimisations; Revisions to the spreading function; Change log 1.1.1e: 30/09/08 Interim beta, with source as reversion to Delphi complete (with conditional define to re-enable all IA-32/x87 code). Change log 1.1.1d: 10/09/08 Further revision to the simplified spreading function - slightly higher bitrates than 1.1.1c but I'm happier with the method; Reference-threshold constants re-calculated using more iterations (2^(32-fft-bit-length) iterations, i.e. 512K iterations for 8192 sample FFT and 128M iterations for 32 sample FFT) and for the first time taking into account FFT-result values less than 1. This only really affects bits-to-remove values between 1 and 7, which is in line with my expectation when I made the change to the noise-calculation method; Change log 1.1.1c: 02/09/08 Further revision to the simplified spreading function; Dither removed; Change log 1.1.1b: 26/08/08 Revision to the simplified spreading function. All bin "averages" now calculated taking into account a variable proportion of bins to either side, i.e. "average" = (fft_result[i]+(fft_result[i-1]+fft_result[i+1])*factor)/(1+2*factor), where factor = 0.0 at 20Hz and 1.0 at 16kHz, with linear interpolation for intermediate values. Change log 1.1.1a: 25/08/08 Fundamental simplification of spreading function methodology put forward for comment. All bin "averages" now calculated taking into account a fixed proportion of bins to either side, i.e. "average" = (fft_result[i]+(fft_result[i-1]+fft_result[i+1])*factor)/(1+2*factor), where factor = 0.26 in this case; FFT result overall averaging now carried out prior to the spreading function rather than at the same time; Reference_threshold constants revised slightly. Change log 1.1.0b: 03/08/08 FFT lengths will now increase for higher bitrate audio, i.e. 88.2/96kHz, 176.4/192kHz and 352.8/384kHz; improved logfile output and --detail output; reference threshold constants for rectangular dither and triangular dither have been calculated so added noise should be the same for dither off and any dither level between 0 and 1 - the number of bits-to-remove will however reduce with "increasing" dither. This post has been edited by Nick.C: Dec 16 2009, 22:31 -------------------- lossyWAV -q X -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
![]() |
Sep 3 2008, 22:35
Post
#2
|
|
![]() Group: Members Posts: 195 Joined: 8-October 01 From: Sofia, Bulgaria Member No.: 250 |
Suggested foobar2000 converter setup: lossyFLAC: CODE Encoder: c:\windows\system32\cmd.exe lossyTAK:Extension: lossy.flac Parameters: /d /c c:\"program files"\bin\lossywav - --standard --silent --stdout|c:\"program files"\bin\flac - -b 512 -5 -f -o%d Format is: lossless or hybrid Highest BPS mode supported: 24 CODE Encoder: c:\windows\system32\cmd.exe lossyWV:Extension: lossy.tak Parameters: /d /c c:\"program files"\bin\lossywav - --standard --silent --stdout|c:\"program files"\bin\takc -e -p2m -fsl512 -ihs - %d Format is: lossless or hybrid Highest BPS mode supported: 24 CODE Encoder: c:\windows\system32\cmd.exe Extension: lossy.wv Parameters: /d /c c:\"program files"\bin\lossywav - --standard --silent --stdout|c:\"program files"\bin\wavpack -hm --blocksize=512 --merge-blocks -i - %d Format is: lossless or hybrid Highest BPS mode supported: 24 Just out of curiosity, why there is no example for lossyAPE (MonkeyAudio)? Sorry if this has already been mentioned somewhere, the lossyWAV threads are a bit too long ~ |
|
|
|
Nick.C lossyWAV 1.2.0 Development Thread Aug 25 2008, 12:16
Nick.C Some questions:Do we need dither?Do we need 32-bit... Aug 25 2008, 13:36
botface QUOTE (Nick.C @ Aug 25 2008, 13:36) Some ... Aug 25 2008, 15:32
halb27 QUOTE (Nick.C @ Aug 25 2008, 14:36) Some ... Aug 25 2008, 15:43
sauvage78 I was waiting for this thread
I wish I could ans... Aug 25 2008, 19:14
halb27 QUOTE (sauvage78 @ Aug 25 2008, 20:14) ..... Aug 25 2008, 21:05
Nick.C One possible variant is to use 1 as a spreading va... Aug 25 2008, 21:18
halb27 QUOTE (Nick.C @ Aug 25 2008, 22:18) One p... Aug 26 2008, 07:37
Axon I'll second a request for 32-bit float. Aug 26 2008, 00:28
Nick.C I am re-examining each major processing component ... Aug 26 2008, 08:26
halb27 QUOTE (Nick.C @ Aug 26 2008, 09:26) ... m... Aug 26 2008, 09:43
2Bdecided The noise floor already "floats" in 32-b... Aug 26 2008, 12:33
Axon QUOTE (2Bdecided @ Aug 26 2008, 06:33) Th... Aug 26 2008, 23:42
krmathis Suggestion: Cross-platform code, allowing Mac OS X... Aug 26 2008, 18:38
Nick.C It would be possible to read 32-bit float values a... Aug 27 2008, 07:40
Axon A complete mapping of the floating point domain is... Aug 27 2008, 07:49
SebastianG QUOTE (Nick.C @ Aug 25 2008, 13:16) 1.2.0... Aug 27 2008, 14:06
Nick.C QUOTE (SebastianG @ Aug 27 2008, 14:06) C... Aug 27 2008, 22:18
GeSomeone I fail to see how anyone that goes through the len... Aug 27 2008, 14:49
2Bdecided QUOTE (GeSomeone @ Aug 27 2008, 14:49) I ... Aug 29 2008, 14:18
Nick.C lossyWAV beta 1.1.1c attached to post #1 in this t... Sep 2 2008, 12:53
krmathis Guess nobody liked my suggestion.
Oh well! ...... Sep 2 2008, 14:22
Nick.C I love the idea, I just don't have the develop... Sep 2 2008, 14:27
krmathis QUOTE (Nick.C @ Sep 2 2008, 15:27) I love... Sep 4 2008, 16:13
sauvage78 I just spend the last 15 min testing LossyWAV V1.1... Sep 3 2008, 17:32
Nick.C Monkey's Audio does not make use of a "wa... Sep 3 2008, 22:57
Nick.C And a knowledge of C which I don't have - loss... Sep 4 2008, 16:25
[JAZ] QUOTE (Nick.C @ Sep 4 2008, 17:25) And a ... Sep 4 2008, 19:34
rbrito QUOTE (Nick.C @ Sep 4 2008, 12:25) And a ... Sep 16 2008, 23:48
Nick.C Thanks [JAZ], that's certainly worth a look - ... Sep 4 2008, 22:20
servimo QUOTE lossyFLAC:
CODE
Encoder: c:\windows... Sep 5 2008, 04:04
halb27 QUOTE (servimo @ Sep 5 2008, 05:04) ...lo... Sep 5 2008, 08:26
[JAZ] QUOTE (servimo @ Sep 5 2008, 05:04) What ... Sep 5 2008, 11:25
sauvage78 servimo:
RTFM
-b 512 Sep 5 2008, 05:23
servimo I should have did it this way: FLAC -> WAV -... Sep 5 2008, 06:04
Nick.C servimo, the foobar2000 settings work perfectly - ... Sep 5 2008, 08:19
servimo In all those tests I'll keep the -b 512 I didn... Sep 5 2008, 21:56
uart QUOTE (servimo @ Sep 5 2008, 12:56) The o... Sep 6 2008, 17:01
halb27 QUOTE (uart @ Sep 6 2008, 18:01) ...My un... Sep 6 2008, 17:08
uart I'm new to lossywav and I've just tested s... Sep 6 2008, 17:14
uart HELP I'm getting double file extentions in all... Sep 6 2008, 19:16
Nick.C uart:
1: The correction file is made up of the di... Sep 6 2008, 20:14
uart Thanks for the info Nick.
QUOTE (Nick.C @ Se... Sep 6 2008, 20:35
Nick.C I have all file extensions visible by choice too.
... Sep 6 2008, 20:38
uart UPDATE.
Previously I've just been testing thi... Sep 6 2008, 20:48
Nick.C Your track / album naming strings shouldn't be... Sep 6 2008, 20:55
uart Thanks anyway Nick. I've just cut and pasted y... Sep 6 2008, 21:03
foosion My theory is that some part of the software checks... Sep 6 2008, 21:52
sauvage78 As I wanted to know if it was usefull to include a... Sep 8 2008, 10:30
Gow Anyone know of a way to set up up a Lossy WMA-L st... Sep 9 2008, 04:11
Nick.C Sorry, I don't know how to setup WMA-L in foob... Sep 10 2008, 07:55
Gow Well I have tried and failed...I haven't pinne... Sep 11 2008, 00:47
Nick.C I've been busy transcoding the IA-32/x87 assem... Sep 24 2008, 21:38
rbrito Hi, Nick.
QUOTE (Nick.C @ Sep 24 2008, 17... Sep 24 2008, 23:39
Nick.C All of the IA-32 / x87 source is still in the proj... Sep 25 2008, 07:15
[JAZ] QUOTE (Nick.C @ Sep 25 2008, 08:15) I hav... Sep 25 2008, 11:42
Nick.C Reversion to Delphi complete (with conditional def... Sep 30 2008, 08:18
rbrito QUOTE (Nick.C @ Sep 30 2008, 04:18) Rever... Sep 30 2008, 14:53
rbrito I just checked in the new sources of Nick into the... Sep 30 2008, 16:11
uart Hi Nick. I was just wondering what version of Delp... Sep 30 2008, 17:47
Nick.C I downloaded Turbo Delphi 2006 from the Codegear s... Sep 30 2008, 19:53
uart Ok thanks Nick, I'll give that a try Oct 1 2008, 18:29
uart Ok that worked. After a little bit of fiddling I... Oct 2 2008, 15:08
hellokeith QUOTE (Gow @ Sep 10 2008, 18:47) Well I h... Oct 4 2008, 23:34
Nick.C My implementation of SG's new noise-shaping me... Oct 22 2008, 08:25
uart What exactly do you need Nick? Do you mean you sim... Oct 22 2008, 16:39
Nick.C I would like some content which has some form of m... Oct 22 2008, 20:27
Gregory S. Chudov Greetings.
I was thinking about ways to gracefull... Nov 18 2008, 17:31
pdq QUOTE (Gregory S. Chudov @ Nov 18 2008, 11... Nov 18 2008, 17:42
Gregory S. Chudov QUOTE (pdq @ Nov 18 2008, 19:42) 1) I thi... Nov 18 2008, 17:47
pdq QUOTE (Gregory S. Chudov @ Nov 18 2008, 11... Nov 18 2008, 20:11
Nick.C If you decode HDCD to 24-bit WAV, process that out... Nov 18 2008, 19:38
Gregory S. Chudov QUOTE (Nick.C @ Nov 18 2008, 21:38) If yo... Nov 18 2008, 20:34
Nick.C lossyWAV does not recognise HDCD input - Christoph... Nov 18 2008, 21:05
Gregory S. Chudov Thanks.
QUOTE (Nick.C @ Nov 18 2008, 23... Nov 18 2008, 21:20
pdq Any low bits that are already zero will remain zer... Nov 18 2008, 22:09
Gregory S. Chudov QUOTE (pdq @ Nov 19 2008, 00:09) Any low ... Nov 18 2008, 22:39
Nick.C A 20-bit sample in a 24-bit container will already... Nov 19 2008, 08:17
Gregory S. Chudov QUOTE (Nick.C @ Nov 19 2008, 10:17) A 20-... Nov 20 2008, 15:42
Nick.C Yes, thanks. Nov 20 2008, 16:06
Gregory S. Chudov Here it is:
http://www.hydrogenaudio.org/forums/i... Nov 20 2008, 23:14
Nick.C QUOTE (Gregory S. Chudov @ Nov 20 2008, 23... Nov 21 2008, 08:47
Gregory S. Chudov QUOTE (Nick.C @ Nov 21 2008, 10:47) Looki... Nov 21 2008, 10:47
lvqcl Processing 1-hour wav (16/44):
LossyWav.exe: 73 se... Nov 21 2008, 01:18
Gregory S. Chudov I added lossyWAV support to CUETools.
New CUETool... Nov 22 2008, 16:29
[JAZ] QUOTE (Gregory S. Chudov @ Nov 22 2008, 16... Nov 23 2008, 13:08
Nick.C It looks like I should "hang up" Delphi ... Nov 22 2008, 19:12
Neasden Did people give up on ABX'ing LossyWAV? I didn... Nov 22 2008, 19:24
halb27 QUOTE (Neasden @ Nov 22 2008, 20:24) Did ... Nov 22 2008, 23:39
Nick.C --standard (-S or -q 5) appears, from all of the i... Nov 22 2008, 21:11
singaiya I gave up ABX testing it. It was really difficult ... Nov 23 2008, 00:10
Nick.C Thanks for your effort [JAZ], it's appreciated... Nov 23 2008, 21:09
[JAZ] Some updates on the port to Java:
I have a workin... Nov 30 2008, 20:33
Gregory S. Chudov QUOTE (JAZ @ Nov 30 2008, 22:33) Some upd... Nov 30 2008, 22:00
Nick.C Sounds good [JAZ] - keep up the good work!
Th... Nov 30 2008, 20:51
Nick.C The pure Delphi and Delphi / IA-32 / x87 versions ... Nov 30 2008, 22:04
[JAZ] I've uploaded a .jar file with the implementat... Dec 1 2008, 23:47
Nick.C Thanks again [JAZ] - more potential platforms for ... Dec 2 2008, 08:47
Canar I too would like 32-bit float support, if that... Dec 9 2008, 05:34![]() ![]() |
|
Lo-Fi Version | Time is now: 20th May 2013 - 10:34 |