Skip to main content

Topic: lossyWAV 1.2.0 Development Thread (Read 224061 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Nick.C
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.2.0 Development Thread
Reply #50
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: [Select]
|===============|==========|==========|==========|==========|==========|==========|
|    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|
|===============|==========|==========|==========|==========|==========|==========|
  • Last Edit: 10 September, 2008, 07:45:17 AM by Nick.C
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

  • Gow
  • [*][*][*]
lossyWAV 1.2.0 Development Thread
Reply #51
Well I have tried and failed...I haven't pinned down the right sequence yet...

What I have used so far...

Code: [Select]
/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

  • rbrito
  • [*][*]
lossyWAV 1.2.0 Development Thread
Reply #52
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.

  • Nick.C
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.2.0 Development Thread
Reply #53
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 -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

  • rbrito
  • [*][*]
lossyWAV 1.2.0 Development Thread
Reply #54
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.

  • Nick.C
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.2.0 Development Thread
Reply #55
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 -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

  • [JAZ]
  • [*][*][*][*][*]
lossyWAV 1.2.0 Development Thread
Reply #56
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.
  • Last Edit: 25 September, 2008, 06:44:29 AM by [JAZ]

  • Nick.C
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.2.0 Development Thread
Reply #57
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 -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

  • rbrito
  • [*][*]
lossyWAV 1.2.0 Development Thread
Reply #58
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.

  • rbrito
  • [*][*]
lossyWAV 1.2.0 Development Thread
Reply #59
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.

  • uart
  • [*][*][*][*][*]
lossyWAV 1.2.0 Development Thread
Reply #60
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.

  • Nick.C
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.2.0 Development Thread
Reply #61
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.
  • Last Edit: 30 September, 2008, 02:54:34 PM by Nick.C
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

  • uart
  • [*][*][*][*][*]
lossyWAV 1.2.0 Development Thread
Reply #62
Ok thanks Nick, I'll give that a try

  • uart
  • [*][*][*][*][*]
lossyWAV 1.2.0 Development Thread
Reply #63
Ok that worked. After a little bit of fiddling I've now got it compiling properly under the older Borland Delphi-7.

  • hellokeith
  • [*][*][*][*]
lossyWAV 1.2.0 Development Thread
Reply #64
Well I have tried and failed...I haven't pinned down the right sequence yet...

What I have used so far...

Code: [Select]
/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.

  • Nick.C
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.2.0 Development Thread
Reply #65
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 -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

  • uart
  • [*][*][*][*][*]
lossyWAV 1.2.0 Development Thread
Reply #66
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?

  • Nick.C
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.2.0 Development Thread
Reply #67
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 -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

lossyWAV 1.2.0 Development Thread
Reply #68
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

  • pdq
  • [*][*][*][*][*]
lossyWAV 1.2.0 Development Thread
Reply #69
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.

lossyWAV 1.2.0 Development Thread
Reply #70
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.
  • Last Edit: 18 November, 2008, 11:47:48 AM by Gregory S. Chudov
CUETools 2.1.4

  • Nick.C
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.2.0 Development Thread
Reply #71
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 -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-

  • pdq
  • [*][*][*][*][*]
lossyWAV 1.2.0 Development Thread
Reply #72

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.

lossyWAV 1.2.0 Development Thread
Reply #73
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

  • Nick.C
  • [*][*][*][*][*]
  • Developer
lossyWAV 1.2.0 Development Thread
Reply #74
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 -a 4 -s h -A --feedback 2 --limit 15848| FLAC -5 -e -p -b 512 -P=4096 -S-