Mercurial > libavcodec.hg
diff motion_est.c @ 2576:e237d9bd0f8c libavcodec
check mb/me_threshold range, fixes assertion failure
author | michael |
---|---|
date | Sat, 26 Mar 2005 18:10:44 +0000 |
parents | e25782262d7d |
children | 511e3afc43e1 |
line wrap: on
line diff
--- a/motion_est.c Sat Mar 26 17:01:49 2005 +0000 +++ b/motion_est.c Sat Mar 26 18:10:44 2005 +0000 @@ -1016,7 +1016,7 @@ 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 @@ 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 @@ }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];