[vlc-commits] deinterlace: fix filter selection

Steve Lhomme git at videolan.org
Wed Jul 5 11:17:06 CEST 2017


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon Jul  3 10:18:40 2017 +0200| [3d6a804a1062459f3c46c834a2029dc011dc2db2] | committer: Jean-Baptiste Kempf

deinterlace: fix filter selection

Apply the filter setting *after* initializing the context.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3d6a804a1062459f3c46c834a2029dc011dc2db2
---

 modules/video_filter/deinterlace/deinterlace.c | 4 ++--
 modules/video_output/win32/d3d11_deinterlace.c | 4 ++--
 modules/video_output/win32/dxva2_deinterlace.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/video_filter/deinterlace/deinterlace.c b/modules/video_filter/deinterlace/deinterlace.c
index d028834998..1397aed9b8 100644
--- a/modules/video_filter/deinterlace/deinterlace.c
+++ b/modules/video_filter/deinterlace/deinterlace.c
@@ -318,13 +318,13 @@ notsupp:
 
     p_sys->chroma = chroma;
 
+    InitDeinterlacingContext( &p_sys->context );
+
     config_ChainParse( p_filter, FILTER_CFG_PREFIX, ppsz_filter_options,
                        p_filter->p_cfg );
     char *psz_mode = var_InheritString( p_filter, FILTER_CFG_PREFIX "mode" );
     SetFilterMethod( p_filter, psz_mode, packed );
 
-    InitDeinterlacingContext( &p_sys->context );
-
     IVTCClearState( p_filter );
 
 #if defined(CAN_COMPILE_C_ALTIVEC)
diff --git a/modules/video_output/win32/d3d11_deinterlace.c b/modules/video_output/win32/d3d11_deinterlace.c
index 6d3efa9110..6be55c600f 100644
--- a/modules/video_output/win32/d3d11_deinterlace.c
+++ b/modules/video_output/win32/d3d11_deinterlace.c
@@ -419,6 +419,8 @@ static int Open(vlc_object_t *obj)
 
     sys->procEnumerator  = processorEnumerator;
 
+    InitDeinterlacingContext( &sys->context );
+
     sys->context.settings = p_mode->settings;
     if (sys->context.settings.b_double_rate)
         sys->context.pf_render_ordered = RenderPic;
@@ -433,8 +435,6 @@ static int Open(vlc_object_t *obj)
        goto error;
     }
 
-    InitDeinterlacingContext( &sys->context );
-
     filter->fmt_out.video   = out_fmt;
     filter->pf_video_filter = Deinterlace;
     filter->pf_flush        = Flush;
diff --git a/modules/video_output/win32/dxva2_deinterlace.c b/modules/video_output/win32/dxva2_deinterlace.c
index 23bbdb8876..520fc29ac9 100644
--- a/modules/video_output/win32/dxva2_deinterlace.c
+++ b/modules/video_output/win32/dxva2_deinterlace.c
@@ -357,6 +357,8 @@ static int Open(vlc_object_t *obj)
     sys->d3d9_dll     = d3d9_dll;
     sys->decoder_caps = best_caps;
 
+    InitDeinterlacingContext( &sys->context );
+
     sys->context.settings = p_mode->settings;
     sys->context.settings.b_use_frame_history = best_caps.NumBackwardRefSamples != 0 ||
                                        best_caps.NumForwardRefSamples  != 0;
@@ -374,8 +376,6 @@ static int Open(vlc_object_t *obj)
        goto error;
     }
 
-    InitDeinterlacingContext( &sys->context );
-
     filter->fmt_out.video   = out_fmt;
     filter->pf_video_filter = Deinterlace;
     filter->pf_flush        = Flush;



More information about the vlc-commits mailing list