[Ffmpeg-devel] [PATCH] 24-bits flac support (with 16-bits output)

Dave Chapman dave
Fri May 26 11:23:57 CEST 2006


Thibaut Mattern wrote:
> Hi,
> 
> there was some discussion last year about 24-bits flac support :
>  http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/25992

Thanks for doing what I promised to do at the time of that discussion....

> the attached patch does two things :
>  - fixes the overflow in the  decode_subframe_lpc function

There is no need to perform 64-bit multiplications when decoding 16-bit
audio - this will just slow the decoder down in the most common case.
IMO, a better solution would be to work out in which cases a 32-bit loop
would overflow, and use the 64-bit version only for those frames.

I implemented that approach in the version of ffmpeg's flac.c that I
adapted for Rockbox.  You can see that version of decode_subframe_lpc here:

http://www.rockbox.org/viewcvs.cgi/apps/codecs/libffmpegFLAC/decoder.c?view=markup

Regards,

Dave.




More information about the ffmpeg-devel mailing list