summaryrefslogtreecommitdiffstats
path: root/libavcodec/motion_est.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-10-30 22:55:07 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-10-30 22:55:07 +0000
commit0bfacb95dea6a04e4c10a24b9d90c14a401ade67 (patch)
tree503361c70210048fcbfad04a2b987d0ce3618a0f /libavcodec/motion_est.c
parent1d9324fd4e179ff49df6cad3a3dd8280920166a1 (diff)
downloadffmpeg-streaming-0bfacb95dea6a04e4c10a24b9d90c14a401ade67.zip
ffmpeg-streaming-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/motion_est.c')
-rw-r--r--libavcodec/motion_est.c2
1 files changed, 1 insertions, 1 deletions
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
}
OpenPOWER on IntegriCloud