From 77f309c94ff17f5627290a7a5a4477db714ecd1e Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 25 Oct 2019 00:25:05 +0200 Subject: vo_gpu, options: don't return NaN through API Internally, vo_gpu uses NaN for some options to indicate a default value that is different depending on the context (e.g. different scalers). There are 2 problems with this: 1. you couldn't reset the options to their defaults 2. NaN is a damn mess and shouldn't be part of the API The option parser already rejected NaN explicitly, which is why 1. didn't work. Regarding 2., JSON might be a good example, and actually caused a bug report. Fix this by mapping NaN to the special value "default". I think I'd prefer other mechanisms (maybe just having every scaler expose separate options?), but for now this will do. See you in a future commit, which painfully deprecates this and replaces it with something else. I refrained from using "no" (my favorite magic value for "unset" etc.) because then I'd have e.g. make --no-scale-param1 work, which in addition to a lot of effort looks dumb and nobody will use it. Here's also an apology for the shitty added test script. Fixes: #6691 --- DOCS/man/options.rst | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'DOCS/man/options.rst') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index e147883f29..d537380e78 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -4404,8 +4404,10 @@ The following video options are currently all specific to ``--vo=gpu`` and smooth. ``--scale-param1=``, ``--scale-param2=``, ``--cscale-param1=``, ``--cscale-param2=``, ``--dscale-param1=``, ``--dscale-param2=``, ``--tscale-param1=``, ``--tscale-param2=`` - Set filter parameters. Ignored if the filter is not tunable. Currently, - this affects the following filter parameters: + Set filter parameters. By default, these are set to the special string + ``default``, which maps to a scaler-specific default value. Ignored if the + filter is not tunable. Currently, this affects the following filter + parameters: bcspline Spline parameters (``B`` and ``C``). Defaults to 0.5 for both. @@ -4477,8 +4479,10 @@ The following video options are currently all specific to ``--vo=gpu`` and ``--scale-wparam=``, ``--cscale-wparam=``, ``--cscale-wparam=``, ``--tscale-wparam=`` (Advanced users only) Configure the parameter for the window function given - by ``--scale-window`` etc. Ignored if the window is not tunable. Currently, - this affects the following window parameters: + by ``--scale-window`` etc. By default, these are set to the special string + ``default``, which maps to a window-specific default value. Ignored if the + window is not tunable. Currently, this affects the following window + parameters: kaiser Window parameter (alpha). Defaults to 6.33. @@ -5524,8 +5528,10 @@ The following video options are currently all specific to ``--vo=gpu`` and the display. ``--tone-mapping-param=`` - Set tone mapping parameters. Ignored if the tone mapping algorithm is not - tunable. This affects the following tone mapping algorithms: + Set tone mapping parameters. By default, this is set to the special string + ``default``, which maps to an algorithm-specific default value. Ignored if + the tone mapping algorithm is not tunable. This affects the following tone + mapping algorithms: clip Specifies an extra linear coefficient to multiply into the signal -- cgit v1.2.3