[x265] [PATCH 1 of 4 RFC] cli: hoist param_default() call from showHelp
Steve Borho
steve at borho.org
Fri Jun 5 20:28:02 CEST 2015
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1433521775 18000
# Fri Jun 05 11:29:35 2015 -0500
# Node ID 8a269d0d0d821865cf9f0c0732c590970f330004
# Parent 43afbde189f390c74f580b0d377731b498c7f7ce
cli: hoist param_default() call from showHelp
This way we can use the api-> version of param_default
diff -r 43afbde189f3 -r 8a269d0d0d82 source/x265.cpp
--- a/source/x265.cpp Fri Jun 05 11:03:10 2015 +0530
+++ b/source/x265.cpp Fri Jun 05 11:29:35 2015 -0500
@@ -213,7 +213,10 @@
}
if (bShowHelp)
+ {
+ api->param_default(param);
showHelp(param);
+ }
for (optind = 0;; )
{
@@ -225,6 +228,7 @@
switch (c)
{
case 'h':
+ api->param_default(param);
showHelp(param);
break;
@@ -313,7 +317,10 @@
}
if (argc <= 1)
+ {
+ api->param_default(param);
showHelp(param);
+ }
if (inputfn == NULL || outputfn == NULL)
{
diff -r 43afbde189f3 -r 8a269d0d0d82 source/x265cli.h
--- a/source/x265cli.h Fri Jun 05 11:03:10 2015 +0530
+++ b/source/x265cli.h Fri Jun 05 11:29:35 2015 -0500
@@ -229,7 +229,6 @@
static void showHelp(x265_param *param)
{
int level = param->logLevel;
- x265_param_default(param);
printVersion(param);
#define OPT(value) (value ? "enabled" : "disabled")
More information about the x265-devel
mailing list