summaryrefslogtreecommitdiffstats
path: root/filters/f_auto_filters.c
diff options
context:
space:
mode:
author1nsane000 <33362569+1nsane000@users.noreply.github.com>2024-02-21 01:55:36 +0100
committerPhilip Langdale <github.philipl@overt.org>2024-03-04 17:41:40 -0800
commit03bfd797f6d8d703601aad1065194c760d8927dd (patch)
tree20e66ae0646dac493b4cbb3717316785d011ce1e /filters/f_auto_filters.c
parent5b52d4497206f9d977f0f1bbf08c396e76dd619f (diff)
downloadmpv-03bfd797f6d8d703601aad1065194c760d8927dd.tar.bz2
mpv-03bfd797f6d8d703601aad1065194c760d8927dd.tar.xz
video/filter: add field order support for built in deinterlacers
refqueue gets the field of the frame from mp_image which almost always(if not always) assumes bottom field order first. By default this behavior should not change but specifying the field order should bypass this.
Diffstat (limited to 'filters/f_auto_filters.c')
-rw-r--r--filters/f_auto_filters.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/filters/f_auto_filters.c b/filters/f_auto_filters.c
index b37fd9d5f4..6fa38b96c2 100644
--- a/filters/f_auto_filters.c
+++ b/filters/f_auto_filters.c
@@ -88,12 +88,14 @@ static void deint_process(struct mp_filter *f)
bool has_filter = true;
if (img->imgfmt == IMGFMT_VDPAU) {
- char *args[] = {"deint", "yes", NULL};
+ char *args[] = {"deint", "yes",
+ "parity", field_parity, NULL};
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};
p->sub.filter =
- mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "d3d11vpp", NULL);
+ mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "d3d11vpp", args);
} else if (img->imgfmt == IMGFMT_CUDA) {
char *args[] = {"mode", "send_field",
"parity", field_parity, NULL};
@@ -106,7 +108,8 @@ static void deint_process(struct mp_filter *f)
mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "bwdif_vulkan", args);
} else if (img->imgfmt == IMGFMT_VAAPI) {
char *args[] = {"deint", "motion-adaptive",
- "interlaced-only", "yes", NULL};
+ "interlaced-only", "yes",
+ "parity", field_parity, NULL};
p->sub.filter =
mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "vavpp", args);
} else {