Mercurial > libavcodec.hg
changeset 2354:643724c609ff libavcodec
overflow fix
author | michael |
---|---|
date | Tue, 16 Nov 2004 13:40:56 +0000 |
parents | 444b9ff022a3 |
children | 69fcdad5f7d5 |
files | motion_est.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/motion_est.c Mon Nov 15 15:53:53 2004 +0000 +++ b/motion_est.c Tue Nov 16 13:40:56 2004 +0000 @@ -1017,7 +1017,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; + return INT_MAX/4; } assert(IS_INTRA(mb_type) || USES_LIST(mb_type,0) || USES_LIST(mb_type,1)); @@ -1035,7 +1035,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; + return INT_MAX/4; } if(USES_LIST(mb_type, 0)){ @@ -1096,7 +1096,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; + return INT_MAX/4; } cmpf= s->dsp.sse[1]; chroma_cmpf= s->dsp.sse[1];