From 03cf150ff3516789d581214177f291d46310aaf4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 22 Aug 2017 17:01:35 +0200 Subject: video: redo video equalizer option handling I really wouldn't care much about this, but some parts of the core code are under HAVE_GPL, so there's some need to get rid of it. Simply turn the video equalizer from its current fine-grained handling with vf/vo fallbacks into global options. This makes updating them much simpler. This removes any possibility of applying video equalizers in filters, which affects vf_scale, and the previously removed vf_eq. Not a big loss, since the preferred VOs have this builtin. Remove video equalizer handling from vo_direct3d, vo_sdl, vo_vaapi, and vo_xv. I'm not going to waste my time on these legacy VOs. vo.eq_opts_cache exists _only_ to send a VOCTRL_SET_EQUALIZER, which exists _only_ to trigger a redraw. This seems silly, but for now I feel like this is less of a pain. The rest of the equalizer using code is self-updating. See commit 96b906a51d5 for how some video equalizer code was GPL only. Some command line option names and ranges can probably be traced back to a GPL only committer, but we don't consider these copyrightable. --- video/out/vo_direct3d.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'video/out/vo_direct3d.c') diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c index e18cf8e4e0..687bb972a9 100644 --- a/video/out/vo_direct3d.c +++ b/video/out/vo_direct3d.c @@ -185,7 +185,6 @@ typedef struct d3d_priv { D3DFORMAT osd_fmt_table[SUBBITMAP_COUNT]; D3DMATRIX d3d_colormatrix; - struct mp_csp_equalizer video_eq; struct osdpart *osd[MAX_OSD_PARTS]; } d3d_priv; @@ -1171,7 +1170,6 @@ static void update_colorspace(d3d_priv *priv) { struct mp_csp_params csp = MP_CSP_PARAMS_DEFAULTS; mp_csp_set_image_params(&csp, &priv->params); - mp_csp_copy_equalizer_values(&csp, &priv->video_eq); if (priv->use_shaders) { csp.input_bits = priv->planes[0].bits_per_pixel; @@ -1245,23 +1243,6 @@ static int control(struct vo *vo, uint32_t request, void *data) case VOCTRL_REDRAW_FRAME: d3d_draw_frame(priv); return VO_TRUE; - case VOCTRL_SET_EQUALIZER: { - if (!priv->use_shaders) - break; - struct voctrl_set_equalizer_args *args = data; - if (mp_csp_equalizer_set(&priv->video_eq, args->name, args->value) < 0) - return VO_NOTIMPL; - update_colorspace(priv); - vo->want_redraw = true; - return VO_TRUE; - } - case VOCTRL_GET_EQUALIZER: { - if (!priv->use_shaders) - break; - struct voctrl_get_equalizer_args *args = data; - return mp_csp_equalizer_get(&priv->video_eq, args->name, args->valueptr) - >= 0 ? VO_TRUE : VO_NOTIMPL; - } case VOCTRL_SET_PANSCAN: calc_fs_rect(priv); priv->vo->want_redraw = true; -- cgit v1.2.3