[x265] [PATCH 4 of 7] param: expose 'lookahead-slices' for param.lookaheadSlices (help hidden at H1)
Steve Borho
steve at borho.org
Thu Mar 26 17:27:24 CET 2015
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1427386017 18000
# Thu Mar 26 11:06:57 2015 -0500
# Node ID 9178c211a0feb1738b15133685a6103bdf471d86
# Parent 75e5803b6fa3b5c29582d88c37595e86d133c4bf
param: expose 'lookahead-slices' for param.lookaheadSlices (help hidden at H1)
Most users will not want to use this, it is only helpful on fairly large
machines and even then only helpful for some use-cases.
diff -r 75e5803b6fa3 -r 9178c211a0fe source/common/param.cpp
--- a/source/common/param.cpp Thu Mar 26 11:12:39 2015 -0500
+++ b/source/common/param.cpp Thu Mar 26 11:06:57 2015 -0500
@@ -599,6 +599,7 @@
OPT2("constrained-intra", "cip") p->bEnableConstrainedIntra = atobool(value);
OPT("fast-intra") p->bEnableFastIntra = atobool(value);
OPT("open-gop") p->bOpenGOP = atobool(value);
+ OPT("lookahead-slices") p->lookaheadSlices = atoi(value);
OPT("scenecut")
{
p->scenecutThreshold = atobool(value);
@@ -1064,6 +1065,8 @@
"max consecutive bframe count must be 16 or smaller");
CHECK(param->lookaheadDepth > X265_LOOKAHEAD_MAX,
"Lookahead depth must be less than 256");
+ CHECK(param->lookaheadSlices > 16 || param->lookaheadSlices < 0,
+ "Lookahead slices must between 0 and 16");
CHECK(param->rc.aqMode < X265_AQ_NONE || X265_AQ_AUTO_VARIANCE < param->rc.aqMode,
"Aq-Mode is out of range");
CHECK(param->rc.aqStrength < 0 || param->rc.aqStrength > 3,
@@ -1305,6 +1308,7 @@
TOOLOPT(param->bIntraInBFrames, "b-intra");
TOOLOPT(param->bEnableFastIntra, "fast-intra");
TOOLOPT(param->bEnableStrongIntraSmoothing, "strong-intra-smoothing");
+ TOOLVAL(param->lookaheadSlices, "lslices=%d");
if (param->bEnableLoopFilter)
{
if (param->deblockingFilterBetaOffset || param->deblockingFilterTCOffset)
@@ -1366,6 +1370,7 @@
s += sprintf(s, " min-keyint=%d", p->keyframeMin);
s += sprintf(s, " scenecut=%d", p->scenecutThreshold);
s += sprintf(s, " rc-lookahead=%d", p->lookaheadDepth);
+ s += sprintf(s, " lookahead-slices=%d", p->lookaheadSlices);
s += sprintf(s, " bframes=%d", p->bframes);
s += sprintf(s, " bframe-bias=%d", p->bFrameBias);
s += sprintf(s, " b-adapt=%d", p->bFrameAdaptive);
diff -r 75e5803b6fa3 -r 9178c211a0fe source/x265cli.h
--- a/source/x265cli.h Thu Mar 26 11:12:39 2015 -0500
+++ b/source/x265cli.h Thu Mar 26 11:06:57 2015 -0500
@@ -110,6 +110,7 @@
{ "scenecut", required_argument, NULL, 0 },
{ "no-scenecut", no_argument, NULL, 0 },
{ "rc-lookahead", required_argument, NULL, 0 },
+ { "lookahead-slices", required_argument, NULL, 0 },
{ "bframes", required_argument, NULL, 'b' },
{ "bframe-bias", required_argument, NULL, 0 },
{ "b-adapt", required_argument, NULL, 0 },
@@ -312,6 +313,7 @@
H0(" --no-scenecut Disable adaptive I-frame decision\n");
H0(" --scenecut <integer> How aggressively to insert extra I-frames. Default %d\n", param->scenecutThreshold);
H0(" --rc-lookahead <integer> Number of frames for frame-type lookahead (determines encoder latency) Default %d\n", param->lookaheadDepth);
+ H1(" --lookahead-slices <0..16> Number of slices to use per lookahead cost estimate. Default %d\n", param->lookaheadSlices);
H0(" --bframes <integer> Maximum number of consecutive b-frames (now it only enables B GOP structure) Default %d\n", param->bframes);
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);
More information about the x265-devel
mailing list