changeset 18489:adfadb4a26b5

support lavc mv0_threshold
author corey
date Sat, 13 May 2006 20:18:57 +0000
parents b23c0e341e3e
children afcc7b017a63
files DOCS/man/en/mplayer.1 libmpcodecs/ve_lavc.c
diffstat 2 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Sat May 13 19:04:39 2006 +0000
+++ b/DOCS/man/en/mplayer.1	Sat May 13 20:18:57 2006 +0000
@@ -7868,6 +7868,21 @@
 This has no effect if mbd=0.
 .
 .TP
+.B mv0_threshold=<any non-negative integer>
+When surrounding motion vectors are <0,0> and the motion estimation
+score of the current block is less than mv0_threshold, <0,0> is used for
+the motion vector and further motion estimation is skipped (default:
+256).
+Lowering mv0_threshold to 0 can give a slight (0.01dB) PSNR increase and
+possibly make the encoded video look slightly better; raising
+mv0_threshold past 320 results in diminished PSNR and visual quality.
+Higher values speed up encoding very slightly (usually less than 1%,
+depending on the other options used).
+.br
+.I NOTE:
+This option does not require mv0 to be enabled.
+.
+.TP
 .B qprd (mbd=2 only)
 rate distorted optimal quantization parameter (QP) for the given
 lambda of each macroblock
--- a/libmpcodecs/ve_lavc.c	Sat May 13 19:04:39 2006 +0000
+++ b/libmpcodecs/ve_lavc.c	Sat May 13 20:18:57 2006 +0000
@@ -160,6 +160,7 @@
 static int lavc_param_bidir_refine = 0;
 static int lavc_param_sc_factor = 1;
 static int lavc_param_video_global_header= 0;
+static int lavc_param_mv0_threshold = 256;
 
 char *lavc_param_acodec = "mp2";
 int lavc_param_atag = 0;
@@ -319,6 +320,7 @@
 	{"sc_factor", &lavc_param_sc_factor, CONF_TYPE_INT, CONF_RANGE, 1, INT_MAX, NULL},
 	{"vglobal", &lavc_param_video_global_header, CONF_TYPE_INT, CONF_RANGE, 0, INT_MAX, NULL},
 	{"aglobal", &lavc_param_audio_global_header, CONF_TYPE_INT, CONF_RANGE, 0, INT_MAX, NULL},
+	{"mv0_threshold", &lavc_param_mv0_threshold, CONF_TYPE_INT, CONF_RANGE, 0, INT_MAX, NULL},
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };
 #endif
@@ -649,6 +651,7 @@
     if(lavc_param_video_global_header&2){
         lavc_venc_context->flags2 |= CODEC_FLAG2_LOCAL_HEADER;
     }
+    lavc_venc_context->mv0_threshold = lavc_param_mv0_threshold;
 
     switch(lavc_param_format)
     {