summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-29 15:18:19 +0200
committerwm4 <wm4@nowhere>2014-05-02 01:08:05 +0200
commit90a039a5991c20c3a185667348bf7c69dbb4cd19 (patch)
tree47c39ed0218203b0211aa3b86689e9ecd5b1a432 /player
parent3f060a19d84bfef8ea08b81399b16c8414053700 (diff)
downloadmpv-90a039a5991c20c3a185667348bf7c69dbb4cd19.tar.bz2
mpv-90a039a5991c20c3a185667348bf7c69dbb4cd19.tar.xz
command, vo_vdpau: respect vdpau deint sub-option
This is a horrible hack to keep compatibility with the vo_vdpau deint sub-option.
Diffstat (limited to 'player')
-rw-r--r--player/command.c17
1 files changed, 15 insertions, 2 deletions
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) &&