diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-10-30 22:55:07 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-10-30 22:55:07 +0000 |
commit | 0bfacb95dea6a04e4c10a24b9d90c14a401ade67 (patch) | |
tree | 503361c70210048fcbfad04a2b987d0ce3618a0f /libavcodec | |
parent | 1d9324fd4e179ff49df6cad3a3dd8280920166a1 (diff) | |
download | ffmpeg-0bfacb95dea6a04e4c10a24b9d90c14a401ade67.tar.gz |
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
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/motion_est.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index f8064b126c..547c619526 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 } |