From f6d931301bd226239d95f59e3f18abfeab692ee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Sun, 8 Sep 2024 17:43:04 +0200 Subject: [PATCH] vf_d3d11vpp: adjust options for userdeint filter Fixes: #14816 --- filters/f_auto_filters.c | 4 +++- video/filter/vf_d3d11vpp.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/filters/f_auto_filters.c b/filters/f_auto_filters.c index e151e2dc19..148439cf08 100644 --- a/filters/f_auto_filters.c +++ b/filters/f_auto_filters.c @@ -93,7 +93,9 @@ static void deint_process(struct mp_filter *f) p->sub.filter = mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "vdpaupp", args); } else if (img->imgfmt == IMGFMT_D3D11) { - char *args[] = {"parity", field_parity, NULL}; + char *args[] = {"deint", "yes", + "interlaced-only", "yes", + "parity", field_parity, NULL}; p->sub.filter = mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "d3d11vpp", args); } else if (img->imgfmt == IMGFMT_CUDA) { diff --git a/video/filter/vf_d3d11vpp.c b/video/filter/vf_d3d11vpp.c index 8a149950e6..7fcc71d2ae 100644 --- a/video/filter/vf_d3d11vpp.c +++ b/video/filter/vf_d3d11vpp.c @@ -213,6 +213,9 @@ static int recreate_video_proc(struct mp_filter *vf) if (FAILED(hr)) goto fail; + if (!p->opts->mode && p->opts->deint_enabled) + p->opts->mode = D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BOB; + int rindex = p->opts->mode ? -1 : 0; if (rindex == 0) goto create;