]> git.sesse.net Git - vlc/commitdiff
. support pour --synchro I+ (images I et la premi�re P)
authorSam Hocevar <sam@videolan.org>
Thu, 24 Aug 2000 00:16:25 +0000 (00:16 +0000)
committerSam Hocevar <sam@videolan.org>
Thu, 24 Aug 2000 00:16:25 +0000 (00:16 +0000)
ChangeLog
include/vpar_synchro.h
src/interface/main.c
src/video_parser/video_parser.c
src/video_parser/vpar_synchro.c

index 0c66166e2287f905699f8ca0708c56aa449342f3..036fd12d30983463c1891475fbef63c1b0c64817 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,13 @@
 O.1.99i :
 
-  * fixed the support for the field pictures, which involved a few dozens
+  * fixed the support for field pictures, which involved a few dozens
     bugs in the video parser and video decoder.
   * put names of authors under a lot of source files, for historical
     purposes.
   * fixed another input_file exit bug for the beos version.
   * fixed the aliases install.
   * renamed an inconsistent varaible in src/input/input_file.c.
+  * added support for I+ synchro (all Is and the first P).
 
 Tue, 22 Aug 2000 01:31:58 +0200
 0.1.99h :
index 14304d7ddde57842897d1425c876f27b1f4b5f7e..b2e6e7b21ae9e563ace8971bd89263b5a564b2b3 100644 (file)
@@ -75,7 +75,7 @@ typedef struct video_synchro_s
     int           displayable_p;
     boolean_t     b_all_B;
     int           displayable_b;
-    boolean_t     b_dropped_last_B;
+    boolean_t     b_dropped_last;
 
 } video_synchro_t;
 
@@ -84,9 +84,10 @@ typedef struct video_synchro_s
 
 #define VPAR_SYNCHRO_DEFAULT   0
 #define VPAR_SYNCHRO_I         1
-#define VPAR_SYNCHRO_IP        2
-#define VPAR_SYNCHRO_IPplus    3
-#define VPAR_SYNCHRO_IPB       4
+#define VPAR_SYNCHRO_Iplus     2
+#define VPAR_SYNCHRO_IP        3
+#define VPAR_SYNCHRO_IPplus    4
+#define VPAR_SYNCHRO_IPB       5
 
 #endif
 
index dd950075d8e145be30b942eb3a5a0e4a50055a4a..639a46bd9279d49c9080aa24d10d875bdd8c07a5 100644 (file)
@@ -657,7 +657,7 @@ static void Usage( int i_fashion )
     /* Synchro parameters */
     intf_Msg( "\n"
               "Synchro parameters:\n"
-              "  " VPAR_SYNCHRO_VAR "={I|IP|IP+|IPB}      \tsynchro algorithm\n");
+              "  " VPAR_SYNCHRO_VAR "={I|I+|IP|IP+|IPB}   \tsynchro algorithm\n");
 }
 
 /*****************************************************************************
index e960d7349a16b3f44d7ea43b5bbf1dec7fc4305a..0af739cd50dcabd913c83d58996665e745f8bac7 100644 (file)
@@ -301,7 +301,7 @@ static int InitThread( vpar_thread_t *p_vpar )
     p_vpar->synchro.displayable_p = 2 << 10;
     p_vpar->synchro.b_all_B = 0;
     p_vpar->synchro.displayable_b = 0;
-    p_vpar->synchro.b_dropped_last_B = 0;
+    p_vpar->synchro.b_dropped_last = 0;
     /* assume there were about 3 P and 6 B images between I's */
     p_vpar->synchro.i_P_seen = p_vpar->synchro.i_P_kept = 1 << 10;
     p_vpar->synchro.i_B_seen = p_vpar->synchro.i_B_kept = 1 << 10;
@@ -500,6 +500,10 @@ static int SynchroType( )
           case '\0':
             return VPAR_SYNCHRO_I;
 
+          case '+':
+            if( *psz_synchro ) return 0;
+            return VPAR_SYNCHRO_Iplus;
+
           case 'p':
           case 'P':
             switch( *psz_synchro++ )
index 7d61fa783c3d6c36744bf5b9504825aeada2dcc0..dd75986591b010f34404c5f1ba1ee20b35529b29 100644 (file)
@@ -215,6 +215,10 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type,
             if( p_vpar->synchro.i_type != VPAR_SYNCHRO_DEFAULT )
             {
                 /* I, IP, IP+, IPB */
+                if( p_vpar->synchro.i_type == VPAR_SYNCHRO_Iplus )
+                {
+                    p_vpar->synchro.b_dropped_last = 1;
+                }
                 return( 1 );
             }
 
@@ -227,6 +231,19 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type,
                 return( 0 );
             }
 
+            if( p_vpar->synchro.i_type == VPAR_SYNCHRO_Iplus ) /* I+ */
+            {
+                if( p_vpar->synchro.b_dropped_last )
+                {
+                    p_vpar->synchro.b_dropped_last = 0;
+                    return( 1 );
+                }
+                else
+                {
+                    return( 0 );
+                }
+            }
+
             if( p_vpar->synchro.i_type >= VPAR_SYNCHRO_IP ) /* IP, IP+, IPB */
             {
                 return( 1 );
@@ -260,13 +277,13 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type,
                     return( 1 );
                 }
 
-                if( p_vpar->synchro.b_dropped_last_B ) /* IP+ */
+                if( p_vpar->synchro.b_dropped_last ) /* IP+ */
                 {
-                    p_vpar->synchro.b_dropped_last_B = 0;
+                    p_vpar->synchro.b_dropped_last = 0;
                     return( 1 );
                 }
 
-                p_vpar->synchro.b_dropped_last_B = 1;
+                p_vpar->synchro.b_dropped_last = 1;
                 return( 0 );
             }