[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec motion_est_template.c, 1.29, 1.30 utils.c, 1.179, 1.180 avcodec.h, 1.464, 1.465

Michael Niedermayer CVS michael
Sun May 7 13:48:10 CEST 2006


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv10138

Modified Files:
	motion_est_template.c utils.c avcodec.h 
Log Message:
make zero motion vector threshold user setable


Index: motion_est_template.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/motion_est_template.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- motion_est_template.c	12 Jan 2006 22:43:15 -0000	1.29
+++ motion_est_template.c	7 May 2006 11:48:07 -0000	1.30
@@ -896,7 +896,8 @@
         CHECK_CLIPED_MV((last_mv[ref_mv_xy][0]*ref_mv_scale + (1<<15))>>16,
                         (last_mv[ref_mv_xy][1]*ref_mv_scale + (1<<15))>>16)
     }else{
-        if(dmin<h*h && ( P_LEFT[0]    |P_LEFT[1]
+        if(dmin<((h*h*s->avctx->mv0_threshold)>>8)
+                    && ( P_LEFT[0]    |P_LEFT[1]
                         |P_TOP[0]     |P_TOP[1]
                         |P_TOPRIGHT[0]|P_TOPRIGHT[1])==0){
             *mx_ptr= 0;

Index: utils.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/utils.c,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -d -r1.179 -r1.180
--- utils.c	30 Mar 2006 04:33:05 -0000	1.179
+++ utils.c	7 May 2006 11:48:07 -0000	1.180
@@ -739,6 +739,7 @@
 {"partp8x8", NULL, 0, FF_OPT_TYPE_CONST, X264_PART_P8X8, INT_MIN, INT_MAX, V|E, "partitions"},
 {"partb8x8", NULL, 0, FF_OPT_TYPE_CONST, X264_PART_B8X8, INT_MIN, INT_MAX, V|E, "partitions"},
 {"sc_factor", NULL, OFFSET(scenechange_factor), FF_OPT_TYPE_INT, 6, 0, INT_MAX, V|E},
+{"mv0_threshold", NULL, OFFSET(mv0_threshold), FF_OPT_TYPE_INT, 256, 0, INT_MAX, V|E},
 {NULL},
 };
 
@@ -793,6 +794,7 @@
     s->frame_skip_cmp= FF_CMP_DCTMAX;
     s->nsse_weight= 8;
     s->sample_fmt= SAMPLE_FMT_S16; // FIXME: set to NONE
+    s->mv0_threshold= 256;
 
     s->intra_quant_bias= FF_DEFAULT_QUANT_BIAS;
     s->inter_quant_bias= FF_DEFAULT_QUANT_BIAS;

Index: avcodec.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/avcodec.h,v
retrieving revision 1.464
retrieving revision 1.465
diff -u -d -r1.464 -r1.465
--- avcodec.h	10 Apr 2006 07:45:29 -0000	1.464
+++ avcodec.h	7 May 2006 11:48:07 -0000	1.465
@@ -1967,6 +1967,14 @@
      * - decoding: unused
      */
     int scenechange_factor;
+
+    /**
+     *
+     * note: value depends upon the compare functin used for fullpel ME
+     * - encoding: set by user.
+     * - decoding: unused
+     */
+    int mv0_threshold;
 } AVCodecContext;
 
 /**





More information about the ffmpeg-cvslog mailing list