summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcorey <corey@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-05-13 20:18:57 +0000
committercorey <corey@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-05-13 20:18:57 +0000
commit447119777b3a890d3d243c3c58451ac3be659cac (patch)
tree0bddcdbbff19efcfc2823e48e7869758c7ad4082
parent3de60f8ff7e6988952ccce183820ebcd0ee5f582 (diff)
downloadmpv-447119777b3a890d3d243c3c58451ac3be659cac.tar.bz2
mpv-447119777b3a890d3d243c3c58451ac3be659cac.tar.xz
support lavc mv0_threshold
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18490 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--DOCS/man/en/mplayer.115
-rw-r--r--libmpcodecs/ve_lavc.c3
2 files changed, 18 insertions, 0 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index 43dcaefe9a..bff4c29c89 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -7868,6 +7868,21 @@ Try to encode each MB with MV=<0,0> and choose the better one.
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
diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c
index 8fcac43ddb..bcff655c38 100644
--- a/libmpcodecs/ve_lavc.c
+++ b/libmpcodecs/ve_lavc.c
@@ -160,6 +160,7 @@ static int lavc_param_brd_scale = 0;
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 @@ m_option_t lavcopts_conf[]={
{"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 @@ static int config(struct vf_instance_s* vf,
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)
{