diff options
author | 1nsane000 <33362569+1nsane000@users.noreply.github.com> | 2024-02-21 01:43:50 +0100 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2024-03-04 17:41:40 -0800 |
commit | 5b52d4497206f9d977f0f1bbf08c396e76dd619f (patch) | |
tree | aef2b4abfad6e31582b9adcf526be6e161c1f354 | |
parent | 38a8e9bcba3bd31ecf5efbeee07c2169f82192d8 (diff) | |
download | mpv-5b52d4497206f9d977f0f1bbf08c396e76dd619f.tar.bz2 mpv-5b52d4497206f9d977f0f1bbf08c396e76dd619f.tar.xz |
f_auto_filters: pass field parity to lavfi bwdif deinterlacers
Since all of them(software, vulkan, cuda) already have a built in parity
parameter
-rw-r--r-- | filters/f_auto_filters.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/filters/f_auto_filters.c b/filters/f_auto_filters.c index 43791ed13a..b37fd9d5f4 100644 --- a/filters/f_auto_filters.c +++ b/filters/f_auto_filters.c @@ -6,6 +6,7 @@ #include "common/msg.h" #include "options/m_config.h" #include "options/options.h" +#include "video/filter/refqueue.h" #include "video/mp_image.h" #include "video/mp_image_pool.h" @@ -73,6 +74,18 @@ static void deint_process(struct mp_filter *f) return; } + char *field_parity; + switch (opts->field_parity) { + case MP_FIELD_PARITY_TFF: + field_parity = "tff"; + break; + case MP_FIELD_PARITY_BFF: + field_parity = "bff"; + break; + default: + field_parity = "auto"; + } + bool has_filter = true; if (img->imgfmt == IMGFMT_VDPAU) { char *args[] = {"deint", "yes", NULL}; @@ -82,11 +95,13 @@ static void deint_process(struct mp_filter *f) p->sub.filter = mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "d3d11vpp", NULL); } else if (img->imgfmt == IMGFMT_CUDA) { - char *args[] = {"mode", "send_field", NULL}; + char *args[] = {"mode", "send_field", + "parity", field_parity, NULL}; p->sub.filter = mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "bwdif_cuda", args); } else if (img->imgfmt == IMGFMT_VULKAN) { - char *args[] = {"mode", "send_field", NULL}; + char *args[] = {"mode", "send_field", + "parity", field_parity, NULL}; p->sub.filter = mp_create_user_filter(f, MP_OUTPUT_CHAIN_VIDEO, "bwdif_vulkan", args); } else if (img->imgfmt == IMGFMT_VAAPI) { @@ -120,7 +135,8 @@ static void deint_process(struct mp_filter *f) } } - char *args[] = {"mode", "send_field", NULL}; + char *args[] = {"mode", "send_field", + "parity", field_parity, NULL}; filters[1] = mp_create_user_filter(subf, MP_OUTPUT_CHAIN_VIDEO, "bwdif", args); |