]> git.sesse.net Git - vlc/commitdiff
Suite des images I.
authorChristophe Massiot <massiot@videolan.org>
Mon, 17 Jan 2000 14:52:25 +0000 (14:52 +0000)
committerChristophe Massiot <massiot@videolan.org>
Mon, 17 Jan 2000 14:52:25 +0000 (14:52 +0000)
include/config.h
src/video_decoder/video_decoder.c
src/video_parser/vpar_headers.c
src/video_parser/vpar_synchro.c

index f9fb7deff2f1212cacd9dd19d539d78872de834f..7160bbd0892ec23e737d94ef6160f4f633e36b02 100644 (file)
 /* Number of macroblock buffers available. It should be always greater than
  * twice the number of macroblocks in a picture. VFIFO_SIZE + 1 should also
  * be a power of two. */
-#define VFIFO_SIZE                      4095
+#define VFIFO_SIZE                      8191
 
 /* Maximum number of macroblocks in a picture. */
-#define MAX_MB                          32767
+#define MAX_MB                          2048
 
 /*******************************************************************************
  * Video decoder configuration
index d452e24d4fa66bd1afd3558255edc6ef7191a297..9eb80ec38b36094435e26fca7905c99046eed9c7 100644 (file)
@@ -186,7 +186,7 @@ static void RunThread( vdec_thread_t *p_vdec )
         return;
     }
     p_vdec->b_run = 1;
-p_vdec->b_error = 1;
+
     /*
      * Main loop - it is not executed if an error occured during
      * initialization
@@ -230,9 +230,6 @@ static void ErrorThread( vdec_thread_t *p_vdec )
     {
         p_mb = vpar_GetMacroblock( &p_vdec->p_vpar->vfifo );
         vpar_DestroyMacroblock( &p_vdec->p_vpar->vfifo, p_mb );
-
-        /* Sleep a while */
-        msleep( VDEC_IDLE_SLEEP );                
     }
 }
 
index 7aa0f7fc8d0fc2f9742d57cb55b8f0c2af13f92f..e0b5e9a392920cb70dc421eb56179504d6add640 100644 (file)
@@ -668,11 +668,17 @@ static void PictureHeader( vpar_thread_t * p_vpar )
     if( !p_vpar->picture.i_current_structure )
     {
         /* This is a new frame. Get a structure from the video_output. */
-        P_picture = vout_CreatePicture( p_vpar->p_vout,
+        if( ( P_picture = vout_CreatePicture( p_vpar->p_vout,
                                         99+p_vpar->sequence.i_chroma_format, /*???*/
                                         p_vpar->sequence.i_width,
                                         p_vpar->sequence.i_height,
-                                        p_vpar->sequence.i_width*sizeof(yuv_data_t) );
+                                        p_vpar->sequence.i_width*sizeof(yuv_data_t) ) )
+             == NULL )
+        {
+            intf_ErrMsg("vpar debug: allocation error in vout_CreatePicture\n");
+            p_vpar->b_error = 1;
+            return;
+        }
 
         /* Initialize values. */
         P_picture->date = vpar_SynchroDecode( p_vpar,
@@ -757,14 +763,18 @@ fprintf(stderr, "Image parsee\n");
 
         /* Link referenced pictures for the decoder 
          * They are unlinked in vpar_ReleaseMacroblock() & vpar_DestroyMacroblock() */
+#if 0
         if( p_vpar->sequence.p_forward != NULL )
         {
-               vout_LinkPicture( p_vpar->p_vout, p_vpar->sequence.p_forward );
+            vout_LinkPicture( p_vpar->p_vout, p_vpar->sequence.p_forward );
         }
         if( p_vpar->sequence.p_backward != NULL )
         {
             vout_LinkPicture( p_vpar->p_vout, p_vpar->sequence.p_backward );
         } 
+#endif
+        /* Send signal to the video_decoder. */
+        vlc_cond_signal( &p_vpar->vfifo.wait );
         
         /* Prepare context for the next picture. */
         P_picture = NULL;
index bb1a42595acf7e1c6839b5d04a10f89129cbade0..23e297f6c2358560f80c29d6cacc231ddba84884 100644 (file)
@@ -67,7 +67,7 @@ void vpar_SynchroTrash( vpar_thread_t * p_vpar, int i_coding_type,
 mtime_t vpar_SynchroDecode( vpar_thread_t * p_vpar, int i_coding_type,
                             int i_structure )
 {
-
+    return mdate() + 500000;
 }
 
 /*****************************************************************************