[x265-commits] [x265] rest: use comma to separate short and long options

Steve Borho steve at borho.org
Tue Mar 25 23:12:26 CET 2014


details:   http://hg.videolan.org/x265/rev/9ee05bffbc68
branches:  
changeset: 6586:9ee05bffbc68
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 25 13:37:06 2014 -0500
description:
rest: use comma to separate short and long options

This looks better, and fixes cross referencing
Subject: [x265] rest: fix csv logging descripion, move debug options to the end

details:   http://hg.videolan.org/x265/rev/6ece6e038ca8
branches:  
changeset: 6587:6ece6e038ca8
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 25 14:05:34 2014 -0500
description:
rest: fix csv logging descripion, move debug options to the end
Subject: [x265] rest: large cleanup of CLI opt docs

details:   http://hg.videolan.org/x265/rev/8181f224ec27
branches:  
changeset: 6588:8181f224ec27
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 25 16:06:00 2014 -0500
description:
rest: large cleanup of CLI opt docs
Subject: [x265] rest: improve CLI docs, fix some wrong descriptions, moar better

details:   http://hg.videolan.org/x265/rev/11d301883894
branches:  
changeset: 6589:11d301883894
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 25 16:56:15 2014 -0500
description:
rest: improve CLI docs, fix some wrong descriptions, moar better

I've moved --weightp and --refs to the ME section since they have no bearing
on slice decision and lots of impact on motion search.  Some new options are
still missing, will add those in a later commit

diffstat:

 doc/reST/cli.rst |  750 ++++++++++++++++++++++++++++--------------------------
 1 files changed, 391 insertions(+), 359 deletions(-)

diffs (truncated from 984 to 300 lines):

diff -r c52c2f8c3e32 -r 11d301883894 doc/reST/cli.rst
--- a/doc/reST/cli.rst	Tue Mar 25 12:54:41 2014 -0500
+++ b/doc/reST/cli.rst	Tue Mar 25 16:56:15 2014 -0500
@@ -2,589 +2,621 @@
 Command line Options
 *********************
 
+Note that unless an option is listed as **CLI ONLY** the option is also
+supported by x265_param_parse(). The CLI uses getopt to parse the
+command line options so the short or long versions may be used and the
+long options may be truncated to the shortest unambiguous abbreviation.
+Users of the API must pass x265_param_parse() the full option name.
+
+Preset and tune have special implications. The API user must call
+x265_param_default_preset() with the preset and tune parameters they
+wish to use, prior to calling x265_param_parse() to set any additional
+fields. The CLI does this for the user implicitly, so all CLI options
+are applied after the user's preset and tune choices, regarless of the
+order of the options on the command line.
+
+If there is an extra command line argument (not an option or an option
+value) the CLI will treat it as the input filename.  This effectively
+makes the :option:`--input` specifier optional for the input file. If
+there are two extra arguments, the second is treated as the output
+bitstream filename, making :option:`--output` also optional if the input
+filename was implied. This makes :command:`x265 in.yuv out.hevc` a valid
+command line. If there are more than two extra arguments, the CLI will
+consider this an error and abort.
+
+Generally, when an option expects a string value from a list of strings
+the user may specify the integer ordinal of the value they desire. ie:
+:option:`--log-level` 3 is equivalent to :option:`--log-level` debug.
+
 Standalone Executable Options
 =============================
 
-.. option:: --help/-h
+.. option:: --help, -h
 
-   Display help text
+	Display help text
 
-.. option:: --version/-V
+	**CLI ONLY**
 
-   Display version details
+.. option:: --version, -V
 
-.. option:: --cpuid
-   
-   Limit SIMD capability bitmap
-   
-   **Values:**  0:auto **(Default)**; 1:none
-   
-.. option:: --threads
-   
-   Number of threads for thread pool; 0: detect CPU core count **(Default)**
-   
-.. option:: --preset/-p
-   
-   Sets parameters to preselected values, trading off compression efficiency against 
-   encoding speed. These parameters are applied before all other input parameters are 
-   applied, and so you can override any parameters that these values control.   
-   
-   **Values:**  ultrafast, superfast, veryfast, faster, fast, medium **(Default)**, slow, slower, veryslow, placebo
+	Display version details
 
-.. option:: --tune/-t
+	**CLI ONLY**
 
-   Tune the settings for a particular type of source or situation. The changes will
-   be applied after --preset but before all other parameters.
-   
-   **Values:** psnr, ssim **(Default)**, zero-latency.
+.. option:: --asm <integer:false:string>, --no-asm
 
-.. option:: --frame-threads/-F
-    
-   Number of concurrently encoded frames
-  
-   **Range of values:** >=0.  **Default** = auto-determined from a formula based on the number of CPU cores
+	x265 will use all detected CPU SIMD architectures by default. You can
+	disable all assembly by using :option:`--no-asm` or you can specify
+	a comma separated list of SIMD architectures to use, matching these
+	strings: MMX2, SSE, SSE2, SSE3, SSSE3, SSE4, SSE4.1, SSE4.2, AVX, XOP, FMA4, AVX2, FMA3
 
-.. option::--log
-    
-   Logging level
+	Some higher architectures imply lower ones being present, this is
+	handled implicitly.
 
-   **Values:**  0:ERROR; 1:WARNING; 2:INFO **(Default)**; 3:DEBUG; 4:FULL -1:NONE
+	One may also directly supply the CPU capability bitmap as an integer.
 
-.. option:: --log 3
+.. option:: --threads <integer>
 
-   produces a log file that records results per frame
+	Number of threads for thread pool. Default 0 (detected CPU core
+	count)
 
-.. option:: --output/-o
+.. option:: --preset, -p <integer|string>
 
-   Bitstream output file name
+	Sets parameters to preselected values, trading off compression efficiency against 
+	encoding speed. These parameters are applied before all other input parameters are 
+	applied, and so you can override any parameters that these values control. Default medium
+
+	0. ultrafast
+	1. superfast
+	2. veryfast
+	3. faster
+	4. fast
+	5. medium
+	6. slow
+	7. slower
+	8. veryslow
+	9. placebo
+
+.. option:: --tune, -t <string>
+
+	Tune the settings for a particular type of source or situation. The changes will
+	be applied after --preset but before all other parameters. Default none
+
+	**Values:** psnr, ssim, zero-latency, fast-decode.
+
+.. option:: --frame-threads, -F <integer>
+
+	Number of concurrently encoded frames. Using a single frame thred
+	gives a slight improvement in compression, since the entire reference
+	frames are always available for motion compensation, but it has
+	severe performance implications. Default is an autodetected count
+	based on the number of CPU cores and whether WPP is enabled or not.
+
+.. option:: --log-level <int|string>
+
+	Logging level. Debug level enables per-frame QP, metric, and bitrate
+	logging. If a CSV file is being generated, debug level makes the log
+	be per-frame rather than per-encode. Full level enables hash and
+	weight logging. -1 disables all logging, except certain fatal
+	errors, and can be specified by the string "none". Default: 2 (info)
+
+	0. error
+	1. warning
+	2. info
+	3. debug
+	4. full
+
+.. option:: --csv <filename>
+
+	Writes encoding results to a comma separated value log file Creates
+	the file if it doesnt already exist, else adds one line per run.  if
+	:option:`--log-level` is debug or above, it writes one line per
+	frame. Default none
+
+.. option:: --output, -o <filename>
+
+	Bitstream output file name
+
+	**CLI ONLY**
 
 .. option:: --no-progress
 
-   Disable per-frame encoding progress reporting
+	Disable CLI periodic progress reports
 
-.. option:: --csv <filename>
-
-   Writes encoding results to a comma separated value log file
-   Creates the file if it doesnt already exist, else adds one line per run
-
-.. option:: --y4m
-    
-   Parse input stream as YUV4MPEG2 regardless of file extension
-
-------------------------------
+	**CLI ONLY**
 
 Input Options
 =============
 
-.. option:: --input
+.. option:: --input <filename>
 
-    Raw YUV or Y4M input file name
+	Input filename, only raw YUV or Y4M supported. Use single dash for
+	stdin. This option name will be implied for the first "extra"
+	command line argument.
 
-.. option:: --input-depth
+	**CLI ONLY**
 
-    Bit-depth of input file (YUV only).
+.. option:: --y4m
 
-    **Values:** any value between 8 and 16. Default is internal depth.
+	Parse input stream as YUV4MPEG2 regardless of file extension,
+	primarily intended for use with stdin. This option is implied if
+	the input filename has a ".y4m" extension
+	(ie: :option:`--input` - :option:`--y4m`)
 
-.. option:: --input-res
+	**CLI ONLY**
 
-    Source picture size [w x h], auto-detected if Y4M
+.. option:: --input-depth <integer>
 
-.. option:: --input-csp
+	YUV only: Bit-depth of input file or stream
 
-    Source color space parameter, auto detected if Y4M;
+	**Values:** any value between 8 and 16. Default is internal depth.
 
-    **Values:** 1:"i420" **(Default)**, or 3:"i444"
+	**CLI ONLY**
 
-.. option:: --fps
+.. option:: --input-res <wxh>
 
-    Source frame rate; auto-detected if Y4M;
+	YUV only: Source picture size [w x h]
 
-    **Range of values:** positive int or float, or num/denom
+	**CLI ONLY**
 
-.. option:: --seek
-    
-    Number of frames to skip at start of input file
+.. option:: --input-csp <integer|string>
 
-    **Range of values:** 0 to the number of frames in the video
-    **Default**: 0
+	YUV only: Source color space. Only i420 and i444 are supported at
+	this time.
 
-.. option:: --frames/-f
+	0. i400
+	1. i420
+	2. i422
+	3. i444
+	4. nv12
+	5. nv16
 
-    Number of frames to be encoded; 0 implies all **(Default)**
+.. option:: --fps <integer|float|numerator/denominator>
 
-    **Range of values:** 0 to the number of frames in the video
+	YUV only: Source frame rate
 
-------------------------------
+	**Range of values:** positive int or float, or num/denom
 
-Reconstructed video options (debugging)
-=======================================
+.. option:: --seek <integer>
 
-.. option:: --recon/-r
+	Number of frames to skip at start of input file. Default 0
 
-    Re-constructed image YUV or Y4M output file name
+	**CLI ONLY**
 
-.. option:: --recon-depth
+.. option:: --frames, -f <integer>
 
-    Bit-depth of output file 
+	Number of frames to be encoded. Default 0 (all)
 
-    **Default:** same as input bit depth
+	**CLI ONLY**
+
 
 Quad-Tree analysis
 ==================
 
-.. option:: --no-wpp
+.. option:: --wpp, --no-wpp
 
-    Disable Wavefront Parallel Processing
+	Enable Wavefront Parallel Processing. Default: Enabled
 
-.. option:: --wpp
+.. option:: --ctu, -s <64|32|16>
 
-    Enable Wavefront Parallel Processing **(Default)**
+	Maximum CU size (width and height). Default: 64
 
-.. option:: --ctu/-s
+.. option:: --tu-intra-depth <1..4>
 
-    Maximum CU size (width and height)
-   
-    **Values:** 16, 32, 64 **(Default)**
+	Max TU recursive depth for intra CUs. Default: 1
 
-.. option:: --tu-intra-depth
+.. option:: --tu-inter-depth <1..4>
 


More information about the x265-commits mailing list