Mercurial > libavcodec.hg
comparison motion_est.c @ 1995:38e77ac19836 libavcodec
dont missuse assert()
author | michael |
---|---|
date | Fri, 30 Apr 2004 18:09:24 +0000 |
parents | 19c2344e800a |
children | 15c885db82a8 |
comparison
equal
deleted
inserted
replaced
1994:8d3540dddd1b | 1995:38e77ac19836 |
---|---|
1000 int xy2= xy + s->b8_stride; | 1000 int xy2= xy + s->b8_stride; |
1001 s->mb_type[mb_xy]=CANDIDATE_MB_TYPE_INTRA; | 1001 s->mb_type[mb_xy]=CANDIDATE_MB_TYPE_INTRA; |
1002 c->stride<<=1; | 1002 c->stride<<=1; |
1003 c->uvstride<<=1; | 1003 c->uvstride<<=1; |
1004 | 1004 |
1005 assert(s->flags & CODEC_FLAG_INTERLACED_ME); | 1005 if(!(s->flags & CODEC_FLAG_INTERLACED_ME)){ |
1006 av_log(s->avctx, AV_LOG_ERROR, "Interlaced macroblock selected but interlaced motion estimation disabled\n"); | |
1007 return -1; | |
1008 } | |
1006 | 1009 |
1007 if(USES_LIST(mb_type, 0)){ | 1010 if(USES_LIST(mb_type, 0)){ |
1008 int field_select0= p->ref_index[0][xy ]; | 1011 int field_select0= p->ref_index[0][xy ]; |
1009 int field_select1= p->ref_index[0][xy2]; | 1012 int field_select1= p->ref_index[0][xy2]; |
1010 assert(field_select0==0 ||field_select0==1); | 1013 assert(field_select0==0 ||field_select0==1); |
1058 //FIXME bidir scores | 1061 //FIXME bidir scores |
1059 } | 1062 } |
1060 c->stride>>=1; | 1063 c->stride>>=1; |
1061 c->uvstride>>=1; | 1064 c->uvstride>>=1; |
1062 }else if(IS_8X8(mb_type)){ | 1065 }else if(IS_8X8(mb_type)){ |
1063 assert(s->flags & CODEC_FLAG_4MV); | 1066 if(!(s->flags & CODEC_FLAG_4MV)){ |
1067 av_log(s->avctx, AV_LOG_ERROR, "4MV macroblock selected but 4MV encoding disabled\n"); | |
1068 return -1; | |
1069 } | |
1064 cmpf= s->dsp.sse[1]; | 1070 cmpf= s->dsp.sse[1]; |
1065 chroma_cmpf= s->dsp.sse[1]; | 1071 chroma_cmpf= s->dsp.sse[1]; |
1066 init_mv4_ref(s); | 1072 init_mv4_ref(s); |
1067 for(i=0; i<4; i++){ | 1073 for(i=0; i<4; i++){ |
1068 xy= s->block_index[i]; | 1074 xy= s->block_index[i]; |