[x265-commits] [x265] cli: change --log option to --log-level, allow strings or...
Steve Borho
steve at borho.org
Thu Mar 6 05:10:27 CET 2014
details: http://hg.videolan.org/x265/rev/50a04c4cf0ff
branches:
changeset: 6394:50a04c4cf0ff
user: Steve Borho <steve at borho.org>
date: Wed Mar 05 19:48:15 2014 -0600
description:
cli: change --log option to --log-level, allow strings or ints
getopt allows partial matches, so --log N will still work like it always has.
x265_parse_param() will accept "log" or "log-level"
Since the first entry in the name list corresponds to -1, the string list is
not placed in x265.h, where all indices are 0 based.
Subject: [x265] cli: improve CLI help for --overscan
details: http://hg.videolan.org/x265/rev/f38f72976bcd
branches:
changeset: 6395:f38f72976bcd
user: Steve Borho <steve at borho.org>
date: Wed Mar 05 19:48:57 2014 -0600
description:
cli: improve CLI help for --overscan
Subject: [x265] cli: improve help text by describing command argument data types
details: http://hg.videolan.org/x265/rev/f1dd1c83f3c6
branches:
changeset: 6396:f1dd1c83f3c6
user: Steve Borho <steve at borho.org>
date: Wed Mar 05 20:30:24 2014 -0600
description:
cli: improve help text by describing command argument data types
Subject: [x265] cli: fix AQ CLI help. 0, 1, and 2 are valid options
details: http://hg.videolan.org/x265/rev/bbaab3feef92
branches:
changeset: 6397:bbaab3feef92
user: Steve Borho <steve at borho.org>
date: Wed Mar 05 20:35:21 2014 -0600
description:
cli: fix AQ CLI help. 0, 1, and 2 are valid options
Subject: [x265] cli: add --no- options to some VUI fields
details: http://hg.videolan.org/x265/rev/3ffbee76c1f2
branches:
changeset: 6398:3ffbee76c1f2
user: Steve Borho <steve at borho.org>
date: Wed Mar 05 20:42:54 2014 -0600
description:
cli: add --no- options to some VUI fields
This is a little pedantic since they default to false and likely won't change
at any time.
Subject: [x265] cli: reorder help for better clarity
details: http://hg.videolan.org/x265/rev/64e76dcaf172
branches:
changeset: 6399:64e76dcaf172
user: Steve Borho <steve at borho.org>
date: Wed Mar 05 21:13:50 2014 -0600
description:
cli: reorder help for better clarity
Subject: [x265] cli: show condensed error message if no arguments are given
details: http://hg.videolan.org/x265/rev/105fe9b2d189
branches:
changeset: 6400:105fe9b2d189
user: Steve Borho <steve at borho.org>
date: Wed Mar 05 21:14:46 2014 -0600
description:
cli: show condensed error message if no arguments are given
Subject: [x265] cli: invalid preset or tune is a non-recoverabe error
details: http://hg.videolan.org/x265/rev/228c0004d401
branches:
changeset: 6401:228c0004d401
user: Steve Borho <steve at borho.org>
date: Wed Mar 05 21:15:44 2014 -0600
description:
cli: invalid preset or tune is a non-recoverabe error
Subject: [x265] cli: show compiled assembly status and detected SIMD arches on x265 --version
details: http://hg.videolan.org/x265/rev/37309f09aaa1
branches:
changeset: 6402:37309f09aaa1
user: Steve Borho <steve at borho.org>
date: Wed Mar 05 21:16:56 2014 -0600
description:
cli: show compiled assembly status and detected SIMD arches on x265 --version
Subject: [x265] cli: add --crf-max option for param.rc.rfConstantMax
details: http://hg.videolan.org/x265/rev/ba92d0695116
branches:
changeset: 6403:ba92d0695116
user: Steve Borho <steve at borho.org>
date: Wed Mar 05 21:32:47 2014 -0600
description:
cli: add --crf-max option for param.rc.rfConstantMax
diffstat:
source/common/param.cpp | 14 +++-
source/common/param.h | 3 +
source/x265.cpp | 153 ++++++++++++++++++++++++++---------------------
source/x265.h | 2 +-
4 files changed, 100 insertions(+), 72 deletions(-)
diffs (truncated from 320 to 300 lines):
diff -r 01547efd182d -r ba92d0695116 source/common/param.cpp
--- a/source/common/param.cpp Wed Mar 05 16:18:38 2014 -0600
+++ b/source/common/param.cpp Wed Mar 05 21:32:47 2014 -0600
@@ -495,6 +495,7 @@ int x265_param_parse(x265_param *p, cons
#pragma warning(disable: 4127) // conditional expression is constant
#endif
#define OPT(STR) else if (!strcmp(name, STR))
+#define OPT2(STR1, STR2) else if (!strcmp(name, STR1) || !strcmp(name, STR2))
if (0) ;
OPT("asm")
{
@@ -525,7 +526,15 @@ int x265_param_parse(x265_param *p, cons
OPT("csv") p->csvfn = value;
OPT("threads") p->poolNumThreads = atoi(value);
OPT("frame-threads") p->frameNumThreads = atoi(value);
- OPT("log") p->logLevel = atoi(value);
+ OPT2("log-level", "log")
+ {
+ p->logLevel = atoi(value);
+ if (bError)
+ {
+ bError = false;
+ p->logLevel = parseName(value, logLevelNames, bError) - 1;
+ }
+ }
OPT("wpp") p->bEnableWavefront = atobool(value);
OPT("ctu") p->maxCUSize = (uint32_t)atoi(value);
OPT("tu-intra-depth") p->tuQTMaxIntraDepth = (uint32_t)atoi(value);
@@ -586,6 +595,7 @@ int x265_param_parse(x265_param *p, cons
OPT("vbv-maxrate") p->rc.vbvMaxBitrate = atoi(value);
OPT("vbv-bufsize") p->rc.vbvBufferSize = atoi(value);
OPT("vbv-init") p->rc.vbvBufferInit = atof(value);
+ OPT("crf-max") p->rc.rfConstantMax = atof(value);
OPT("crf")
{
p->rc.rfConstant = atof(value);
@@ -1010,7 +1020,7 @@ int x265_check_params(x265_param *param)
CHECK(param->bFrameAdaptive < 0 || param->bFrameAdaptive > 2,
"Valid adaptive b scheduling values 0 - none, 1 - fast, 2 - full");
CHECK(param->logLevel < -1 || param->logLevel > X265_LOG_FULL,
- "Valid Logging level 0:ERROR 1:WARNING 2:INFO 3:DEBUG 4:FULL -1:NONE");
+ "Valid Logging level -1:none 0:error 1:warning 2:info 3:debug 4:full");
CHECK(param->scenecutThreshold < 0,
"scenecutThreshold must be greater than 0");
CHECK(param->rdPenalty < 0 || param->rdPenalty > 2,
diff -r 01547efd182d -r ba92d0695116 source/common/param.h
--- a/source/common/param.h Wed Mar 05 16:18:38 2014 -0600
+++ b/source/common/param.h Wed Mar 05 21:32:47 2014 -0600
@@ -35,6 +35,9 @@ int parseCpuName(const char *value, bo
void setParamAspectRatio(x265_param *p, int width, int height);
void getParamAspectRatio(x265_param *p, int& width, int& height);
+/* this table is kept internal to avoid confusion, since log level indices start at -1 */
+static const char * const logLevelNames[] = { "none", "error", "warning", "info", "debug", "full", 0 };
+
}
#endif // ifndef X265_PARAM_H
diff -r 01547efd182d -r ba92d0695116 source/x265.cpp
--- a/source/x265.cpp Wed Mar 05 16:18:38 2014 -0600
+++ b/source/x265.cpp Wed Mar 05 21:32:47 2014 -0600
@@ -72,7 +72,7 @@ static const struct option long_options[
{ "preset", required_argument, NULL, 'p' },
{ "tune", required_argument, NULL, 't' },
{ "frame-threads", required_argument, NULL, 'F' },
- { "log", required_argument, NULL, 0 },
+ { "log-level", required_argument, NULL, 0 },
{ "csv", required_argument, NULL, 0 },
{ "y4m", no_argument, NULL, 0 },
{ "no-progress", no_argument, NULL, 0 },
@@ -128,6 +128,7 @@ static const struct option long_options[
{ "no-weightp", no_argument, NULL, 0 },
{ "weightp", no_argument, NULL, 'w' },
{ "crf", required_argument, NULL, 0 },
+ { "crf-max", required_argument, NULL, 0 },
{ "vbv-maxrate", required_argument, NULL, 0 },
{ "vbv-bufsize", required_argument, NULL, 0 },
{ "vbv-init", required_argument, NULL, 0 },
@@ -156,6 +157,7 @@ static const struct option long_options[
{ "no-cutree", no_argument, NULL, 0 },
{ "cutree", no_argument, NULL, 0 },
{ "vui", no_argument, NULL, 0 },
+ { "no-vui", no_argument, NULL, 0 },
{ "sar", required_argument, NULL, 0 },
{ "overscan", required_argument, NULL, 0 },
{ "videoformat", required_argument, NULL, 0 },
@@ -170,10 +172,14 @@ static const struct option long_options[
{ "no-framefieldinfo", no_argument, NULL, 0 },
{ "crop-rect", required_argument, NULL, 0 },
{ "timinginfo", no_argument, NULL, 0 },
+ { "no-timinginfo", no_argument, NULL, 0 },
{ "hrd", no_argument, NULL, 0 },
+ { "no-hrd", no_argument, NULL, 0 },
{ "nal-hrd", required_argument, NULL, 0 },
{ "bitstreamrestriction", no_argument, NULL, 0 },
+ { "no-bitstreamrestriction", no_argument, NULL, 0 },
{ "subpichrd", no_argument, NULL, 0 },
+ { "no-subpichrd", no_argument, NULL, 0 },
{ 0, 0, 0, 0 }
};
@@ -291,94 +297,92 @@ void CLIOptions::showHelp(x265_param *pa
H0("\nExecutable Options:\n");
H0("-h/--h Show this help text and exit\n");
H0("-V/--version Show version info and exit\n");
- H0(" --[no-]asm Override CPU detection. Default: auto\n");
- H0(" --threads Number of threads for thread pool (0: detect CPU core count, default)\n");
- H0("-p/--preset Trade off performance for compression efficiency. Default medium\n");
+ H0(" --[no-]asm <bool|int|string> Override CPU detection. Default: auto\n");
+ H0(" --threads <integer> Number of threads for thread pool (0: detect CPU core count, default)\n");
+ H0("-F/--frame-threads <integer> Number of concurrently encoded frames. 0: auto-determined by core count\n");
+ H0(" --log-level <string> Logging level: none error warning info debug full. Default %s\n", logLevelNames[param->logLevel+1]);
+ H0(" --csv <filename> Comma separated log file, log level >= 3 frame log, else one line per run\n");
+ H0(" --no-progress Disable CLI progress reports\n");
+ H0("-o/--output <filename> Bitstream output file name\n");
+ H0("\nInput Options:\n");
+ H0(" --input <filename> Raw YUV or Y4M input file name. `-` for stdin\n");
+ H0(" --y4m Force parsing of input stream as YUV4MPEG2 regardless of file extension\n");
+ H0(" --input-depth <integer> Bit-depth of input file. Default 8\n");
+ H0(" --input-res WxH Source picture size [w x h], auto-detected if Y4M\n");
+ H0(" --input-csp <string> Source color space: i420 or i444, auto-detected if Y4M. Default: i420\n");
+ H0(" --fps <float|rational> Source frame rate (float or num/denom), auto-detected if Y4M\n");
+ H0(" --seek <integer> First frame to encode\n");
+ H0("\nPresets:\n");
+ H0("-f/--frames <integer> Maximum number of frames to encode. Default all\n");
+ H0("-p/--preset <string> Trade off performance for compression efficiency. Default medium\n");
H0(" ultrafast, veryfast, faster, fast, medium, slow, slower, veryslow, or placebo\n");
- H0("-t/--tune Tune the settings for a particular type of source or situation:\n");
+ H0("-t/--tune <string> Tune the settings for a particular type of source or situation:\n");
H0(" psnr, ssim, zerolatency, or fastdecode\n");
- H0("-F/--frame-threads Number of concurrently encoded frames. 0: auto-determined by core count\n");
- H0(" --log Logging level 0:ERROR 1:WARNING 2:INFO 3:DEBUG -1:NONE. Default %d\n", param->logLevel);
- H0(" --csv Comma separated log file, log level >= 3 frame log, else one line per run\n");
- H0(" --y4m Parse input stream as YUV4MPEG2 regardless of file extension\n");
- H0(" --no-progress Disable CLI progress reports\n");
- H0("-o/--output Bitstream output file name\n");
- H0("\nInput Options:\n");
- H0(" --input Raw YUV or Y4M input file name\n");
- H0(" --input-depth Bit-depth of input file. Default 8\n");
- H0(" --input-res Source picture size [w x h], auto-detected if Y4M\n");
- H0(" --input-csp Source color space parameter, auto-detected if Y4M. 1:i420 3:i444. Default: 1\n");
- H0(" --fps Source frame rate (float or num/denom), auto-detected if Y4M\n");
- H0(" --seek First frame to encode\n");
- H0("-f/--frames Maximum number of frames to encode. Default all\n");
+ H0("\nQuality reporting metrics:\n");
+ H0(" --[no-]ssim Enable reporting SSIM metric scores. Default %s\n", OPT(param->bEnableSsim));
+ H0(" --[no-]psnr Enable reporting PSNR metric scores. Default %s\n", OPT(param->bEnablePsnr));
H0("\nQuad-Tree analysis:\n");
H0(" --[no-]wpp Enable Wavefront Parallel Processing. Default %s\n", OPT(param->bEnableWavefront));
- H0("-s/--ctu Maximum CU size (default: 64x64). Default %d\n", param->maxCUSize);
- H0(" --tu-intra-depth Max TU recursive depth for intra CUs. Default %d\n", param->tuQTMaxIntraDepth);
- H0(" --tu-inter-depth Max TU recursive depth for inter CUs. Default %d\n", param->tuQTMaxInterDepth);
+ H0("-s/--ctu <64|32|16> Maximum CU size (default: 64x64). Default %d\n", param->maxCUSize);
+ H0(" --tu-intra-depth <integer> Max TU recursive depth for intra CUs. Default %d\n", param->tuQTMaxIntraDepth);
+ H0(" --tu-inter-depth <integer> Max TU recursive depth for inter CUs. Default %d\n", param->tuQTMaxInterDepth);
H0("\nTemporal / motion search options:\n");
- H0(" --me Motion search method 0:dia 1:hex 2:umh 3:star 4:full. Default %d\n", param->searchMethod);
- H0("-m/--subme Amount of subpel refinement to perform (0:least .. 7:most). Default %d \n", param->subpelRefine);
- H0(" --merange Motion search range. Default %d\n", param->searchRange);
+ 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(" --[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));
- H0(" --max-merge Maximum number of merge candidates. Default %d\n", param->maxNumMergeCand);
+ H0(" --max-merge <1..5> Maximum number of merge candidates. Default %d\n", param->maxNumMergeCand);
H0(" --[no-]early-skip Enable early SKIP detection. Default %s\n", OPT(param->bEnableEarlySkip));
H0(" --[no-]fast-cbf Enable Cbf fast mode. Default %s\n", OPT(param->bEnableCbfFastMode));
H0("\nSpatial / intra options:\n");
- H0(" --rdpenalty penalty for 32x32 intra TU in non-I slices. 0:disabled 1:RD-penalty 2:maximum. Default %d\n", param->rdPenalty);
+ H0(" --rdpenalty <0..2> penalty for 32x32 intra TU in non-I slices. 0:disabled 1:RD-penalty 2:maximum. Default %d\n", param->rdPenalty);
H0(" --[no-]tskip Enable intra transform skipping. Default %s\n", OPT(param->bEnableTransformSkip));
H0(" --[no-]tskip-fast Enable fast intra transform skipping. Default %s\n", OPT(param->bEnableTSkipFast));
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));
H0("\nSlice decision options:\n");
H0(" --[no-]open-gop Enable open-GOP, allows I slices to be non-IDR. Default %s\n", OPT(param->bOpenGOP));
- H0("-I/--keyint Max IDR period in frames. -1 for infinite-gop. Default %d\n", param->keyframeMax);
- H0("-i/--min-keyint Scenecuts closer together than this are coded as I, not IDR. Default: auto\n");
+ H0("-I/--keyint <integer> Max IDR period in frames. -1 for infinite-gop. Default %d\n", param->keyframeMax);
+ H0("-i/--min-keyint <integer> Scenecuts closer together than this are coded as I, not IDR. Default: auto\n");
H0(" --no-scenecut Disable adaptive I-frame decision\n");
- H0(" --scenecut How aggressively to insert extra I-frames. Default %d\n", param->scenecutThreshold);
- H0(" --rc-lookahead Number of frames for frame-type lookahead (determines encoder latency) Default %d\n", param->lookaheadDepth);
- H0(" --bframes Maximum number of consecutive b-frames (now it only enables B GOP structure) Default %d\n", param->bframes);
- H0(" --bframe-bias Bias towards B frame decisions. Default %d\n", param->bFrameBias);
- H0(" --b-adapt 0 - none, 1 - fast, 2 - full (trellis) adaptive B frame scheduling. Default %d\n", param->bFrameAdaptive);
+ 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);
+ H0(" --bframes <integer> Maximum number of consecutive b-frames (now it only enables B GOP structure) Default %d\n", param->bframes);
+ H0(" --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 max number of L0 references to be allowed (1 .. 16) Default %d\n", param->maxNumReferences);
+ H0(" --ref <integer> max number of L0 references to be allowed (1 .. 16) Default %d\n", param->maxNumReferences);
H0("-w/--[no-]weightp Enable weighted prediction in P slices. Default %s\n", OPT(param->bEnableWeightedPred));
- H0("\nQP, rate control and rate distortion options:\n");
- H0(" --bitrate Target bitrate (kbps), implies ABR. Default %d\n", param->rc.bitrate);
- H0(" --crf Quality-based VBR (0-51). Default %f\n", param->rc.rfConstant);
- H0(" --vbv-maxrate Max local bitrate (kbit/s). Default %d\n", param->rc.vbvMaxBitrate);
- H0(" --vbv-bufsize Set size of the VBV buffer (kbit). Default %d\n", param->rc.vbvBufferSize);
- H0(" --vbv-init Initial VBV buffer occupancy. Default %f\n", param->rc.vbvBufferInit);
- H0("-q/--qp Base QP for CQP mode. Default %d\n", param->rc.qp);
- H0(" --aq-mode Mode for Adaptive Quantization - 0:none 1:aqVariance Default %d\n", param->rc.aqMode);
- H0(" --aq-strength Reduces blocking and blurring in flat and textured areas.(0 to 3.0). Default %f\n", param->rc.aqStrength);
+ H0("\nRate control and rate distortion options:\n");
+ H0(" --bitrate <integer> Target bitrate (kbps), implies ABR. Default %d\n", param->rc.bitrate);
+ H0(" --crf <float> Quality-based VBR (0-51). Default %f\n", param->rc.rfConstant);
+ H0(" --crf-max <float> With CRF+VBV, limit RF to this value. 0 for no limit (default)\n");
+ H0(" May cause VBV underflows!\n");
+ H0(" --vbv-maxrate <integer> Max local bitrate (kbit/s). Default %d\n", param->rc.vbvMaxBitrate);
+ H0(" --vbv-bufsize <integer> Set size of the VBV buffer (kbit). Default %d\n", param->rc.vbvBufferSize);
+ H0(" --vbv-init <float> Initial VBV buffer occupancy. Default %f\n", param->rc.vbvBufferInit);
+ H0("-q/--qp <integer> Base QP for CQP mode. Default %d\n", param->rc.qp);
+ H0(" --aq-mode <integer> Mode for Adaptive Quantization - 0:none 1:uniform AQ 2:auto variance. Default %d\n", param->rc.aqMode);
+ H0(" --aq-strength <float> Reduces blocking and blurring in flat and textured areas.(0 to 3.0). Default %f\n", param->rc.aqStrength);
H0(" --[no-]cutree Enable cutree for Adaptive Quantization. Default %s\n", OPT(param->rc.cuTree));
- H0(" --cbqpoffs Chroma Cb QP Offset. Default %d\n", param->cbQpOffset);
- H0(" --crqpoffs Chroma Cr QP Offset. Default %d\n", param->crQpOffset);
- H0(" --rd Level of RD in mode decision 0:least....6:full RDO. Default %d\n", param->rdLevel);
+ H0(" --cbqpoffs <integer> Chroma Cb QP Offset. Default %d\n", param->cbQpOffset);
+ H0(" --crqpoffs <integer> Chroma Cr QP Offset. Default %d\n", param->crQpOffset);
+ H0(" --rd <0..6> Level of RD in mode decision 0:least....6:full RDO. Default %d\n", param->rdLevel);
H0(" --[no-]signhide Hide sign bit of one coeff per TU (rdo). Default %s\n", OPT(param->bEnableSignHiding));
- H0("\nLoop filter:\n");
- H0(" --[no-]lft Enable Loop Filter. Default %s\n", OPT(param->bEnableLoopFilter));
- H0("\nSample Adaptive Offset loop filter:\n");
+ H0("\nLoop filters (deblock and SAO):\n");
+ H0(" --[no-]lft Enable Deblocking Loop Filter. Default %s\n", OPT(param->bEnableLoopFilter));
H0(" --[no-]sao Enable Sample Adaptive Offset. Default %s\n", OPT(param->bEnableSAO));
- H0(" --sao-lcu-bounds 0: right/bottom boundary areas skipped 1: non-deblocked pixels are used. Default %d\n", param->saoLcuBoundary);
- H0(" --sao-lcu-opt 0: SAO picture-based optimization, 1: SAO LCU-based optimization. Default %d\n", param->saoLcuBasedOptimization);
- H0("\nQuality reporting metrics:\n");
- H0(" --[no-]ssim Enable reporting SSIM metric scores. Default %s\n", OPT(param->bEnableSsim));
- H0(" --[no-]psnr Enable reporting PSNR metric scores. Default %s\n", OPT(param->bEnablePsnr));
- H0("\nReconstructed video options (debugging):\n");
- H0("-r/--recon Reconstructed raw image YUV or Y4M output file name\n");
- H0(" --recon-depth Bit-depth of reconstructed raw image file. Defaults to input bit depth\n");
- H0("\nSEI options:\n");
- H0(" --hash Decoded Picture Hash SEI 0: disabled, 1: MD5, 2: CRC, 3: Checksum. Default %d\n", param->decodedPictureHashSEI);
+ H0(" --sao-lcu-bounds <integer> 0: right/bottom boundary areas skipped 1: non-deblocked pixels are used. Default %d\n", param->saoLcuBoundary);
+ H0(" --sao-lcu-opt <integer> 0: SAO picture-based optimization, 1: SAO LCU-based optimization. Default %d\n", param->saoLcuBasedOptimization);
H0("\nVUI options:\n");
- H0(" --vui Add Video Useability Information with all fields to the SPS. Default %s\n", OPT(param->vui.bEnableVuiParametersPresentFlag));
- H0(" --sar <int:int|int> Sample Aspect Ratio, the ratio of width to height of an individual pixel.\n");
+ H0(" --[no-]vui Add Video Useability Information with all fields to the SPS. Default %s\n", OPT(param->vui.bEnableVuiParametersPresentFlag));
+ H0(" --sar <width:height|int> Sample Aspect Ratio, the ratio of width to height of an individual pixel.\n");
H0(" Choose from 0=undef, 1=1:1(\"square\"), 2=12:11, 3=10:11, 4=16:11,\n");
H0(" 5=40:33, 6=24:11, 7=20:11, 8=32:11, 9=80:33, 10=18:11, 11=15:11,\n");
H0(" 12=64:33, 13=160:99, 14=4:3, 15=3:2, 16=2:1 or custom ratio of <int:int>. Default %d\n", param->vui.aspectRatioIdc);
- H0(" --overscan <string> Specify crop overscan setting from undef, show or crop. Default undef\n");
+ H0(" --crop-rect <string> Add 'left,top,right,bottom' to the bitstream-level cropping rectangle\n");
+ H0(" --overscan <string> Specify whether it is appropriate for decoder to show cropped region: undef, show or crop. Default undef\n");
H0(" --videoformat <string> Specify video format from undef, component, pal, ntsc, secam, mac. Default undef\n");
H0(" --range <string> Specify black level and range of luma and chroma signals as full or limited Default limited\n");
H0(" --colorprim <string> Specify color primaries from undef, bt709, bt470m, bt470bg, smpte170m,\n");
@@ -392,12 +396,16 @@ void CLIOptions::showHelp(x265_param *pa
H0(" --[no-]fieldseq Specify that pictures are fields and an SEI timing message\n");
H0(" will be added to every access unit. Default %s\n", OPT(param->vui.bEnableFieldSeqFlag));
H0(" --[no-]framefieldinfo Specify that a pic-struct will be added to the SEI timing message. Default %s\n", OPT(param->vui.bEnableFrameFieldInfoPresentFlag));
- H0(" --crop-rect <string> Add 'left,top,right,bottom' to the bitstream-level cropping rectangle\n");
- H0(" --timinginfo Add timing information to the VUI. Defaut %s\n", OPT(param->vui.bEnableVuiTimingInfoPresentFlag));
- H0(" --hrd Signal HRD information. Default %s\n", OPT(param->vui.bEnableVuiHrdParametersPresentFlag));
+ H0(" --[no-]timinginfo Add timing information to the VUI. Defaut %s\n", OPT(param->vui.bEnableVuiTimingInfoPresentFlag));
+ H0(" --[no-]hrd Signal HRD information. Default %s\n", OPT(param->vui.bEnableVuiHrdParametersPresentFlag));
H0(" --nal-hrd <string> Signal NAL HRD information (requires vbv-buffer size) Choose from none, vbr or cbr.Default none\n");
- H0(" --bitstreamrestriction Add bit stream restriction fields to the VUI. Default %s\n", OPT(param->vui.bEnableBitstreamRestrictionFlag));
- H0(" --subpichrd Add sub picture HRD parameters to the HRD. Default %s\n", OPT(param->vui.bEnableSubPicHrdParamsPresentFlag));
+ H0(" --[no-]bitstreamrestriction Add bit stream restriction fields to the VUI. Default %s\n", OPT(param->vui.bEnableBitstreamRestrictionFlag));
+ H0(" --[no-]subpichrd Add sub picture HRD parameters to the HRD. Default %s\n", OPT(param->vui.bEnableSubPicHrdParamsPresentFlag));
+ H0("\nReconstructed video options (debugging):\n");
+ H0("-r/--recon <filename> Reconstructed raw image YUV or Y4M output file name\n");
+ H0(" --recon-depth <integer> Bit-depth of reconstructed raw image file. Defaults to input bit depth, or 8 if Y4M\n");
+ H0("\nSEI options:\n");
+ H0(" --hash <integer> Decoded Picture Hash SEI 0: disabled, 1: MD5, 2: CRC, 3: Checksum. Default %d\n", param->decodedPictureHashSEI);
#undef OPT
#undef H0
exit(0);
@@ -415,6 +423,12 @@ bool CLIOptions::parse(int argc, char **
const char *preset = "medium";
const char *tune = "ssim";
+ if (argc <= 1)
+ {
+ x265_log(NULL, X265_LOG_ERROR, "No input file. Run x265 --help for a list of options.\n");
+ return true;
+ }
+
/* Presets are applied before all other options. */
for (optind = 0;; )
{
@@ -431,7 +445,7 @@ bool CLIOptions::parse(int argc, char **
if (x265_param_default_preset(param, preset, tune) < 0)
{
- x265_log(NULL, X265_LOG_WARNING, "preset or tune unrecognized\n");
+ x265_log(NULL, X265_LOG_ERROR, "preset or tune unrecognized\n");
return true;
}
More information about the x265-commits
mailing list