Mercurial > libavcodec.hg
diff motion_est.c @ 320:cda7d0857baf libavcodec
- ME setting moved to AVCodecContext/MpegEncContext, no longer a global.
- EPZS ME algo used by default.
- HQ flag activated for ffmpeg.
- Cosmetics ...
author | pulento |
---|---|
date | Sun, 14 Apr 2002 18:57:51 +0000 |
parents | 5753d57e7e6b |
children | 9c6f056f0e41 |
line wrap: on
line diff
--- a/motion_est.c Fri Apr 12 14:01:10 2002 +0000 +++ b/motion_est.c Sun Apr 14 18:57:51 2002 +0000 @@ -594,7 +594,7 @@ CHECK_MV(P[0][0]>>shift, P[0][1]>>shift) //check(best[0],best[1],0, b0) - if(s->full_search==ME_EPZS) + if(s->me_method==ME_EPZS) dmin= small_diamond_search(s, best, dmin, new_pic, old_pic, pic_stride, pred_x, pred_y, mv_penalty, quant, xmin, ymin, xmax, ymax, shift); else @@ -825,7 +825,7 @@ int P[6][2]; const int shift= 1+s->quarter_sample; int mb_type=0; - + //static int skip=0; range = 8 * (1 << (s->f_code - 1)); /* XXX: temporary kludge to avoid overflow for msmpeg4 */ if (s->out_format == FMT_H263 && !s->h263_msmpeg4) @@ -851,7 +851,7 @@ xmax = s->mb_width*16 - 16; ymax = s->mb_height*16 - 16; } - switch(s->full_search) { + switch(s->me_method) { case ME_ZERO: default: no_motion_search(s, &mx, &my); @@ -999,6 +999,7 @@ s->avg_mb_var+= varc; s->mc_mb_var += vard; + #if 0 printf("varc=%4d avg_var=%4d (sum=%4d) vard=%4d mx=%2d my=%2d\n", varc, s->avg_mb_var, sum, vard, mx - xx, my - yy); @@ -1016,12 +1017,19 @@ }else{ if (vard <= 64 || vard < varc) { mb_type|= MB_TYPE_INTER; - if (s->full_search != ME_ZERO) { + if (s->me_method != ME_ZERO) { halfpel_motion_search(s, &mx, &my, dmin, xmin, ymin, xmax, ymax, pred_x, pred_y); } else { mx -= 16 * mb_x; my -= 16 * mb_y; } +#if 0 + if (vard < 10) { + skip++; + fprintf(stderr,"\nEarly skip: %d vard: %2d varc: %5d dmin: %d", + skip, vard, varc, dmin); + } +#endif }else{ mb_type|= MB_TYPE_INTRA; mx = 0;//mx*2 - 32 * mb_x;