summaryrefslogtreecommitdiffstats
path: root/video/out/x11_common.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-30 00:37:44 +0200
committerwm4 <wm4@nowhere>2013-09-30 00:47:24 +0200
commitc000a08de2d967aff85d0c19b3e8dd3e762a76c2 (patch)
treedeceb1b2e06ea9144ee470a18276201d208e4be8 /video/out/x11_common.h
parent00d41cc5b065cc809ab64901aca3dcaae8035869 (diff)
downloadmpv-c000a08de2d967aff85d0c19b3e8dd3e762a76c2.tar.bz2
mpv-c000a08de2d967aff85d0c19b3e8dd3e762a76c2.tar.xz
x11: remove colormap code, always request TrueColor visuals
vo_x11 had a clever trick to implement a video equalizer: it requested a DirectColor visual. This is a X11 mechanism which allows you to specify a lookup table for each color channel. Effectively, this is a safe override for the graphic card's gamma ramp. If X thinks the window deserves priority over other windows in the system, X would temporarily switch the gamma ramp so that DirectColor visuals can be displayed as the application intends. (I'm not sure what the exact policy is, but in practice, this meant the equalizer worked when the mouse button was inside the window.) But all in all, this is just lots of useless code for a feature that is rarely ever useful. Remove it and use the libswscale equalizer instead. (This comes without a cost, since vo_x11 already uses libswscale.) One worry was that using DirectColor could have made it work better in 8-bit paletted mode. But this is not the case: there's no difference, and in both cases, the video looks equally bad.
Diffstat (limited to 'video/out/x11_common.h')
-rw-r--r--video/out/x11_common.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/video/out/x11_common.h b/video/out/x11_common.h
index c085a7af41..7cd848245d 100644
--- a/video/out/x11_common.h
+++ b/video/out/x11_common.h
@@ -94,14 +94,6 @@ struct vo_x11_state {
unsigned int oldfuncs;
XComposeStatus compose_status;
- int vo_gamma;
- int vo_brightness;
- int vo_contrast;
-
- Colormap cmap;
- XColor cols[256];
- int cm_size, red_mask, green_mask, blue_mask;
-
/* XShm stuff */
int ShmCompletionEvent;
/* Number of outstanding XShmPutImage requests */
@@ -131,8 +123,6 @@ struct vo_x11_state {
int vo_x11_init(struct vo *vo);
void vo_x11_uninit(struct vo *vo);
int vo_x11_check_events(struct vo *vo);
-uint32_t vo_x11_set_equalizer(struct vo *vo, const char *name, int value);
-uint32_t vo_x11_get_equalizer(struct vo *vo, const char *name, int *value);
bool vo_x11_screen_is_composited(struct vo *vo);
void fstype_help(void);
void vo_x11_config_vo_window(struct vo *vo, XVisualInfo *vis,