summaryrefslogtreecommitdiffstats
path: root/video/vdpau_mixer.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-22 17:01:35 +0200
committerwm4 <wm4@nowhere>2017-08-22 17:01:35 +0200
commit03cf150ff3516789d581214177f291d46310aaf4 (patch)
tree2f352bf9c6d36e10001accdb72cef2d7683ab04a /video/vdpau_mixer.c
parentd67aa6da6bbd3cba9eabd12cda4703821fecc7a1 (diff)
downloadmpv-03cf150ff3516789d581214177f291d46310aaf4.tar.bz2
mpv-03cf150ff3516789d581214177f291d46310aaf4.tar.xz
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.
Diffstat (limited to 'video/vdpau_mixer.c')
-rw-r--r--video/vdpau_mixer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/video/vdpau_mixer.c b/video/vdpau_mixer.c
index d6f93a9d13..b1aed70e78 100644
--- a/video/vdpau_mixer.c
+++ b/video/vdpau_mixer.c
@@ -67,9 +67,6 @@ struct mp_vdpau_mixer *mp_vdpau_mixer_create(struct mp_vdpau_ctx *vdp_ctx,
.ctx = vdp_ctx,
.log = log,
.video_mixer = VDP_INVALID_HANDLE,
- .video_eq = {
- .capabilities = MP_CSP_EQ_CAPS_COLORMATRIX,
- },
};
mp_vdpau_handle_preemption(mixer->ctx, &mixer->preemption_counter);
return mixer;
@@ -201,7 +198,8 @@ static int create_vdp_mixer(struct mp_vdpau_mixer *mixer,
struct mp_csp_params cparams = MP_CSP_PARAMS_DEFAULTS;
mp_csp_set_image_params(&cparams, &mixer->image_params);
- mp_csp_copy_equalizer_values(&cparams, &mixer->video_eq);
+ if (mixer->video_eq)
+ mp_csp_equalizer_state_get(mixer->video_eq, &cparams);
mp_get_csp_matrix(&cparams, &yuv2rgb);
for (int r = 0; r < 3; r++) {
@@ -268,6 +266,9 @@ int mp_vdpau_mixer_render(struct mp_vdpau_mixer *mixer,
if (mixer->video_mixer == VDP_INVALID_HANDLE)
mixer->initialized = false;
+ if (mixer->video_eq && mp_csp_equalizer_state_changed(mixer->video_eq))
+ mixer->initialized = false;
+
VdpChromaType s_chroma_type;
uint32_t s_w, s_h;