lossyWAV 1.2.0 Development Thread, Added noise WAV bitdepth reduction method |
![]() ![]() |
lossyWAV 1.2.0 Development Thread, Added noise WAV bitdepth reduction method |
Sep 10 2008, 07:55
Post
#51
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
Sorry, I don't know how to setup WMA-L in foobar2000 - good luck!
lossyWAV 1.1.1d attached to post #1 in this thread. CODE |===============|==========|==========|==========|==========|==========|==========|
| Version | FLAC | --insane |--extreme |--standard|--portable| --zero | |===============|==========|==========|==========|==========|==========|==========| |lossyWAV 1.1.0b| 854kbit/s| 632kbit/s| 548kbit/s| 463kbit/s| 376kbit/s| 285kbit/s| |---------------|----------|----------|----------|----------|----------|----------| |lossyWAV 1.1.1c| 854kbit/s| 627kbit/s| 542kbit/s| 457kbit/s| 373kbit/s| 281kbit/s| |---------------|----------|----------|----------|----------|----------|----------| |lossyWAV 1.1.1d| 854kbit/s| 631kbit/s| 547kbit/s| 462kbit/s| 377kbit/s| 283kbit/s| |===============|==========|==========|==========|==========|==========|==========| This post has been edited by Nick.C: Sep 10 2008, 12:45 -------------------- lossyWAV -q X -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
Sep 11 2008, 00:47
Post
#52
|
|
![]() Group: Members Posts: 233 Joined: 14-June 06 From: Fort Wayne, IN Member No.: 31824 |
Well I have tried and failed...I haven't pinned down the right sequence yet...
What I have used so far... CODE /d /c C:\"Program Files (x86)"\foobar2000\codec\lossywav - --portable --silent --stdout | "C:\Program Files (x86)\Windows Media Components\Encoder\WMCmd.vbs" -silent -a_codec WMA9LSL -a_mode 2 -a_setting Q100_44_2_16 -input %s -output %d Problem is it gives back a WSHShell / undefined variable...probably has to do something with the piping or some other little variable. I will have to stick with the workaround method I have setup at the moment. Convert to Lossy Portable FLAC and then convert that to WMA-Lossless. I will keep trying every once in a while to try to figure some tweak or some trick to get it to work as a command line. -------------------- Zune 80, Tak -p4 audio library, Lossless=Choice
|
|
|
|
Sep 16 2008, 23:48
Post
#53
|
|
![]() Group: Members Posts: 52 Joined: 16-August 05 Member No.: 23948 |
And a knowledge of C which I don't have - lossyWAV is Delphi & IA-32 assembler.... As I mentioned in another post, I think that I can help you here a bit, so that the program truly becomes cross-platform. I'm dying to know about how it is used and how it works on my files. Regards, Rogério Brito. |
|
|
|
Sep 24 2008, 21:38
Post
#54
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
I've been busy transcoding the IA-32/x87 assembler routines back to vanilla Delphi. Only a few more routines to go (nmath & nwav units) and I'll post the source of 1.1.1e. At present, the processing speed has decreased by a factor of approximately 3 for the (much) reduced assembler version - shows the advantages of hand-coded assembler....
-------------------- lossyWAV -q X -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
Sep 24 2008, 23:39
Post
#55
|
|
![]() Group: Members Posts: 52 Joined: 16-August 05 Member No.: 23948 |
Hi, Nick.
I've been busy transcoding the IA-32/x87 assembler routines back to vanilla Delphi. Only a few more routines to go (nmath & nwav units) and I'll post the source of 1.1.1e. Thanks for the information. I was already going to transcode those very units, but seeing that you are working on them, I don't want to deal with a moving target. QUOTE At present, the processing speed has decreased by a factor of approximately 3 for the (much) reduced assembler version - shows the advantages of hand-coded assembler.... Well, that's one price to pay for those which are interested in having the tool be cross-platform. Also, I think that Delphi would have the ability to do conditional compiles, doesn't it? And as compilers mature, we can reach the speed of hand-coded assembly asymptotically... In the worst case scenario, we can use some already optimized build-dependency like "liboil" (for "optimized inner loops"). Regards, Rogério Brito. P.S.: BTW, it would be nice if you used the SVN repository of sourceforge, since, this way, other people could see the conversion and learn from it. I am sure that I would appreciate it. |
|
|
|
Sep 25 2008, 07:15
Post
#56
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
All of the IA-32 / x87 source is still in the project, as you surmised "hidden" behind compiler conditional defines so that I can check that I haven't broken the "fast" version while re-implementing the Delphi version. There is a one-to-one correspondance of routines, so far, between Assembler and Delphi - this should allow people to examine and compare the original Delphi and the optimised assembler versions.
I haven't worked out how to do anything with the SourceForge project - it's an empty folder. -------------------- lossyWAV -q X -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
Sep 25 2008, 11:42
Post
#57
|
|
|
Group: Members Posts: 1559 Joined: 24-June 02 From: Catalunya(Spain) Member No.: 2383 |
I haven't worked out how to do anything with the SourceForge project - it's an empty folder. You currently have the project configured to use CVS. I personally recommend using the SVN option instead*. Here you have information of both cases CVS: How to install tortoiseCVS and configure it to use with sourceforge. Do *not* configure it for anonymous user. You wouldn't be able to commit (upload) the changes, as that cannot be changed afterwards. http://alexandria.wiki.sourceforge.net/CVS...eCVS+with+PuTTY SVN: Enable the SVN option in sourceforge: Login into sourceforge, and go to this page (else you won't have access) https://sourceforge.net/project/admin/svn.p...group_id=228679 Enable the checkbox for subversion, and press "Update" button. Similarly, go to https://sourceforge.net/project/admin/cvs.p...group_id=228679 and uncheck the CVS option and press update (These options are under the Admin menu in the project main page. Now they hide it under the "more" option) How to install TortoiseSVN and configure it: http://alexandria.wiki.sourceforge.net/Sub...t+-+TortoiseSVN Once you have any of the options configured, you have to checkout the repository (which will create an empty directory in your machine with either a CVS or a .svn subfolder) where you can copy the source files, and then do a commit of this directory to upload the changes. (If using SVN, it will ask for your username and password at this point) The source can always be seen on these url's. It is a great tool to follow the changes. if CVS: http://lossywav.cvs.sourceforge.net/lossywav/ if SVN: http://lossywav.svn.sourceforge.net/viewvc/lossywav/ * SVN offers several advantages over CVS, like checking differences with the previous release without the need to contact the repository, renaming of directories and can connect directly to sourceforge, without the need of configuring a public key. This post has been edited by [JAZ]: Sep 25 2008, 11:44 |
|
|
|
Sep 30 2008, 08:18
Post
#58
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
Reversion to Delphi complete (with conditional define to re-enable all of the existing IA-32/x87 code).
lossyWAV beta 1.1.1e attached to post #1 in this thread. -------------------- lossyWAV -q X -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
Sep 30 2008, 14:53
Post
#59
|
|
![]() Group: Members Posts: 52 Joined: 16-August 05 Member No.: 23948 |
Reversion to Delphi complete (with conditional define to re-enable all of the existing IA-32/x87 code). lossyWAV beta 1.1.1e attached to post #1 in this thread. Hummm, I downloaded the zip files that you posted on the first post and I see only Windows executables. Perhaps I'm blind, but I would like to import the sources soon to our SVN repository. Where is the source code? (sorry for the lame question). A note to other people: we have already established a project on sourceforge and I removed the CVS repository and enabled the SVN one. I will keep two main parts there: one for Nick's development in Delphi and one for porting issutes. I welcome anybody to send patches (unified format largely preferred) to the code that will be there. I intend to code things in plain C and create a Debian package of it latter (so many Unix distributions---FreeBSD, Debian, OpenBSD, Ubuntu, Gentoo etc) can benefit from it. Regards, Rogério Brito. Sorry, sorry. Just found out the sources. They will be checked into the repository. Regards, Rogério Brito. |
|
|
|
Sep 30 2008, 16:11
Post
#60
|
|
![]() Group: Members Posts: 52 Joined: 16-August 05 Member No.: 23948 |
I just checked in the new sources of Nick into the repository. They can be seen here:
http://lossywav.svn.sourceforge.net/viewvc/lossywav/ Regards, Rogério Brito. |
|
|
|
Sep 30 2008, 17:47
Post
#61
|
|
|
Group: Members Posts: 727 Joined: 23-November 04 Member No.: 18295 |
Hi Nick. I was just wondering what version of Delphi are you using on this project? I use Borland Delphi 7 (probably a bit old) and it freezes if I try to open the project file.
|
|
|
|
Sep 30 2008, 19:53
Post
#62
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
I downloaded Turbo Delphi 2006 from the Codegear site. It comes with a free 100 year licence when you register to be able to download it.
The reason it is crashing may be that I have done most of the development on a USB stick so that the code is suitably portable - that may cause the IDE to crash when you open the project. I would try creating a new console application and pasting lossywav.dpr into the main code window. This post has been edited by Nick.C: Sep 30 2008, 19:54 -------------------- lossyWAV -q X -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
Oct 1 2008, 18:29
Post
#63
|
|
|
Group: Members Posts: 727 Joined: 23-November 04 Member No.: 18295 |
Ok thanks Nick, I'll give that a try
|
|
|
|
Oct 2 2008, 15:08
Post
#64
|
|
|
Group: Members Posts: 727 Joined: 23-November 04 Member No.: 18295 |
Ok that worked. After a little bit of fiddling I've now got it compiling properly under the older Borland Delphi-7.
|
|
|
|
Oct 4 2008, 23:34
Post
#65
|
|
|
Group: Members Posts: 288 Joined: 14-August 06 Member No.: 34027 |
Well I have tried and failed...I haven't pinned down the right sequence yet... What I have used so far... CODE /d /c C:\"Program Files (x86)"\foobar2000\codec\lossywav - --portable --silent --stdout | "C:\Program Files (x86)\Windows Media Components\Encoder\WMCmd.vbs" -silent -a_codec WMA9LSL -a_mode 2 -a_setting Q100_44_2_16 -input %s -output %d Problem is it gives back a WSHShell / undefined variable...probably has to do something with the piping or some other little variable. I will have to stick with the workaround method I have setup at the moment. Convert to Lossy Portable FLAC and then convert that to WMA-Lossless. I will keep trying every once in a while to try to figure some tweak or some trick to get it to work as a command line. Cscript.exe is required to run .vbs files. I believe it is in C:\Windows\System32\ and put the .vbs as an argument after it with full path in quotes. |
|
|
|
Oct 22 2008, 08:25
Post
#66
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
My implementation of SG's new noise-shaping method having stalled (only for a while - my head hurts....), I am turning my attention to the examination of 2ch. audio for M/S content.
What I really need are a few samples which have such content so that I can get a feel for what I'm looking for. I can, of course, develop the algorithm without samples but any output cannot be meaningfully examined without them. -------------------- lossyWAV -q X -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
Oct 22 2008, 16:39
Post
#67
|
|
|
Group: Members Posts: 727 Joined: 23-November 04 Member No.: 18295 |
What exactly do you need Nick? Do you mean you simply need some material that has a lot more content in the mid compared to the side channel?
|
|
|
|
Oct 22 2008, 20:27
Post
#68
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
I would like some content which has some form of matrix surround encoding (as David mentions here) to make sure that it doesn't suffer too much when processed by lossyWAV.
-------------------- lossyWAV -q X -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
Nov 18 2008, 17:31
Post
#69
|
|
![]() Group: Developer Posts: 648 Joined: 2-October 08 From: Ottawa Member No.: 59035 |
Greetings.
I was thinking about ways to gracefully compress HDCD-encoded CDs to a lossy format. There's is a nice HDCD decoder by Christopher Key, which turns HDCD-encoded wav into 24-bit wav with 4 bits wasted (actually containing 20 meaningful bits per sample). So my questions are: 1) Does lossyWAV support 20-bit input, and would it make any difference if the file was 20-bit or 24-bit with 4 bits wasted? 2) Is there a way to force lossyWAV to get rid of at least 4 bits in every frame to be able to store the output as a regular 16-bit wav? -------------------- CUETools 2.1.4
|
|
|
|
Nov 18 2008, 17:42
Post
#70
|
|
|
Group: Members Posts: 3080 Joined: 1-September 05 From: SE Pennsylvania Member No.: 24233 |
Greetings. I was thinking about ways to gracefully compress HDCD-encoded CDs to a lossy format. There's is a nice HDCD decoder by Christopher Key, which turns HDCD-encoded wav into 24-bit wav with 4 bits wasted (actually containing 20 meaningful bits per sample). So my questions are: 1) Does lossyWAV support 20-bit input, and would it make any difference if the file was 20-bit or 24-bit with 4 bits wasted? 2) Is there a way to force lossyWAV to get rid of at least 4 bits in every frame to be able to store the output as a regular 16-bit wav? 1) I think you don't need lossy wav to encode your 20 bits out of 24. Most lossless encoders will account for the low 4 bits always being zero. 2) There are other ways to truncate (or preferrable dither) the data to 16 bits, then pass that on to lossy wav as a regular 16 bit wav file. |
|
|
|
Nov 18 2008, 17:47
Post
#71
|
|
![]() Group: Developer Posts: 648 Joined: 2-October 08 From: Ottawa Member No.: 59035 |
1) I think you don't need lossy wav to encode your 20 bits out of 24. Most lossless encoders will account for the low 4 bits always being zero. 2) There are other ways to truncate (or preferrable dither) the data to 16 bits, then pass that on to lossy wav as a regular 16 bit wav file. 1) I know, but i want to encode to lossy wav, not just compress to flac, so the question is how does it handle such input. 2) There are, but i'm afraid that the quality would suffer more after two subsequent lossy processes. This post has been edited by Gregory S. Chudov: Nov 18 2008, 17:47 -------------------- CUETools 2.1.4
|
|
|
|
Nov 18 2008, 19:38
Post
#72
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
If you decode HDCD to 24-bit WAV, process that output with lossyWAV and pipe to FLAC you will get a 24-bit lossyFLAC file. This will have undergone 1 lossy process (lossyWAV). The difference in filesize between a HDCD>24-bit>16-bit>lossyWAV>FLAC and HDCD>24-bit>lossyWAV>FLAC *should* be a small percentage.
-------------------- lossyWAV -q X -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
Nov 18 2008, 20:11
Post
#73
|
|
|
Group: Members Posts: 3080 Joined: 1-September 05 From: SE Pennsylvania Member No.: 24233 |
1) I think you don't need lossy wav to encode your 20 bits out of 24. Most lossless encoders will account for the low 4 bits always being zero. 1) I know, but i want to encode to lossy wav, not just compress to flac, so the question is how does it handle such input. A lossy wav file is the same size as the original, just with a little bit more noise. The only possible use that I can see for it is that it gets much smaller when you compress it losslessly. |
|
|
|
Nov 18 2008, 20:34
Post
#74
|
|
![]() Group: Developer Posts: 648 Joined: 2-October 08 From: Ottawa Member No.: 59035 |
If you decode HDCD to 24-bit WAV, process that output with lossyWAV and pipe to FLAC you will get a 24-bit lossyFLAC file. This will have undergone 1 lossy process (lossyWAV). The difference in filesize between a HDCD>24-bit>16-bit>lossyWAV>FLAC and HDCD>24-bit>lossyWAV>FLAC *should* be a small percentage. Thanks for an answer, but that i understand. The question was, how does lossyWAV handle 20 bit input or 24 bit input with 4 wasted bits and is there any difference in quality between those cases. And also, is it possible to force lossyWAV to destroy _at least_ given number of bits (e.g. 8 bits for 24 bit input). The reason i'm asking this is not that i'm hoping for a smaller filesize, but because a) some lossless codecs only support 16-bit audio, b) some hardware players only support 16-bit audio. And i don't want to have two lossy processes involved, because this obviously is bad for sound quality. -------------------- CUETools 2.1.4
|
|
|
|
Nov 18 2008, 21:05
Post
#75
|
|
![]() lossyWAV Developer Group: Developer Posts: 1721 Joined: 11-April 07 From: Wherever here is Member No.: 42400 |
lossyWAV does not recognise HDCD input - Christopher's decoder uses API calls to the Windows library - thus making it platform dependent. I am unwilling to tie lossyWAV to one platform (especially just after transcoding all of the IA-32 assembly language routines back to Delphi).
Christopher's decoder outputs 24-bit WAV files (for decoded HDCD output). No option is available to force (at least) a certain number of bits to be removed - it goes against the principle of lossyWAV. Also, lossyWAV, as pdq said above, outputs a file which is almost identical in size to the original (the only addition is a 'fact' chunk and even then not if the output is piped to STDOUT) at the same bit-depth as the original. I can only suggest you try the following out and see if it sounds palatable: HDCD > 24-bit WAV > 16-bit WAV (foobar2000?) > lossyWAV > FLAC. -------------------- lossyWAV -q X -i | FLAC -8 ~= 295kbps
SGS III (Rooted) + 64GB |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 15:09 |