[MEncoder-users] x264 and motion estimation parameters
Joel Yliluoma
bisqwit at iki.fi
Mon May 9 12:43:51 CEST 2005
I noticed that mencoder doesn't allow specifying values for
these x264 parameters:
--me <string> Integer pixel motion estimation method ["hex"]
- dia: diamond search, radius 1 (fast)
- hex: hexagonal search, radius 2
- esa: exhaustive search algorithm (slow)
--merange <integer> Maximum motion vector search range [16]
So I created a patch that now allows it.
This is a source patch - manual pages were not updated.
The default values in this patch match the default values
in the x264 lib.
--- libmpcodecs/ve_x264.c~ 2005-05-09 13:37:50.000000000 +0300
+++ libmpcodecs/ve_x264.c 2005-05-09 13:37:24.000000000 +0300
@@ -96,6 +96,8 @@
static int level_idc = 40;
static int psnr = 0;
static int log_level = 2;
+static int me_method = X264_ME_HEX;
+static int me_range = 16;
m_option_t x264encopts_conf[] = {
{"bitrate", &bitrate, CONF_TYPE_INT, CONF_RANGE, 0, 24000000, NULL},
@@ -146,6 +148,8 @@
{"psnr", &psnr, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"nopsnr", &psnr, CONF_TYPE_FLAG, 0, 1, 0, NULL},
{"log", &log_level, CONF_TYPE_INT, CONF_RANGE, -1, 3, NULL},
+ {"me", &me_method, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
+ {"mrange", &me_range, CONF_TYPE_INT, CONF_RANGE, 0, 512, NULL},
{NULL, NULL, 0, 0, 0, 0, NULL}
};
@@ -185,6 +189,8 @@
mod->param.rc.f_qblur = qblur;
mod->param.rc.f_complexity_blur = complexity_blur;
mod->param.analyse.i_subpel_refine = subq;
+ mod->param.analyse.i_me_range = me_range;
+ mod->param.analyse.i_me_method = me_method;
mod->param.rc.psz_stat_out = passtmpfile;
mod->param.rc.psz_stat_in = passtmpfile;
if((pass & 2) && bitrate <= 0)
Also available at address:
http://bisqwit.iki.fi/src/mencoder-x264-me-patch.txt
--
Joel Yliluoma
http://iki.fi/bisqwit/
More information about the MEncoder-users
mailing list