[flac-dev] [PATCH] stream_encoder : Improve selection of residual accumulator width

Miroslav Lichvar mlichvar at redhat.com
Fri Jun 20 03:53:50 PDT 2014


On Fri, Jun 20, 2014 at 02:15:31PM +0400, lvqcl wrote:
> Miroslav Lichvar wrote:
> > As overflow in the accumulator won't result in a data loss, I think
> > this is good enough until someone can figure out a better approach.

> FLAC calculates real bitdepth of input signal for every block. Is it
> feasible to calculate real bitdepth of residual signal and use this
> value instead of (bps + 4) ?

That would be expensive and I'm not sure if it's worth the cost. It
could be a separate function or it could be integrated in the
fixed and LPC encoding functions. The later would be probably faster,
but it would require patching the assembly code.

-- 
Miroslav Lichvar


More information about the flac-dev mailing list