<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><div class=""><div class=""></div></div><div><br class=""><blockquote type="cite" class=""><div class="">On 5 May 2018, at 17:36, Luís Fernandes <<a href="mailto:zipleen@gmail.com" class="">zipleen@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">In lieu of speed, here’s the patch with the deinterlace=0 removed and comment adjusted.</div><div class=""><br class=""></div><div class="">You can choose which one you think it’s best!</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Luís</div><div class=""><br class=""></div><div class=""><div class="">From effa894f8231379841f7c387a6931064fcca929d Mon Sep 17 00:00:00 2001</div><div class="">From: Luis Fernandes <<a href="mailto:zipleen@gmail.com" class="">zipleen@gmail.com</a>></div><div class="">Date: Mon, 30 Apr 2018 14:33:08 +0100</div><div class="">Subject: [PATCH] add auto deinterlacer-mode which is also valid</div><div class=""><br class=""></div><div class="">---</div><div class=""> lib/video.c | 3 ++-</div><div class=""> 1 file changed, 2 insertions(+), 1 deletion(-)</div><div class=""><br class=""></div><div class="">diff --git a/lib/video.c b/lib/video.c</div><div class="">index 035cc0ebf1..a3e5b248e9 100644</div><div class="">--- a/lib/video.c</div><div class="">+++ b/lib/video.c</div><div class="">@@ -675,7 +675,8 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,</div><div class="">      && strcmp (psz_mode, "discard")  && strcmp (psz_mode, "linear")</div><div class="">      && strcmp (psz_mode, "mean")     && strcmp (psz_mode, "x")</div><div class="">      && strcmp (psz_mode, "yadif")    && strcmp (psz_mode, "yadif2x")</div><div class="">-     && strcmp (psz_mode, "phosphor") && strcmp (psz_mode, "ivtc"))</div><div class="">+     && strcmp (psz_mode, "phosphor") && strcmp (psz_mode, "ivtc")</div><div class="">+     && strcmp (psz_mode, "auto"))</div><div class="">         return;</div><div class=""><br class=""></div><div class="">     if (*psz_mode)</div><div class="">--</div><div class="">2.14.3 (Apple Git-98)</div><div class=""><br class=""></div><div class=""><div class="">From 7ca094304c3485b83efd3263e3e67c7085871444 Mon Sep 17 00:00:00 2001</div><div class="">From: Luis Fernandes <<a href="mailto:zipleen@gmail.com" class="">zipleen@gmail.com</a>></div><div class="">Date: Sat, 5 May 2018 17:34:14 +0100</div><div class="">Subject: [PATCH] change function of deinterlace to specify which deinterlace</div><div class=""> mode and filter we want to use</div><div class=""><br class=""></div><div class="">---</div><div class=""> include/vlc/libvlc_media_player.h |  5 ++++-</div><div class=""> lib/video.c                       | 28 ++++++++++++++--------------</div><div class=""> 2 files changed, 18 insertions(+), 15 deletions(-)</div><div class=""><br class=""></div><div class="">diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h</div><div class="">index 20b220448b..cbb5ec251a 100644</div><div class="">--- a/include/vlc/libvlc_media_player.h</div><div class="">+++ b/include/vlc/libvlc_media_player.h</div><div class="">@@ -1419,9 +1419,12 @@ int libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, unsigned num,</div><div class="">  * Enable or disable deinterlace filter</div><div class="">  *</div><div class="">  * \param p_mi libvlc media player</div><div class="">- * \param psz_mode type of deinterlace filter, NULL to disable</div><div class="">+ * \param deinterlace deinterlace mode -1:auto (default), 0: disabled, 1: enabled</div><div class="">+ * \param psz_mode type of deinterlace filter, NULL for current/default filter</div><div class="">+ * \version LibVLC 4.0.0 and later</div><div class="">  */</div><div class=""> LIBVLC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,</div><div class="">+                                                  int deinterlace,</div><div class="">                                                   const char *psz_mode );</div><div class=""> </div><div class=""> /**</div><div class="">diff --git a/lib/video.c b/lib/video.c</div><div class="">index a3e5b248e9..a8dd5b84b2 100644</div><div class="">--- a/lib/video.c</div><div class="">+++ b/lib/video.c</div><div class="">@@ -663,13 +663,19 @@ end:</div><div class=""> }</div><div class=""> </div><div class=""> /******************************************************************************</div><div class="">- * libvlc_video_set_deinterlace : enable deinterlace</div><div class="">+ * libvlc_video_set_deinterlace : enable/disable/auto deinterlace and filter</div><div class="">  *****************************************************************************/</div><div class="">-void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,</div><div class="">+void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi, int deinterlace,</div><div class="">                                    const char *psz_mode )</div><div class=""> {</div><div class="">+    if (deinterlace != 0 && deinterlace != 1)</div><div class="">+        deinterlace = -1;</div><div class="">+</div><div class="">     if (psz_mode == NULL)</div><div class="">+    {</div><div class="">         psz_mode = "";</div><div class="">+    }</div><div class="">+</div><div class="">     if (*psz_mode</div><div class="">      && strcmp (psz_mode, "blend")    && strcmp (psz_mode, "bob")</div><div class="">      && strcmp (psz_mode, "discard")  && strcmp (psz_mode, "linear")</div><div class="">@@ -679,13 +685,10 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,</div><div class="">      && strcmp (psz_mode, "auto"))</div><div class="">         return;</div><div class=""> </div><div class="">-    if (*psz_mode)</div><div class="">-    {</div><div class="">+    if (*psz_mode && deinterlace != 0)</div><div class="">         var_SetString (p_mi, "deinterlace-mode", psz_mode);</div><div class="">-        var_SetInteger (p_mi, "deinterlace", 1);</div><div class="">-    }</div><div class="">-    else</div><div class="">-        var_SetInteger (p_mi, "deinterlace", 0);</div><div class="">+</div><div class="">+    var_SetInteger (p_mi, "deinterlace", deinterlace);</div><div class=""> </div><div class="">     size_t n;</div><div class="">     vout_thread_t **pp_vouts = GetVouts (p_mi, &n);</div><div class="">@@ -693,13 +696,10 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,</div><div class="">     {</div><div class="">         vout_thread_t *p_vout = pp_vouts[i];</div><div class=""> </div><div class="">-        if (*psz_mode)</div><div class="">-        {</div><div class="">+        if (*psz_mode && deinterlace != 0)</div><div class="">             var_SetString (p_vout, "deinterlace-mode", psz_mode);</div><div class="">-            var_SetInteger (p_vout, "deinterlace", 1);</div><div class="">-        }</div><div class="">-        else</div><div class="">-            var_SetInteger (p_vout, "deinterlace", 0);</div><div class="">+</div><div class="">+        var_SetInteger (p_vout, "deinterlace", deinterlace);</div><div class="">         vlc_object_release (p_vout);</div><div class="">     }</div><div class="">     free (pp_vouts);</div><div class="">-- </div><div class="">2.15.1 (Apple Git-101)</div><div class=""></div></div></div></div><span id="cid:4C5DBB26-92BD-4B55-B66F-E1B0A52E36D5"><auto_deinterlace_mode.patch></span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div class=""><div class=""><div class=""></div></div></div></div><span id="cid:5E4AD9C5-2EBD-4C02-9072-EE54ED4C83BA"><set_auto_deinterlace_1.patch></span><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><div class=""><div class=""></div></div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 4 May 2018, at 17:12, Luis Fernandes <<a href="mailto:zipleen@gmail.com" class="">zipleen@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class=""></div><div class="">Hi Thomas,</div><div class=""><br class=""></div><div class="">No worries!</div><div class=""><br class=""></div><div class="">The forcing of that is about the comment in the function "if mode is NULL, deinterlace will be disabled". </div><div class=""><br class=""></div><div class="">If you think this is not useful, I'll remove it right away - I'm not too attached to the idea, it was used in the previous implementation to "disable" deinterlace.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Luís</div><div class=""><br class="">On 4 May 2018, at 16:34, Thomas Guillem <<a href="mailto:thomas@gllm.fr" class="">thomas@gllm.fr</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class="">


<title class=""></title>


<div class=""><br class=""></div>
<div class="">On Fri, May 4, 2018, at 16:53, Luís Fernandes wrote:<br class=""></div>
<blockquote type="cite" class=""><div class="">Hi,<br class=""></div>
<div class=""><br class=""></div>
<div class="">Here’s the patch without fetching the config.<br class=""></div>
<div class=""><br class=""></div>
<div class="">@Thomas as a side note, I did only add the "fetching of the default deinterlace value" on your suggestion in the VLCKit mailing list ;)<br class=""></div>
</blockquote><div class=""><br class=""></div>
<div class="">Yes sorry about that, but since you can now set the "auto" mode with your patches, I don't think it's useful anymore.<br class=""></div>
<div class=""><br class=""></div>
<blockquote type="cite" class=""><div class=""><br class=""></div>
<div class="">@Caro as soon as this is accepted I’ll update the VLCKit patch!<br class=""></div>
<div class=""><br class=""></div>
<div class="">Cheers,<br class=""></div>
<div class="">Luís<br class=""></div>
<div class=""><br class=""></div>
<div class=""><br class=""></div>
<div class=""><div class="">From effa894f8231379841f7c387a6931064fcca929d Mon Sep 17 00:00:00 2001<br class=""></div>
<div class="">From: Luis Fernandes <<a href="mailto:zipleen@gmail.com" class="">zipleen@gmail.com</a>><br class=""></div>
<div class="">Date: Mon, 30 Apr 2018 14:33:08 +0100<br class=""></div>
<div class="">Subject: [PATCH] add auto deinterlacer-mode which is also valid<br class=""></div>
<div class=""><br class=""></div>
<div class="">---<br class=""></div>
<div class=""> lib/video.c | 3 ++-<br class=""></div>
<div class=""> 1 file changed, 2 insertions(+), 1 deletion(-)<br class=""></div>
<div class=""><br class=""></div>
<div class="">diff --git a/lib/video.c b/lib/video.c<br class=""></div>
<div class="">index 035cc0ebf1..a3e5b248e9 100644<br class=""></div>
<div class="">--- a/lib/video.c<br class=""></div>
<div class="">+++ b/lib/video.c<br class=""></div>
<div class="">@@ -675,7 +675,8 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br class=""></div>
<div class="">      && strcmp (psz_mode, "discard")  && strcmp (psz_mode, "linear")<br class=""></div>
<div class="">      && strcmp (psz_mode, "mean")     && strcmp (psz_mode, "x")<br class=""></div>
<div class="">      && strcmp (psz_mode, "yadif")    && strcmp (psz_mode, "yadif2x")<br class=""></div>
<div class="">-     && strcmp (psz_mode, "phosphor") && strcmp (psz_mode, "ivtc"))<br class=""></div>
<div class="">+     && strcmp (psz_mode, "phosphor") && strcmp (psz_mode, "ivtc")<br class=""></div>
<div class="">+     && strcmp (psz_mode, "auto"))<br class=""></div>
<div class="">         return;<br class=""></div>
<div class=""><br class=""></div>
<div class="">     if (*psz_mode)<br class=""></div>
<div class="">--<br class=""></div>
<div class="">2.14.3 (Apple Git-98)<br class=""></div>
</div>
<div class=""><br class=""></div>
<div class=""><br class=""></div>
<div class=""><div class="">From 71ea2190622c64e4adfe03a4131a17861f0ffe8f Mon Sep 17 00:00:00 2001<br class=""></div>
<div class="">From: Luis Fernandes <<a href="mailto:zipleen@gmail.com" class="">zipleen@gmail.com</a>><br class=""></div>
<div class="">Date: Fri, 4 May 2018 15:42:56 +0100<br class=""></div>
<div class="">Subject: [PATCH] change function of deinterlace to specify which deinterlace<br class=""></div>
<div class=""> mode and filter we want to use<br class=""></div>
<div class=""><br class=""></div>
<div class="">---<br class=""></div>
<div class=""> include/vlc/libvlc_media_player.h |  5 ++++-<br class=""></div>
<div class=""> lib/video.c                       | 29 +++++++++++++++--------------<br class=""></div>
<div class=""> 2 files changed, 19 insertions(+), 15 deletions(-)<br class=""></div>
<div class=""><br class=""></div>
<div class="">diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h<br class=""></div>
<div class="">index 20b220448b..a82f70f5e7 100644<br class=""></div>
<div class="">--- a/include/vlc/libvlc_media_player.h<br class=""></div>
<div class="">+++ b/include/vlc/libvlc_media_player.h<br class=""></div>
<div class="">@@ -1419,9 +1419,12 @@ int libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, unsigned num,<br class=""></div>
<div class="">  * Enable or disable deinterlace filter<br class=""></div>
<div class="">  *<br class=""></div>
<div class="">  * \param p_mi libvlc media player<br class=""></div>
<div class="">- * \param psz_mode type of deinterlace filter, NULL to disable<br class=""></div>
<div class="">+ * \param deinterlace deinterlace mode -1:auto (default), 0: disabled, 1: enabled<br class=""></div>
<div class="">+ * \param psz_mode type of deinterlace filter, NULL to default<br class=""></div>
<div class="">+ * \version LibVLC 4.0.0 and later<br class=""></div>
<div class="">  */<br class=""></div>
<div class=""> LIBVLC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br class=""></div>
<div class="">+                                                  int deinterlace,<br class=""></div>
<div class="">                                                   const char *psz_mode );<br class=""></div>
<div class=""><br class=""></div>
<div class=""> /**<br class=""></div>
<div class="">diff --git a/lib/video.c b/lib/video.c<br class=""></div>
<div class="">index a3e5b248e9..f23320a528 100644<br class=""></div>
<div class="">--- a/lib/video.c<br class=""></div>
<div class="">+++ b/lib/video.c<br class=""></div>
<div class="">@@ -663,13 +663,20 @@ end:<br class=""></div>
<div class=""> }<br class=""></div>
<div class=""><br class=""></div>
<div class=""> /******************************************************************************<br class=""></div>
<div class="">- * libvlc_video_set_deinterlace : enable deinterlace<br class=""></div>
<div class="">+ * libvlc_video_set_deinterlace : enable/disable/auto deinterlace and filter<br class=""></div>
<div class="">  *****************************************************************************/<br class=""></div>
<div class="">-void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br class=""></div>
<div class="">+void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi, int deinterlace,<br class=""></div>
<div class="">                                    const char *psz_mode )<br class=""></div>
<div class=""> {<br class=""></div>
<div class="">+    if (deinterlace != 0 && deinterlace != 1)<br class=""></div>
<div class="">+        deinterlace = -1;<br class=""></div>
<div class="">+<br class=""></div>
<div class="">     if (psz_mode == NULL)<br class=""></div>
<div class="">+    {<br class=""></div>
<div class="">         psz_mode = "";<br class=""></div>
<div class="">+        deinterlace = 0;<br class=""></div>
</div>
</blockquote><div class=""><br class=""></div>
<div class="">Why forcing deinterlace to zero in that case ?<br class=""></div>
<div class=""><br class=""></div>
<blockquote type="cite" class=""><div class=""><div class="">+    }<br class=""></div>
<div class="">+<br class=""></div>
<div class="">     if (*psz_mode<br class=""></div>
<div class="">      && strcmp (psz_mode, "blend")    && strcmp (psz_mode, "bob")<br class=""></div>
<div class="">      && strcmp (psz_mode, "discard")  && strcmp (psz_mode, "linear")<br class=""></div>
<div class="">@@ -679,13 +686,10 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br class=""></div>
<div class="">      && strcmp (psz_mode, "auto"))<br class=""></div>
<div class="">         return;<br class=""></div>
<div class=""><br class=""></div>
<div class="">-    if (*psz_mode)<br class=""></div>
<div class="">-    {<br class=""></div>
<div class="">+    if (*psz_mode && deinterlace != 0)<br class=""></div>
<div class="">         var_SetString (p_mi, "deinterlace-mode", psz_mode);<br class=""></div>
<div class="">-        var_SetInteger (p_mi, "deinterlace", 1);<br class=""></div>
<div class="">-    }<br class=""></div>
<div class="">-    else<br class=""></div>
<div class="">-        var_SetInteger (p_mi, "deinterlace", 0);<br class=""></div>
<div class="">+<br class=""></div>
<div class="">+    var_SetInteger (p_mi, "deinterlace", deinterlace);<br class=""></div>
<div class=""><br class=""></div>
<div class="">     size_t n;<br class=""></div>
<div class="">     vout_thread_t **pp_vouts = GetVouts (p_mi, &n);<br class=""></div>
<div class="">@@ -693,13 +697,10 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br class=""></div>
<div class="">     {<br class=""></div>
<div class="">         vout_thread_t *p_vout = pp_vouts[i];<br class=""></div>
<div class=""><br class=""></div>
<div class="">-        if (*psz_mode)<br class=""></div>
<div class="">-        {<br class=""></div>
<div class="">+        if (*psz_mode && deinterlace != 0)<br class=""></div>
<div class="">             var_SetString (p_vout, "deinterlace-mode", psz_mode);<br class=""></div>
<div class="">-            var_SetInteger (p_vout, "deinterlace", 1);<br class=""></div>
<div class="">-        }<br class=""></div>
<div class="">-        else<br class=""></div>
<div class="">-            var_SetInteger (p_vout, "deinterlace", 0);<br class=""></div>
<div class="">+<br class=""></div>
<div class="">+        var_SetInteger (p_vout, "deinterlace", deinterlace);<br class=""></div>
<div class="">         vlc_object_release (p_vout);<br class=""></div>
<div class="">     }<br class=""></div>
<div class="">     free (pp_vouts);<br class=""></div>
<div class="">--<br class=""></div>
<div class="">2.15.1 (Apple Git-101)<br class=""></div>
</div>
<div class=""><br class=""></div>
<div class=""><br class=""></div>
<div class=""><br class=""></div>
<div class=""><div class=""><br class=""></div>
<blockquote type="cite" class=""><div class="">On 4 May 2018, at 09:58, Carola Nitz via vlc-devel <<a href="mailto:vlc-devel@videolan.org" class="">vlc-devel@videolan.org</a>> wrote:<br class=""></div>
<div class=""><br class=""></div>
<div class=""><div class=""><br class=""></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;" class=""><span class="colour" style="color:rgb(127, 127, 127)"><span class="font" style="font-family:-webkit-system-font, Helvetica Neue, Helvetica, sans-serif"><b class="">From: </b></span></span><span class="font" style="font-family:-webkit-system-font, Helvetica Neue, Helvetica, sans-serif">Carola Nitz <<a href="mailto:nitz.carola@googlemail.com" class="">nitz.carola@googlemail.com</a>></span><br class=""></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;" class=""><span class="colour" style="color:rgb(127, 127, 127)"><span class="font" style="font-family:-webkit-system-font, Helvetica Neue, Helvetica, sans-serif"><b class="">Subject: </b></span></span><span class="font" style="font-family:-webkit-system-font, Helvetica Neue, Helvetica, sans-serif"><b class="">Re: [vlc-devel] [PATCH] Enable/Disable/Auto deinterlace functions for libvlc</b></span><br class=""></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;" class=""><span class="colour" style="color:rgb(127, 127, 127)"><span class="font" style="font-family:-webkit-system-font, Helvetica Neue, Helvetica, sans-serif"><b class="">Date: </b></span></span><span class="font" style="font-family:-webkit-system-font, Helvetica Neue, Helvetica, sans-serif">4 May 2018 at 09:58:49 GMT+1</span><br class=""></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;" class=""><span class="colour" style="color:rgb(127, 127, 127)"><span class="font" style="font-family:-webkit-system-font, Helvetica Neue, Helvetica, sans-serif"><b class="">To: </b></span></span><span class="font" style="font-family:-webkit-system-font, Helvetica Neue, Helvetica, sans-serif">Mailing list for VLC media player developers <<a href="mailto:vlc-devel@videolan.org" class="">vlc-devel@videolan.org</a>></span><br class=""></div>
<div class=""><br class=""></div>
<div class=""><br class=""></div>
<div style="overflow-wrap:break-word;" class=""><div class="">Hey Luis,<br class=""></div>
<div class=""><br class=""></div>
<div class="">I just wanted to follow up on this. <br class=""></div>
<div class="">Did you have time to adjust this patch and address the leak ?<br class=""></div>
<div class="">I’d love for this to get merged into master :) <br class=""></div>
<div class=""><br class=""></div>
<div class="">Best,<br class=""></div>
<div class=""><div class="">Caro<br class=""></div>
<div class=""><div class=""><br class=""></div>
<blockquote type="cite" class=""><div class="">On May 3, 2018, at 11:26 AM, Thomas Guillem <<a href="mailto:thomas@gllm.fr" class="">thomas@gllm.fr</a>> wrote:<br class=""></div>
<div class=""><br class=""></div>
<div class=""><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;-webkit-text-stroke-width:0px;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:currentcolor;" class=""><div class=""><br class=""></div>
</div>
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;-webkit-text-stroke-width:0px;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:currentcolor;" class=""><br class=""></div>
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;-webkit-text-stroke-width:0px;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:currentcolor;" class="">On Mon, Apr 30, 2018, at 18:29, Luís Miguel Fernandes wrote:<br class=""></div>
<blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;-moz-text-size-adjust:auto;-webkit-text-stroke-width:0px;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:currentcolor;" class=""><div class="">Hi Steve,<br class=""></div>
<div class=""><br class=""></div>
<div class="">Thanks for the comments, here's the revised patches.<br class=""></div>
<div class=""><br class=""></div>
<div class=""><div class="">From effa894f8231379841f7c387a6931064fcca929d Mon Sep 17 00:00:00 2001<br class=""></div>
<div class="">From: Luis Fernandes <<a href="mailto:zipleen@gmail.com" class="">zipleen@gmail.com</a>><br class=""></div>
<div class="">Date: Mon, 30 Apr 2018 14:33:08 +0100<br class=""></div>
<div class="">Subject: [PATCH] add auto deinterlacer-mode which is also valid<br class=""></div>
<div class=""><br class=""></div>
<div class="">---<br class=""></div>
<div class=""> lib/video.c | 3 ++-<br class=""></div>
<div class=""> 1 file changed, 2 insertions(+), 1 deletion(-)<br class=""></div>
<div class=""><br class=""></div>
<div class="">diff --git a/lib/video.c b/lib/video.c<br class=""></div>
<div class="">index 035cc0ebf1..a3e5b248e9 100644<br class=""></div>
<div class="">--- a/lib/video.c<br class=""></div>
<div class="">+++ b/lib/video.c<br class=""></div>
<div class="">@@ -675,7 +675,8 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br class=""></div>
<div class="">      && strcmp (psz_mode, "discard")  && strcmp (psz_mode, "linear")<br class=""></div>
<div class="">      && strcmp (psz_mode, "mean")     && strcmp (psz_mode, "x")<br class=""></div>
<div class="">      && strcmp (psz_mode, "yadif")    && strcmp (psz_mode, "yadif2x")<br class=""></div>
<div class="">-     && strcmp (psz_mode, "phosphor") && strcmp (psz_mode, "ivtc"))<br class=""></div>
<div class="">+     && strcmp (psz_mode, "phosphor") && strcmp (psz_mode, "ivtc")<br class=""></div>
<div class="">+     && strcmp (psz_mode, "auto"))<br class=""></div>
<div class="">         return;<br class=""></div>
<div class=""><br class=""></div>
<div class="">     if (*psz_mode)<br class=""></div>
<div class="">--<br class=""></div>
<div class="">2.14.3 (Apple Git-98)<br class=""></div>
<div class=""><br class=""></div>
<div class=""><div class="">From 2b656a5fca5c69e626ac1727d7bc9f3d980f37e6 Mon Sep 17 00:00:00 2001<br class=""></div>
<div class="">From: Luis Fernandes <<a href="mailto:zipleen@gmail.com" class="">zipleen@gmail.com</a>><br class=""></div>
<div class="">Date: Mon, 30 Apr 2018 14:43:00 +0100<br class=""></div>
<div class="">Subject: [PATCH] change function of deinterlace to specify which deinterlace<br class=""></div>
<div class=""> mode and filter we want to use<br class=""></div>
<div class=""><br class=""></div>
<div class="">---<br class=""></div>
<div class=""> include/vlc/libvlc_media_player.h |  5 ++++-<br class=""></div>
<div class=""> lib/video.c                       | 34 ++++++++++++++++++++--------------<br class=""></div>
<div class=""> 2 files changed, 24 insertions(+), 15 deletions(-)<br class=""></div>
<div class=""><br class=""></div>
<div class="">diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h<br class=""></div>
<div class="">index 20b220448b..a82f70f5e7 100644<br class=""></div>
<div class="">--- a/include/vlc/libvlc_media_player.h<br class=""></div>
<div class="">+++ b/include/vlc/libvlc_media_player.h<br class=""></div>
<div class="">@@ -1419,9 +1419,12 @@ int libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, unsigned num,<br class=""></div>
<div class="">  * Enable or disable deinterlace filter<br class=""></div>
<div class="">  *<br class=""></div>
<div class="">  * \param p_mi libvlc media player<br class=""></div>
<div class="">- * \param psz_mode type of deinterlace filter, NULL to disable<br class=""></div>
<div class="">+ * \param deinterlace deinterlace mode -1:auto (default), 0: disabled, 1: enabled<br class=""></div>
<div class="">+ * \param psz_mode type of deinterlace filter, NULL to default<br class=""></div>
<div class="">+ * \version LibVLC 4.0.0 and later<br class=""></div>
<div class="">  */<br class=""></div>
<div class=""> LIBVLC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br class=""></div>
<div class="">+                                                  int deinterlace,<br class=""></div>
<div class="">                                                   const char *psz_mode );<br class=""></div>
<div class=""><br class=""></div>
<div class=""> /**<br class=""></div>
<div class="">diff --git a/lib/video.c b/lib/video.c<br class=""></div>
<div class="">index a3e5b248e9..f96fec7a79 100644<br class=""></div>
<div class="">--- a/lib/video.c<br class=""></div>
<div class="">+++ b/lib/video.c<br class=""></div>
<div class="">@@ -663,13 +663,25 @@ end:<br class=""></div>
<div class=""> }<br class=""></div>
<div class=""><br class=""></div>
<div class=""> /******************************************************************************<br class=""></div>
<div class="">- * libvlc_video_set_deinterlace : enable deinterlace<br class=""></div>
<div class="">+ * libvlc_video_set_deinterlace : enable/disable/auto deinterlace and filter<br class=""></div>
<div class="">  *****************************************************************************/<br class=""></div>
<div class="">-void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br class=""></div>
<div class="">+void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi, int deinterlace,<br class=""></div>
<div class="">                                    const char *psz_mode )<br class=""></div>
<div class=""> {<br class=""></div>
<div class="">+    if (deinterlace != 0 && deinterlace != 1)<br class=""></div>
<div class="">+        deinterlace = -1;<br class=""></div>
<div class="">+<br class=""></div>
<div class="">+    if (psz_mode == NULL)<br class=""></div>
<div class="">+    {<br class=""></div>
<div class="">+        psz_mode = var_GetString(p_mi, "deinterlace-mode");<br class=""></div>
<div class="">+    }<br class=""></div>
</div>
</div>
</blockquote><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;-webkit-text-stroke-width:0px;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:currentcolor;" class=""><br class=""></div>
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;-webkit-text-stroke-width:0px;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:currentcolor;" class="">You leak psz_mode here.<br class=""></div>
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;-webkit-text-stroke-width:0px;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:currentcolor;" class="">But I think it should stay NULL. Just don't set "deinterlace-mode" in that case but only the "deinterlace" int.<br class=""></div>
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;-webkit-text-stroke-width:0px;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:currentcolor;" class=""><br class=""></div>
<blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;-moz-text-size-adjust:auto;-webkit-text-stroke-width:0px;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:currentcolor;" class=""><div class=""><div class=""><div class="">+<br class=""></div>
<div class="">     if (psz_mode == NULL)<br class=""></div>
<div class="">+    {<br class=""></div>
<div class="">         psz_mode = "";<br class=""></div>
<div class="">+        deinterlace = 0;<br class=""></div>
<div class="">+    }<br class=""></div>
<div class="">+<br class=""></div>
<div class="">     if (*psz_mode<br class=""></div>
<div class="">      && strcmp (psz_mode, "blend")    && strcmp (psz_mode, "bob")<br class=""></div>
<div class="">      && strcmp (psz_mode, "discard")  && strcmp (psz_mode, "linear")<br class=""></div>
<div class="">@@ -679,13 +691,10 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br class=""></div>
<div class="">      && strcmp (psz_mode, "auto"))<br class=""></div>
<div class="">         return;<br class=""></div>
<div class=""><br class=""></div>
<div class="">-    if (*psz_mode)<br class=""></div>
<div class="">-    {<br class=""></div>
<div class="">+    if (*psz_mode && deinterlace != 0)<br class=""></div>
<div class="">         var_SetString (p_mi, "deinterlace-mode", psz_mode);<br class=""></div>
<div class="">-        var_SetInteger (p_mi, "deinterlace", 1);<br class=""></div>
<div class="">-    }<br class=""></div>
<div class="">-    else<br class=""></div>
<div class="">-        var_SetInteger (p_mi, "deinterlace", 0);<br class=""></div>
<div class="">+<br class=""></div>
<div class="">+    var_SetInteger (p_mi, "deinterlace", deinterlace);<br class=""></div>
<div class=""><br class=""></div>
<div class="">     size_t n;<br class=""></div>
<div class="">     vout_thread_t **pp_vouts = GetVouts (p_mi, &n);<br class=""></div>
<div class="">@@ -693,13 +702,10 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br class=""></div>
<div class="">     {<br class=""></div>
<div class="">         vout_thread_t *p_vout = pp_vouts[i];<br class=""></div>
<div class=""><br class=""></div>
<div class="">-        if (*psz_mode)<br class=""></div>
<div class="">-        {<br class=""></div>
<div class="">+        if (*psz_mode && deinterlace != 0)<br class=""></div>
<div class="">             var_SetString (p_vout, "deinterlace-mode", psz_mode);<br class=""></div>
<div class="">-            var_SetInteger (p_vout, "deinterlace", 1);<br class=""></div>
<div class="">-        }<br class=""></div>
<div class="">-        else<br class=""></div>
<div class="">-            var_SetInteger (p_vout, "deinterlace", 0);<br class=""></div>
<div class="">+<br class=""></div>
<div class="">+        var_SetInteger (p_vout, "deinterlace", deinterlace);<br class=""></div>
<div class="">         vlc_object_release (p_vout);<br class=""></div>
<div class="">     }<br class=""></div>
<div class="">     free (pp_vouts);<br class=""></div>
<div class="">--<br class=""></div>
<div class="">2.14.3 (Apple Git-98)<br class=""></div>
</div>
<div class=""><br class=""></div>
<div class=""><br class=""></div>
</div>
<div class=""><div class=""><br class=""></div>
<div class=""><br class=""></div>
</div>
<div class=""><div class=""><br class=""></div>
<div class=""><br class=""></div>
<div class="">Regards,<br class=""></div>
<div class="">Luís<br class=""></div>
<div class=""><div class=""><br class=""></div>
<blockquote type="cite" class=""><div class="">On 30 Apr 2018, at 07:55, Steve Lhomme <<a href="mailto:robux4@ycbcr.xyz" class="">robux4@ycbcr.xyz</a>> wrote:<br class=""></div>
<div class=""><br class=""></div>
<div class=""><div bgcolor="#FFFFFF" class=""><p class="">Please post your patches inline, it's easier to comment<br class=""></p><p class=""><br class=""></p><div class=""><br class=""></div>
<div class="">+    if (deinterlace < -1 || deinterlace > 1)<br class=""></div>
<div class="">+        deinterlace = -1;<br class=""></div>
<div class="">To make it more clear what you're doing maybe check if the value is neither 0 nor 1.<br class=""></div>
<div class=""><br class=""></div><p class=""><br class=""></p><div class=""><br class=""></div>
<div class="">+        module_config_t *config = config_FindConfig("deinterlace-mode");<br class=""></div>
<div class="">This should be var_GetString<br class=""></div>
<div class=""><br class=""></div><p class=""><br class=""></p><div class=""><br class=""></div>
<div class="">+     && strcmp (psz_mode, "auto"))<br class=""></div>
<div class="">It seems that should go in another patch before this one.<br class=""></div>
<div class=""><br class=""></div><p class=""><br class=""></p><div class=""><br class=""></div>
<div class="">-        var_SetInteger (p_mi, "deinterlace", 1);<br class=""></div>
<div class="">+        var_SetInteger (p_mi, "deinterlace", deinterlace);<br class=""></div>
<div class="">     }<br class=""></div>
<div class="">     else<br class=""></div>
<div class="">-        var_SetInteger (p_mi, "deinterlace", 0);<br class=""></div>
<div class="">+        var_SetInteger (p_mi, "deinterlace", deinterlace);<br class=""></div>
<div class=""><br class=""></div><p class="">In both cases of the else you do the same call. So don't do it in the else.<br class=""></p><div class=""><br class=""></div>
<div class="">Le 28/04/2018 à 20:13, Luís Fernandes a écrit :<br class=""></div>
<blockquote type="cite" cite="mid:0CDA4F63-9E9E-4BD1-BB9C-9F8253B33E18@gmail.com" class=""><pre class="">Hi all,

I’ve reworked the patch to change the method signature, and thus break compatibility with 3.0.
I’ve added a \version annotation to the .h of the function, but I have no idea if I need to do anything else to signal that this is for libvlc4. 
Please advice on what I need to add more for the patch to be accepted.

Some notes on the patch:
- I had to add "auto" because the default deinterlace-mode for VLCKit is normally "auto", so without it the mode would never get triggered
- default mode is "auto" (-1) - which seems to be the default mode for vlc as well

Regards,
Luís

<br class=""></pre><div class=""><br class=""></div>
<div class=""><br class=""></div>
<pre class=""><br class=""></pre><blockquote type="cite" class=""><pre class="">On 22 Apr 2018, at 11:13, Jean-Baptiste Kempf <a href="mailto:jb@videolan.org" class=""><jb@videolan.org></a> wrote:

Hello,

On Sun, 22 Apr 2018, at 09:37, Rémi Denis-Courmont wrote:
<br class=""></pre><blockquote type="cite" class=""><pre class="">IMO, an API clean-up and thus an ABI break is well overdue in general, and 
with that, I'd do 1. But that's just my own personal opinion.
<br class=""></pre></blockquote><pre class="">Yes. Break API and ABI for 4.0. libvlc6. Go ahead.

But if anyone breaks ABI for 3.0, I'll break his neck. (in a soft fashion) :D

-- 
Jean-Baptiste Kempf -  President
+33 672 704 734
_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
<a href="https://mailman.videolan.org/listinfo/vlc-devel" class="">https://mailman.videolan.org/listinfo/vlc-devel</a>
<br class=""></pre></blockquote><pre class=""><br class=""></pre><div class=""><br class=""></div>
<div class=""><br class=""></div>
<pre class="">_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
<a href="https://mailman.videolan.org/listinfo/vlc-devel" class="">https://mailman.videolan.org/listinfo/vlc-devel</a><br class=""></pre></blockquote><div class=""><br class=""></div>
</div>
<div class="">_______________________________________________<br class=""></div>
<div class="">vlc-devel mailing list<br class=""></div>
<div class="">To unsubscribe or modify your subscription options:<br class=""></div>
<div class=""><a href="https://mailman.videolan.org/listinfo/vlc-devel" class="">https://mailman.videolan.org/listinfo/vlc-devel</a><br class=""></div>
</div>
</blockquote></div>
</div>
<div class=""><u class="">_______________________________________________</u><br class=""></div>
<div class="">vlc-devel mailing list<br class=""></div>
<div class="">To unsubscribe or modify your subscription options:<br class=""></div>
<div class=""><a href="https://mailman.videolan.org/listinfo/vlc-devel" class="">https://mailman.videolan.org/listinfo/vlc-devel</a><br class=""></div><p class="">Email had 2 attachments:<br class=""></p><ul class=""><li class=""><div class=""><code class="">auto_deinterlace.patch</code><br class=""></div>
<div class="">  1k (text/plain)<br class=""></div>
</li><li class=""><div class=""><code class="">set_filter_auto_deinterlace.patch</code><br class=""></div>
<div class="">  5k (text/plain)<br class=""></div>
</li></ul></blockquote><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;-webkit-text-stroke-width:0px;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:currentcolor;" class=""><br class=""></div>
<div class=""><span class="font" style="font-family:Helvetica"><span class="size" style="font-size:12px">_______________________________________________</span></span><br class=""></div>
<div class=""><span class="font" style="font-family:Helvetica"><span class="size" style="font-size:12px">vlc-devel mailing list</span></span><br class=""></div>
<div class=""><span class="font" style="font-family:Helvetica"><span class="size" style="font-size:12px">To unsubscribe or modify your subscription options:</span></span><br class=""></div>
<div class=""><a href="https://mailman.videolan.org/listinfo/vlc-devel" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;-moz-text-size-adjust:auto;-webkit-text-stroke-width:0px;" class="">https://mailman.videolan.org/listinfo/vlc-devel</a><br class=""></div>
</div>
</blockquote></div>
<div class=""><br class=""></div>
</div>
</div>
<div class=""><br class=""></div>
<div class=""><br class=""></div>
<div class="">_______________________________________________<br class=""></div>
<div class="">vlc-devel mailing list<br class=""></div>
<div class="">To unsubscribe or modify your subscription options:<br class=""></div>
<div class=""><a href="https://mailman.videolan.org/listinfo/vlc-devel" class="">https://mailman.videolan.org/listinfo/vlc-devel</a><br class=""></div>
</div>
</blockquote></div>
<div class=""><br class=""></div>
<div class=""><u class="">_______________________________________________</u><br class=""></div>
<div class="">vlc-devel mailing list<br class=""></div>
<div class="">To unsubscribe or modify your subscription options:<br class=""></div>
<div class=""><a href="https://mailman.videolan.org/listinfo/vlc-devel" class="">https://mailman.videolan.org/listinfo/vlc-devel</a><br class=""></div><p class="">Email had 2 attachments:<br class=""></p><ul class=""><li class=""><div class=""><code class="">auto_deinterlace_mode.patch</code><br class=""></div>
<div class="">  1k (text/plain)<br class=""></div>
</li><li class=""><div class=""><code class="">set_auto_deinterlace.patch</code><br class=""></div>
<div class="">  5k (text/plain)<br class=""></div>
</li></ul></blockquote><div class=""><br class=""></div>


</div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">vlc-devel mailing list</span><br class=""><span class="">To unsubscribe or modify your subscription options:</span><br class=""><span class=""><a href="https://mailman.videolan.org/listinfo/vlc-devel" class="">https://mailman.videolan.org/listinfo/vlc-devel</a></span></div></blockquote></div>_______________________________________________<br class="">vlc-devel mailing list<br class="">To unsubscribe or modify your subscription options:<br class=""><a href="https://mailman.videolan.org/listinfo/vlc-devel" class="">https://mailman.videolan.org/listinfo/vlc-devel</a></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>