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
pull/126/head
Michael Niedermayer 22 years ago
parent 1d9324fd4e
commit 0bfacb95de
  1. 2
      libavcodec/motion_est.c

@ -1558,7 +1558,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s,
score=fbmin; score=fbmin;
type= MB_TYPE_BIDIR; 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_sum += score;
s->mc_mb_var[mb_y*s->mb_width + mb_x] = score; //FIXME use SSD s->mc_mb_var[mb_y*s->mb_width + mb_x] = score; //FIXME use SSD
} }

Loading…
Cancel
Save