Mercurial > libavcodec.hg
diff mpegvideo.c @ 287:32a3dcce2e9b libavcodec
fixing motion estimation with h263p hopefully
author | michaelni |
---|---|
date | Sat, 23 Mar 2002 20:21:33 +0000 |
parents | 91f7c38f5f37 |
children | f82cce6cb182 |
line wrap: on
line diff
--- a/mpegvideo.c Sat Mar 23 17:43:30 2002 +0000 +++ b/mpegvideo.c Sat Mar 23 20:21:33 2002 +0000 @@ -381,6 +381,9 @@ else if (s->out_format == FMT_MPEG1) mpeg1_encode_init(s); + /* dont use mv_penalty table for crap MV as it would be confused */ + if(s->full_search<4) s->mv_penalty= default_mv_penalty; + s->encoding = 1; /* init */ @@ -1126,8 +1129,8 @@ } } - /* find best f_code */ - if(s->pict_type==P_TYPE){ + /* find best f_code for ME which do unlimited searches */ + if(s->pict_type==P_TYPE && s->full_search>3){ int mv_num[8]; int i; int loose=0; @@ -1149,6 +1152,10 @@ if(loose > 10) break; //FIXME this is pretty ineffective } s->f_code= i; +/* for(i=0; i<=MAX_FCODE; i++){ + printf("%d ", mv_num[i]); + } + printf("\n");*/ }else{ s->f_code= 1; }