summaryrefslogtreecommitdiffstats
path: root/DOCS/man/options.rst
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-25 00:25:05 +0200
committerwm4 <wm4@nowhere>2019-10-25 00:25:05 +0200
commit77f309c94ff17f5627290a7a5a4477db714ecd1e (patch)
tree196c04befa3756aa12906634be6fa2c2e136a205 /DOCS/man/options.rst
parentb0827b4dc4417de36e596c5adde9cd28605fdf81 (diff)
downloadmpv-77f309c94ff17f5627290a7a5a4477db714ecd1e.tar.bz2
mpv-77f309c94ff17f5627290a7a5a4477db714ecd1e.tar.xz
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
Diffstat (limited to 'DOCS/man/options.rst')
-rw-r--r--DOCS/man/options.rst18
1 files changed, 12 insertions, 6 deletions
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=<value>``, ``--scale-param2=<value>``, ``--cscale-param1=<value>``, ``--cscale-param2=<value>``, ``--dscale-param1=<value>``, ``--dscale-param2=<value>``, ``--tscale-param1=<value>``, ``--tscale-param2=<value>``
- 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=<window>``, ``--cscale-wparam=<window>``, ``--cscale-wparam=<window>``, ``--tscale-wparam=<window>``
(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=<value>``
- 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