[x265] [PATCH] cleaning up CLI options, and their params
Steve Borho
steve at borho.org
Thu Jun 27 20:36:57 CEST 2013
On Thu, Jun 27, 2013 at 7:09 AM, <sumalatha at multicorewareinc.com> wrote:
> # HG changeset patch
> # User sumalatha
> # Date 1372334962 -19800
> # Node ID 8c818d8d27e4786cd20efe4122ece249701d679a
> # Parent 3b93256a844bbbe5584ec1ae7b95e618bf955d69
> cleaning up CLI options, and their params
>
Thanks for taking on this task. This work will need to happen one or two
parameters at a time.
In a single patch you will need to remove a parameter from x265.h, remove
its CLI option from
x265opts.h, fixup the configure() function in encoder.cpp so that a sane
default is used in
place of the former parameter, and also remove validation checks for that
parameter from common.cpp.
Even better is if you determine that a parameter is truly not used anymore,
it should be removed
from TEncCfg (including its access functions).
> diff -r 3b93256a844b -r 8c818d8d27e4 source/x265opts.h
> --- a/source/x265opts.h Thu Jun 27 16:14:14 2013 +0530
> +++ b/source/x265opts.h Thu Jun 27 17:39:22 2013 +0530
> @@ -27,12 +27,7 @@
> HELP("Quad-Tree analysis:")
> OPT("wpp", param->bEnableWavefront, no_argument, 0,
> "Enable Wavefront Parallel Processing")
> OPT("no-wpp", param->bEnableWavefront, no_argument, 0,
> "Disable Wavefront Parallel Processing")
> -OPT("ctu", param->maxCUSize, required_argument, 's',
> "Maximum CU size (default: 64x64)")
> -OPT("cu-depth", param->maxCUDepth, required_argument, 'd',
> "Maximum CU recursion depth (default: 4)")
> -OPT("tu-maxlog2", param->tuQTMaxLog2Size, required_argument, 0,
> "Maximum TU size in logarithm base 2")
> -OPT("tu-minlog2", param->tuQTMinLog2Size, required_argument, 0,
> "Minimum TU size in logarithm base 2")
> -OPT("tu-intra-depth", param->tuQTMaxIntraDepth, required_argument, 0,
> "Max TU recursive depth for intra CUs")
> -OPT("tu-inter-depth", param->tuQTMaxInterDepth, required_argument, 0,
> "Max TU recursive depth for inter CUs")
>
maxCUSize is a param we need to keep, but maxCUDepth is not (it should be
calculated based on maxCUSize).
tuQTMaxLog2Size and tuQTMinLog2Size can both be calculated as well, I
think. tuQTMaxIntraDepth and tuQTMaxInterDepth must stay, they are key
tuning parameters.
>
> HELP("Temporal / motion search options:")
> OPT("me", param->searchMethod, required_argument,
> 0, "Motion search method 0:dia 1:hex 2:umh 3:star(default) 4:hm-orig
> 5:full")
> @@ -44,13 +39,12 @@
> OPT("no-amp", param->bEnableAMP, no_argument,
> 0, "Disable asymmetric motion partitions")
> OPT("rdo", param->bEnableRDO, no_argument,
> 0, "Enable rate distortion-based mode decision")
> OPT("no-rdo", param->bEnableRDO, no_argument,
> 0, "Enable mode decision without rate distortion optimization")
> -OPT("max-merge", param->maxNumMergeCand, required_argument,
> 0, "Maximum number of merge candidates (default: 5)")
>
maxNumMergeCand must stay, it is a perf tuning parameter
> +
> OPT("fdm", param->bEnableFastMergeDecision, no_argument,
> 0, "Enable fast decision for Merge RD Cost")
> OPT("no-fdm", param->bEnableFastMergeDecision, no_argument,
> 0, "Disable fast decision for Merge RD Cost")
> OPT("early-skip", param->bEnableEarlySkip, no_argument,
> 0, "Enable early SKIP detection")
> OPT("no-early-skip", param->bEnableEarlySkip, no_argument,
> 0, "Disable early SKIP detection")
> OPT("merge-level", param->log2ParallelMergeLevel, required_argument,
> 0, "Parallel merge estimation region")
> -OPT("tmvp", param->TMVPModeId, required_argument,
> 0, "TMVP mode 0:disabled 1:enabled(default) 2:auto")
> OPT("fast-cbf", param->bEnableCbfFastMode, no_argument,
> 0, "Enable Cbf fast mode")
> OPT("no-fast-cbf", param->bEnableCbfFastMode, no_argument,
> 0, "Disable Cbf fast mode")
>
All of these flags need to be tested to see if they still have any effect
after all our mode-decision changes.
I suspect log2ParallelMergeLevel and TMVPModeId can be hidden from the user
- either fixed or auto-configured based on other inputs.
>
> @@ -60,8 +54,7 @@
> OPT("no-tskip", param->bEnableTransformSkip, no_argument,
> 0, "Disable intra transform skipping")
> OPT("tskip-fast", param->bEnableTSkipFast, no_argument,
> 0, "Enable fast intra transform skipping")
> OPT("no-tskip-fast", param->bEnableTSkipFast, no_argument,
> 0, "Disable fast intra transform skipping")
> -OPT("strong-intra-smoothing", param->bEnableStrongIntraSmoothing,
> no_argument, 0, "Enable strong intra smoothing for 32x32 blocks")
> -OPT("no-strong-intra-smoothing", param->bEnableStrongIntraSmoothing,
> no_argument, 0, "Disable strong intra smoothing for 32x32 blocks")
> +
>
Does bEnableStrongIntraSmoothing not do anything?
> OPT("constrained-intra", param->bEnableConstrainedIntra, no_argument,
> 0, "Constrained intra prediction (use only intra coded reference pixels)")
> OPT("no-constrained-intra", param->bEnableConstrainedIntra, no_argument,
> 0, "Disable constrained intra prediction (use only intra coded reference
> pixels)")
>
> @@ -74,7 +67,7 @@
>
> HELP("QP and rate distortion options:")
> OPT("qp", param->qp, required_argument,
> 'q', "Base QP for CQP mode (default: 30)")
> -OPT("cbqpoffs", param->cbQpOffset, required_argument,
> 0, "Chroma Cb QP Offset")
> +
>
Why remove the Cb offset and not the Cr offset?
> OPT("crqpoffs", param->crQpOffset, required_argument,
> 0, "Chroma Cr QP Offset")
> OPT("aqselect", param->bEnableAdaptQpSelect, no_argument,
> 0, "Adaptive QP selection")
> OPT("aq", param->bEnableAdaptiveQP, no_argument,
> 0, "Enable QP adaptation based on a psycho-visual model")
>
I suspect all of AQ is broken, and needs to be hidden from the user
interface until it is re-imlemented based on the x264 design. But I don't
know if the Cb and Cr offsets work without AQ.
--
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20130627/9606e787/attachment.html>
More information about the x265-devel
mailing list