* vdec_motion_common.c : common motion compensation routines common
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vdec_motion_common.c,v 1.2 2001/02/13 06:31:05 sam Exp $
+ * $Id: vdec_motion_common.c,v 1.3 2001/02/13 13:01:14 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr>
/* Temporary variables to avoid recalculating things twice */
int i_source_offset, i_dest_offset, i_c_height, i_c_select;
- if( p_source == NULL )
- {
- return;
- }
-
i_source_offset = (p_mb->i_l_x + (i_mv_x >> 1))
+ (p_mb->i_motion_l_y + i_offset
+ b_source_field)
* vpar_headers.h : video parser : headers parsing
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_headers.h,v 1.5 2001/01/24 19:05:55 massiot Exp $
+ * $Id: vpar_headers.h,v 1.6 2001/02/13 13:01:14 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stéphane Borel <stef@via.ecp.fr>
picture_t * p_backward; /* current backward reference frame */
mtime_t next_pts, next_dts;
int i_current_rate;
+ boolean_t b_expect_discontinuity; /* reset the frame predictors
+ * after the current frame */
/* Copyright extension */
boolean_t b_copyright_flag; /* Whether the following
* video_parser.c : video parser thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_parser.c,v 1.73 2001/02/11 01:15:12 sam Exp $
+ * $Id: video_parser.c,v 1.74 2001/02/13 13:01:14 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
p_vpar->sequence.chroma_nonintra_quant.b_allocated = 0;
p_vpar->sequence.i_matrix_coefficients = 1;
p_vpar->sequence.next_pts = p_vpar->sequence.next_dts = 0;
+ p_vpar->sequence.b_expect_discontinuity = 0;
/* Initialize copyright information */
p_vpar->sequence.b_copyright_flag = 0;
if( DECODER_FIFO_START( *p_bit_stream->p_decoder_fifo )->b_discontinuity )
{
/* Escape the current picture and reset the picture predictors. */
+ p_vpar->sequence.b_expect_discontinuity = 1;
p_vpar->picture.b_error = 1;
- if( p_vpar->sequence.p_forward != NULL )
- {
- vout_UnlinkPicture( p_vpar->p_vout, p_vpar->sequence.p_forward );
- }
- if( p_vpar->sequence.p_backward != NULL )
- {
- vout_DatePicture( p_vpar->p_vout, p_vpar->sequence.p_backward,
- vpar_SynchroDate( p_vpar ) );
- vout_UnlinkPicture( p_vpar->p_vout, p_vpar->sequence.p_backward );
- }
- p_vpar->sequence.p_forward = p_vpar->sequence.p_backward = NULL;
}
}
* vpar_blocks.c : blocks parsing
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_blocks.c,v 1.75 2001/02/11 01:15:12 sam Exp $
+ * $Id: vpar_blocks.c,v 1.76 2001/02/13 13:01:15 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr>
* number of macroblocks of the picture, mark the missed ones
* as skipped. */
if( (i_coding_type == P_CODING_TYPE || i_coding_type == B_CODING_TYPE)
+ && !p_vpar->sequence.b_expect_discontinuity
&& p_vpar->picture.b_error &&
( (i_mb_address-i_mb_base) > (p_vpar->sequence.i_mb_size >> 1)
|| (i_structure != FRAME_STRUCTURE
* vpar_headers.c : headers parsing
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_headers.c,v 1.77 2001/02/11 01:15:12 sam Exp $
+ * $Id: vpar_headers.c,v 1.78 2001/02/13 13:01:15 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stéphane Borel <stef@via.ecp.fr>
int i_mb;
#endif
+ /* Recover in case of stream discontinuity. */
+ if( p_vpar->sequence.b_expect_discontinuity )
+ {
+ ReferenceUpdate( p_vpar, I_CODING_TYPE, NULL );
+ ReferenceUpdate( p_vpar, I_CODING_TYPE, NULL );
+ p_vpar->sequence.b_expect_discontinuity = 0;
+ }
+
+ /* Parse the picture header. */
RemoveBits( &p_vpar->bit_stream, 10 ); /* temporal_reference */
p_vpar->picture.i_coding_type = GetBits( &p_vpar->bit_stream, 3 );
RemoveBits( &p_vpar->bit_stream, 16 ); /* vbv_delay */