1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-11 17:39:38 +00:00

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.
This commit is contained in:
wm4 2013-08-17 20:05:28 +02:00
parent 75298d9f0a
commit ab81af477c
2 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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},
}
};