Commit c302e989 authored by Christophe Massiot's avatar Christophe Massiot

* include/video.h include/video_output.h src/video_output/vout_pictures.c:

  In vout_CreatePicture() replace i_repeat_first_field by the more useful
  i_nb_fields
* modules/gui/macosx/intf.m: Fixed a warning
* modules/codec/libmpeg2.c include/vout_synchro.h src/video_output/vout_synchro.c:
  Re-added support for slice-I streams, plus miscellaneous tweakings
parent 6a1d15a4
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* includes all common video types and constants. * includes all common video types and constants.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: video.h,v 1.62 2003/03/28 17:02:25 gbazin Exp $ * $Id: video.h,v 1.63 2003/06/09 00:33:34 massiot Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* *
...@@ -74,7 +74,7 @@ struct picture_t ...@@ -74,7 +74,7 @@ struct picture_t
/* Picture dynamic properties - those properties can be changed by the /* Picture dynamic properties - those properties can be changed by the
* decoder */ * decoder */
vlc_bool_t b_progressive; /* is it a progressive frame ? */ vlc_bool_t b_progressive; /* is it a progressive frame ? */
vlc_bool_t b_repeat_first_field; /* RFF bit */ unsigned int i_nb_fields; /* # of displayed fields */
vlc_bool_t b_top_field_first; /* which field is first */ vlc_bool_t b_top_field_first; /* which field is first */
/* The picture heap we are attached to */ /* The picture heap we are attached to */
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* thread, and destroy a previously opened video output thread. * thread, and destroy a previously opened video output thread.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: video_output.h,v 1.94 2003/04/27 23:16:35 gbazin Exp $ * $Id: video_output.h,v 1.95 2003/06/09 00:33:34 massiot Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr> * Samuel Hocevar <sam@via.ecp.fr>
...@@ -154,7 +154,7 @@ VLC_EXPORT( int, vout_VarCallback, ( vlc_object_t *, const char *, vlc_value_t, ...@@ -154,7 +154,7 @@ VLC_EXPORT( int, vout_VarCallback, ( vlc_object_t *, const char *, vlc_value_t,
VLC_EXPORT( int, vout_ChromaCmp, ( uint32_t, uint32_t ) ); VLC_EXPORT( int, vout_ChromaCmp, ( uint32_t, uint32_t ) );
VLC_EXPORT( picture_t *, vout_CreatePicture, ( vout_thread_t *, vlc_bool_t, vlc_bool_t, vlc_bool_t ) ); VLC_EXPORT( picture_t *, vout_CreatePicture, ( vout_thread_t *, vlc_bool_t, vlc_bool_t, unsigned int ) );
VLC_EXPORT( void, vout_InitPicture, ( vlc_object_t *, picture_t *, int, int, uint32_t ) ); VLC_EXPORT( void, vout_InitPicture, ( vlc_object_t *, picture_t *, int, int, uint32_t ) );
VLC_EXPORT( void, vout_AllocatePicture,( vout_thread_t *, picture_t *, int, int, uint32_t ) ); VLC_EXPORT( void, vout_AllocatePicture,( vout_thread_t *, picture_t *, int, int, uint32_t ) );
VLC_EXPORT( void, vout_DestroyPicture, ( vout_thread_t *, picture_t * ) ); VLC_EXPORT( void, vout_DestroyPicture, ( vout_thread_t *, picture_t * ) );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_synchro.h: frame-dropping structures * vout_synchro.h: frame-dropping structures
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2003 VideoLAN * Copyright (C) 1999-2003 VideoLAN
* $Id: vout_synchro.h,v 1.1 2003/04/14 22:22:32 massiot Exp $ * $Id: vout_synchro.h,v 1.2 2003/06/09 00:33:34 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr> * Jean-Marc Dressler <polux@via.ecp.fr>
...@@ -49,7 +49,11 @@ struct vout_synchro_t ...@@ -49,7 +49,11 @@ struct vout_synchro_t
/* and p_vout->render_time (read with p_vout->change_lock) */ /* and p_vout->render_time (read with p_vout->change_lock) */
/* stream context */ /* stream context */
vlc_bool_t i_nb_ref; /* Number of reference pictures */ int i_nb_ref; /* Number of reference pictures */
int i_dec_nb_ref; /* Number of reference pictures we'll *
* have if we decode the current pic */
int i_trash_nb_ref; /* Number of reference pictures we'll *
* have if we trash the current pic */
unsigned int i_eta_p, i_eta_b; unsigned int i_eta_p, i_eta_b;
mtime_t backward_pts, current_pts; mtime_t backward_pts, current_pts;
int i_current_period; /* period to add to the next picture */ int i_current_period; /* period to add to the next picture */
......
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin * intf.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: intf.m,v 1.88 2003/06/01 23:48:17 hartman Exp $ * $Id: intf.m,v 1.89 2003/06/09 00:33:34 massiot Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "prefs.h" #include "prefs.h"
#include "playlist.h" #include "playlist.h"
#include "info.h" #include "info.h"
#include "controls.h"
/***************************************************************************** /*****************************************************************************
* Local prototypes. * Local prototypes.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_pictures.c : picture management functions * vout_pictures.c : picture management functions
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * Copyright (C) 2000 VideoLAN
* $Id: vout_pictures.c,v 1.39 2003/04/27 23:16:35 gbazin Exp $ * $Id: vout_pictures.c,v 1.40 2003/06/09 00:33:34 massiot Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -108,7 +108,7 @@ void vout_DatePicture( vout_thread_t *p_vout, ...@@ -108,7 +108,7 @@ void vout_DatePicture( vout_thread_t *p_vout,
picture_t *vout_CreatePicture( vout_thread_t *p_vout, picture_t *vout_CreatePicture( vout_thread_t *p_vout,
vlc_bool_t b_progressive, vlc_bool_t b_progressive,
vlc_bool_t b_top_field_first, vlc_bool_t b_top_field_first,
vlc_bool_t b_repeat_first_field ) unsigned int i_nb_fields )
{ {
int i_pic; /* picture index */ int i_pic; /* picture index */
picture_t * p_pic; picture_t * p_pic;
...@@ -136,7 +136,7 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout, ...@@ -136,7 +136,7 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout,
p_pic->b_force = 0; p_pic->b_force = 0;
p_pic->b_progressive = b_progressive; p_pic->b_progressive = b_progressive;
p_pic->b_repeat_first_field = b_repeat_first_field; p_pic->i_nb_fields = i_nb_fields;
p_pic->b_top_field_first = b_top_field_first; p_pic->b_top_field_first = b_top_field_first;
p_vout->i_heap_size++; p_vout->i_heap_size++;
...@@ -178,7 +178,7 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout, ...@@ -178,7 +178,7 @@ picture_t *vout_CreatePicture( vout_thread_t *p_vout,
p_freepic->b_force = 0; p_freepic->b_force = 0;
p_freepic->b_progressive = b_progressive; p_freepic->b_progressive = b_progressive;
p_freepic->b_repeat_first_field = b_repeat_first_field; p_freepic->i_nb_fields = i_nb_fields;
p_freepic->b_top_field_first = b_top_field_first; p_freepic->b_top_field_first = b_top_field_first;
p_freepic->i_matrix_coefficients = 1; p_freepic->i_matrix_coefficients = 1;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_synchro.c : frame dropping routines * vout_synchro.c : frame dropping routines
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: vout_synchro.c,v 1.2 2003/05/04 22:33:35 massiot Exp $ * $Id: vout_synchro.c,v 1.3 2003/06/09 00:33:34 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr> * Samuel Hocevar <sam@via.ecp.fr>
...@@ -134,6 +134,7 @@ vout_synchro_t * __vout_SynchroInit( vlc_object_t * p_object, ...@@ -134,6 +134,7 @@ vout_synchro_t * __vout_SynchroInit( vlc_object_t * p_object,
memset( p_synchro->p_tau, 0, 4 * sizeof(mtime_t) ); memset( p_synchro->p_tau, 0, 4 * sizeof(mtime_t) );
memset( p_synchro->pi_meaningful, 0, 4 * sizeof(unsigned int) ); memset( p_synchro->pi_meaningful, 0, 4 * sizeof(unsigned int) );
p_synchro->i_nb_ref = 0; p_synchro->i_nb_ref = 0;
p_synchro->i_trash_nb_ref = p_synchro->i_dec_nb_ref = 0;
p_synchro->current_pts = mdate() + DEFAULT_PTS_DELAY; p_synchro->current_pts = mdate() + DEFAULT_PTS_DELAY;
p_synchro->backward_pts = 0; p_synchro->backward_pts = 0;
p_synchro->i_current_period = p_synchro->i_backward_period = 0; p_synchro->i_current_period = p_synchro->i_backward_period = 0;
...@@ -161,6 +162,7 @@ void vout_SynchroRelease( vout_synchro_t * p_synchro ) ...@@ -161,6 +162,7 @@ void vout_SynchroRelease( vout_synchro_t * p_synchro )
void vout_SynchroReset( vout_synchro_t * p_synchro ) void vout_SynchroReset( vout_synchro_t * p_synchro )
{ {
p_synchro->i_nb_ref = 0; p_synchro->i_nb_ref = 0;
p_synchro->i_trash_nb_ref = p_synchro->i_dec_nb_ref = 0;
} }
/***************************************************************************** /*****************************************************************************
...@@ -215,10 +217,7 @@ vlc_bool_t vout_SynchroChoose( vout_synchro_t * p_synchro, int i_coding_type ) ...@@ -215,10 +217,7 @@ vlc_bool_t vout_SynchroChoose( vout_synchro_t * p_synchro, int i_coding_type )
{ {
msg_Warn( p_synchro, msg_Warn( p_synchro,
"synchro trashing I ("I64Fd")", pts - now ); "synchro trashing I ("I64Fd")", pts - now );
p_synchro->i_nb_ref = 0;
} }
else if( p_synchro->i_nb_ref < 2 )
p_synchro->i_nb_ref++;
break; break;
case P_CODING_TYPE: case P_CODING_TYPE:
...@@ -258,10 +257,6 @@ vlc_bool_t vout_SynchroChoose( vout_synchro_t * p_synchro, int i_coding_type ) ...@@ -258,10 +257,6 @@ vlc_bool_t vout_SynchroChoose( vout_synchro_t * p_synchro, int i_coding_type )
{ {
b_decode = 0; b_decode = 0;
} }
if( b_decode )
p_synchro->i_nb_ref = 2;
else
p_synchro->i_nb_ref = 0;
break; break;
case B_CODING_TYPE: case B_CODING_TYPE:
...@@ -296,6 +291,7 @@ vlc_bool_t vout_SynchroChoose( vout_synchro_t * p_synchro, int i_coding_type ) ...@@ -296,6 +291,7 @@ vlc_bool_t vout_SynchroChoose( vout_synchro_t * p_synchro, int i_coding_type )
void vout_SynchroTrash( vout_synchro_t * p_synchro ) void vout_SynchroTrash( vout_synchro_t * p_synchro )
{ {
p_synchro->i_trashed_pic++; p_synchro->i_trashed_pic++;
p_synchro->i_nb_ref = p_synchro->i_trash_nb_ref;
} }
/***************************************************************************** /*****************************************************************************
...@@ -304,6 +300,7 @@ void vout_SynchroTrash( vout_synchro_t * p_synchro ) ...@@ -304,6 +300,7 @@ void vout_SynchroTrash( vout_synchro_t * p_synchro )
void vout_SynchroDecode( vout_synchro_t * p_synchro ) void vout_SynchroDecode( vout_synchro_t * p_synchro )
{ {
p_synchro->decoding_start = mdate(); p_synchro->decoding_start = mdate();
p_synchro->i_nb_ref = p_synchro->i_dec_nb_ref;
} }
/***************************************************************************** /*****************************************************************************
...@@ -365,14 +362,17 @@ void vout_SynchroNewPicture( vout_synchro_t * p_synchro, int i_coding_type, ...@@ -365,14 +362,17 @@ void vout_SynchroNewPicture( vout_synchro_t * p_synchro, int i_coding_type,
if( p_synchro->i_eta_p if( p_synchro->i_eta_p
&& p_synchro->i_eta_p != p_synchro->i_n_p ) && p_synchro->i_eta_p != p_synchro->i_n_p )
{ {
#if 0
msg_Dbg( p_synchro, msg_Dbg( p_synchro,
"stream periodicity changed from P[%d] to P[%d]", "stream periodicity changed from P[%d] to P[%d]",
p_synchro->i_n_p, p_synchro->i_eta_p ); p_synchro->i_n_p, p_synchro->i_eta_p );
#endif
p_synchro->i_n_p = p_synchro->i_eta_p; p_synchro->i_n_p = p_synchro->i_eta_p;
} }
p_synchro->i_eta_p = p_synchro->i_eta_b = 0; p_synchro->i_eta_p = p_synchro->i_eta_b = 0;
p_synchro->i_trash_nb_ref = 0;
if( p_synchro->i_nb_ref < 2 )
p_synchro->i_dec_nb_ref = p_synchro->i_nb_ref + 1;
else
p_synchro->i_dec_nb_ref = p_synchro->i_nb_ref;
#if 0 #if 0
msg_Dbg( p_synchro, "I("I64Fd") P("I64Fd")[%d] B("I64Fd")" msg_Dbg( p_synchro, "I("I64Fd") P("I64Fd")[%d] B("I64Fd")"
...@@ -407,15 +407,20 @@ void vout_SynchroNewPicture( vout_synchro_t * p_synchro, int i_coding_type, ...@@ -407,15 +407,20 @@ void vout_SynchroNewPicture( vout_synchro_t * p_synchro, int i_coding_type,
if( p_synchro->i_eta_b if( p_synchro->i_eta_b
&& p_synchro->i_eta_b != p_synchro->i_n_b ) && p_synchro->i_eta_b != p_synchro->i_n_b )
{ {
msg_Warn( p_synchro, msg_Dbg( p_synchro,
"stream periodicity changed from B[%d] to B[%d]", "stream periodicity changed from B[%d] to B[%d]",
p_synchro->i_n_b, p_synchro->i_eta_b ); p_synchro->i_n_b, p_synchro->i_eta_b );
p_synchro->i_n_b = p_synchro->i_eta_b; p_synchro->i_n_b = p_synchro->i_eta_b;
} }
p_synchro->i_eta_b = 0; p_synchro->i_eta_b = 0;
p_synchro->i_dec_nb_ref = 2;
p_synchro->i_trash_nb_ref = 0;
break; break;
case B_CODING_TYPE: case B_CODING_TYPE:
p_synchro->i_eta_b++; p_synchro->i_eta_b++;
p_synchro->i_dec_nb_ref = p_synchro->i_trash_nb_ref
= p_synchro->i_nb_ref;
break; break;
} }
......
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