From 447119777b3a890d3d243c3c58451ac3be659cac Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 13 May 2006 20:18:57 +0000 Subject: support lavc mv0_threshold git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18490 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/en/mplayer.1 | 15 +++++++++++++++ libmpcodecs/ve_lavc.c | 3 +++ 2 files changed, 18 insertions(+) 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= +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) { -- cgit v1.2.3