diff options
author | Niklas Haas <git@nand.wakku.to> | 2015-03-25 04:40:28 +0100 |
---|---|---|
committer | Niklas Haas <git@nand.wakku.to> | 2015-04-04 15:36:13 +0200 |
commit | 586dc5574f519a336fda0e8c1d3c94e0c1df38b2 (patch) | |
tree | 8127e7cd89ebd4bb522c05333ae6bb4421913a8d /DOCS | |
parent | 00151e987d2a290eee27a107faa9a7050fc656c0 (diff) | |
download | mpv-586dc5574f519a336fda0e8c1d3c94e0c1df38b2.tar.bz2 mpv-586dc5574f519a336fda0e8c1d3c94e0c1df38b2.tar.xz |
vo_opengl: separate kernel and window
This makes the core much more elegant, reusable, reconfigurable and also
allows us to more easily add aliases for specific configurations.
Furthermore, this lets us apply a generic blur factor / window function
to arbitrary filters, so we can finally "mix and match" in order to
fine-tune windowing functions.
A few notes are in order:
1. The current system for configuring scalers is ugly and rapidly
getting unwieldy. I modified the man page to make it a bit more
bearable, but long-term we have to do something about it; especially
since..
2. There's currently no way to affect the blur factor or parameters of
the window functions themselves. For example, I can't actually
fine-tune the kaiser window's param1, since there's simply no way to
do so in the current API - even though filter_kernels.c supports it
just fine!
3. This removes some lesser used filters (especially those which are
purely window functions to begin with). If anybody asks, you can get
eg. the old behavior of scale=hanning by using
scale=box:scale-window=hanning:scale-radius=1 (and yes, the result is
just as terrible as that sounds - which is why nobody should have
been using them in the first place).
4. This changes the semantics of the "triangle" scaler slightly - it now
has an arbitrary radius. This can possibly produce weird results for
people who were previously using scale-down=triangle, especially if
in combination with scale-radius (for the usual upscaling). The
correct fix for this is to use scale-down=bilinear_slow instead,
which is an alias for triangle at radius 1.
In regards to the last point, in future I want to make it so that
filters have a filter-specific "preferred radius" (for the ones that
are arbitrarily tunable), once the configuration system for filters has
been redesigned (in particular in a way that will let us separate scale
and scale-down cleanly). That way, "triangle" can simply have the
preferred radius of 1 by default, while still being tunable. (Rather
than the default radius being hard-coded to 3 always)
Diffstat (limited to 'DOCS')
-rw-r--r-- | DOCS/man/vo.rst | 59 |
1 files changed, 33 insertions, 26 deletions
diff --git a/DOCS/man/vo.rst b/DOCS/man/vo.rst index 7111a8bbcc..da59a2a7c4 100644 --- a/DOCS/man/vo.rst +++ b/DOCS/man/vo.rst @@ -308,12 +308,16 @@ Available video output drivers are: This filter corresponds to the old ``lanczos3`` alias if the default radius is used, while ``lanczos2`` corresponds to a radius of 2. + (This filter is an alias for ``sinc``-windowed ``sinc``) + ``ewa_lanczos`` Elliptic weighted average Lanczos scaling. Also known as Jinc. Relatively slow, but very good quality. The radius can be controlled with ``scale-radius``. Increasing the radius makes the filter sharper but adds more ringing. + (This filter is an alias for ``jinc``-windowed ``jinc``) + ``ewa_lanczossharp`` A slightly sharpened version of ewa_lanczos, preconfigured to use an ideal radius and parameter. If your hardware can run it, this is @@ -344,37 +348,35 @@ Available video output drivers are: Set filter parameters. Ignored if the filter is not tunable. Currently, this affects the following filter parameters: - ``kaiser`` - Window parameter (``alpha``). Defaults to 6.33. - - ``mitchell`` - Spline parameters (``B`` and ``C``). Defaults to 1/3 for both. + bcspline + Spline parameters (``B`` and ``C``). Defaults to 0.5 for both. - ``gaussian`` + gaussian Scale parameter (``t``). Increasing this makes the result blurrier. Defaults to 1. - ``ewa_lanczos``, ``ewa_ginseng``, ``ewa_hanning`` - Jinc function scaling factor (also known as a blur factor). - Decreasing this makes the result sharper, increasing it makes it - blurrier. Defaults to 1. Note that setting this too low (eg. 0.5) - leads to bad results. It's recommended to stay between 0.9 and 1.1. - - ``sharpen3``, ``sharpen5`` + sharpen3, sharpen5 Sharpening strength. Increasing this makes the image sharper but adds more ringing and aliasing. Defaults to 0.5. - ``oversample`` + oversample Minimum distance to an edge before interpolation is used. Setting this to 0 will always interpolate edges, whereas setting it to 0.5 will never interpolate, thus behaving as if the regular nearest neighbour algorithm was used. Defaults to 0.0. - ``scale-radius=<r>`` + ``scale-blur=<value>`` + Kernel scaling factor (also known as a blur factor). Decreasing this + makes the result sharper, increasing it makes it blurrier (default 0). + If set to 0, the kernel's preferred blur factor is used. Note that + setting this too low (eg. 0.5) leads to bad results. It's generally + recommended to stick to values between 0.8 and 1.2. + + ``scale-radius=<value>`` Set radius for filters listed below, must be a float number between 1.0 and 16.0. Defaults to be 3.0 if not specified. - ``sinc``, ``lanczos``, ``blackman``, ``gaussian`` and all EWA filters (eg. ``ewa_lanczos``) + ``sinc`` and derivatives, ``jinc`` and derivatives, ``gaussian``, ``box`` and ``triangle`` Note that depending on filter implementation details and video scaling ratio, the radius that actually being used might be different @@ -389,6 +391,11 @@ Available video output drivers are: Note that this doesn't affect the special filters ``bilinear``, ``bicubic_fast`` or ``sharpen``. + ``scale-window=<window>`` + (Advanced users only) Choose a custom windowing function for the kernel. + Defaults to the filter's preferred window if unset. Use + ``scale-window=help`` to get a list of supported windowing functions. + ``scaler-resizes-only`` Disable the scaler if the video image is not resized. In that case, ``bilinear`` is used instead whatever is set with ``scale``. Bilinear @@ -469,26 +476,26 @@ Available video output drivers are: ``scale-down=<filter>`` Like ``scale``, but apply these filters on downscaling instead. If this - option is unset, the filter implied by ``scale`` will be applied. - - ``cscale-param1``, ``cscale-param2``, ``cscale-radius``, ``cscale-antiring`` - Set filter parameters and radius for ``cscale``. + option is unset, the filter implied by ``scale`` will be applied. Note + that this is also affected by the other options related to ``scale``, + ie. there is no ``scale-down-param1`` or similar. - See ``scale-param1``, ``scale-param2``, ``scale-radius`` and - ``scale-antiring``. - - ``tscale=<filter>``, ``tscale-param1``, ``tscale-param2``, ``tscale-antiring`` + ``tscale=<filter>`` The filter used for interpolating the temporal axis (frames). This is only used if ``interpolation`` is enabled. The only valid choices for ``tscale`` are separable convolution filters (use ``tscale=help`` - to get a list). The other options (``tscale-param1`` etc.) are - analogous to their ``scale`` counterparts. The default is ``oversample``. + to get a list). The default is ``oversample``. Note that the maximum supported filter radius is currently 3, and that using filters with larger radius may introduce issues when pausing or framestepping, proportional to the radius used. It is recommended to stick to a radius of 1 or 2. + ``cscale-radius``, ``tscale-radius``, ``cscale-blur``, ``tscale-blur``, etc. + Set filter parameters for ``cscale`` and ``tscale``, respectively. + + See the corresponding options for ``scale``. + ``linear-scaling`` Scale in linear light. This is automatically enabled if ``target-prim``, ``target-trc``, ``icc-profile`` or |