Mercurial > libavcodec.hg
comparison motion_est.c @ 807:0e1d375c537f libavcodec
fixing q>0.0 assert failure caused by overflow of variance for b frames
author | michaelni |
---|---|
date | Wed, 30 Oct 2002 22:55:07 +0000 |
parents | 7f0d502a42c5 |
children | 79de6308c34d |
comparison
equal
deleted
inserted
replaced
806:440b8e4b2d35 | 807:0e1d375c537f |
---|---|
1556 } | 1556 } |
1557 if(fbmin<score){ | 1557 if(fbmin<score){ |
1558 score=fbmin; | 1558 score=fbmin; |
1559 type= MB_TYPE_BIDIR; | 1559 type= MB_TYPE_BIDIR; |
1560 } | 1560 } |
1561 score= (score*score + 128*256)>>16; | 1561 score= ((unsigned)(score*score + 128*256))>>16; |
1562 s->mc_mb_var_sum += score; | 1562 s->mc_mb_var_sum += score; |
1563 s->mc_mb_var[mb_y*s->mb_width + mb_x] = score; //FIXME use SSD | 1563 s->mc_mb_var[mb_y*s->mb_width + mb_x] = score; //FIXME use SSD |
1564 } | 1564 } |
1565 | 1565 |
1566 if(s->flags&CODEC_FLAG_HQ){ | 1566 if(s->flags&CODEC_FLAG_HQ){ |