1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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
This commit is contained in:
Michael Niedermayer 2002-10-30 22:55:07 +00:00
parent 1d9324fd4e
commit 0bfacb95de

View File

@ -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
}