* vpar_synchro.h : video parser blocks management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_synchro.h,v 1.6 2001/01/15 19:54:34 massiot Exp $
+ * $Id: vpar_synchro.h,v 1.7 2001/01/16 13:27:14 massiot Exp $
*
* Author: Christophe Massiot <massiot@via.ecp.fr>
*
unsigned int i_eta_p, i_eta_b;
boolean_t b_dropped_last; /* for special synchros below */
mtime_t backward_pts, current_pts;
- mtime_t current_period; /* period to add to the next picture */
- mtime_t backward_period; /* period to add after the next
- * reference picture */
+ int i_current_period; /* period to add to the next picture */
+ int i_backward_period; /* period to add after the next
+ * reference picture
+ * (backward_period * period / 2) */
#ifdef STATS
unsigned int i_trashed_pic, i_not_chosen_pic, i_pic;
* vpar_synchro.c : frame dropping routines
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_synchro.c,v 1.74 2001/01/15 19:54:34 massiot Exp $
+ * $Id: vpar_synchro.c,v 1.75 2001/01/16 13:27:14 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
memset( p_vpar->synchro.pi_meaningful, 0, 4 * sizeof(unsigned int) );
p_vpar->synchro.b_dropped_last = 0;
p_vpar->synchro.current_pts = mdate() + DEFAULT_PTS_DELAY;
- p_vpar->synchro.backward_pts = p_vpar->synchro.current_period =
- p_vpar->synchro.backward_period = 0;
+ p_vpar->synchro.backward_pts = 0;
+ p_vpar->synchro.i_current_period = p_vpar->synchro.i_backward_period = 0;
#ifdef STATS
p_vpar->synchro.i_trashed_pic = p_vpar->synchro.i_not_chosen_pic =
p_vpar->synchro.i_pic = 0;
break;
}
- p_vpar->synchro.current_pts += p_vpar->synchro.current_period;
+ p_vpar->synchro.current_pts += p_vpar->synchro.i_current_period
+ * (period >> 1);
#define PTS_THRESHOLD (period >> 2)
if( i_coding_type == B_CODING_TYPE )
/* A video frame can be displayed 1, 2 or 3 times, according to
* repeat_first_field, top_field_first, progressive_sequence and
* progressive_frame. */
- p_vpar->synchro.current_period = i_repeat_field * (period >> 1);
+ p_vpar->synchro.i_current_period = i_repeat_field;
if( p_vpar->sequence.next_pts )
{
}
else
{
- p_vpar->synchro.current_period = p_vpar->synchro.backward_period;
- p_vpar->synchro.backward_period = i_repeat_field * (period >> 1);
+ p_vpar->synchro.i_current_period = p_vpar->synchro.i_backward_period;
+ p_vpar->synchro.i_backward_period = i_repeat_field;
if( p_vpar->synchro.backward_pts )
{