summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_d3d11vpp.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 /video/filter/vf_d3d11vpp.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 'video/filter/vf_d3d11vpp.c')
-rw-r--r--video/filter/vf_d3d11vpp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/video/filter/vf_d3d11vpp.c b/video/filter/vf_d3d11vpp.c
index d63acd11ce..cedb91d857 100644
--- a/video/filter/vf_d3d11vpp.c
+++ b/video/filter/vf_d3d11vpp.c
@@ -46,6 +46,7 @@ struct opts {
bool deint_enabled;
bool interlaced_only;
int mode;
+ int field_parity;
};
struct priv {
@@ -469,6 +470,7 @@ static struct mp_filter *vf_d3d11vpp_create(struct mp_filter *parent,
(p->opts->deint_enabled ? MP_MODE_DEINT : 0) |
MP_MODE_OUTPUT_FIELDS |
(p->opts->interlaced_only ? MP_MODE_INTERLACED_ONLY : 0));
+ mp_refqueue_set_parity(p->queue, p->opts->field_parity);
return f;
@@ -488,6 +490,10 @@ static const m_option_t vf_opts_fields[] = {
{"mocomp", D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_MOTION_COMPENSATION},
{"ivctc", D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_INVERSE_TELECINE},
{"none", 0})},
+ {"parity", OPT_CHOICE(field_parity,
+ {"tff", MP_FIELD_PARITY_TFF},
+ {"bff", MP_FIELD_PARITY_BFF},
+ {"auto", MP_FIELD_PARITY_AUTO})},
{0}
};
@@ -499,6 +505,7 @@ const struct mp_user_filter_entry vf_d3d11vpp = {
.priv_defaults = &(const OPT_BASE_STRUCT) {
.deint_enabled = true,
.mode = D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BOB,
+ .field_parity = MP_FIELD_PARITY_AUTO,
},
.options = vf_opts_fields,
},