Commit c760db38 authored by Christophe Massiot's avatar Christophe Massiot

* Change for the forthcoming fast forward and slow motion support.

parent 6eb70788
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -64,9 +64,10 @@ typedef struct video_synchro_s
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;
......
......@@ -2,7 +2,7 @@
* 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>
......@@ -150,8 +150,8 @@ void vpar_SynchroInit( vpar_thread_t * p_vpar )
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;
......@@ -469,7 +469,8 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type,
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 )
......@@ -477,7 +478,7 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_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 )
{
......@@ -497,8 +498,8 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type,
}
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 )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment