Commit 18f5cd99 authored by Christophe Massiot's avatar Christophe Massiot

Cleaned up include/. Unnecessary headers are no longer under include/, but

under src/. (eat that)
parent 213957d2
/*****************************************************************************
* input.h: structures of the input not exported to other modules
* input_ext-plugins.h: structures of the input not exported to other modules,
* but exported to plug-ins
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input.h,v 1.38 2001/06/27 09:53:56 massiot Exp $
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: input_ext-plugins.h,v 1.1 2001/07/17 09:48:07 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -131,3 +132,163 @@ static __inline__ void input_NullPacket( input_thread_t * p_input,
}
}
/*
* Optional netlist management
*/
/*****************************************************************************
* netlist_t: structure to manage a netlist
*****************************************************************************/
typedef struct netlist_s
{
vlc_mutex_t lock;
size_t i_buffer_size;
/* Buffers */
byte_t * p_buffers; /* Big malloc'ed area */
data_packet_t * p_data; /* malloc'ed area */
pes_packet_t * p_pes; /* malloc'ed area */
/* FIFOs of free packets */
data_packet_t ** pp_free_data;
pes_packet_t ** pp_free_pes;
struct iovec * p_free_iovec;
/* FIFO size */
unsigned int i_nb_pes;
unsigned int i_nb_data;
/* Index */
unsigned int i_data_start, i_data_end;
unsigned int i_pes_start, i_pes_end;
/* Number of blocs read once by readv */
unsigned int i_read_once;
} netlist_t;
/*****************************************************************************
* Prototypes
*****************************************************************************/
int input_NetlistInit( struct input_thread_s *,
int i_nb_data, int i_nb_pes,
size_t i_buffer_size,
int i_read_once );
struct iovec * input_NetlistGetiovec( void * p_method_data );
void input_NetlistMviovec( void * , size_t, struct data_packet_s **);
struct data_packet_s * input_NetlistNewPacket( void *, size_t );
struct pes_packet_s * input_NetlistNewPES( void * );
void input_NetlistDeletePacket( void *, struct data_packet_s * );
void input_NetlistDeletePES( void *, struct pes_packet_s * );
void input_NetlistEnd( struct input_thread_s * );
/*
* Optional MPEG demultiplexing
*/
/*****************************************************************************
* Constants
*****************************************************************************/
#define TS_PACKET_SIZE 188 /* Size of a TS packet */
#define PSI_SECTION_SIZE 4096 /* Maximum size of a PSI section */
#define PAT_UNINITIALIZED (1 << 6)
#define PMT_UNINITIALIZED (1 << 6)
#define PSI_IS_PAT 0x00
#define PSI_IS_PMT 0x01
#define UNKNOWN_PSI 0xff
/*****************************************************************************
* psi_section_t
*****************************************************************************
* Describes a PSI section. Beware, it doesn't contain pointers to the TS
* packets that contain it as for a PES, but the data themselves
*****************************************************************************/
typedef struct psi_section_s
{
byte_t buffer[PSI_SECTION_SIZE];
u8 i_section_number;
u8 i_last_section_number;
u8 i_version_number;
u16 i_section_length;
u16 i_read_in_section;
/* the PSI is complete */
boolean_t b_is_complete;
/* packet missed up ? */
boolean_t b_trash;
/*about sections */
boolean_t b_section_complete;
/* where are we currently ? */
byte_t * p_current;
} psi_section_t;
/*****************************************************************************
* es_ts_data_t: extension of es_descriptor_t
*****************************************************************************/
typedef struct es_ts_data_s
{
boolean_t b_psi; /* Does the stream have to be handled by
* the PSI decoder ? */
int i_psi_type; /* There are different types of PSI */
psi_section_t * p_psi_section; /* PSI packets */
/* Markers */
int i_continuity_counter;
} es_ts_data_t;
/*****************************************************************************
* pgrm_ts_data_t: extension of pgrm_descriptor_t
*****************************************************************************/
typedef struct pgrm_ts_data_s
{
u16 i_pcr_pid; /* PCR ES, for TS streams */
int i_pmt_version;
} pgrm_ts_data_t;
/*****************************************************************************
* stream_ts_data_t: extension of stream_descriptor_t
*****************************************************************************/
typedef struct stream_ts_data_s
{
int i_pat_version; /* Current version of the PAT */
} stream_ts_data_t;
/*****************************************************************************
* stream_ps_data_t: extension of stream_descriptor_t
*****************************************************************************/
typedef struct stream_ps_data_s
{
boolean_t b_has_PSM; /* very rare, in fact */
u8 i_PSM_version;
} stream_ps_data_t;
/* PSM version is 5 bits, so -1 is not a valid value */
#define EMPTY_PSM_VERSION -1
/*****************************************************************************
* Prototypes
*****************************************************************************/
void input_ParsePES ( struct input_thread_s *, struct es_descriptor_s * );
void input_GatherPES ( struct input_thread_s *, struct data_packet_s *,
struct es_descriptor_s *, boolean_t, boolean_t );
es_descriptor_t * input_ParsePS( struct input_thread_s *,
struct data_packet_s * );
void input_DemuxPS ( struct input_thread_s *, struct data_packet_s * );
void input_DemuxTS ( struct input_thread_s *, struct data_packet_s * );
void input_DemuxPSI ( struct input_thread_s *, struct data_packet_s *,
struct es_descriptor_s *, boolean_t, boolean_t );
/*****************************************************************************
* netlist_t: structure to manage a netlist
*****************************************************************************/
typedef struct netlist_s
{
vlc_mutex_t lock;
size_t i_buffer_size;
/* Buffers */
byte_t * p_buffers; /* Big malloc'ed area */
data_packet_t * p_data; /* malloc'ed area */
pes_packet_t * p_pes; /* malloc'ed area */
/* FIFOs of free packets */
data_packet_t ** pp_free_data;
pes_packet_t ** pp_free_pes;
struct iovec * p_free_iovec;
/* FIFO size */
unsigned int i_nb_pes;
unsigned int i_nb_data;
/* Index */
unsigned int i_data_start, i_data_end;
unsigned int i_pes_start, i_pes_end;
/* Number of blocs read once by readv */
unsigned int i_read_once;
} netlist_t;
/*****************************************************************************
* Prototypes
*****************************************************************************/
int input_NetlistInit( struct input_thread_s *,
int i_nb_data, int i_nb_pes,
size_t i_buffer_size,
int i_read_once );
struct iovec * input_NetlistGetiovec( void * p_method_data );
void input_NetlistMviovec( void * , size_t, struct data_packet_s **);
struct data_packet_s * input_NetlistNewPacket( void *, size_t );
struct pes_packet_s * input_NetlistNewPES( void * );
void input_NetlistDeletePacket( void *, struct data_packet_s * );
void input_NetlistDeletePES( void *, struct pes_packet_s * );
void input_NetlistEnd( struct input_thread_s * );
......@@ -2,7 +2,7 @@
* modules.h : Module management functions.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules.h,v 1.26 2001/06/27 09:53:56 massiot Exp $
* $Id: modules.h,v 1.27 2001/07/17 09:48:07 massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -179,10 +179,8 @@ typedef struct function_list_s
struct
{
void ( * pf_idct_init ) ( struct vdec_thread_s * );
void ( * pf_sparse_idct ) ( struct vdec_thread_s *,
dctelem_t *, int );
void ( * pf_idct ) ( struct vdec_thread_s *,
dctelem_t *, int );
void ( * pf_sparse_idct ) ( void *, dctelem_t *, int );
void ( * pf_idct ) ( void *, dctelem_t *, int );
void ( * pf_norm_scan ) ( u8 ppi_scan[2][64] );
void ( * pf_decode_init ) ( struct vdec_thread_s * );
......
/*****************************************************************************
* mpeg_system.h: structures of the input used to parse MPEG-1, MPEG-2 PS
* and TS system layers
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: mpeg_system.h,v 1.4 2001/06/03 12:47:21 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Constants
*****************************************************************************/
#define TS_PACKET_SIZE 188 /* Size of a TS packet */
#define PSI_SECTION_SIZE 4096 /* Maximum size of a PSI section */
#define PAT_UNINITIALIZED (1 << 6)
#define PMT_UNINITIALIZED (1 << 6)
#define PSI_IS_PAT 0x00
#define PSI_IS_PMT 0x01
#define UNKNOWN_PSI 0xff
/*****************************************************************************
* psi_section_t
*****************************************************************************
* Describes a PSI section. Beware, it doesn't contain pointers to the TS
* packets that contain it as for a PES, but the data themselves
*****************************************************************************/
typedef struct psi_section_s
{
byte_t buffer[PSI_SECTION_SIZE];
u8 i_section_number;
u8 i_last_section_number;
u8 i_version_number;
u16 i_section_length;
u16 i_read_in_section;
/* the PSI is complete */
boolean_t b_is_complete;
/* packet missed up ? */
boolean_t b_trash;
/*about sections */
boolean_t b_section_complete;
/* where are we currently ? */
byte_t * p_current;
} psi_section_t;
/*****************************************************************************
* es_ts_data_t: extension of es_descriptor_t
*****************************************************************************/
typedef struct es_ts_data_s
{
boolean_t b_psi; /* Does the stream have to be handled by
* the PSI decoder ? */
int i_psi_type; /* There are different types of PSI */
psi_section_t * p_psi_section; /* PSI packets */
/* Markers */
int i_continuity_counter;
} es_ts_data_t;
/*****************************************************************************
* pgrm_ts_data_t: extension of pgrm_descriptor_t
*****************************************************************************/
typedef struct pgrm_ts_data_s
{
u16 i_pcr_pid; /* PCR ES, for TS streams */
int i_pmt_version;
} pgrm_ts_data_t;
/*****************************************************************************
* stream_ts_data_t: extension of stream_descriptor_t
*****************************************************************************/
typedef struct stream_ts_data_s
{
int i_pat_version; /* Current version of the PAT */
} stream_ts_data_t;
/*****************************************************************************
* stream_ps_data_t: extension of stream_descriptor_t
*****************************************************************************/
typedef struct stream_ps_data_s
{
boolean_t b_has_PSM; /* very rare, in fact */
u8 i_PSM_version;
} stream_ps_data_t;
/* PSM version is 5 bits, so -1 is not a valid value */
#define EMPTY_PSM_VERSION -1
/*****************************************************************************
* Prototypes
*****************************************************************************/
void input_ParsePES ( struct input_thread_s *, struct es_descriptor_s * );
void input_GatherPES ( struct input_thread_s *, struct data_packet_s *,
struct es_descriptor_s *, boolean_t, boolean_t );
es_descriptor_t * input_ParsePS( struct input_thread_s *,
struct data_packet_s * );
void input_DemuxPS ( struct input_thread_s *, struct data_packet_s * );
void input_DemuxTS ( struct input_thread_s *, struct data_packet_s * );
void input_DemuxPSI ( struct input_thread_s *, struct data_packet_s *,
struct es_descriptor_s *, boolean_t, boolean_t );
/*****************************************************************************
* video_decoder.h : video decoder thread
* vdec_common.h : structures from the video decoder exported to plug-ins
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_decoder.h,v 1.24 2001/05/30 17:03:11 sam Exp $
* $Id: vdec_ext-plugins.h,v 1.1 2001/07/17 09:48:07 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -22,21 +22,79 @@
*****************************************************************************/
/*****************************************************************************
* Requires:
* "config.h"
* "common.h"
* "mtime.h"
* "threads.h"
* "input.h"
* "video.h"
* "video_output.h"
* "decoder_fifo.h"
* Function pointers
*****************************************************************************/
typedef void (*f_motion_t)( struct macroblock_s * );
/*****************************************************************************
* macroblock_t : information on a macroblock passed to the video_decoder
* thread
*****************************************************************************/
typedef struct macroblock_s
{
picture_t * p_picture; /* current frame in progress */
int i_mb_type; /* macroblock type */
int i_coded_block_pattern;
/* which blocks are coded ? */
int i_chroma_nb_blocks; /* number of blocks for
* chroma components */
/* IDCT information */
dctelem_t ppi_blocks[12][64]; /* blocks */
void ( * pf_idct[12] ) ( void *, dctelem_t*, int );
/* sparse IDCT or not ? */
int pi_sparse_pos[12]; /* position of the
* non-NULL coeff */
/* Motion compensation information */
f_motion_t pf_motion; /* function to use for motion comp */
picture_t * p_backward; /* backward reference frame */
picture_t * p_forward; /* forward reference frame */
int ppi_field_select[2][2]; /* field to use to
* form predictions */
int pppi_motion_vectors[2][2][2]; /* motion vectors */
int ppi_dmv[2][2]; /* differential motion vectors */
/* coordinates of the block in the picture */
int i_l_x, i_c_x;
int i_motion_l_y;
int i_motion_c_y;
int i_l_stride; /* number of yuv_data_t to
* ignore when changing line */
int i_c_stride; /* idem, for chroma */
boolean_t b_P_second; /* Second field of a P picture ?
* (used to determine the predicting
* frame) */
boolean_t b_motion_field; /* Field we are predicting
* (top field or bottom field) */
/* AddBlock information */
yuv_data_t * p_data[12]; /* pointer to the position
* in the final picture */
int i_addb_l_stride, i_addb_c_stride;
/* nb of coeffs to jump when changing lines */
} macroblock_t;
/* Macroblock types */
#define MB_INTRA 1
#define MB_PATTERN 2
#define MB_MOTION_BACKWARD 4
#define MB_MOTION_FORWARD 8
#define MB_QUANT 16
/* Motion types */
#define MOTION_FIELD 1
#define MOTION_FRAME 2
#define MOTION_16X8 2
#define MOTION_DMV 3
/* Structures */
#define TOP_FIELD 1
#define BOTTOM_FIELD 2
#define FRAME_STRUCTURE 3
/*****************************************************************************
* vdec_thread_t: video decoder thread descriptor
*****************************************************************************
* XXX??
*****************************************************************************/
typedef struct vdec_thread_s
{
......@@ -47,11 +105,8 @@ typedef struct vdec_thread_s
boolean_t b_active; /* `active' flag */
vlc_thread_t thread_id; /* id for thread functions */
/* Thread configuration */
/* XXX?? */
// int *pi_status;
/* idct iformations */
/* IDCT iformations */
void * p_idct_data;
dctelem_t p_pre_idct[64*64];
/* Macroblock copy functions */
......@@ -64,24 +119,3 @@ typedef struct vdec_thread_s
} vdec_thread_t;
/*****************************************************************************
* Prototypes
*****************************************************************************/
struct vpar_thread_s;
struct macroblock_s;
/* Thread management functions */
#ifndef VDEC_SMP
int vdec_InitThread ( struct vdec_thread_s *p_vdec );
#endif
void vdec_DecodeMacroblock ( struct vdec_thread_s *p_vdec,
struct macroblock_s *p_mb );
void vdec_DecodeMacroblockC ( struct vdec_thread_s *p_vdec,
struct macroblock_s *p_mb );
void vdec_DecodeMacroblockBW ( struct vdec_thread_s *p_vdec,
struct macroblock_s *p_mb );
vdec_thread_t * vdec_CreateThread ( struct vpar_thread_s *p_vpar /*,
int *pi_status */ );
void vdec_DestroyThread ( vdec_thread_t *p_vdec /*,
int *pi_status */ );
......@@ -2,7 +2,7 @@
* input_dummy.c: dummy input plugin, to manage "vlc:***" special options
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: input_dummy.c,v 1.2 2001/06/08 20:03:16 sam Exp $
* $Id: input_dummy.c,v 1.3 2001/07/17 09:48:07 massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -51,8 +51,7 @@
#include "stream_control.h"
#include "input_ext-intf.h"
#include "input_ext-dec.h"
#include "input.h"
#include "input_ext-plugins.h"
#include "modules.h"
#include "modules_export.h"
......
......@@ -7,7 +7,7 @@
* will only be given back to netlist when refcount is zero.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: dvd_netlist.c,v 1.11 2001/06/15 05:12:30 sam Exp $
* $Id: dvd_netlist.c,v 1.12 2001/07/17 09:48:07 massiot Exp $
*
* Authors: Henri Fallon <henri@videolan.org>
* Stphane Borel <stef@videolan.org>
......@@ -56,8 +56,8 @@
#include "stream_control.h"
#include "input_ext-intf.h"
#include "input_ext-dec.h"
#include "input_ext-plugins.h"
#include "input.h"
#include "dvd_netlist.h"
#include "modules.h"
......
......@@ -10,7 +10,7 @@
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.79 2001/07/11 02:01:04 sam Exp $
* $Id: input_dvd.c,v 1.80 2001/07/17 09:48:07 massiot Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -80,14 +80,12 @@
#include "stream_control.h"
#include "input_ext-intf.h"
#include "input_ext-dec.h"
#include "input.h"
#include "input_ext-plugins.h"
#include "input_dvd.h"
#include "dvd_netlist.h"
#include "dvd_ifo.h"
#include "dvd_summary.h"
#include "mpeg_system.h"
#include "debug.h"
......
......@@ -2,7 +2,7 @@
* idct.c : IDCT module
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: idct.c,v 1.12 2001/07/11 02:01:04 sam Exp $
* $Id: idct.c,v 1.13 2001/07/17 09:48:07 massiot Exp $
*
* Authors: Gal Hendryckx <jimmy@via.ecp.fr>
*
......@@ -40,7 +40,7 @@
#include "video.h"
#include "video_output.h"
#include "video_decoder.h"
#include "vdec_ext-plugins.h"
#include "vdec_block.h"
#include "vdec_idct.h"
......@@ -121,8 +121,7 @@ static void vdec_NormScan( u8 ppi_scan[2][64] )
/*****************************************************************************
* vdec_IDCT : IDCT function for normal matrices
*****************************************************************************/
void _M( vdec_IDCT )( vdec_thread_t * p_vdec, dctelem_t * p_block,
int i_idontcare )
void _M( vdec_IDCT )( void * p_idct_data, dctelem_t * p_block, int i_idontcare )
{
s32 tmp0, tmp1, tmp2, tmp3;
s32 tmp10, tmp11, tmp12, tmp13;
......
......@@ -2,7 +2,7 @@
* idctaltivec.c : Altivec IDCT module
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: idctaltivec.c,v 1.9 2001/07/11 02:01:04 sam Exp $
* $Id: idctaltivec.c,v 1.10 2001/07/17 09:48:07 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -39,11 +39,11 @@
#include "video.h"
#include "video_output.h"
#include "video_decoder.h"
#include "modules.h"
#include "modules_inner.h"