[Ffmpeg-cvslog] r5422 - trunk/libavcodec/ratecontrol.c
Corey Hickey
bugfood-ml
Tue May 30 19:26:18 CEST 2006
Rich Felker wrote:
> 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.
Yes, something like that. I guess it should stop being lazy and post
full steps to reproduce. I thought it was happening with every file, but
it seems to only happen with some.
1. Compile mplayer CVS snapshot with SVN libavcodec.
2. $ wget http://fatooh.org/files/tmp/small.mpg
3. $ for i in 1 2 ; do mencoder small.mpg -nosound -ovc lavc -lavcopts
vpass=$i:vmax_b_frames=2 -o /dev/null ; done
Also, if it matters, this is on amd64.
-Corey
More information about the ffmpeg-cvslog
mailing list