From a7230dfed0bf563fd9f4673c3020d1cf8461febf Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 31 Oct 2019 16:45:28 +0100 Subject: sws_utils, zimg: destroy vo_x11 and vo_drm performance Raise swscale and zimg default parameters. This restores screenshot quality settings (maybe) unset in the commit before. Also expose some more libswscale and zimg options. Since these options are also used for VOs like x11 and drm, this will make x11/drm/etc. much slower. For compensation, provide a profile that sets the old option values: sw-fast. I'm also enabling zimg here, just as an experiment. The core problem is that we have a single set of command line options which control the settings used for most swscale/zimg uses. This was done in the previous commit. It cannot differentiate between the VOs, which need to be realtime and may accept/require lower quality options, and things like screenshots or vo_image, which can be slower, but should not sacrifice quality by default. Should this have two sets of options or something similar to do the right thing depending on the code which calls libswscale? Maybe. Or should I just ignore the problem, make it someone else's problem (users who want to use software conversion VOs), provide a sub-optimal solution, and call it a day? Definitely, sounds good, pushing to master, goodbye. --- DOCS/man/options.rst | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) (limited to 'DOCS/man/options.rst') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index c8af27bcb7..76f39dc29f 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -3833,6 +3833,21 @@ Software Scaler ``--sws-cvs=`` Software scaler chroma vertical shifting. See ``--sws-scaler``. +``--sws-bitexact=`` + Unknown functionality (default: no). Consult libswscale source code. The + primary purpose of this, as far as libswscale API goes), is to produce + exactly the same output for the same input on all platforms (output has the + same "bits" everywhere, thus "bitexact"). Typically disables optimizations. + +``--sws-fast=`` + Allow optimizations that help with performance, but reduce quality (default: + no). + + VOs like ``drm`` and ``x11`` will benefit a lot from using ``--sws-fast``. + You may need to set other options, like ``--sws-scaler``. The builtin + ``sws-fast`` profile sets this option and some others to gain performance + for reduced quality. + ``--sws-allow-zimg=`` Allow using zimg (if the component using the internal swscale wrapper explicitly allows so). In this case, zimg *may* be used, if the internal @@ -3846,14 +3861,34 @@ Software Scaler correctly, a verbose priority log message will indicate whether zimg is being used. - Currently, barely anything uses this. + Most things which need software conversion can make use of this. -``--zimg--scaler=`` +``--zimg--scaler=`` Zimg luma scaler to use (default: bilinear). +``--zimg-scaler-param-a=``, ``--zimg-scaler-param-b=`` + Set scaler parameters. By default, these are set to the special string + ``default``, which maps to a scaler-specific default value. Ignored if the + scaler is not tunable. + + ``lanczos`` + ``--zimg-scaler-param-a`` is the number of taps. + + ``bicubic`` + a and b are the bicubic b and c parameters. + +``--zimg-scaler-chroma=...`` + Same as ``--zimg--scaler``, for for chroma interpolation. + +``--zimg-scaler-chroma-param-a``, ``--zimg-scaler-chroma-param-b`` + Same as ``--zimg-scaler-param-a`` / ``--zimg-scaler-param-b``, for chroma. + +``--zimg-dither=`` + Dithering (default: random). + ``--zimg-fast=`` Allow optimizations that help with performance, but reduce quality (default: - yes). Currently, this may simplify gamma conversion operations. + no). Currently, this may simplify gamma conversion operations. Audio Resampler -- cgit v1.2.3