[vlc-commits] video-filter: deinterlace: set default mode from blend to auto (which is x)

Victorien Le Couviour--Tuffet git at videolan.org
Fri Jun 23 11:50:52 CEST 2017


vlc | branch: master | Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com> | Fri May  5 16:29:01 2017 +0200| [8a0ef8bc7fa65782e20f4a5c5a89eaa2b394d5ff] | committer: Thomas Guillem

video-filter: deinterlace: set default mode from blend to auto (which is x)

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 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" ) )
     {



More information about the vlc-commits mailing list