diff options
author | wm4 <wm4@nowhere> | 2013-08-24 19:37:34 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-08-24 19:40:18 +0200 |
commit | 47e92b2f884d4dd831e3e59ae9c692b460ef8dc3 (patch) | |
tree | 545d089a4a1be158c135fd43eaa33d4d93538925 /video/out/gl_video.c | |
parent | ba4654b72977b915e5f09d23ce02e099c2bd9d0f (diff) | |
download | mpv-47e92b2f884d4dd831e3e59ae9c692b460ef8dc3.tar.bz2 mpv-47e92b2f884d4dd831e3e59ae9c692b460ef8dc3.tar.xz |
video: handle video output levels with mp_image_params
Until now, video output levels (obscure feature, like using TV screens
that require RGB output in limited range, similar to YUY) still required
handling of VOCTRL_SET_YUV_COLORSPACE. Simplify this, and use the new
mp_image_params code. This gets rid of some code. VOCTRL_SET_YUV_COLORSPACE
is not needed at all anymore in VOs that use the reconfig callback. The
result of VOCTRL_GET_YUV_COLORSPACE is now used only used for the
colormatrix related properties (basically, for display on OSD). For
other VOs, VOCTRL_SET_YUV_COLORSPACE will be sent only once after config
instead of twice.
Diffstat (limited to 'video/out/gl_video.c')
-rw-r--r-- | video/out/gl_video.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c index 6fb41e5814..e285be252a 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -1973,6 +1973,12 @@ void gl_video_config(struct gl_video *p, struct mp_image_params *params) p->image_dw = params->d_w; p->image_dh = params->d_h; p->image_params = *params; + + struct mp_csp_details csp = MP_CSP_DETAILS_DEFAULTS; + csp.levels_in = params->colorlevels; + csp.levels_out = params->outputlevels; + csp.format = params->colorspace; + p->colorspace = csp; } void gl_video_set_output_depth(struct gl_video *p, int r, int g, int b) @@ -2046,16 +2052,6 @@ bool gl_video_get_csp_override(struct gl_video *p, struct mp_csp_details *csp) return true; } -bool gl_video_set_csp_override(struct gl_video *p, struct mp_csp_details *csp) -{ - if (p->is_yuv) { - p->colorspace = *csp; - update_all_uniforms(p); - return true; - } - return false; -} - bool gl_video_set_equalizer(struct gl_video *p, const char *name, int val) { if (mp_csp_equalizer_set(&p->video_eq, name, val) >= 0) { |