diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-11-15 15:21:40 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-11-15 17:03:41 +0200 |
commit | 98ee8dd15976501157c894ec385c4c551c6614ad (patch) | |
tree | 0ca98500193f1e76da5ecc15d2076abec9caee59 /libvo/x11_common.c | |
parent | 201bef7ee150f9d852996b379c926ba0c47320d5 (diff) | |
download | mpv-98ee8dd15976501157c894ec385c4c551c6614ad.tar.bz2 mpv-98ee8dd15976501157c894ec385c4c551c6614ad.tar.xz |
Add yuv_colorspace property, implemented in vo_vdpau and vo_xv
Add a property to select YUV colorspace. Currently implemented only in
vo_vdpau and vo_xv. Allows switching between BT.601, BT.709 and
SMPTE-240M (vdpau only).
The xv support uses the "XV_ITURBT_709" attribute. At least my NVIDIA
card supports that; I don't know whether other xv implementations do.
Bind the colorspace switch to the 'c' key by default. 'c' is currently
used by vo_sdl for some fullscreen mode change thing, but at the moment
that does not conflict and if it will in the future then vo_sdl can
change.
VDPAU part based on a patch from Lauri Mylläri <lauri.myllari@gmail.com>
Diffstat (limited to 'libvo/x11_common.c')
-rw-r--r-- | libvo/x11_common.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 621880e137..e617aad082 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -1651,7 +1651,7 @@ double vo_vm_get_fps(struct vo *vo) if (!XF86VidModeGetModeLine(x11->display, x11->screen, &clock, &modeline)) return 0; if (modeline.privsize) - Xfree(modeline.private); + XFree(modeline.private); return 1e3 * clock / modeline.htotal / modeline.vtotal; } #endif @@ -1906,6 +1906,9 @@ int vo_xv_set_eq(struct vo *vo, uint32_t xv_port, char *name, int value) else if (!strcmp(attributes[i].name, "XV_BLUE_INTENSITY") && (!strcasecmp(name, "blue_intensity"))) port_value = value; + else if (!strcmp(attributes[i].name, "XV_ITURBT_709") + && (!strcasecmp(name, "bt_709"))) + port_value = value; else continue; @@ -1987,6 +1990,9 @@ int vo_xv_get_eq(struct vo *vo, uint32_t xv_port, char *name, int *value) else if (!strcmp(attributes[i].name, "XV_BLUE_INTENSITY") && (!strcasecmp(name, "blue_intensity"))) *value = val; + else if (!strcmp(attributes[i].name, "XV_ITURBT_709") + && (!strcasecmp(name, "bt_709"))) + *value = val; else continue; |