[x265-commits] [x265] rest: improve --output, add documentation for --repeat-he...

Steve Borho steve at borho.org
Wed Mar 26 04:47:04 CET 2014


details:   http://hg.videolan.org/x265/rev/c82b0f98e3fb
branches:  
changeset: 6599:c82b0f98e3fb
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 25 22:38:04 2014 -0500
description:
rest: improve --output, add documentation for --repeat-headers
Subject: [x265] param: ignore leading double-slash in names passed to x265_param_parse

details:   http://hg.videolan.org/x265/rev/2cda667fd786
branches:  
changeset: 6600:2cda667fd786
user:      Steve Borho <steve at borho.org>
date:      Tue Mar 25 22:46:36 2014 -0500
description:
param: ignore leading double-slash in names passed to x265_param_parse

It might be ambiguous to API users whether these are required, looking at our
documentation, so ignore them if they do.

diffstat:

 doc/reST/cli.rst        |  21 ++++++++++++++++++++-
 source/common/param.cpp |   4 ++++
 2 files changed, 24 insertions(+), 1 deletions(-)

diffs (50 lines):

diff -r 2404a23fb957 -r 2cda667fd786 doc/reST/cli.rst
--- a/doc/reST/cli.rst	Tue Mar 25 22:09:00 2014 -0500
+++ b/doc/reST/cli.rst	Tue Mar 25 22:46:36 2014 -0500
@@ -115,7 +115,12 @@ Standalone Executable Options
 
 .. option:: --output, -o <filename>
 
-	Bitstream output file name
+	Bitstream output file name. If there are two extra CLI options, the
+	first is implicitly the input filename and the second is the output
+	filename, making the :option:`--output` option optional.
+
+	The output file will always contain a raw HEVC bitstream, the CLI
+	does not support any container file formats.
 
 	**CLI ONLY**
 
@@ -708,4 +713,18 @@ Debugging options
 
 	**CLI ONLY**
 
+API-only Options
+================
+
+These options are not exposed in the CLI because they are only useful to
+applications which use libx265 as a shared library.  These are available
+via x265_param_parse()
+
+.. option:: --repeat-headers
+
+	If enabled, x265 will emit VPS, SPS, and PPS headers with every
+	keyframe. This is intended for use when you do not have a container
+	to keep the stream headers for you and you want keyframes to be
+	random access points.
+
 .. vim: noet
diff -r 2404a23fb957 -r 2cda667fd786 source/common/param.cpp
--- a/source/common/param.cpp	Tue Mar 25 22:09:00 2014 -0500
+++ b/source/common/param.cpp	Tue Mar 25 22:46:36 2014 -0500
@@ -453,6 +453,10 @@ int x265_param_parse(x265_param *p, cons
     if (!name)
         return X265_PARAM_BAD_NAME;
 
+    // skip -- prefix if provided
+    if (name[0] == '-' && name[1] == '-')
+        name += 2;
+
     // s/_/-/g
     if (strlen(name) + 1 < sizeof(nameBuf) && strchr(name, '_'))
     {


More information about the x265-commits mailing list