From 830f0aed97da7257e1cbe30a367144bc51ec52d2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 12 Feb 2018 18:23:22 +0100 Subject: video: make --deinterlace and HW deinterlace filters always deinterlace Before this, we made deinterlacing dependent on the video codec metadata (AVFrame.interlaced_frame for libavcodec). So even if --deinterlace=yes was set, we skipped deinterlacing if the flag wasn't set. This is very unreliable and there are many streams with flags incorrectly set. The potential problem is that this might upset people who alwase enabled deinterlace and hoped it worked. But it's likely these people were screwed by this setting anyway. The new behavior is less tricky and easier to understand, and this preferable. Maybe one day we could introduce a --deinterlace=auto, which does the right thing, but of course this would be hard to implement (esecially with hwdec). Fixes #5219. --- video/filter/vf_d3d11vpp.c | 2 +- video/filter/vf_vavpp.c | 2 +- video/filter/vf_vdpaupp.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'video') diff --git a/video/filter/vf_d3d11vpp.c b/video/filter/vf_d3d11vpp.c index fb96a44e65..6ba1996da3 100644 --- a/video/filter/vf_d3d11vpp.c +++ b/video/filter/vf_d3d11vpp.c @@ -532,7 +532,7 @@ const struct mp_user_filter_entry vf_d3d11vpp = { .priv_size = sizeof(OPT_BASE_STRUCT), .priv_defaults = &(const OPT_BASE_STRUCT) { .deint_enabled = 1, - .interlaced_only = 1, + .interlaced_only = 0, .mode = D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BOB, }, .options = vf_opts_fields, diff --git a/video/filter/vf_vavpp.c b/video/filter/vf_vavpp.c index 608f1eea6f..598997ca24 100644 --- a/video/filter/vf_vavpp.c +++ b/video/filter/vf_vavpp.c @@ -475,7 +475,7 @@ const struct mp_user_filter_entry vf_vavpp = { .priv_size = sizeof(OPT_BASE_STRUCT), .priv_defaults = &(const OPT_BASE_STRUCT){ .deint_type = 2, - .interlaced_only = 1, + .interlaced_only = 0, .reversal_bug = 1, }, .options = vf_opts_fields, diff --git a/video/filter/vf_vdpaupp.c b/video/filter/vf_vdpaupp.c index 3b10e13421..fe3a903558 100644 --- a/video/filter/vf_vdpaupp.c +++ b/video/filter/vf_vdpaupp.c @@ -180,7 +180,7 @@ static const m_option_t vf_opts_fields[] = { OPT_FLOATRANGE("denoise", opts.denoise, 0, 0, 1), OPT_FLOATRANGE("sharpen", opts.sharpen, 0, -1, 1), OPT_INTRANGE("hqscaling", opts.hqscaling, 0, 0, 9), - OPT_FLAG("interlaced-only", interlaced_only, 0, OPTDEF_INT(1)), + OPT_FLAG("interlaced-only", interlaced_only, 0), {0} }; -- cgit v1.2.3