diff options
author | Dudemanguy <random342@airmail.cc> | 2024-01-21 20:37:47 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2024-02-07 14:50:09 +0000 |
commit | 8dbbc2ad82d6ebfa986db4726e2e5006b7cb0a9d (patch) | |
tree | c9dd1bfe83ed3141275e7bf560214200e0322305 /options | |
parent | 9ce2bafbe9a49afe65eb86b46625f12dcb1b3110 (diff) | |
download | mpv-8dbbc2ad82d6ebfa986db4726e2e5006b7cb0a9d.tar.bz2 mpv-8dbbc2ad82d6ebfa986db4726e2e5006b7cb0a9d.tar.xz |
player: add an auto option to deinterlace
Deinterlacing required that the user set it on/off themselves, but we
actually have handy flags for detecting if a frame is interlaced. So
it's pretty simple to make an auto option using that. Unfortunately,
life is not quite that simple and there are known cases of false
positives from the ffmpeg flags so we can't make auto the default value.
However, it still may have some utility for some people, and the
detection could potentially be improved upon later. Closes #10358.
Diffstat (limited to 'options')
-rw-r--r-- | options/options.c | 3 | ||||
-rw-r--r-- | options/options.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/options/options.c b/options/options.c index c103f80103..b25b4ac72c 100644 --- a/options/options.c +++ b/options/options.c @@ -436,7 +436,8 @@ const struct m_sub_options dvd_conf = { const struct m_sub_options filter_conf = { .opts = (const struct m_option[]){ - {"deinterlace", OPT_BOOL(deinterlace)}, + {"deinterlace", OPT_CHOICE(deinterlace, + {"no", 0}, {"yes", 1}, {"auto", -1})}, {0} }, .size = sizeof(OPT_BASE_STRUCT), diff --git a/options/options.h b/options/options.h index 6caabbfe75..e05b723a01 100644 --- a/options/options.h +++ b/options/options.h @@ -397,7 +397,7 @@ struct dvd_opts { }; struct filter_opts { - bool deinterlace; + int deinterlace; }; extern const struct m_sub_options vo_sub_opts; |