[Ffmpeg-cvslog] r5422 - trunk/libavcodec/ratecontrol.c
Rich Felker
dalias
Tue May 30 07:30:32 CEST 2006
On Mon, May 29, 2006 at 01:49:04PM -0700, Corey Hickey wrote:
> michael wrote:
> > Author: michael
> > Date: Mon May 29 18:50:37 2006
> > New Revision: 5422
> >
> > Modified:
> > trunk/libavcodec/ratecontrol.c
> >
> > Log:
> > fabs is better then abs for floats ...
> >
> >
> > Modified: trunk/libavcodec/ratecontrol.c
> > ==============================================================================
> > --- trunk/libavcodec/ratecontrol.c (original)
> > +++ trunk/libavcodec/ratecontrol.c Mon May 29 18:50:37 2006
> > @@ -911,7 +911,7 @@
> > av_free(qscale);
> > av_free(blured_qscale);
> >
> > - if(abs(expected_bits/all_available_bits - 1.0) > 0.01 ){
> > + if(fabs(expected_bits/all_available_bits - 1.0) > 0.01 ){
> > av_log(s->avctx, AV_LOG_ERROR, "Error: 2pass curve failed to converge\n");
> > return -1;
> > }
>
> This is resulting in mencoder failing the second pass for me. Prior to
> this revision, the same command works fine.
Looks like the threshold is wrong, and it just happened that the test
was a virtual no-op before due to truncation.
Rich
More information about the ffmpeg-cvslog
mailing list