mirror of
https://github.com/mpv-player/mpv
synced 2025-03-19 01:47:38 +00:00
f_auto_filters: pass field parity to lavfi bwdif deinterlacers
Since all of them(software, vulkan, cuda) already have a built in parity parameter
This commit is contained in:
parent
38a8e9bcba
commit
5b52d44972
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user