[vlc-devel] [PATCH 2/3] video-filter: deinterlace: set default mode from blend to auto (which is x)
Victorien Le Couviour--Tuffet
victorien.lecouviour.tuffet at gmail.com
Wed Jun 14 13:41:53 CEST 2017
---
modules/video_filter/deinterlace/deinterlace.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/modules/video_filter/deinterlace/deinterlace.c b/modules/video_filter/deinterlace/deinterlace.c
index 5e56eb88e0..d8562d4a3a 100644
--- a/modules/video_filter/deinterlace/deinterlace.c
+++ b/modules/video_filter/deinterlace/deinterlace.c
@@ -148,15 +148,18 @@ static void SetFilterMethod( filter_t *p_filter, const char *mode, bool pack )
{
filter_sys_t *p_sys = p_filter->p_sys;
- if( mode == NULL )
- mode = "blend";
+ if ( mode == NULL )
+ mode = "auto";
- p_sys->i_mode = DEINTERLACE_BLEND; /* default */
p_sys->b_double_rate = false;
p_sys->b_half_height = false;
p_sys->b_use_frame_history = false;
- if( !strcmp( mode, "discard" ) )
+ if ( !strcmp( mode, "auto" ) )
+ {
+ p_sys->i_mode = DEINTERLACE_X;
+ }
+ else if( !strcmp( mode, "discard" ) )
{
p_sys->i_mode = DEINTERLACE_DISCARD;
p_sys->b_half_height = true;
@@ -178,12 +181,13 @@ static void SetFilterMethod( filter_t *p_filter, const char *mode, bool pack )
}
else if( !strcmp( mode, "blend" ) )
{
+ p_sys->i_mode = DEINTERLACE_BLEND;
}
else if( pack )
{
msg_Err( p_filter, "unknown or incompatible deinterlace mode \"%s\""
" for packed format", mode );
- mode = "blend";
+ return SetFilterMethod( p_filter, "auto", pack );
}
else if( !strcmp( mode, "yadif" ) )
{
@@ -200,7 +204,7 @@ static void SetFilterMethod( filter_t *p_filter, const char *mode, bool pack )
{
msg_Err( p_filter, "unknown or incompatible deinterlace mode \"%s\""
" for high depth format", mode );
- mode = "blend";
+ return SetFilterMethod(p_filter, "auto", pack);
}
else if( !strcmp( mode, "x" ) )
{
--
2.13.1
More information about the vlc-devel
mailing list