annotate libmpeg2/mpeg2.h @ 19364:6ccc6a6bf875

help_mp-hu.h & man/hu/mplayer.1 synced with r19369
author Gabrov
date Sat, 12 Aug 2006 12:09:12 +0000
parents 0783dd397f74
children 60a39d71e247
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 * mpeg2.h
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
3 * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
4 * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
7 * See http://libmpeg2.sourceforge.net/ for updates.
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
8 *
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 * mpeg2dec is free software; you can redistribute it and/or modify
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
12 * (at your option) any later version.
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
13 *
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 * mpeg2dec is distributed in the hope that it will be useful,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 * GNU General Public License for more details.
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
18 *
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
20 * along with this program; if not, write to the Free Software
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14732
1385ec491ffb Mark locally modified files as such to comply more closely with GPL 2a.
diego
parents: 12932
diff changeset
22 *
1385ec491ffb Mark locally modified files as such to comply more closely with GPL 2a.
diego
parents: 12932
diff changeset
23 * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
18783
0783dd397f74 CVS --> Subversion in copyright notices
diego
parents: 18727
diff changeset
24 * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
14732
1385ec491ffb Mark locally modified files as such to comply more closely with GPL 2a.
diego
parents: 12932
diff changeset
25 * $Id$
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
28 #ifndef MPEG2_H
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
29 #define MPEG2_H
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
30
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
31 #define MPEG2_VERSION(a,b,c) (((a)<<16)|((b)<<8)|(c))
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
32 #define MPEG2_RELEASE MPEG2_VERSION (0, 4, 0) /* 0.4.0 */
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
33
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
34 #define SEQ_FLAG_MPEG2 1
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
35 #define SEQ_FLAG_CONSTRAINED_PARAMETERS 2
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
36 #define SEQ_FLAG_PROGRESSIVE_SEQUENCE 4
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
37 #define SEQ_FLAG_LOW_DELAY 8
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
38 #define SEQ_FLAG_COLOUR_DESCRIPTION 16
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
39
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
40 #define SEQ_MASK_VIDEO_FORMAT 0xe0
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
41 #define SEQ_VIDEO_FORMAT_COMPONENT 0
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
42 #define SEQ_VIDEO_FORMAT_PAL 0x20
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
43 #define SEQ_VIDEO_FORMAT_NTSC 0x40
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
44 #define SEQ_VIDEO_FORMAT_SECAM 0x60
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
45 #define SEQ_VIDEO_FORMAT_MAC 0x80
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
46 #define SEQ_VIDEO_FORMAT_UNSPECIFIED 0xa0
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
47
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
48 typedef struct mpeg2_sequence_s {
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
49 unsigned int width, height;
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
50 unsigned int chroma_width, chroma_height;
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
51 unsigned int byte_rate;
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
52 unsigned int vbv_buffer_size;
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
53 uint32_t flags;
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
54
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
55 unsigned int picture_width, picture_height;
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
56 unsigned int display_width, display_height;
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
57 unsigned int pixel_width, pixel_height;
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
58 unsigned int frame_period;
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
59
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
60 uint8_t profile_level_id;
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
61 uint8_t colour_primaries;
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
62 uint8_t transfer_characteristics;
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
63 uint8_t matrix_coefficients;
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
64 } mpeg2_sequence_t;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
65
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
66 #define GOP_FLAG_DROP_FRAME 1
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
67 #define GOP_FLAG_BROKEN_LINK 2
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
68 #define GOP_FLAG_CLOSED_GOP 4
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
69
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
70 typedef struct mpeg2_gop_s {
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
71 uint8_t hours;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
72 uint8_t minutes;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
73 uint8_t seconds;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
74 uint8_t pictures;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
75 uint32_t flags;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
76 } mpeg2_gop_t;
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
77
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
78 #define PIC_MASK_CODING_TYPE 7
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
79 #define PIC_FLAG_CODING_TYPE_I 1
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
80 #define PIC_FLAG_CODING_TYPE_P 2
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
81 #define PIC_FLAG_CODING_TYPE_B 3
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
82 #define PIC_FLAG_CODING_TYPE_D 4
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
83
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
84 #define PIC_FLAG_TOP_FIELD_FIRST 8
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
85 #define PIC_FLAG_PROGRESSIVE_FRAME 16
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
86 #define PIC_FLAG_COMPOSITE_DISPLAY 32
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
87 #define PIC_FLAG_SKIP 64
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
88 #define PIC_FLAG_TAGS 128
10509
d9d24093db2e Export flags needed for softpulldown filter.
ranma
parents: 9852
diff changeset
89 #define PIC_FLAG_REPEAT_FIRST_FIELD 256
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
90 #define PIC_MASK_COMPOSITE_DISPLAY 0xfffff000
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
91
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
92 typedef struct mpeg2_picture_s {
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
93 unsigned int temporal_reference;
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
94 unsigned int nb_fields;
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
95 uint32_t tag, tag2;
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
96 uint32_t flags;
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
97 struct {
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
98 int x, y;
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
99 } display_offset[3];
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
100 } mpeg2_picture_t;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
101
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
102 typedef struct mpeg2_fbuf_s {
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
103 uint8_t * buf[3];
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
104 void * id;
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
105 } mpeg2_fbuf_t;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
106
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
107 typedef struct mpeg2_info_s {
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
108 const mpeg2_sequence_t * sequence;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
109 const mpeg2_gop_t * gop;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
110 const mpeg2_picture_t * current_picture;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
111 const mpeg2_picture_t * current_picture_2nd;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
112 const mpeg2_fbuf_t * current_fbuf;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
113 const mpeg2_picture_t * display_picture;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
114 const mpeg2_picture_t * display_picture_2nd;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
115 const mpeg2_fbuf_t * display_fbuf;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
116 const mpeg2_fbuf_t * discard_fbuf;
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
117 const uint8_t * user_data;
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
118 unsigned int user_data_len;
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
119 } mpeg2_info_t;
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
120
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
121 typedef struct mpeg2dec_s mpeg2dec_t;
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
122 typedef struct mpeg2_decoder_s mpeg2_decoder_t;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
123
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
124 typedef enum {
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
125 STATE_BUFFER = 0,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
126 STATE_SEQUENCE = 1,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
127 STATE_SEQUENCE_REPEATED = 2,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
128 STATE_GOP = 3,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
129 STATE_PICTURE = 4,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
130 STATE_SLICE_1ST = 5,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
131 STATE_PICTURE_2ND = 6,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
132 STATE_SLICE = 7,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
133 STATE_END = 8,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
134 STATE_INVALID = 9,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
135 STATE_INVALID_END = 10
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
136 } mpeg2_state_t;
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
137
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
138 typedef struct mpeg2_convert_init_s {
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
139 unsigned int id_size;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
140 unsigned int buf_size[3];
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
141 void (* start) (void * id, const mpeg2_fbuf_t * fbuf,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
142 const mpeg2_picture_t * picture, const mpeg2_gop_t * gop);
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
143 void (* copy) (void * id, uint8_t * const * src, unsigned int v_offset);
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
144 } mpeg2_convert_init_t;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
145 typedef enum {
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
146 MPEG2_CONVERT_SET = 0,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
147 MPEG2_CONVERT_STRIDE = 1,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
148 MPEG2_CONVERT_START = 2
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
149 } mpeg2_convert_stage_t;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
150 typedef int mpeg2_convert_t (int stage, void * id,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
151 const mpeg2_sequence_t * sequence, int stride,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
152 uint32_t accel, void * arg,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
153 mpeg2_convert_init_t * result);
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
154 int mpeg2_convert (mpeg2dec_t * mpeg2dec, mpeg2_convert_t convert, void * arg);
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
155 int mpeg2_stride (mpeg2dec_t * mpeg2dec, int stride);
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
156 void mpeg2_set_buf (mpeg2dec_t * mpeg2dec, uint8_t * buf[3], void * id);
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
157 void mpeg2_custom_fbuf (mpeg2dec_t * mpeg2dec, int custom_fbuf);
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
158
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
159 #define MPEG2_ACCEL_X86_MMX 1
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
160 #define MPEG2_ACCEL_X86_3DNOW 2
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
161 #define MPEG2_ACCEL_X86_MMXEXT 4
18727
24b2d27f2407 Use MPlayer's CPU detection module instead of libmpeg2's,
gpoirier
parents: 14732
diff changeset
162 #define MPEG2_ACCEL_X86_SSE2 8
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
163 #define MPEG2_ACCEL_PPC_ALTIVEC 1
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
164 #define MPEG2_ACCEL_ALPHA 1
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
165 #define MPEG2_ACCEL_ALPHA_MVI 2
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
166 #define MPEG2_ACCEL_SPARC_VIS 1
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
167 #define MPEG2_ACCEL_SPARC_VIS2 2
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
168 #define MPEG2_ACCEL_DETECT 0x80000000
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
169
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
170 uint32_t mpeg2_accel (uint32_t accel);
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
171 mpeg2dec_t * mpeg2_init (void);
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
172 const mpeg2_info_t * mpeg2_info (mpeg2dec_t * mpeg2dec);
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
173 void mpeg2_close (mpeg2dec_t * mpeg2dec);
36
846535ace7a2 libmpeg2-0.2.0 merge
arpi_esp
parents: 1
diff changeset
174
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
175 void mpeg2_buffer (mpeg2dec_t * mpeg2dec, uint8_t * start, uint8_t * end);
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
176 int mpeg2_getpos (mpeg2dec_t * mpeg2dec);
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
177 mpeg2_state_t mpeg2_parse (mpeg2dec_t * mpeg2dec);
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
178
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
179 void mpeg2_reset (mpeg2dec_t * mpeg2dec, int full_reset);
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
180 void mpeg2_skip (mpeg2dec_t * mpeg2dec, int skip);
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
181 void mpeg2_slice_region (mpeg2dec_t * mpeg2dec, int start, int end);
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
182
12932
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
183 void mpeg2_tag_picture (mpeg2dec_t * mpeg2dec, uint32_t tag, uint32_t tag2);
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
184
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
185 void mpeg2_init_fbuf (mpeg2_decoder_t * decoder, uint8_t * current_fbuf[3],
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
186 uint8_t * forward_fbuf[3], uint8_t * backward_fbuf[3]);
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
187 void mpeg2_slice (mpeg2_decoder_t * decoder, int code, const uint8_t * buffer);
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
188
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
189 typedef enum {
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
190 MPEG2_ALLOC_MPEG2DEC = 0,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
191 MPEG2_ALLOC_CHUNK = 1,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
192 MPEG2_ALLOC_YUV = 2,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
193 MPEG2_ALLOC_CONVERT_ID = 3,
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
194 MPEG2_ALLOC_CONVERTED = 4
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
195 } mpeg2_alloc_t;
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
196
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
197 void * mpeg2_malloc (unsigned size, mpeg2_alloc_t reason);
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
198 void mpeg2_free (void * buf);
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
199 void mpeg2_malloc_hooks (void * malloc (unsigned, mpeg2_alloc_t),
d0a8810e155c Importing libmpeg2 from mpeg2dec-0.4.0b
henry
parents: 10509
diff changeset
200 int free (void *));
9852
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
201
47984e3f54ce Importing libmpeg2 from mpeg2dec-0.3.1
arpi
parents: 2050
diff changeset
202 #endif /* MPEG2_H */