Commit 269db021 authored by michaelni's avatar michaelni

fixing q>0.0 assert failure caused by overflow of variance for b frames


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1120 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 60ddf5e9
...@@ -1558,7 +1558,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s, ...@@ -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
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment