[x265] [PATCH] cli: connect --limit-refs to param.limitReferences
ashok at multicorewareinc.com
ashok at multicorewareinc.com
Tue May 19 15:17:51 CEST 2015
# HG changeset patch
# User Ashok Kumar Mishra<ashok at multicorewareinc.com>
# Date 1431936273 -19800
# Mon May 18 13:34:33 2015 +0530
# Node ID 536be87c9bb64cf301a5dd276a9814e819c77110
# Parent 3a8c241580093e93b5e46a0a13f631c4420215cd
cli: connect --limit-refs to param.limitReferences
diff -r 3a8c24158009 -r 536be87c9bb6 source/common/param.cpp
--- a/source/common/param.cpp Mon May 18 13:31:59 2015 +0530
+++ b/source/common/param.cpp Mon May 18 13:34:33 2015 +0530
@@ -151,6 +151,7 @@
param->subpelRefine = 2;
param->searchRange = 57;
param->maxNumMergeCand = 2;
+ param->limitReferences = 0;
param->bEnableWeightedPred = 1;
param->bEnableWeightedBiPred = 0;
param->bEnableEarlySkip = 0;
@@ -641,6 +642,7 @@
}
}
OPT("ref") p->maxNumReferences = atoi(value);
+ OPT("limit-refs") p->limitReferences = atoi(value);
OPT("weightp") p->bEnableWeightedPred = atobool(value);
OPT("weightb") p->bEnableWeightedBiPred = atobool(value);
OPT("cbqpoffs") p->cbQpOffset = atoi(value);
@@ -1026,6 +1028,8 @@
"subme must be less than or equal to X265_MAX_SUBPEL_LEVEL (7)");
CHECK(param->subpelRefine < 0,
"subme must be greater than or equal to 0");
+ CHECK(param->limitReferences > 3,
+ "limitReferences must be 0, 1, 2 or 3");
CHECK(param->frameNumThreads < 0 || param->frameNumThreads > X265_MAX_FRAME_THREADS,
"frameNumThreads (--frame-threads) must be [0 .. X265_MAX_FRAME_THREADS)");
CHECK(param->cbQpOffset < -12, "Min. Chroma Cb QP Offset is -12");
@@ -1277,6 +1281,8 @@
if (param->rc.aqMode)
x265_log(param, X265_LOG_INFO, "AQ: mode / str / qg-size / cu-tree : %d / %0.1f / %d / %d\n", param->rc.aqMode,
param->rc.aqStrength, param->rc.qgSize, param->rc.cuTree);
+ x265_log(param, X265_LOG_INFO, "References / ref-limit cu / depth : %d / %d / %d\n",
+ param->maxNumReferences, !!(param->limitReferences & X265_REF_LIMIT_CU), !!(param->limitReferences & X265_REF_LIMIT_DEPTH));
if (param->bLossless)
x265_log(param, X265_LOG_INFO, "Rate Control : Lossless\n");
@@ -1420,6 +1426,7 @@
s += sprintf(s, " bframe-bias=%d", p->bFrameBias);
s += sprintf(s, " b-adapt=%d", p->bFrameAdaptive);
s += sprintf(s, " ref=%d", p->maxNumReferences);
+ s += sprintf(s, " limit-refs=%d", p->limitReferences);
BOOL(p->bEnableWeightedPred, "weightp");
BOOL(p->bEnableWeightedBiPred, "weightb");
s += sprintf(s, " aq-mode=%d", p->rc.aqMode);
diff -r 3a8c24158009 -r 536be87c9bb6 source/x265cli.h
--- a/source/x265cli.h Mon May 18 13:31:59 2015 +0530
+++ b/source/x265cli.h Mon May 18 13:34:33 2015 +0530
@@ -121,6 +121,7 @@
{ "no-b-pyramid", no_argument, NULL, 0 },
{ "b-pyramid", no_argument, NULL, 0 },
{ "ref", required_argument, NULL, 0 },
+ { "limit-refs", required_argument, NULL, 0 },
{ "no-weightp", no_argument, NULL, 0 },
{ "weightp", no_argument, NULL, 'w' },
{ "no-weightb", no_argument, NULL, 0 },
@@ -302,10 +303,12 @@
H0(" --[no-]signhide Hide sign bit of one coeff per TU (rdo). Default %s\n", OPT(param->bEnableSignHiding));
H1(" --[no-]tskip Enable intra 4x4 transform skipping. Default %s\n", OPT(param->bEnableTransformSkip));
H0("\nTemporal / motion search options:\n");
+ H0(" --max-merge <1..5> Maximum number of merge candidates. Default %d\n", param->maxNumMergeCand);
+ H0(" --ref <integer> max number of L0 references to be allowed (1 .. 16) Default %d\n", param->maxNumReferences);
+ H0(" --limit-refs <0|1|2|3> limit references per depth (1) or CU (2) or both (3). Default %d\n", param->limitReferences);
H0(" --me <string> Motion search method dia hex umh star full. Default %d\n", param->searchMethod);
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-]rect Enable rectangular motion partitions Nx2N and 2NxN. Default %s\n", OPT(param->bEnableRectInter));
H0(" --[no-]amp Enable asymmetric motion partitions, requires --rect. Default %s\n", OPT(param->bEnableAMP));
H1(" --[no-]temporal-mvp Enable temporal MV predictors. Default %s\n", OPT(param->bEnableTemporalMvp));
@@ -327,7 +330,6 @@
H1(" --bframe-bias <integer> Bias towards B frame decisions. Default %d\n", param->bFrameBias);
H0(" --b-adapt <0..2> 0 - none, 1 - fast, 2 - full (trellis) adaptive B frame scheduling. Default %d\n", param->bFrameAdaptive);
H0(" --[no-]b-pyramid Use B-frames as references. Default %s\n", OPT(param->bBPyramid));
- H0(" --ref <integer> max number of L0 references to be allowed (1 .. 16) Default %d\n", param->maxNumReferences);
H1(" --zones <zone0>/<zone1>/... Tweak the bitrate of regions of the video\n");
H1(" Each zone is of the form\n");
H1(" <start frame>,<end frame>,<option>\n");
More information about the x265-devel
mailing list