Index: libvo/vo_vdpau.c =================================================================== --- libvo/vo_vdpau.c (revision 31833) +++ libvo/vo_vdpau.c (working copy) @@ -161,7 +161,7 @@ static int top_field_first; static int flip; static int hqscaling; - +static int colorkey; static VdpDecoder decoder; static int decoder_max_refs; @@ -430,6 +430,13 @@ &vdp_flip_queue); CHECK_ST_ERROR("Error when calling vdp_presentation_queue_create") + if (colorkey) { + vdp_bg.red = ((vo_colorkey & 0x00ff0000) >> 16)/255.0f; + vdp_bg.green = ((vo_colorkey & 0x0000ff00) >> 8)/255.0f; + vdp_bg.blue = (vo_colorkey & 0x000000ff)/255.0f; + mp_msg(MSGT_VO, MSGL_INFO, "[vdpau] setting colorkey=0x%x as r=%g, g=%g, b=%g\n", + vo_colorkey, vdp_bg.red, vdp_bg.green, vdp_bg.blue); + } vdp_st = vdp_presentation_queue_set_background_color(vdp_flip_queue, &vdp_bg); CHECK_ST_ERROR("Error when calling vdp_presentation_queue_set_background_color") return 0; @@ -1187,6 +1194,7 @@ {"colorspace", OPT_ARG_INT, &colorspace, NULL}, {"force-mixer", OPT_ARG_BOOL, &force_mixer, NULL}, {"hqscaling", OPT_ARG_INT, &hqscaling, (opt_test_f)int_non_neg}, + {"colorkey", OPT_ARG_BOOL, &colorkey, NULL}, {NULL} }; @@ -1221,6 +1229,8 @@ " force-mixer\n" " Use the VDPAU mixer (default)\n" " Use noforce-mixer to allow BGRA output (disables all above options)\n" + " colorkey\n" + " Use the colorkey from MPlayer -colorkey option\n" ; static int preinit(const char *arg) @@ -1238,6 +1248,7 @@ colorspace = 1; force_mixer = 1; hqscaling = 0; + colorkey = 0; if (subopt_parse(arg, subopts) != 0) { mp_msg(MSGT_VO, MSGL_FATAL, help_msg); return -1; Index: DOCS/man/en/mplayer.1 =================================================================== --- DOCS/man/en/mplayer.1 (revision 31833) +++ DOCS/man/en/mplayer.1 (working copy) @@ -833,7 +833,7 @@ Changes the colorkey to an RGB value of your choice. 0x000000 is black and 0xffffff is white. Only supported by the cvidix, fbdev, svga, vesa, winvidix, xmga, xvidix, -xover, xv (see \-vo xv:ck), xvmc (see \-vo xv:ck) and directx video output +xover, xv (see \-vo xv:ck), xvmc (see \-vo xv:ck), vdpau and directx video output drivers. . .TP @@ -3585,6 +3585,8 @@ Makes temporal deinterlacers operate both on luma and chroma (default). Use nochroma\-deint to solely use luma and speed up advanced deinterlacing. Useful with slow video memory. +.IPs colorkey +Use the colorkey from MPlayer -colorkey option. .IPs pullup Try to skip deinterlacing for progressive frames, useful for watching telecined content, needs fast video hardware for high resolutions.