summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-08-17 20:05:28 +0200
committerwm4 <wm4@nowhere>2013-08-17 20:06:21 +0200
commitab81af477cd58d03a0c2762f4b465a36b2aead34 (patch)
tree7744cc3f049bb623e101c9b38057eb545eb9303b
parent75298d9f0afa4adda99cf32459bb68f7967960f7 (diff)
downloadmpv-ab81af477cd58d03a0c2762f4b465a36b2aead34.tar.bz2
mpv-ab81af477cd58d03a0c2762f4b465a36b2aead34.tar.xz
vo_vdpau: use color close to black as default colorkey (instead of green)
The VDPAU default colorkey, although it seems to be driver specific, is usually green. This is a pretty annoying color, and you usually see it briefly (as flashes) if the VDPAU window resizes. Change it to some shade of black. The new default color is close to what MPlayer picks as colorkey (and apparently it worked well for them): VdpColor vdp_bg = {0.01, 0.02, 0.03, 0}; Since our OPT_COLOR can set 8 bit colors only, we use '#020507' instead, which should be the same assuming 8 bit colors. Obviously, you can't use black, because black is a way too common color, and would make it too easy to observe the colorkey effect when e.g. moving a terminal with black background over the video window.
-rw-r--r--DOCS/man/en/vo.rst6
-rw-r--r--video/out/vo_vdpau.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/DOCS/man/en/vo.rst b/DOCS/man/en/vo.rst
index d37b679303..1199b6b10a 100644
--- a/DOCS/man/en/vo.rst
+++ b/DOCS/man/en/vo.rst
@@ -136,9 +136,9 @@ Available video output drivers are:
``colorkey=<#RRGGBB|#AARRGGBB>``
Set the VDPAU presentation queue background color, which in practice
is the colorkey used if VDPAU operates in overlay mode (default:
- ``#00000000``, meaning do not change the VDPAU default). If the alpha
- component of this value is 0, the default VDPAU colorkey will be used
- instead (which is usually green).
+ ``#020507``, some shade of black). If the alpha component of this value
+ is 0, the default VDPAU colorkey will be used instead (which is usually
+ green).
Using the VDPAU frame queueing functionality controlled by the queuetime
options makes mpv's frame flip timing less sensitive to system CPU load and
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c
index addb155c56..9d08ad376b 100644
--- a/video/out/vo_vdpau.c
+++ b/video/out/vo_vdpau.c
@@ -1556,7 +1556,10 @@ const struct vo_driver video_out_vdpau = {
OPT_INT("queuetime_fs", flip_offset_fs, 0, OPTDEF_INT(50)),
OPT_INTRANGE("output_surfaces", num_output_surfaces, 0,
2, MAX_OUTPUT_SURFACES, OPTDEF_INT(3)),
- OPT_COLOR("colorkey", colorkey, 0),
+ OPT_COLOR("colorkey", colorkey, 0,
+ .defval = &(const struct m_color) {
+ .r = 2, .g = 5, .b = 7, .a = 255,
+ }),
{NULL},
}
};