diff options
author | 1nsane000 <33362569+1nsane000@users.noreply.github.com> | 2024-03-05 02:20:01 +0100 |
---|---|---|
committer | Philip Langdale <github.philipl@overt.org> | 2024-03-04 17:41:40 -0800 |
commit | 38a8e9bcba3bd31ecf5efbeee07c2169f82192d8 (patch) | |
tree | c17f5ec8f5c883c2639b12be6f63c8b5d5ea768e /options | |
parent | c1029aaa820de8193e2a466039d2acccca610fd6 (diff) | |
download | mpv-38a8e9bcba3bd31ecf5efbeee07c2169f82192d8.tar.bz2 mpv-38a8e9bcba3bd31ecf5efbeee07c2169f82192d8.tar.xz |
options: add --deinterlace-field-parity option
Previously there was no way to specify the field order of interlaced videos
when deinterlacing with inbuilt filters. Lavfi deinterlacers seemed to prefer
top field order while inbuilt ones (vdpaupp, vavpp, d3d11vpp) seemed to prefer
bottom field order. The default "auto" option should work exactly as before
while specifying either "tff" or "bff" should force the specified field order
Diffstat (limited to 'options')
-rw-r--r-- | options/options.c | 8 | ||||
-rw-r--r-- | options/options.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/options/options.c b/options/options.c index 3675d5734d..796a6c668b 100644 --- a/options/options.c +++ b/options/options.c @@ -42,6 +42,7 @@ #include "input/event.h" #include "stream/stream.h" #include "video/csputils.h" +#include "video/filter/refqueue.h" #include "video/hwdec.h" #include "video/image_writer.h" #include "sub/osd.h" @@ -440,9 +441,16 @@ const struct m_sub_options filter_conf = { .opts = (const struct m_option[]){ {"deinterlace", OPT_CHOICE(deinterlace, {"no", 0}, {"yes", 1}, {"auto", -1})}, + {"deinterlace-field-parity", OPT_CHOICE(field_parity, + {"tff", MP_FIELD_PARITY_TFF}, + {"bff", MP_FIELD_PARITY_BFF}, + {"auto", MP_FIELD_PARITY_AUTO})}, {0} }, .size = sizeof(OPT_BASE_STRUCT), + .defaults = &(const struct filter_opts){ + .field_parity = MP_FIELD_PARITY_AUTO, + }, .change_flags = UPDATE_IMGPAR, }; diff --git a/options/options.h b/options/options.h index 9dce3f609c..1b7c3e3583 100644 --- a/options/options.h +++ b/options/options.h @@ -399,6 +399,7 @@ struct dvd_opts { struct filter_opts { int deinterlace; + int field_parity; }; extern const struct m_sub_options vo_sub_opts; |