[x265] [PATCH] x265: Implemented do_help() without using x265opts
Gopu Govindaswamy
gopu at multicorewareinc.com
Wed Oct 16 11:19:07 CEST 2013
# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1381915132 -19800
# Node ID 5f173d255d550efefbbf63837bee5fe9d2d12f00
# Parent de3b1f54873c23189284f63f471d4c95440bacc6
x265: Implemented do_help() without using x265opts
diff -r de3b1f54873c -r 5f173d255d55 source/x265.cpp
--- a/source/x265.cpp Wed Oct 16 11:43:31 2013 +0530
+++ b/source/x265.cpp Wed Oct 16 14:48:52 2013 +0530
@@ -264,27 +264,95 @@
{
x265_param_default(param);
print_version(param);
- int cpuid = 0, inputBitDepth = 8, outputBitDepth = param->internalBitDepth;
- char help = 'h';
-
- printf("\nSyntax: x265 [options] infile [-o] outfile\n");
- printf(" infile can be YUV or Y4M\n");
- printf(" outfile is raw HEVC bitstream\n");
-
-#define HELP(message) printf("\n%s\n", message);
-#define OPT(longname, var, argreq, flag, helptext) \
- if (flag) printf("-%c/", flag); else printf(" "); \
- printf("--%-20s\t%s\n", longname, helptext); \
- if (argreq == required_argument) printf("\t\t\t\tDefault: %d\n", var); \
- else if (strncmp(longname, "no-", 3)) printf("\t\t\t\tDefault: %s\n", var ? "Enabled" : "Disabled");
-#define STROPT(longname, var, argreq, flag, helptext) \
- if (flag) printf("-%c/", flag); else printf(" "); \
- printf("--%-20s\t%s\n", longname, helptext);
-#include "x265opts.h"
+ int inputBitDepth = 8, outputBitDepth = param->internalBitDepth;
+#define H0 printf
+#define OPT(value) (value ? "Enable" : "Disable")
+ H0("\nSyntax: x265 [options] infile [-o] outfile\n");
+ H0(" infile can be YUV or Y4M\n");
+ H0(" outfile is raw HEVC bitstream\n");
+ H0("Standalone Executable Options:\n");
+ H0("-h/--h Show this help text\n");
+ H0(" --cpuid Limit SIMD arch 0:auto 1:None 2:SSE2 .. 8:AVX2 \n \t\t\t\t Default :0\n");
+ H0(" --threads Number of threads for thread pool (0: detect CPU core count \n \t\t\t\t Default : %d\n", param->poolNumThreads);
+ H0("-F/--frame-threads Number of concurrently encoded frames \n \t\t\t\t Default : %d\n", param->frameNumThreads);
+ H0(" --log Logging level 0:ERROR 1:WARNING 2:INFO 3:DEBUG -1:NONE \n \t\t\t\t Default : %d\n", param->logLevel);
+ H0(" --csv Comma separated value log file, appends one line per run\n");
+ H0(" --no-progress Disable progress reports \n \t\t\t\t Default : Enable\n");
+ H0("-o/--output Bitstream output file name\n");
+ H0("Input Options:\n");
+ H0(" --input Raw YUV or Y4M input file name\n");
+ H0(" --input-depth Bit-depth of input file (YUV only) \n \t\t\t\t Default : %d\n",inputBitDepth);
+ H0(" --input-res Source picture size [w x h], auto-detect if Y4M\n");
+ H0(" --fps Frame rate, auto-detect if Y4M \n \t\t\t\t Default : 0\n");
+ H0(" --frame-skip Number of frames to skip at start of input file \n \t\t\t\t Default : 0\n");
+ H0("-f/--frames Number of frames to be encoded (0 implies all)\n");
+ H0("Reconstructed video options (debugging):\n");
+ H0("-r/--recon Reconstructed image YUV or Y4M output file name\n");
+ H0(" --recon-depth Bit-depth of output file \n \t\t\t\t Default : %d\n", outputBitDepth);
+ H0("Quad-Tree analysis:\n");
+ H0(" --no-wpp Disable Wavefront Parallel Processing\n");
+ H0(" --wpp Enable Wavefront Parallel Processing \n \t\t\t\t Default : %s\n",OPT(param->bEnableWavefront));
+ H0("-s/--ctu Maximum CU size (default: 64x64) \n \t\t\t\t Default : %d\n", param->maxCUSize);
+ H0(" --tu-intra-depth Max TU recursive depth for intra CUs \n \t\t\t\t Default : %d\n", param->tuQTMaxIntraDepth);
+ H0(" --tu-inter-depth Max TU recursive depth for inter CUs \n \t\t\t\t Default : %d\n", param->tuQTMaxInterDepth);
+ H0("Temporal / motion search options:\n");
+ H0(" --me Motion search method 0:dia 1:hex 2:umh 3:star 4:full \n \t\t\t\t Default : %d\n", param->searchMethod);
+ H0("-m/--subme Amount of subpel refinement to perform (0:least .. 7:most) \n \t\t\t\t Default : %d \n", param->subpelRefine);
+ H0(" --merange Motion search range \n \t\t\t\t Default : %d\n", param->searchRange);
+ H0(" --no-rect Disable rectangular motion partitions Nx2N and 2NxN\n");
+ H0(" --rect Enable rectangular motion partitions Nx2N and 2NxN \n \t\t\t\t Default : %s\n",OPT(param->bEnableRectInter));
+ H0(" --no-amp Disable asymmetric motion partitions\n");
+ H0(" --amp Enable asymmetric motion partitions, requires --rect \n \t\t\t\t Default : %s\n",OPT(param->bEnableAMP));
+ H0(" --max-merge Maximum number of merge candidates \n \t\t\t\t Default : %d\n", param->maxNumMergeCand);
+ H0(" --no-early-skip Disable early SKIP detection\n");
+ H0(" --early-skip Enable early SKIP detection \n \t\t\t\t Default : %s\n", OPT(param->bEnableEarlySkip));
+ H0(" --no-fast-cbf Disable Cbf fast mode\n");
+ H0(" --fast-cbf Enable Cbf fast mode \n \t\t\t\t Default : %s\n", OPT(param->bEnableCbfFastMode));
+ H0("Spatial / intra options:\n");
+ H0(" --rdpenalty penalty for 32x32 intra TU in non-I slices. 0:disabled 1:RD-penalty 2:maximum \n \t\t\t\t Default : %d\n", param->rdPenalty);
+ H0(" --no-tskip Disable intra transform skipping\n");
+ H0(" --tskip Enable intra transform skipping \n \t\t\t\t Default : %s\n", OPT(param->bEnableTransformSkip));
+ H0(" --no-tskip-fast Disable fast intra transform skipping\n");
+ H0(" --tskip-fast Enable fast intra transform skipping \n \t\t\t\t Default : %s\n", OPT(param->bEnableTSkipFast));
+ H0(" --no-strong-intra-smoothing Disable strong intra smoothing for 32x32 blocks\n");
+ H0(" --strong-intra-smoothing Enable strong intra smoothing for 32x32 blocks \n \t\t\t\t Default : %s\n", OPT(param->bEnableStrongIntraSmoothing));
+ H0(" --no-constrained-intra Disable constrained intra prediction (use only intra coded reference pixels)\n");
+ H0(" --constrained-intra Constrained intra prediction (use only intra coded reference pixels) \n \t\t\t\t Default : %s\n", OPT(param->bEnableConstrainedIntra));
+ H0("Slice decision options:\n");
+ H0(" --refresh Intra refresh type - 0:none, 1:CDR, 2:IDR (default: CDR) \n \t\t\t\t Default : %d\n", param->decodingRefreshType);
+ H0(" -i/--keyint Max intra period in frames \n \t\t\t\t Default : %d\n", param->keyframeMax);
+ H0(" --rc-lookahead Number of frames for frame-type lookahead (determines encoder latency) \n \t\t\t\t Default : %d\n", param->lookaheadDepth);
+ H0(" --bframes Maximum number of consecutive b-frames (now it only enables B GOP structure) \n \t\t\t\t Default : %d\n", param->bframes);
+ H0(" --bframe-bias Bias towards B frame decisions \n \t\t\t\t Default : %d\n", param->bFrameBias);
+ H0(" --b-adapt 0 - none, 1 - fast, 2 - full (trellis) adaptive B frame scheduling \n \t\t\t\t Default : %d\n", param->bFrameAdaptive);
+ H0(" --ref max number of L0 references to be allowed (1 .. 16) \n \t\t\t\t Default : %d\n", param->maxNumReferences);
+ H0(" --no-weightp Disable weighted prediction in P slices\n");
+ H0("-w/--weightp Enable weighted prediction in P slices \n \t\t\t\t Default : %s\n", OPT(param->bEnableWeightedPred));
+ H0("QP, rate control and rate distortion options:\n");
+ H0(" --bitrate Target bitrate (kbps), implies ABR \n \t\t\t\t Default : %d\n", param->rc.bitrate);
+ H0("-q/--qp Base QP for CQP mode \n \t\t\t\t Default : %d\n", param->rc.qp);
+ H0(" --cbqpoffs Chroma Cb QP Offset \n \t\t\t\t Default : %d\n", param->cbQpOffset);
+ H0(" --crqpoffs Chroma Cr QP Offset \n \t\t\t\t Default : %d\n", param->crQpOffset);
+ H0(" --rd Level of RD in mode decision 0:least....2:full RDO \n \t\t\t\t Default : %d\n", param->bRDLevel);
+ H0(" --no-signhide Disable hide sign bit of one coeff per TU (rdo)");
+ H0(" --signhide Hide sign bit of one coeff per TU (rdo) \n \t\t\t\t Default : %s\n", OPT(param->bEnableSignHiding));
+ H0("Loop filter:\n");
+ H0(" --no-lft Disable Loop Filter\n");
+ H0(" --lft Enable Loop Filter \n \t\t\t\t Default : %s\n", OPT(param->bEnableLoopFilter));
+ H0("Sample Adaptive Offset loop filter:\n");
+ H0(" --no-sao Disable Sample Adaptive Offset\n");
+ H0(" --sao Enable Sample Adaptive Offset \n \t\t\t\t Default : %s\n", OPT(param->bEnableSAO));
+ H0(" --sao-lcu-bounds 0: right/bottom boundary areas skipped 1: non-deblocked pixels are used \n \t\t\t\t Default : %d\n", param->saoLcuBoundary);
+ H0(" --sao-lcu-opt 0: SAO picture-based optimization, 1: SAO LCU-based optimization \n \t\t\t\t Default : %d\n", param->saoLcuBasedOptimization);
+ H0("Quality reporting metrics:\n");
+ H0(" --no-ssim Disable reporting SSIM metric scores\n");
+ H0(" --ssim Enable reporting SSIM metric scores \n \t\t\t\t Default : %s\n", OPT(param->bEnableSsim));
+ H0(" --no-psnr Disable reporting PSNR metric scores\n");
+ H0(" --psnr Enable reporting PSNR metric scores \n \t\t\t\t Default : %s\n", OPT(param->bEnablePsnr));
+ H0("SEI options:\n");
+ H0(" --hash Decoded Picture Hash SEI 0: disabled, 1: MD5, 2: CRC, 3: Checksum \n \t\t\t\t Default : %d\n", param->decodedPictureHashSEI);
#undef OPT
-#undef STROPT
-#undef HELP
-
+#undef H0
exit(0);
}
More information about the x265-devel
mailing list