1
|
1 /*
|
|
2 * mpeg2.h
|
36
|
3 * Copyright (C) 1999-2001 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
|
1
|
4 *
|
|
5 * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
|
36
|
6 *
|
1
|
7 * mpeg2dec is free software; you can redistribute it and/or modify
|
|
8 * it under the terms of the GNU General Public License as published by
|
36
|
9 * the Free Software Foundation; either version 2 of the License, or
|
|
10 * (at your option) any later version.
|
|
11 *
|
1
|
12 * mpeg2dec is distributed in the hope that it will be useful,
|
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
36
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1
|
15 * GNU General Public License for more details.
|
36
|
16 *
|
1
|
17 * You should have received a copy of the GNU General Public License
|
36
|
18 * along with this program; if not, write to the Free Software
|
|
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
1
|
20 */
|
|
21
|
36
|
22 /* Structure for the mpeg2dec decoder */
|
|
23
|
|
24 typedef struct mpeg2dec_s {
|
|
25 // vo_instance_t * output;
|
|
26
|
|
27 /* this is where we keep the state of the decoder */
|
|
28 struct picture_s * picture;
|
|
29
|
|
30 uint32_t shift;
|
|
31 int is_display_initialized;
|
|
32 int is_sequence_needed;
|
|
33 int drop_flag;
|
|
34 int drop_frame;
|
|
35 int in_slice;
|
1
|
36
|
36
|
37 /* the maximum chunk size is determined by vbv_buffer_size */
|
|
38 /* which is 224K for MP@ML streams. */
|
|
39 /* (we make no pretenses of decoding anything more than that) */
|
|
40 /* allocated in init - gcc has problems allocating such big structures */
|
|
41 uint8_t * chunk_buffer;
|
|
42 /* pointer to current position in chunk_buffer */
|
|
43 uint8_t * chunk_ptr;
|
|
44 /* last start code ? */
|
|
45 uint8_t code;
|
1
|
46
|
36
|
47 /* ONLY for 0.2.0 release - will not stay there later */
|
|
48 int frame_rate_code;
|
|
49 } mpeg2dec_t ;
|
1
|
50
|
|
51
|
|
52 void mpeg2_init (void);
|
|
53 //void mpeg2_allocate_image_buffers (picture_t * picture);
|
967
|
54 int mpeg2_decode_data (vo_functions_t *, uint8_t * data_start, uint8_t * data_end,int framedrop);
|
1
|
55 //void mpeg2_close (vo_functions_t *);
|
967
|
56 //void mpeg2_drop (int flag);
|
36
|
57
|
|
58
|
|
59
|
|
60 /* initialize mpegdec with a opaque user pointer */
|
|
61 //void mpeg2_init (mpeg2dec_t * mpeg2dec, uint32_t mm_accel
|
|
62 // ,vo_instance_t * output
|
|
63 // );
|
|
64
|
|
65 /* destroy everything which was allocated, shutdown the output */
|
|
66 //void mpeg2_close (mpeg2dec_t * mpeg2dec);
|
|
67
|
|
68 //int mpeg2_decode_data (mpeg2dec_t * mpeg2dec,
|
|
69 // uint8_t * data_start, uint8_t * data_end);
|
|
70
|
|
71 //void mpeg2_drop (mpeg2dec_t * mpeg2dec, int flag);
|