Op 07-02-12 19:50, Ralph Giles schreef:> Basically the audio is chopped into a blocks and each block is coded > either uncompressed, as a constant value (good for silence), or with > linear predictive coding plus a rice-coded residual. I don't know how > the encoder decides where to put the block boundaries.AFAIK, FLAC uses a fixed block length so block boundaries are just put somewhere a block ends. Flake, another FLAC-encoders can use variable block length and has a algorithm to decide the length, but this is outside of the -0 to -8 presets, as these are all fixed block length.
On 7 February 2012 21:59, Martijn van Beurden <mvanb1 at gmail.com> wrote:> AFAIK, FLAC uses a fixed block length so block boundaries are just put > somewhere a block ends. Flake, another FLAC-encoders can use variable > block length and has a algorithm to decide the length, but this is > outside of the -0 to -8 presets, as these are all fixed block length.Aha. Thanks for clarifying. I just saw the reference to variable-length blocks in the format document. How much does the variable-block mode improve compression? -r
On 02/08/2012 11:49 AM, Ralph Giles wrote:> On 7 February 2012 21:59, Martijn van Beurden <mvanb1 at gmail.com> wrote: > >> AFAIK, FLAC uses a fixed block length so block boundaries are just put >> somewhere a block ends. Flake, another FLAC-encoders can use variable >> block length and has a algorithm to decide the length, but this is >> outside of the -0 to -8 presets, as these are all fixed block length. > > Aha. Thanks for clarifying. I just saw the reference to > variable-length blocks in the format document. > > How much does the variable-block mode improve compression?0.5% to 1.0% on average. That's with a fairly simple algorithm. -Justin
On Wed, Feb 08, 2012 at 08:49:37AM -0800, giles at thaumas.net wrote:> On 7 February 2012 21:59, Martijn van Beurden <mvanb1 at gmail.com> wrote: > > > Flake, another FLAC-encoders can use variable > > block length and has a algorithm to decide the length, but this is > > outside of the -0 to -8 presets, as these are all fixed block length. > > How much does the variable-block mode improve compression?I did a lot of tests about a year ago, and Flake definitely has tighter compression at the higher presets (they go up to 11, probably because 11 is one louder). I don't have the exact results to hand, but I do remember that it wasn't as much of an improvement as I had expected, and it took a lot more time to compress. Playback compatibility is not guaranteed with any of Flake's additional variable-block preset levels. I tested playback, and most software that I tried wasn't able to decode the tightest Flake compression options. The dealbreaker for me was no support for audio above 16-bit/44.1k. I regularly re-compress files to save space, and I have noticed that a lot of distributed .flac files were not compressed to the maximum level possible using version 1.2.1 of flac/libflac (or an older FLAC version was used, or both). What I should really do is test battery life with different levels of compression, as for a lot of applications that will matter more than how full the storage device can get (per hour of stored music). Latest version (according to the flake-enc website) is 0.11 (2007) but at least the Flake maintainer is active on this mailing list :-) -- -Dec. --- "Mosaic is going to be on every computer in the world." - Marc Andreessen, 1994