From 0941f79b43fe6bbd3de767905722f27e65d885c0 Mon Sep 17 00:00:00 2001 From: Popvue Date: Thu, 22 Oct 2026 20:53:20 +0000 Subject: [PATCH 8/8] Popvue: libvlc patch leaving yadif out of deinterlace yadif.h is GPL 2 or later (from MPlayer/libavfilter); the deinterlace module keeps its LGPL modes, auto (x) the default. --- .../0053-deinterlace-leave-out-yadif.patch | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 libvlc/patches/0053-deinterlace-leave-out-yadif.patch diff --git a/libvlc/patches/0053-deinterlace-leave-out-yadif.patch b/libvlc/patches/0053-deinterlace-leave-out-yadif.patch new file mode 100644 index 00000000..7fcdf15c --- /dev/null +++ b/libvlc/patches/0053-deinterlace-leave-out-yadif.patch @@ -0,0 +1,132 @@ +From e2283f330b6098287bcc8c4057eff3dd8412b03a Mon Sep 17 00:00:00 2001 +From: Popvue +Date: Thu, 22 Oct 2026 20:53:01 +0000 +Subject: [PATCH] deinterlace: leave out yadif + +yadif.h and yadif_template.h, which algo_yadif.c builds the yadif and yadif2x +modes from, come from MPlayer/libavfilter under the GPL 2 or later, and were +left out of the 2012 relicensing to the LGPL for that reason. The other modes +stay; the default (auto) is x. A yadif mode asked for anyway is refused by +libvlc_video_set_deinterlace and the vout, and the filter takes auto's x. +--- + lib/video.c | 1 - + modules/video_filter/Makefile.am | 2 -- + modules/video_filter/deinterlace/deinterlace.c | 7 +++---- + modules/video_filter/deinterlace/deinterlace.h | 5 ++--- + src/libvlc-module.c | 4 ++-- + src/video_output/interlacing.c | 2 -- + 6 files changed, 7 insertions(+), 14 deletions(-) + +diff --git a/lib/video.c b/lib/video.c +index 9bc0f634f5..982361e9fa 100644 +--- a/lib/video.c ++++ b/lib/video.c +@@ -675,7 +675,6 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi, int deinterlace, + && strcmp (psz_mode, "blend") && strcmp (psz_mode, "bob") + && strcmp (psz_mode, "discard") && strcmp (psz_mode, "linear") + && strcmp (psz_mode, "mean") && strcmp (psz_mode, "x") +- && strcmp (psz_mode, "yadif") && strcmp (psz_mode, "yadif2x") + && strcmp (psz_mode, "phosphor") && strcmp (psz_mode, "ivtc") + && strcmp (psz_mode, "auto")) + return; +diff --git a/modules/video_filter/Makefile.am b/modules/video_filter/Makefile.am +index f65344d486..c1d8d08e39 100644 +--- a/modules/video_filter/Makefile.am ++++ b/modules/video_filter/Makefile.am +@@ -131,8 +131,6 @@ libdeinterlace_plugin_la_SOURCES = \ + video_filter/deinterlace/helpers.c video_filter/deinterlace/helpers.h \ + video_filter/deinterlace/algo_basic.c video_filter/deinterlace/algo_basic.h \ + video_filter/deinterlace/algo_x.c video_filter/deinterlace/algo_x.h \ +- video_filter/deinterlace/algo_yadif.c video_filter/deinterlace/algo_yadif.h \ +- video_filter/deinterlace/yadif.h video_filter/deinterlace/yadif_template.h \ + video_filter/deinterlace/algo_phosphor.c video_filter/deinterlace/algo_phosphor.h \ + video_filter/deinterlace/algo_ivtc.c video_filter/deinterlace/algo_ivtc.h + # inline ASM doesn't build with -O0 +diff --git a/modules/video_filter/deinterlace/deinterlace.c b/modules/video_filter/deinterlace/deinterlace.c +index 9f9d5291ff..58d02a4135 100644 +--- a/modules/video_filter/deinterlace/deinterlace.c ++++ b/modules/video_filter/deinterlace/deinterlace.c +@@ -362,10 +362,6 @@ static struct filter_mode_t filter_mode [] = { + { false, false, false, true }, true, true }, + { "blend", .pf_render_single_pic = RenderBlend, + { false, false, false, false }, true, true }, +- { "yadif", .pf_render_single_pic = RenderYadifSingle, +- { false, true, false, false }, false, true }, +- { "yadif2x", .pf_render_ordered = RenderYadif, +- { true, true, false, false }, false, true }, + { "x", .pf_render_single_pic = RenderX, + { false, false, false, false }, false, false }, + { "phosphor", .pf_render_ordered = RenderPhosphor, +@@ -416,7 +412,10 @@ static void SetFilterMethod( filter_t *p_filter, const char *mode, bool pack ) + } + } + ++ /* A mode this build does not have (yadif, left out as GPL code) takes ++ * the auto mode's method rather than none. */ + msg_Err( p_filter, "unknown deinterlace mode \"%s\"", mode ); ++ SetFilterMethod( p_filter, "x", pack ); + } + + /** +diff --git a/modules/video_filter/deinterlace/deinterlace.h b/modules/video_filter/deinterlace/deinterlace.h +index 355f2f4882..e79629bb97 100644 +--- a/modules/video_filter/deinterlace/deinterlace.h ++++ b/modules/video_filter/deinterlace/deinterlace.h +@@ -39,7 +39,6 @@ struct vlc_object_t; + /* Local algorithm headers */ + #include "algo_basic.h" + #include "algo_x.h" +-#include "algo_yadif.h" + #include "algo_phosphor.h" + #include "algo_ivtc.h" + #include "common.h" +@@ -51,12 +50,12 @@ struct vlc_object_t; + /** Available deinterlace modes. */ + static const char *const mode_list[] = { + "discard", "blend", "mean", "bob", "linear", "x", +- "yadif", "yadif2x", "phosphor", "ivtc" }; ++ "phosphor", "ivtc" }; + + /** User labels for the available deinterlace modes. */ + static const char *const mode_list_text[] = { + N_("Discard"), N_("Blend"), N_("Mean"), N_("Bob"), N_("Linear"), "X", +- "Yadif", "Yadif (2x)", N_("Phosphor"), N_("Film NTSC (IVTC)") }; ++ N_("Phosphor"), N_("Film NTSC (IVTC)") }; + + /***************************************************************************** + * Data structures +diff --git a/src/libvlc-module.c b/src/libvlc-module.c +index 56342523f3..c2d4026e38 100644 +--- a/src/libvlc-module.c ++++ b/src/libvlc-module.c +@@ -354,12 +354,12 @@ static const char * const ppsz_deinterlace_text[] = { + "Deinterlace method to use for video processing.") + static const char * const ppsz_deinterlace_mode[] = { + "auto", "discard", "blend", "mean", "bob", +- "linear", "x", "yadif", "yadif2x", "phosphor", ++ "linear", "x", "phosphor", + "ivtc" + }; + static const char * const ppsz_deinterlace_mode_text[] = { + N_("Auto"), N_("Discard"), N_("Blend"), N_("Mean"), N_("Bob"), +- N_("Linear"), "X", "Yadif", "Yadif (2x)", N_("Phosphor"), ++ N_("Linear"), "X", N_("Phosphor"), + N_("Film NTSC (IVTC)") + }; + +diff --git a/src/video_output/interlacing.c b/src/video_output/interlacing.c +index f07ef8ef5a..2155c2f964 100644 +--- a/src/video_output/interlacing.c ++++ b/src/video_output/interlacing.c +@@ -47,8 +47,6 @@ static const char deinterlace_modes[][9]= { + "bob", + "linear", + "x", +- "yadif", +- "yadif2x", + "phosphor", + "ivtc", + }; +-- +2.50.1 (Apple Git-155) + -- 2.50.1 (Apple Git-155)