From 90a039a5991c20c3a185667348bf7c69dbb4cd19 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 29 Apr 2014 15:18:19 +0200 Subject: command, vo_vdpau: respect vdpau deint sub-option This is a horrible hack to keep compatibility with the vo_vdpau deint sub-option. --- player/command.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'player/command.c') diff --git a/player/command.c b/player/command.c index 55e01ac77f..4d0473f4c2 100644 --- a/player/command.c +++ b/player/command.c @@ -1552,9 +1552,22 @@ static bool check_output_format(struct MPContext *mpctx, int imgfmt) static int probe_deint_filters(struct MPContext *mpctx) { #if HAVE_VDPAU - if (check_output_format(mpctx, IMGFMT_VDPAU) && - probe_deint_filter(mpctx, "vdpaupp:deint=yes")) + if (check_output_format(mpctx, IMGFMT_VDPAU)) { + char filter[80] = "vdpaupp:deint=yes"; + int pref = 0; + if (mpctx->video_out) + vo_control(mpctx->video_out, VOCTRL_GET_PREF_DEINT, &pref); + pref = pref < 0 ? -pref : pref; + if (pref > 0 && pref <= 4) { + const char *types[] = + {"", "first-field", "bob", "temporal", "temporal-spatial"}; + mp_snprintf_append(filter, sizeof(filter), ":deint-mode=%s", + types[pref]); + } + + probe_deint_filter(mpctx, filter); return 0; + } #endif #if HAVE_VAAPI_VPP if (check_output_format(mpctx, IMGFMT_VAAPI) && -- cgit v1.2.3