<html><head></head><body><div class="gmail_quote">Le 26 juin 2017 19:20:17 GMT+02:00, Steve Lhomme <robux4@videolabs.io> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">---<br /> modules/video_filter/deinterlace/deinterlace.c | 6 ++++--<br /> modules/video_filter/deinterlace/deinterlace.h | 2 ++<br /> 2 files changed, 6 insertions(+), 2 deletions(-)<br /><br />diff --git a/modules/video_filter/deinterlace/deinterlace.c b/modules/video_filter/deinterlace/deinterlace.c<br />index 4ebc3826ab..9baa049ccb 100644<br />--- a/modules/video_filter/deinterlace/deinterlace.c<br />+++ b/modules/video_filter/deinterlace/deinterlace.c<br />@@ -155,6 +155,7 @@ static void SetFilterMethod( filter_t *p_filter, const char *mode, bool pack )<br />     p_sys->b_half_height = false;<br />     p_sys->b_use_frame_history = false;<br />     p_sys->b_single_field = false;<br />+    p_sys->b_phosphor_mode = false;<br /> <br />     if ( !strcmp( mode, "auto" ) || !strcmp( mode, "x" ) )<br />     {<br />@@ -215,6 +216,7 @@ static void SetFilterMethod( filter_t *p_filter, const char *mode, bool pack )<br />     else if( !strcmp( mode, "phosphor" ) )<br />     {<br />         p_sys->i_mode = DEINTERLACE_PHOSPHOR;<br />+        p_sys->b_phosphor_mode = true;<br />         p_sys->b_double_rate = true;<br />         p_sys->b_use_frame_history = true;<br />     }<br />@@ -261,7 +263,7 @@ static void GetOutputFormat( filter_t *p_filter,<br />         p_dst->i_frame_rate *= 2;<br />     }<br /> <br />-    if( p_sys->i_mode == DEINTERLACE_PHOSPHOR  &&<br />+    if( p_sys->b_phosphor_mode &&<br />         2 * p_sys->chroma->p[1].h.num == p_sys->chroma->p[1].h.den &&<br />         2 * p_sys->chroma->p[2].h.num == p_sys->chroma->p[2].h.den &&<br />         p_sys->phosphor.i_chroma_for_420 == PC_UPCONVERT )<br />@@ -726,7 +728,7 @@ notsupp:<br />     }<br /> <br />     /* */<br />-    if( p_sys->i_mode == DEINTERLACE_PHOSPHOR )<br />+    if( p_sys->b_phosphor_mode )<br />     {<br />         int i_c420 = var_GetInteger( p_filter,<br />                                      FILTER_CFG_PREFIX "phosphor-chroma" );<br />diff --git a/modules/video_filter/deinterlace/deinterlace.h b/modules/video_filter/deinterlace/deinterlace.h<br />index 3059f09f2a..d09cac5f24 100644<br />--- a/modules/video_filter/deinterlace/deinterlace.h<br />+++ b/modules/video_filter/deinterlace/deinterlace.h<br />@@ -120,6 +120,8 @@ struct filter_sys_t<br />     picture_t *pp_history[HISTORY_SIZE];<br /> <br />     /* Algorithm-specific substructures */<br />+    bool b_phosphor_mode;     /**< The filter mode is "phosphor" */<br />+<br />     union {<br />         phosphor_sys_t phosphor; /**< Phosphor algorithm state. */<br />         ivtc_sys_t ivtc;         /**< IVTC algorithm state. */</pre></blockquote></div><br clear="all">Seems like a failure to abstract the algorithms correctly, TBH.<br>
-- <br>
Rémi Denis-Courmont<br>
Typed on an inconvenient virtual keyboard</body></html>