Help - Search - Members - Calendar
Full Version: WavPack library: Hybrid compression requierments
Hydrogenaudio Forums > Lossless Audio Compression > WavPack
Doron
Hi.
I am trying to use hybrid compression. I am not using a correction file. I want to read from memory so I am using WavpackOpenFileInputEx. What is the minimum set of access functions that I need to implement in order for the extraction to work? Is seeking capability required for lossy decompression?

Thanks,
Doron
bryant
QUOTE(Doron @ Jan 3 2007, 04:20) *

I am trying to use hybrid compression. I am not using a correction file. I want to read from memory so I am using WavpackOpenFileInputEx. What is the minimum set of access functions that I need to implement in order for the extraction to work? Is seeking capability required for lossy decompression?

The only function that must work correctly is read_bytes. There is no seeking for any WavPack file unless you attempt to seek in the audio data (or try to read tags or md5sum or something else out at the end of the file).

However, you should define stubs for the other functions and return some non-error value. For example, get_length should return -1.

You might want to try the "tiny decoder" because it's simpler to use (there's only a read function passed because it can't seek). It's available on the WavPack downloads page.

Please let me know of you have any trouble.
Doron
QUOTE(bryant @ Jan 4 2007, 09:11) *

QUOTE(Doron @ Jan 3 2007, 04:20) *

I am trying to use hybrid compression. I am not using a correction file. I want to read from memory so I am using WavpackOpenFileInputEx. What is the minimum set of access functions that I need to implement in order for the extraction to work? Is seeking capability required for lossy decompression?

The only function that must work correctly is read_bytes. There is no seeking for any WavPack file unless you attempt to seek in the audio data (or try to read tags or md5sum or something else out at the end of the file).

However, you should define stubs for the other functions and return some non-error value. For example, get_length should return -1.

You might want to try the "tiny decoder" because it's simpler to use (there's only a read function passed because it can't seek). It's available on the WavPack downloads page.

Please let me know of you have any trouble.


I've activated the hybrid mode.
I am really pleased with wavpack's performances especially since I abused it a little (I am compressing 16KB buffers, each one as a single file) and still got good compression and good quality, so thanks!
btw, I've implemented the put_char function because it seems the decoder needs it (in the beginning of each buffer the decoder reads one byte and puts it back).
One more question - currently i am using the following flags when compressing: CONFIG_HYBRID_FLAG | CONFIG_BITRATE_KBPS. (and setting config->bitrate=32;)
I tried adding the CONFIG_HIGH_FLAG and got only silence when decrypting the files. Do I have to do anything else to make this flag work?

thanks,

Doron
bryant
QUOTE(Doron @ Jan 7 2007, 08:01) *

btw, I've implemented the put_char function because it seems the decoder needs it (in the beginning of each buffer the decoder reads one byte and puts it back).
Oops, sorry I forgot about that! You can rebuild the library with the VER4_ONLY macro defined and that will eliminate the push_back_byte function requirement (and make the code smaller too).

QUOTE
One more question - currently i am using the following flags when compressing: CONFIG_HYBRID_FLAG | CONFIG_BITRATE_KBPS. (and setting config->bitrate=32;)
I tried adding the CONFIG_HIGH_FLAG and got only silence when decrypting the files. Do I have to do anything else to make this flag work?
Hmm, no, there shouldn't be anything else required to do for that case. Usually silence in decoding means that errors were found and the output was muted. If you are decoding the whole file in one call to WavpackUnpackSamples() then maybe it has something to do with that. It might be interesting to try smaller chunks and see what you get (in fact, you can unpack one sample at a time although it will be slow).

Let me know if you can't figure that one out.

David

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.