[x265] [PATCH] Fix CLI parsing for MV-HEVC Encode
Kirithika Kalirathnam
kirithika at multicorewareinc.com
Mon Sep 30 08:28:23 UTC 2024
>From 7d661649d87789e587f80307e6574e6b08003bf1 Mon Sep 17 00:00:00 2001
From: Kirithika <kirithika at multicorewareinc.com>
Date: Mon, 30 Sep 2024 13:20:18 +0530
Subject: [PATCH] Fix CLI parsing for MV-HEVC Encode
This commit does the following:
1.For encodes with --multiview-config enabled, it allows only one extra
argument in the CLI that would be treated as --output(output bitstream)
2.Update docs
---
doc/reST/cli.rst | 7 +++++--
source/x265cli.cpp | 7 ++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/doc/reST/cli.rst b/doc/reST/cli.rst
index 95cb37f20..c00240187 100755
--- a/doc/reST/cli.rst
+++ b/doc/reST/cli.rst
@@ -25,7 +25,9 @@ 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.y4m out.hevc` a valid
command line. If there are more than two extra arguments, the CLI will
-consider this an error and abort.
+consider this an error and abort.For Multiview encodes i.e encodes with
+:option:`--multiview-config` , only one extra command line argument is
+allowed and the CLI will treat it as the output filename.
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:
@@ -2930,7 +2932,8 @@ Multiview Encode Options
Other input parameters such as input-csp/input-depth/input-res/fps must
be configured through
- normal CLI and is expected to be same for all views.
+ normal CLI and is expected to be same for all views.The input
filename(s):option:`--input` alone will be inferred
+ from the config file.
**CLI_ONLY**
diff --git a/source/x265cli.cpp b/source/x265cli.cpp
index 40eac4c8d..efd9b2fe0 100755
--- a/source/x265cli.cpp
+++ b/source/x265cli.cpp
@@ -806,11 +806,16 @@ namespace X265_NS {
}
}
- if (param->numViews < 2)
+#if !ENABLE_MULTIVIEW
+ if (optind < argc && !(*inputfn[0]))
+ strncpy(inputfn[0], argv[optind++], 1024);
+#else
+ if (!this->multiViewConfig)
{
if (optind < argc && !(*inputfn[0]))
strncpy(inputfn[0], argv[optind++], 1024);
}
+#endif
if (optind < argc && !outputfn)
outputfn = argv[optind++];
if (optind < argc)
--
2.28.0.windows.1
*Thanks,*
*Kirithika*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20240930/b5d75442/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-mv-hevc-cli-parsing-patch1.diff
Type: application/octet-stream
Size: 2393 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20240930/b5d75442/attachment.obj>
More information about the x265-devel
mailing list