[vlc-devel] [PATCH 08/12] video_filter:deinterlace: tell which methods won't care about the field element
Steve Lhomme
robux4 at videolabs.io
Tue Jun 27 16:11:10 CEST 2017
---
modules/video_filter/deinterlace/deinterlace.c | 7 +++++++
modules/video_filter/deinterlace/deinterlace.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/modules/video_filter/deinterlace/deinterlace.c b/modules/video_filter/deinterlace/deinterlace.c
index 17ab199c50..5eeeb8c127 100644
--- a/modules/video_filter/deinterlace/deinterlace.c
+++ b/modules/video_filter/deinterlace/deinterlace.c
@@ -154,10 +154,12 @@ static void SetFilterMethod( filter_t *p_filter, const char *mode, bool pack )
p_sys->b_double_rate = false;
p_sys->b_half_height = false;
p_sys->b_use_frame_history = false;
+ p_sys->b_single_field = false;
if( !strcmp( mode, "discard" ) )
{
p_sys->i_mode = DEINTERLACE_DISCARD;
+ p_sys->b_single_field = true;
p_sys->b_half_height = true;
}
else if( !strcmp( mode, "bob" ) || !strcmp( mode, "progressive-scan" ) )
@@ -173,11 +175,13 @@ static void SetFilterMethod( filter_t *p_filter, const char *mode, bool pack )
else if( !strcmp( mode, "mean" ) )
{
p_sys->i_mode = DEINTERLACE_MEAN;
+ p_sys->b_single_field = true;
p_sys->b_half_height = true;
}
else if( !strcmp( mode, "blend" ) )
{
p_sys->i_mode = DEINTERLACE_BLEND;
+ p_sys->b_single_field = true;
}
else if( pack )
{
@@ -188,6 +192,7 @@ static void SetFilterMethod( filter_t *p_filter, const char *mode, bool pack )
else if( !strcmp( mode, "yadif" ) )
{
p_sys->i_mode = DEINTERLACE_YADIF;
+ p_sys->b_single_field = true;
p_sys->b_use_frame_history = true;
}
else if( !strcmp( mode, "yadif2x" ) )
@@ -205,6 +210,7 @@ static void SetFilterMethod( filter_t *p_filter, const char *mode, bool pack )
else if( !strcmp( mode, "x" ) )
{
p_sys->i_mode = DEINTERLACE_X;
+ p_sys->b_single_field = true;
}
else if( !strcmp( mode, "phosphor" ) )
{
@@ -215,6 +221,7 @@ static void SetFilterMethod( filter_t *p_filter, const char *mode, bool pack )
else if( !strcmp( mode, "ivtc" ) )
{
p_sys->i_mode = DEINTERLACE_IVTC;
+ p_sys->b_single_field = true;
p_sys->b_use_frame_history = true;
}
else
diff --git a/modules/video_filter/deinterlace/deinterlace.h b/modules/video_filter/deinterlace/deinterlace.h
index 00fddb74ec..3059f09f2a 100644
--- a/modules/video_filter/deinterlace/deinterlace.h
+++ b/modules/video_filter/deinterlace/deinterlace.h
@@ -97,6 +97,7 @@ struct filter_sys_t
bool b_double_rate; /**< Shall we double the framerate? */
bool b_half_height; /**< Shall be divide the height by 2 */
bool b_use_frame_history; /**< Use the input frame history buffer? */
+ bool b_single_field; /**< The filter doesn't handle the field info */
/** Merge routine: C, MMX, SSE, ALTIVEC, NEON, ... */
void (*pf_merge) ( void *, const void *, const void *, size_t );
--
2.12.1
More information about the vlc-devel
mailing list