Commit 0bfacb95 authored by Michael Niedermayer's avatar Michael Niedermayer

fixing q>0.0 assert failure caused by overflow of variance for b frames

Originally committed as revision 1120 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 1d9324fd
......@@ -1558,7 +1558,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s,
score=fbmin;
type= MB_TYPE_BIDIR;
}
score= (score*score + 128*256)>>16;
score= ((unsigned)(score*score + 128*256))>>16;
s->mc_mb_var_sum += score;
s->mc_mb_var[mb_y*s->mb_width + mb_x] = score; //FIXME use SSD
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment