summaryrefslogtreecommitdiffstats
path: root/DOCS/man/options.rst
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2024-02-16 10:40:52 -0600
committerDudemanguy <random342@airmail.cc>2024-02-26 16:46:00 +0000
commitc72c47204d8b6f3a590e566325c9976f0774f591 (patch)
treeef9cb0dc0a26ea3d6ff48a18d29e457c0f6fd1c2 /DOCS/man/options.rst
parentc774b5f5173f8e43e2da0612437f7e3931df6acc (diff)
downloadmpv-c72c47204d8b6f3a590e566325c9976f0774f591.tar.bz2
mpv-c72c47204d8b6f3a590e566325c9976f0774f591.tar.xz
vo_gpu/vo_gpu_next: rework --alpha into --background option
The --alpha option currently covers two related but different concepts: whether or not to ignore the alpha component and possibly blending it with a background. Because of the way the option currently works, it is impossible to have a transparent window (which requires setting --alpha=yes) while blending it with the background at the same time. To solve this, let's rework it so it it superseded by the background option. --background controls what kind of background to set for the image if possible. It can be blended with the set background color, with tiles, or not blended at all (the last one is still broken on X11/mesa except for GLX, *sigh*). In this new paradigm, --alpha=no has no real purpose because you can simply set the background to color and whatever color you want for exactly the same effect. So the option is removed. Instead, the hint set by windowing backends (i.e. setting ra_ctx->opts.want_alpha) can by done with the --background option. As an aside, the colors in vo_gpu are currently bugged due to not pre-multiplying the alpha and it seems no one ever noticed. The next commit fixes that. vo_gpu_next support happens latter since it requires new things from libplacebo. Fixes #9615.
Diffstat (limited to 'DOCS/man/options.rst')
-rw-r--r--DOCS/man/options.rst40
1 files changed, 18 insertions, 22 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index e484b183ab..4e9392861b 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -6921,35 +6921,31 @@ them.
softsubbed ASS signs to match the video colors, but may cause
SRT subtitles or similar to look slightly off.
-``--alpha=<blend-tiles|blend|yes|no>``
- Decides what to do if the input has an alpha component.
-
- blend-tiles
+``--background=<none|color|tiles>``
+ If the frame has an alpha component, decide what kind of background, if any,
+ to blend it with. This does nothing if there is no alpha component.
+
+ color
+ Blend the frame against the background color (``--background-color``,
+ normally black).
+ tiles
Blend the frame against a 16x16 gray/white tiles background (default).
- blend
- Blend the frame against the background color (``--background``, normally
- black).
- yes
- Try to create a framebuffer with alpha component. This only makes sense
- if the video contains alpha information (which is extremely rare) or if
- you make the background color transparent. May not be supported on all
- platforms. If alpha framebuffers are unavailable, it silently falls
- back on a normal framebuffer. Note that if you set the ``--fbo-format``
- option to a non-default value, a format with alpha must be specified,
- or this won't work. Whether this really works depends on the windowing
- system and desktop environment.
- no
- Ignore alpha component.
+ none
+ Do not blend the frame and leave the alpha as is.
-``--opengl-rectangle-textures``
- Force use of rectangle textures (default: no). Normally this shouldn't have
- any advantages over normal textures. Note that hardware decoding overrides
- this flag. Could be removed any time.
+ Before mpv 0.38.0, this option used to accept a color value specifying the
+ background color. This is now done by the ``--background-color`` option.
+ Use that instead.
``--background-color=<color>``
Color used to draw parts of the mpv window not covered by video. See the
``--sub-color`` option for how colors are defined.
+``--opengl-rectangle-textures``
+ Force use of rectangle textures (default: no). Normally this shouldn't have
+ any advantages over normal textures. Note that hardware decoding overrides
+ this flag. Could be removed any time.
+
``--gpu-tex-pad-x``, ``--gpu-tex-pad-y``
Enlarge the video source textures by this many pixels. For debugging only
(normally textures are sized exactly, but due to hardware decoding interop