summaryrefslogtreecommitdiffstats
path: root/DOCS/man
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-07-14 22:52:27 +0200
committerwm4 <wm4@nowhere>2020-07-15 22:59:17 +0200
commit2a89da0c8548bec624f7f60f0b08d98602c7d394 (patch)
treed898c6ca78a61658041406981f51531510d6f832 /DOCS/man
parentf1290f709509b950ee9d7131bfcb6e1be901f69d (diff)
downloadmpv-2a89da0c8548bec624f7f60f0b08d98602c7d394.tar.bz2
mpv-2a89da0c8548bec624f7f60f0b08d98602c7d394.tar.xz
zimg: add slice threading and use it by default
This probably makes it much faster (I wouldn't know, I didn't run any benchmarks ). Seems to work as well (although I'm not sure, it's not like I'd perform rigorous tests). The scale_zimg test seems to mysteriously treat color in fully transparent alpha differently, which makes no sense, and isn't visible (but makes the test fail). I can't be bothered with investigating this more. What do you do with failing tests? Correct, you disable them. Or rather, you disable whatever appears to cause them to fail, which is the threading in this case. This change follows mostly the tile_example.cpp. The slice size uses a minimum of 64, which was suggested by the zimg author. Some of this commit is a bit inelegant and weird, such as recomputing the scale factor for every slice, or the way slice_h is managed. Too lazy to make this more elegant. zimg git had a regressio around active_region (which is needed by the slicing), which was fixed in commit 83071706b2e6bc634. Apparently, the bug was never released, so just add a warning to the manpage.
Diffstat (limited to 'DOCS/man')
-rw-r--r--DOCS/man/options.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index b85b67c991..95bec1c3d3 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -4283,6 +4283,17 @@ Software Scaler
``--zimg-dither=<no|ordered|random|error-diffusion>``
Dithering (default: random).
+``--zimg-threads=<auto|integer>``
+ Set the maximum number of threads to use for scaling (default: auto).
+ ``auto`` uses the number of logical cores on the current machine. Note that
+ the scaler may use less threads (or even just 1 thread) depending on stuff.
+ Passing a value of 1 disables threading and always scales the image in a
+ single operation. Higher thread counts waste resources, but make it
+ typically faster.
+
+ Note that some zimg git versions had bugs that will corrupt the output if
+ threads are used.
+
``--zimg-fast=<yes|no>``
Allow optimizations that help with performance, but reduce quality (default:
yes). Currently, this may simplify gamma conversion operations.