[x265] [PATCH] Add CLI option to enable/disable Temporal MVP
Nicolas Morey-Chaisemartin
nmorey at kalray.eu
Mon Oct 27 20:00:14 CET 2014
# HG changeset patch
# User Nicolas Morey-Chaisemartin <nmorey at kalray.eu>
# Date 1414074865 -7200
# Thu Oct 23 15:34:25 2014 +0200
Add CLI option to enable/disable Temporal MVP
---
doc/reST/cli.rst | 7 +++++++
source/common/param.cpp | 3 +++
source/x265.cpp | 3 +++
3 files changed, 13 insertions(+)
diff --git a/doc/reST/cli.rst b/doc/reST/cli.rst
index 6b90da8..0ecb77a 100644
--- a/doc/reST/cli.rst
+++ b/doc/reST/cli.rst
@@ -517,6 +517,13 @@ Temporal / motion search options
The max candidate number is encoded in the SPS and determines the
bit cost of signaling merge CUs. Default 2
+.. option:: --temporal-mvp, --no-temporal-mvp
+
+ Enable temporal motion vector predictors in P and B slices.
+ This enables the use of the motion vector from the collocated block
+ in the previous frame to be used as a predictor. Default is enabled
+
+
Spatial/intra options
=====================
diff --git a/source/common/param.cpp b/source/common/param.cpp
index 4ced165..9d8a4b3 100644
--- a/source/common/param.cpp
+++ b/source/common/param.cpp
@@ -568,6 +568,8 @@ int x265_param_parse(x265_param *p, const char *name, const char *value)
OPT("rect") p->bEnableRectInter = atobool(value);
OPT("amp") p->bEnableAMP = atobool(value);
OPT("max-merge") p->maxNumMergeCand = (uint32_t)atoi(value);
+ OPT("temporal-mvp") p->bEnableTemporalMvp = atobool(value);
+
OPT("early-skip") p->bEnableEarlySkip = atobool(value);
OPT("fast-cbf") p->bEnableCbfFastMode = atobool(value);
OPT("rdpenalty") p->rdPenalty = atoi(value);
@@ -1202,6 +1204,7 @@ char *x265_param2string(x265_param *p)
BOOL(p->bEnableRectInter, "rect");
BOOL(p->bEnableAMP, "amp");
s += sprintf(s, " max-merge=%d", p->maxNumMergeCand);
+ BOOL(p->bEnableTemporalMvp, "temporal-mvp");
BOOL(p->bEnableEarlySkip, "early-skip");
BOOL(p->bEnableCbfFastMode, "fast-cbf");
s += sprintf(s, " rdpenalty=%d", p->rdPenalty);
diff --git a/source/x265.cpp b/source/x265.cpp
index 76cbcc8..4bdeac8 100644
--- a/source/x265.cpp
+++ b/source/x265.cpp
@@ -104,6 +104,8 @@ static const struct option long_options[] =
{ "subme", required_argument, NULL, 'm' },
{ "merange", required_argument, NULL, 0 },
{ "max-merge", required_argument, NULL, 0 },
+ { "temporal-mvp", no_argument, NULL, 0 },
+ { "no-temporal-mvp", no_argument, NULL, 0 },
{ "rdpenalty", required_argument, NULL, 0 },
{ "no-rect", no_argument, NULL, 0 },
{ "rect", no_argument, NULL, 0 },
@@ -405,6 +407,7 @@ void CLIOptions::showHelp(x265_param *param)
H0("-m/--subme <integer> Amount of subpel refinement to perform (0:least .. 7:most). Default %d \n", param->subpelRefine);
H0(" --merange <integer> Motion search range. Default %d\n", param->searchRange);
H0(" --max-merge <1..5> Maximum number of merge candidates. Default %d\n", param->maxNumMergeCand);
+ H0(" --[no-]temporal-mvp Enable temporal MV predictors. Default %s\n", OPT(param->bEnableTemporalMvp));
H0("\nSpatial / intra options:\n");
H0(" --[no-]strong-intra-smoothing Enable strong intra smoothing for 32x32 blocks. Default %s\n", OPT(param->bEnableStrongIntraSmoothing));
H0(" --[no-]constrained-intra Constrained intra prediction (use only intra coded reference pixels) Default %s\n", OPT(param->bEnableConstrainedIntra));
More information about the x265-devel
mailing list