diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-03-26 18:10:44 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-03-26 18:10:44 +0000 |
commit | cec1f05fd7d64c208388b6c57f82a8bc75f4981e (patch) | |
tree | d90bb26985f5864813d852e17ff670379f361656 /libavcodec/motion_est.c | |
parent | 71434945f20c6d340b4c942de7746e6ea46ec74b (diff) | |
download | ffmpeg-cec1f05fd7d64c208388b6c57f82a8bc75f4981e.tar.gz |
check mb/me_threshold range, fixes assertion failure
Originally committed as revision 4082 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/motion_est.c')
-rw-r--r-- | libavcodec/motion_est.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index 2c1ff50946..2cb6a34d35 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -1016,7 +1016,7 @@ static inline int check_input_motion(MpegEncContext * s, int mb_x, int mb_y, int if(p_type && USES_LIST(mb_type, 1)){ av_log(c->avctx, AV_LOG_ERROR, "backward motion vector in P frame\n"); - return INT_MAX/4; + return INT_MAX/2; } assert(IS_INTRA(mb_type) || USES_LIST(mb_type,0) || USES_LIST(mb_type,1)); @@ -1034,7 +1034,7 @@ static inline int check_input_motion(MpegEncContext * s, int mb_x, int mb_y, int if(!(s->flags & CODEC_FLAG_INTERLACED_ME)){ av_log(c->avctx, AV_LOG_ERROR, "Interlaced macroblock selected but interlaced motion estimation disabled\n"); - return INT_MAX/4; + return INT_MAX/2; } if(USES_LIST(mb_type, 0)){ @@ -1095,7 +1095,7 @@ static inline int check_input_motion(MpegEncContext * s, int mb_x, int mb_y, int }else if(IS_8X8(mb_type)){ if(!(s->flags & CODEC_FLAG_4MV)){ av_log(c->avctx, AV_LOG_ERROR, "4MV macroblock selected but 4MV encoding disabled\n"); - return INT_MAX/4; + return INT_MAX/2; } cmpf= s->dsp.sse[1]; chroma_cmpf= s->dsp.sse[1]; |