diff options
author | Juanjo <pulento@users.sourceforge.net> | 2002-04-14 18:57:51 +0000 |
---|---|---|
committer | Juanjo <pulento@users.sourceforge.net> | 2002-04-14 18:57:51 +0000 |
commit | e4986da9ce91c4a6f9e942c4225f0c3d90e5db95 (patch) | |
tree | 17a8d25051d364c09e4e878e1408a3b2f315869c /libavcodec/motion_est.c | |
parent | b1ec5875a63d5cf61629ff69fb337c6d96e7b964 (diff) | |
download | ffmpeg-e4986da9ce91c4a6f9e942c4225f0c3d90e5db95.tar.gz |
- ME setting moved to AVCodecContext/MpegEncContext, no longer a global.
- EPZS ME algo used by default.
- HQ flag activated for ffmpeg.
- Cosmetics ...
Originally committed as revision 398 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/motion_est.c')
-rw-r--r-- | libavcodec/motion_est.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index 3779afe0f8..c378e3658b 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -594,7 +594,7 @@ static int epzs_motion_search(MpegEncContext * s, 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 @@ void estimate_motion(MpegEncContext * s, 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 @@ void estimate_motion(MpegEncContext * s, 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 @@ void estimate_motion(MpegEncContext * s, 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 @@ void estimate_motion(MpegEncContext * s, }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; |