IPB

Welcome Guest ( Log In | Register )

Does Wavpack (or FLAC) support compression on 10 or 12 bit waveforms?
lkeagle
post May 13 2013, 21:46
Post #1





Group: Members
Posts: 1
Joined: 13-May 13
Member No.: 108110



I am investigating compression alternatives (beyond gzip/deflate/etc.) for short clips of 10 or 12 bit audio-frequency waveforms. I can't find any reference in the documentation that wavpack supports anything other than 16/24 bit waveforms.

I haven't attempted any tests yet, but does anyone know if this is possible with wavpack (or other lossless codecs like FLAC)? I could pad to 16bit if necessary for a test, but it would be far less than ideal to add a 33% overhead before compression even begins.
Go to the top of the page
+Quote Post
 
Start new topic
Replies (1 - 6)
saratoga
post May 13 2013, 22:24
Post #2





Group: Members
Posts: 5002
Joined: 2-September 02
Member No.: 3264



Any format that works with lossywav will work with <16 bit input. The decoder might insist on zero padding to 16 bit when writing to wav (packed 12 bit formats are uncommonly used).
Go to the top of the page
+Quote Post
Nick.C
post May 13 2013, 22:36
Post #3


lossyWAV Developer


Group: Developer
Posts: 1792
Joined: 11-April 07
From: Wherever here is
Member No.: 42400



Any PCM integer samples contained in the RIFF WAVE format will have a sample size corresponding to an exact number of bytes, i.e 8, 16, 24 or 32 bits. Audio where bits_per_sample is not divisible by 8 should be contained in a permissible sample size and padded with a number of LSBs (i.e. left shifted by the corresponding number of padding bits).


--------------------
lossyWAV -q X -a 4 --feedback 4| FLAC -8 ~= 320kbps
Go to the top of the page
+Quote Post
lvqcl
post May 13 2013, 22:50
Post #4





Group: Developer
Posts: 3399
Joined: 2-December 07
Member No.: 49183



Of course, both FLAC and WavPack compress such padded data efficiently: there's no (or almost no) overhead.
Go to the top of the page
+Quote Post
ktf
post May 14 2013, 07:57
Post #5





Group: Members
Posts: 384
Joined: 22-March 09
From: The Netherlands
Member No.: 68263



How would 10 or 12 bit even be packed? (It can't be packed in WAV, right?) Anyway, the FLAC specification has room for any bitdepth between 4 and 32 bit, but I'm not sure whether the reference encoder accepts those, I never tried.

As others already said, padding is very well possible, because both WavPack and FLAC search for wasted bits, thats the method lossyWAV works. Overhead will be almost non-existent.


--------------------
Music: sounds arranged such that they construct feelings.
Go to the top of the page
+Quote Post
saratoga
post May 14 2013, 16:21
Post #6





Group: Members
Posts: 5002
Joined: 2-September 02
Member No.: 3264



QUOTE (ktf @ May 14 2013, 02:57) *
How would 10 or 12 bit even be packed? (It can't be packed in WAV, right?)


10 bits of sample 1, 10 bits of sample 2, etc.

But yes, I was forgetting, WAV does not allow packed samples, or integer numbers of bytes.
Go to the top of the page
+Quote Post
Nick.C
post May 14 2013, 19:22
Post #7


lossyWAV Developer


Group: Developer
Posts: 1792
Joined: 11-April 07
From: Wherever here is
Member No.: 42400



QUOTE (ktf @ May 14 2013, 06:57) *
How would 10 or 12 bit even be packed? (It can't be packed in WAV, right?) Anyway, the FLAC specification has room for any bitdepth between 4 and 32 bit, but I'm not sure whether the reference encoder accepts those, I never tried.

10 bit sample: 0111111111; Requires to be placed in a 16 bit container for WAV, i.e. 0111111111000000. As I said previously, WAV requires sample sizes to be an integer number of bytes.


--------------------
lossyWAV -q X -a 4 --feedback 4| FLAC -8 ~= 320kbps
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd October 2014 - 11:39