/* 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
return;
}
p_vdec->b_run = 1;
-p_vdec->b_error = 1;
+
/*
* Main loop - it is not executed if an error occured during
* initialization
{
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 );
}
}
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,
/* 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;