lossyWAV 1.1.0 released., Added noise WAV bit reduction method. |
lossyWAV 1.1.0 released., Added noise WAV bit reduction method. |
Jul 14 2008, 12:34
Post
#1
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
lossyWAV 1.1.0c is now available for download.
CODE lossyWAV 1.1.0c, Copyright (C) 2007,2008 Nick Currie. Copyleft. Link to the hydrogenaudio wiki articleThis program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Process Description: lossyWAV adds white noise to the processed output. The amount of added noise is based on analysis of the signal levels in the frequency range 20Hz to 16kHz. If signals above the upper limiting frequency are at an even lower level, they can be swamped by the added noise. This is usually inaudible, but the behaviour can be changed by specifying a higher --limit (in the range 16kHz to 20kHz). For many audio signals, there is little content at very high frequencies, and forcing lossyWAV to keep the added noise level lower than the content at these frequencies can increase the bitrate dramatically for no perceptible benefit. Usage : lossyWAV <input wav file> <options> Example : lossyWAV musicfile.wav Quality Options: -I, --insane highest quality output, suitable for transcoding; -E, --extreme high quality output, also suitable for transcoding; -S, --standard default quality output, considered to be transparent; -P, --portable good quality output for DAP use. Not considered to be fully transparent, but considered fit for its intended purpose. Standard Options: -c, --check check if WAV file has already been processed; default=off. errorlevel=16 if already processed, 0 if not. -C, --correction write correction file for processed WAV file; default=off. -f, --force forcibly over-write output file if it exists; default=off. -h, --help display help. -L, --longhelp display extended help. -M, --merge merge existing lossy.wav and lwcdf.wav files. -o, --outdir <t> destination directory for the output file(s). -v, --version display the lossyWAV version number. Advanced Options: - if filename="-" then WAV input is taken from STDIN. --blockdist show distribution of lowest significant bit of input codec-blocks and bit-removed codec-blocks. -D, --dither <n> enable variable PDF dither of output; default=off; 0 = rectangular; 1 = triangular; 0.5 = half way between. -l, --limit <n> set upper frequency limit to be used in analyses to n Hz; (16000<=n<=20000), default = 16000. --linkchannels Revert to original single bits-to-remove value for all channels rather than channel dependent bits-to-remove. -q, --quality <n> quality preset (10=highest quality, 0=lowest bitrate; default = --standard = 5; --insane = 10; --extreme = 7.5; --portable = 2.5) --sampledist show distribution of lowest significant bit of input samples and bit-removed samples. --scale <n> scaling factor from WaveGain, etc; (0.0<n<=8.0),default=1.0 -s, --shaping <n> enable fixed noise shaping; (0.00<=n<=1.00); default=q/10; 0.00 = off, 1.00 = 100% effectiveness, 0.50 = 50%, etc. --stdinname <t> pseudo filename to use when input from STDIN. --stdout write processed WAV output to STDOUT. -w, --writetolog create (or append to) lossyWAV.log in the output directory. System Options: -B, --below set process priority to below normal. -d, --detail enable detailed bits-to-remove information output mode --low set process priority to low. -n, --nowarnings suppress lossyWAV warnings. -Q, --quiet significantly reduce screen output. --silent no screen output. Special thanks: David Robinson for the publication of his lossyFLAC method, guidance, and the motivation to implement the method as lossyWAV. Horst Albrecht for ABX testing, valuable support in tuning the internal presets, constructive criticism and all the feedback. Sebastian Gesemann for the noise shaping coefficients and help in using them in the lossyWAV noise shaping implementation. Don Cross for the Complex-FFT algorithm used. 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 Enclose the element of the path containing spaces within double quotation marks ("), e.g. C:\"Program Files"\directory_where_executable_is\executable_name. This is a Windows limitation. N.B.: lossyWAV 1.2.0 development thread here This post has been edited by Nick.C: Apr 17 2012, 20:51
Attached File(s)
lossyWAV_1.1.0c.zip ( 75.56K )
Number of downloads: 787
lossyWAV_Source_20090430_2145_1.1.0c.zip ( 201.82K )
Number of downloads: 274-------------------- lossyWAV -q X -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
![]() |
Jul 25 2008, 03:36
Post
#2
|
|
|
Group: Members Posts: 291 Joined: 27-January 04 From: Germany Member No.: 11530 |
I have three questions:
Seems that it's always used with respect to the chosen quality value (q/10). 2. A comparison of ReplayGain values indicates that peak sample values increase with lossyWAV, reaching 1.0 where the originals were below 1.0. May that indicate possibly clipped samples? 3. Can lossyWAV safely be used with 96 kHz material without any disadvantages? Does it depend on whether noise shaping is used or not? This post has been edited by Hancoque: Jul 25 2008, 12:03 |
|
|
|
Jul 25 2008, 19:09
Post
#3
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
I have three questions: 1) You can disable shaping with --shaping 0;Seems that it's always used with respect to the chosen quality value (q/10). 2. A comparison of ReplayGain values indicates that peak sample values increase with lossyWAV, reaching 1.0 where the originals were below 1.0. May that indicate possibly clipped samples? 3. Can lossyWAV safely be used with 96 kHz material without any disadvantages? Does it depend on whether noise shaping is used or not? 2) Samples will sometimes increase due to rounding off lsb's, sometimes decrease - increasing to 32768 will cause some clipping for 16-bit and will be changed to (32767 shr bits-to-remove) shl bits-to-remove. Clips are counted per channel per codec block. If the number of clips exceeds a preset value (see --longhelp) then the bits-to-remove for that channel is reduced by one and the bit removal process is repeated until the number of clips for that channel does not exceed the permitted number or the number of bits removed is zero; 3) Yes - noise shaping is optimised for 44.1kHz and 48kHz - thanks to SebastianG's coefficients - if worried about this noise shaping, use --shaping 0 as above. [edit] Explanation at #2 [/edit] This post has been edited by Nick.C: Jul 25 2008, 22:21 -------------------- lossyWAV -q X -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
Jul 25 2008, 22:28
Post
#4
|
|
![]() Group: Members Posts: 733 Joined: 17-September 06 Member No.: 35307 |
2) Peak samples will sometimes increase due to rounding off lsb's - this will cause some clipping at +32768 for 16-bit and will be changed to (32767 shr bits-to-remove) shl bits-to-remove; NickC, I was also interested in this explanation. Am I right to presume that 'shr' is 'bit-shift to the right' by the number of places following the 'shr' command (discarding the LSBs that shift off the end), and 'shl' is 'bit-shift left', shifting to the left while setting the new LSBs to zero. I.e. 32767 is expressed in 16-bit signed binary as: 0111 1111 1111 1111 If bits to remove is 5, this clips to what I can also express as: 32768 - (2 ^ bits-to-remove) = 32768 - 2^5 = 32768 - 32 = 32736 = 0111 1111 1110 0000 Rather than do my 2 to the power of 5 calculation, this was done by shifting the maximum value of 32767 by 5 places to the right, going to 0000 0011 1111 1111 then back to 5 places to the left, filling LSBs with zeroes: going to 0111 1111 1110 0000 So (2 ^ bits-to-remove) = 32 is the clipping error, which is 1/1024th of the target signal amplitude in this case, and represents a smaller error than 32 from the original signal (presumably between 16 and 31), where the target bits-to-remove would have generated a rounding error of 15 if it had 17 bits available to round upwards instead of having to round downwards. In this 5-bit case, this clipping error is equivalent to clipping caused by increasing gain by 0.0085 dB above full scale, which is very low-level, and might reassure other users (e.g. try amplifying a full-scale signal by 0.0085 dB and ABX the clipping distortion, which will exceed the distortion in lossyWAV [edit]when 5 bits are removed, that is[/edit]). The sample error adds energy at about -60dB relative to a full-scale sample in this case, which is only mildly indicative of what scale of event may happen in the frequency domain to which the ear responds. Things get more complicated with noise shaping in use, though presumably there's a feed-forward of accumulated error (like with error-diffusion dither in imaging) which enables the always-negative clipping adjustment to be offset by greater likelihood of positive shifts in following samples, and presumably the instantaneous clipping is likely to be incorporated into the high frequency end of the shaped noise unless there happen to be numerous successive clipped samples, which naturally means lower frequencies. This post has been edited by Dynamic: Jul 25 2008, 22:30 |
|
|
|
Nick.C lossyWAV 1.1.0 released. Jul 14 2008, 12:34
botface QUOTE (Nick.C @ Jul 14 2008, 12:34) lossy... Jul 14 2008, 13:47
Nick.C QUOTE (botface @ Jul 14 2008, 13:47) Well... Jul 14 2008, 19:32
Axon Yayayay! Thanks a lot Nick.
Has there been a ... Jul 14 2008, 19:55
Nick.C QUOTE (Axon @ Jul 14 2008, 19:55) Has the... Jul 14 2008, 20:23
carpman QUOTE (Axon @ Jul 14 2008, 19:55) Has the... Jul 14 2008, 20:38
Nick.C QUOTE (carpman @ Jul 14 2008, 20:38) QUOT... Jul 14 2008, 20:54
Axon Yeah, I'm mainly curious as to if comparing lo... Jul 14 2008, 20:50
Synthetic Soul QUOTE (Axon @ Jul 14 2008, 20:50) Yeah, I... Jul 16 2008, 14:42
Nick.C QUOTE (Synthetic Soul @ Jul 16 2008, 14:4... Jul 16 2008, 16:30
Synthetic Soul QUOTE (Synthetic Soul @ Jul 16 2008, 14:4... Jul 18 2008, 11:45
halb27 QUOTE (Synthetic Soul @ Jul 18 2008, 12:4... Jul 18 2008, 12:33
Nick.C QUOTE (halb27 @ Jul 18 2008, 12:33) If th... Jul 18 2008, 18:43
Nick.C QUOTE (halb27 @ Jul 18 2008, 12:33) If th... Jul 19 2008, 20:30
halb27 QUOTE (Nick.C @ Jul 19 2008, 21:30) QUOTE... Jul 19 2008, 21:57
sauvage78 thks Nick, now that noise shaping was done in 1.1.... Jul 14 2008, 21:21
Nick.C QUOTE (sauvage78 @ Jul 14 2008, 21:21) th... Jul 14 2008, 21:38
Agent69 Out of curiousity, and with all due respect to its... Jul 16 2008, 13:44
2Bdecided QUOTE (Agent69 @ Jul 16 2008, 13:44) Out ... Jul 16 2008, 17:10
Nick.C QUOTE (2Bdecided @ Jul 16 2008, 17:10) QU... Jul 16 2008, 19:11
carpman Your question assumes that disk space is never an ... Jul 16 2008, 14:25
Axon To say nothing about vinyl. Gawd! My needledro... Jul 16 2008, 19:02
botface QUOTE (Axon @ Jul 16 2008, 19:02) To say ... Jul 17 2008, 14:22
Brent I searched the entire 1.1.0 development thread, bu... Jul 16 2008, 20:36
halb27 QUOTE (Brent @ Jul 16 2008, 21:36) ... ha... Jul 16 2008, 21:05
Nick.C QUOTE (halb27 @ Jul 16 2008, 21:05) Thank... Jul 16 2008, 21:25
Brent QUOTE (halb27 @ Jul 16 2008, 22:05) QUOTE... Jul 17 2008, 10:17
halb27 QUOTE (Brent @ Jul 17 2008, 11:17) .. wha... Jul 17 2008, 10:27
Nick.C That's a good question - I believe that Mardel... Jul 16 2008, 20:45
carpman QUOTE (Nick.C @ Jul 16 2008, 16:30) QUOTE... Jul 17 2008, 01:45
Axon Now this is cute. Just for grins I tried lossyWAV ... Jul 17 2008, 02:59
shadowking i think -standard quality losswav is aiming for tr... Jul 17 2008, 10:36
2Bdecided QUOTE (shadowking @ Jul 17 2008, 10:36) A... Jul 17 2008, 12:21
2Bdecided If you take a 44.1kHz file and simply resample it ... Jul 17 2008, 14:59
botface QUOTE (2Bdecided @ Jul 17 2008, 14:59) If... Jul 17 2008, 16:10
2Bdecided Sorry - I didn't write that very well.
What I... Jul 17 2008, 17:15
botface QUOTE (2Bdecided @ Jul 17 2008, 17:15) Wh... Jul 17 2008, 20:12
Dynamic QUOTE (botface @ Jul 17 2008, 20:12) So, ... Jul 18 2008, 00:32
2Bdecided QUOTE (Dynamic @ Jul 18 2008, 00:32) Ther... Jul 18 2008, 10:49
raygrote Lossy Wav really sounds very interesting. I've... Jul 17 2008, 19:50
carpman QUOTE (raygrote @ Jul 17 2008, 19:50) 1. ... Jul 17 2008, 20:23
Nick.C ^^ What he said.... Jul 17 2008, 20:32
carpman Don't listen to me, just read the wiki; it... Jul 17 2008, 20:37
raygrote Thanks for info.
It still doesn't work with Fo... Jul 17 2008, 21:38
halb27 QUOTE (raygrote @ Jul 17 2008, 22:38) ...... Jul 17 2008, 23:02
carpman QUOTE (raygrote @ Jul 17 2008, 21:38) I s... Jul 17 2008, 21:47
sauvage78 -o%d is ok, --stdout| e: maybe is not ... try --st... Jul 17 2008, 23:59
raygrote I tried all suggestions, nothing is working. I... Jul 18 2008, 00:49
Nick.C QUOTE (raygrote @ Jul 18 2008, 00:49) I t... Jul 18 2008, 08:23
botface QUOTE (raygrote @ Jul 18 2008, 00:49) I t... Jul 18 2008, 09:06
smok3 how would a piped cmd look for win? (flac to lossy... Jul 19 2008, 22:40
Nick.C QUOTE (smok3 @ Jul 19 2008, 22:40) how wo... Jul 19 2008, 22:45
smok3 cool, tnx,
what makes you think it will be easie... Jul 20 2008, 21:05
Nick.C QUOTE (smok3 @ Jul 20 2008, 21:05) cool, ... Jul 20 2008, 21:22
smok3 true, somehow i have this weird obsession to const... Jul 20 2008, 21:55
sauvage78 hi,
today I tried to ABX lossywav 1.1.0 with the G... Jul 22 2008, 09:24
Nick.C QUOTE (sauvage78 @ Jul 22 2008, 09:24) ..... Jul 25 2008, 17:47
Neasden lossyWAV is very interesting!
Is it like...
... Jul 25 2008, 04:00
Synthetic Soul QUOTE (Neasden @ Jul 25 2008, 04:00) loss... Jul 25 2008, 09:09
Hancoque If I disable noise shaping, I should enable dither... Jul 26 2008, 12:17
Nick.C QUOTE (Hancoque @ Jul 26 2008, 12:17) If ... Jul 26 2008, 12:46
Nick.C QUOTE (Hancoque @ Jul 26 2008, 12:17) Wha... Jul 26 2008, 19:50
Hancoque So you think that noise shaping should also be use... Jul 26 2008, 13:02
Nick.C QUOTE (Hancoque @ Jul 26 2008, 13:02) So ... Jul 26 2008, 14:48
Hancoque I created four test samples containing white noise... Jul 26 2008, 19:56
Nick.C QUOTE (Hancoque @ Jul 26 2008, 19:56) I c... Jul 26 2008, 20:19
2Bdecided Nick,
1. The FFT size should vary with sample rat... Jul 28 2008, 16:28
Nick.C QUOTE (2Bdecided @ Jul 28 2008, 16:28) Ni... Jul 28 2008, 20:14
Hancoque QUOTE (Nick.C @ Jul 28 2008, 21:14) Basic... Aug 3 2008, 02:33

Nick.C QUOTE (Hancoque @ Aug 3 2008, 02:33) Do y... Aug 3 2008, 08:45

botface QUOTE [*]reference threshold constants for rectang... Aug 3 2008, 08:51

Hancoque QUOTE (Nick.C @ Aug 3 2008, 09:45) I was ... Aug 3 2008, 11:59

Nick.C QUOTE (Hancoque @ Aug 3 2008, 11:59) Is t... Aug 3 2008, 22:13
Hancoque I don't plan to use dithering either. I was ju... Aug 5 2008, 00:29
Hancoque Is it intended that the dithering noise is also sh... Aug 4 2008, 03:07
Nick.C QUOTE (Hancoque @ Aug 4 2008, 03:07) Is i... Aug 4 2008, 07:24
Hancoque I'm using the current version 1.1.0b.
I don... Aug 4 2008, 11:58
Nick.C QUOTE (Hancoque @ Aug 4 2008, 11:58) I... Aug 4 2008, 12:36
2Bdecided Of course the dither should/will be noise shaped. ... Aug 4 2008, 13:11
Nick.C QUOTE (2Bdecided @ Aug 4 2008, 13:11) Of ... Aug 4 2008, 13:33
2Bdecided QUOTE (Nick.C @ Aug 4 2008, 13:33) 1) Dit... Aug 5 2008, 10:30
Nick.C QUOTE (2Bdecided @ Aug 5 2008, 10:30) But... Aug 5 2008, 10:57
Gow I started doing some personal listening and file s... Aug 5 2008, 03:23
smok3 continued, about bat files and tagging, this oneli... Aug 7 2008, 09:18
Nick.C QUOTE (smok3 @ Aug 7 2008, 09:18) continu... Aug 7 2008, 10:12
smok3 QUOTE You could put both lines on one line with a ... Aug 7 2008, 13:41
Nick.C QUOTE (smok3 @ Aug 7 2008, 13:41) QUOTE Y... Aug 7 2008, 13:53
Synthetic Soul One minor benefit: As you are using && (a... Aug 7 2008, 14:19
smok3 fixed the post - 'downgraded' twoliner to ... Aug 7 2008, 15:04
Hanky Nice batch file. But if the specified input file d... Aug 7 2008, 15:16
Nick.C QUOTE (Hanky @ Aug 7 2008, 15:16) Nice ba... Aug 7 2008, 15:48
Hanky Thanks Nick.C, that fixed the error
One more sm... Aug 7 2008, 15:53
Nick.C QUOTE (Hanky @ Aug 7 2008, 15:53) Thanks ... Aug 7 2008, 20:03
Hanky That one works great when you pass one or more fi... Aug 7 2008, 20:33
Nick.C QUOTE (Hanky @ Aug 7 2008, 20:33) That on... Aug 7 2008, 20:45
smok3 my usual approach is to do one batch that handles ... Aug 7 2008, 20:43
sauvage78 Quote: Nick.C
"My intention is to understand ... Aug 17 2008, 06:49![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 01:31 |