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 8 February 2012 10:00, Justin Ruggles <justin.ruggles at gmx.com> wrote:> 0.5% to 1.0% on average. That's with a fairly simple algorithm.Not very worthwhile. I imagine it's possible to do quite a bit more on some files, but it would be pretty expensive to find the boundaries... -r
On 02/08/2012 01:06 PM, Ralph Giles wrote:> On 8 February 2012 10:00, Justin Ruggles <justin.ruggles at gmx.com> wrote: > >> 0.5% to 1.0% on average. That's with a fairly simple algorithm. > > Not very worthwhile. I imagine it's possible to do quite a bit more on > some files, but it would be pretty expensive to find the boundaries...Yes, it likely can do better, and yes it can be quite expensive. IIRC (it was several years ago) the algorithm I used in Flake is just a simple threshold comparison of the sum of 2nd order LPC residual on equally-divided pieces of the input block to decide whether or not to merge adjacent pieces. But something better could be done using smaller pieces, trellis search, and/or a more accurate cost function. -Justin