[FFmpeg-cvslog] r24630 - trunk/libavcodec/flacenc.c

Justin Ruggles justin.ruggles
Sat Jul 31 22:43:38 CEST 2010


jbr wrote:

> Author: jbr
> Date: Sat Jul 31 22:32:12 2010
> New Revision: 24630
> 
> Log:
> Calculate an exact frame size before writing.  Now the buffer size requirements 
> can be known exactly, so larger frame sizes can be safely encoded without buffer 
> overwrite.
> 
> Modified:
>    trunk/libavcodec/flacenc.c

Just a note about this commit:

The rice-coded residual count that is used to estimate the rice params
and prediction order is not exact.  It is fairly close, but it is
usually off by several hundred bytes (usually higher, occassionally
lower).  Because of this, an exact bit counting function had to be added
in order to safely detect buffer size requirements.

I added to my TODO list to optionally use the exact count for
calculating optimal rice params and prediction order as well.

-Justin



More information about the ffmpeg-cvslog mailing list