[x265] [PATCH] cli: connect --limit-refs to param.limitReferences
ashok at multicorewareinc.com
ashok at multicorewareinc.com
Mon Apr 13 15:33:44 CEST 2015
# HG changeset patch
# User Ashok Kumar Mishra<ashok at multicorewareinc.com>
# Date 1428931472 -19800
# Mon Apr 13 18:54:32 2015 +0530
# Node ID b86198988303ae3ec4eeb42017e654f01d0f30a9
# Parent f145aefac07db1b595550753754fca12d509c029
cli: connect --limit-refs to param.limitReferences
diff -r f145aefac07d -r b86198988303 source/common/param.cpp
--- a/source/common/param.cpp Mon Apr 13 18:54:32 2015 +0530
+++ b/source/common/param.cpp Mon Apr 13 18:54:32 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);
@@ -1024,6 +1026,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");
@@ -1271,6 +1275,12 @@
x265_log(param, X265_LOG_INFO, "Lookahead / bframes / badapt : %d / %d / %d\n", param->lookaheadDepth, param->bframes, param->bFrameAdaptive);
x265_log(param, X265_LOG_INFO, "b-pyramid / weightp / weightb / refs: %d / %d / %d / %d\n",
param->bBPyramid, param->bEnableWeightedPred, param->bEnableWeightedBiPred, param->maxNumReferences);
+ x265_log(param, X265_LOG_INFO, "Lookahead / bframes / badapt : %d / %d / %d\n",
+ param->lookaheadDepth, param->bframes, param->bFrameAdaptive);
+ x265_log(param, X265_LOG_INFO, "B-pyramid / weightp / weightb : %d / %d / %d\n",
+ param->bBPyramid, param->bEnableWeightedPred, param->bEnableWeightedBiPred);
+ 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");
@@ -1383,6 +1393,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 f145aefac07d -r b86198988303 source/x265cli.h
--- a/source/x265cli.h Mon Apr 13 18:54:32 2015 +0530
+++ b/source/x265cli.h Mon Apr 13 18:54:32 2015 +0530
@@ -120,6 +120,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 },
@@ -297,10 +298,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));
@@ -322,7 +325,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