From 0bfacb95dea6a04e4c10a24b9d90c14a401ade67 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 30 Oct 2002 22:55:07 +0000 Subject: 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 --- libavcodec/motion_est.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/motion_est.c') diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index f8064b1..547c619 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -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 } -- cgit v1.1