[vlc-devel] [PATCH] deinterlace: fix filter selection
Steve Lhomme
robux4 at videolabs.io
Mon Jul 3 10:18:40 CEST 2017
Apply the filter setting *after* initializing the context.
---
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 a73cb7bc59..cd4d70c25c 100644
--- a/modules/video_filter/deinterlace/deinterlace.c
+++ b/modules/video_filter/deinterlace/deinterlace.c
@@ -309,13 +309,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, "deinterlace-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;
--
2.12.1
More information about the vlc-devel
mailing list