Christopher's decoder outputs 24-bit WAV files (for decoded HDCD output).
Any low bits that are already zero will remain zero. What lossy wav does is, when appropriate, zero out additional lower bits to make lossless compression more effective.
A 20-bit sample in a 24-bit container will already be "left justified" as required by the WAV specification, i.e. effectively multiplied by 16, therefore lowest 4 bits are going to be zero.16>24>lossyWAV>16 will probably not equal 16>lossyWAV, additionally, if the lossyWAV>16 step includes dither then the carefully zeroed lsb's will disappear and the wasted-bits compression advantage will be lost. lossyWAV supports 9-bit to 32-bit integer samples in 16, 24 and 32-bit signed integer "containers", exactly the same as the WAV specification. [/edit]
Here it is:http://www.hydrogenaudio.org/forums/index....showtopic=67418Tested to be bit identical with 1.1.1e on at least one file, at least with default quality setting
Looking at the code for the FFT functions - are you using a trick to only have to create one array of A(Re,Im) values by shifting the index by the bitlength difference of the FFT length in question and the maximum FFT bitlength?
Rógerio Brito (rbrito on these forums) is interested in a C port - how different is C# to C (I *really* don't know anything about C)?
Did people give up on ABX'ing LossyWAV? I didn't see usual ABX tests anymore. I hope it's that good!
LossyWAVDotNet is a C# class library which implements the algorithm,AudioCodecsDotNet is a C# WAV reader/writer libraryLossyWAVSharp is a command line utility which uses them.
jCD1_02.wav.lossy.wav: wrote 995611 bytes, ratio=0,342CD1_02.wav.lossy.wav: wrote 1026802 bytes, ratio=0,353
Some updates on the port to Java:I have a working code already, based mostly on the C# sources and to a lesser extent to the delphi sources or the web when something didn't look quite right/clear enough.I don't have yet a .jar that could be tested, but i'll look into making one soon.Currently:It is a lot slower than the C# sources. ( by two orders of magnitude). This is because i've removed some of the lookup tables and implemented the FFT methods as they would be by the book.Of course, i am in the process to add those tables back, in a way that could reflect what they really are and why they are there.Another thing that i've discovered so far is that while the output seems to produce similar results, it does not produce the same ones than lossyWavSharp. I've processed a .wav with both programs, and they play fine in foobar, but the one generated by jLossyWav, if encoded with .flac, is smaller.I have no idea yet why and if this is good or bad. I hope to get a clearer idea after finishing the source separation.Code: [Select]jCD1_02.wav.lossy.wav: wrote 995611 bytes, ratio=0,342CD1_02.wav.lossy.wav: wrote 1026802 bytes, ratio=0,353