diff options
author | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-03-04 21:01:54 +0000 |
---|---|---|
committer | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-03-04 21:01:54 +0000 |
commit | 156ec7764eec11e78de6b7a17cef7679a9e30a63 (patch) | |
tree | a37ef9ade32aa15f51049aed533c7e7258749c6f /libmpeg2/mpeg2.h | |
parent | c25474941c626032141c0a142274ce6769927d86 (diff) | |
download | mpv-156ec7764eec11e78de6b7a17cef7679a9e30a63.tar.bz2 mpv-156ec7764eec11e78de6b7a17cef7679a9e30a63.tar.xz |
libmpeg2-0.2.0 merge
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpeg2/mpeg2.h')
-rw-r--r-- | libmpeg2/mpeg2.h | 92 |
1 files changed, 53 insertions, 39 deletions
diff --git a/libmpeg2/mpeg2.h b/libmpeg2/mpeg2.h index 68f74289c8..c3bce07805 100644 --- a/libmpeg2/mpeg2.h +++ b/libmpeg2/mpeg2.h @@ -1,57 +1,71 @@ /* * mpeg2.h - * - * Copyright (C) Aaron Holtzman <aholtzma@ess.engr.uvic.ca> - Mar 2000 + * Copyright (C) 1999-2001 Aaron Holtzman <aholtzma@ess.engr.uvic.ca> * * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * + * * mpeg2dec 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, or (at your option) - * any later version. - * + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * * mpeg2dec 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 + * 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 GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, * + * 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-1307 USA */ -#ifdef __OMS__ -#include <oms/plugin/output_video.h> -#ifndef vo_functions_t -#define vo_functions_t plugin_output_video_t -#endif -#else -//FIXME normally I wouldn't nest includes, but we'll leave this here until I get -//another chance to move things around -#include "video_out.h" -#endif - -#include <inttypes.h> -#ifdef __OMS__ -#include <oms/accel.h> -#else -#include "mm_accel.h" -#endif - -//config flags -#define MPEG2_MLIB_ENABLE MM_ACCEL_MLIB -#define MPEG2_MMX_ENABLE MM_ACCEL_X86_MMX -#define MPEG2_3DNOW_ENABLE MM_ACCEL_X86_3DNOW -#define MPEG2_SSE_ENABLE MM_ACCEL_X86_MMXEXT - -//typedef struct mpeg2_config_s { -// //Bit flags that enable various things -// uint32_t flags; -//} mpeg2_config_t; +/* Structure for the mpeg2dec decoder */ + +typedef struct mpeg2dec_s { +// vo_instance_t * output; + + /* this is where we keep the state of the decoder */ + struct picture_s * picture; + + uint32_t shift; + int is_display_initialized; + int is_sequence_needed; + int drop_flag; + int drop_frame; + int in_slice; + + /* the maximum chunk size is determined by vbv_buffer_size */ + /* which is 224K for MP@ML streams. */ + /* (we make no pretenses of decoding anything more than that) */ + /* allocated in init - gcc has problems allocating such big structures */ + uint8_t * chunk_buffer; + /* pointer to current position in chunk_buffer */ + uint8_t * chunk_ptr; + /* last start code ? */ + uint8_t code; + + /* ONLY for 0.2.0 release - will not stay there later */ + int frame_rate_code; +} mpeg2dec_t ; + void mpeg2_init (void); //void mpeg2_allocate_image_buffers (picture_t * picture); int mpeg2_decode_data (vo_functions_t *, uint8_t * data_start, uint8_t * data_end); //void mpeg2_close (vo_functions_t *); void mpeg2_drop (int flag); + + + +/* initialize mpegdec with a opaque user pointer */ +//void mpeg2_init (mpeg2dec_t * mpeg2dec, uint32_t mm_accel +// ,vo_instance_t * output +// ); + +/* destroy everything which was allocated, shutdown the output */ +//void mpeg2_close (mpeg2dec_t * mpeg2dec); + +//int mpeg2_decode_data (mpeg2dec_t * mpeg2dec, +// uint8_t * data_start, uint8_t * data_end); + +//void mpeg2_drop (mpeg2dec_t * mpeg2dec, int flag); |