lvqcl wrote:

> If the least significant bit in all samples of a 24-bit WAV file is set to 0,
> the encoder sets 'bps' variable to 23 and the description of this patch -
> 
> "This fix [...] restores the use of a FLAC_uint32 accumulator for 16 (and 
> less) bit files"
> 
> - is not correct: this fix restores the use of a FLAC_uint32 accumulator for 
> 23 (and
> less) bit files. I slightly modified snippet6.wav and the current version 
> hangs on it when
> I add -b 8192 --lax options.
> 
> 
> The code to enable 32-bit accumulator only for 16 (and less) bit files should 
> be:
> 
> "if(bps <= 16 && FLAC__bitmath_ilog2(default_partition_samples) + bps < 32)"
> 
> ...and it seems that default_partition_samples must be less or equal to 
> 65535; this means that FLAC__bitmath_ilog2(default_partition_samples) is less 
> or equal to 15 and the code above is equivalent to:
> 
> "if(bps <= 16)"

Thanks, I've updated the fix to use this test to determine whether a 32 bit
accumulator can be used.

Cheers,
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
_______________________________________________
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev

Reply via email to