27#define MPEG2_VERSION(a,b,c) (((a)<<16)|((b)<<8)|(c))
28#define MPEG2_RELEASE MPEG2_VERSION (0, 4, 1)
30#define SEQ_FLAG_MPEG2 1
31#define SEQ_FLAG_CONSTRAINED_PARAMETERS 2
32#define SEQ_FLAG_PROGRESSIVE_SEQUENCE 4
33#define SEQ_FLAG_LOW_DELAY 8
34#define SEQ_FLAG_COLOUR_DESCRIPTION 16
36#define SEQ_MASK_VIDEO_FORMAT 0xe0
37#define SEQ_VIDEO_FORMAT_COMPONENT 0
38#define SEQ_VIDEO_FORMAT_PAL 0x20
39#define SEQ_VIDEO_FORMAT_NTSC 0x40
40#define SEQ_VIDEO_FORMAT_SECAM 0x60
41#define SEQ_VIDEO_FORMAT_MAC 0x80
42#define SEQ_VIDEO_FORMAT_UNSPECIFIED 0xa0
62#define GOP_FLAG_DROP_FRAME 1
63#define GOP_FLAG_BROKEN_LINK 2
64#define GOP_FLAG_CLOSED_GOP 4
74#define PIC_MASK_CODING_TYPE 7
75#define PIC_FLAG_CODING_TYPE_I 1
76#define PIC_FLAG_CODING_TYPE_P 2
77#define PIC_FLAG_CODING_TYPE_B 3
78#define PIC_FLAG_CODING_TYPE_D 4
80#define PIC_FLAG_TOP_FIELD_FIRST 8
81#define PIC_FLAG_PROGRESSIVE_FRAME 16
82#define PIC_FLAG_COMPOSITE_DISPLAY 32
83#define PIC_FLAG_SKIP 64
84#define PIC_FLAG_TAGS 128
85#define PIC_MASK_COMPOSITE_DISPLAY 0xfffff000
139 void (*
copy) (
void * id, uint8_t *
const * src,
unsigned int v_offset);
148 uint32_t accel,
void * arg,
155#define MPEG2_ACCEL_X86_MMX 1
156#define MPEG2_ACCEL_X86_3DNOW 2
157#define MPEG2_ACCEL_X86_MMXEXT 4
158#define MPEG2_ACCEL_X86_SSE2 8
159#define MPEG2_ACCEL_X86_SSE3 16
160#define MPEG2_ACCEL_PPC_ALTIVEC 1
161#define MPEG2_ACCEL_ALPHA 1
162#define MPEG2_ACCEL_ALPHA_MVI 2
163#define MPEG2_ACCEL_SPARC_VIS 1
164#define MPEG2_ACCEL_SPARC_VIS2 2
165#define MPEG2_ACCEL_DETECT 0x80000000
183 uint8_t * forward_fbuf[3], uint8_t * backward_fbuf[3]);
186 unsigned int * pixel_width,
187 unsigned int * pixel_height);
void mpeg2_reset(mpeg2dec_t *mpeg2dec)
Definition decode.c:741
void mpeg2_close(mpeg2dec_t *mpeg2dec)
Definition decode.c:811
void * mpeg2_malloc(unsigned size, mpeg2_alloc_t reason)
Definition alloc.c:32
struct mpeg2_fbuf_s mpeg2_fbuf_t
mpeg2_state_t mpeg2_parse(mpeg2dec_t *mpeg2dec)
Definition decode.c:152
int mpeg2_guess_aspect(const mpeg2_sequence_t *sequence, unsigned int *pixel_width, unsigned int *pixel_height)
Definition header.c:336
int mpeg2_getpos(mpeg2dec_t *mpeg2dec)
Definition decode.c:117
uint32_t mpeg2_accel(uint32_t accel)
Definition decode.c:379
void mpeg2_malloc_hooks(void *malloc(unsigned, mpeg2_alloc_t), int free(void *))
Definition alloc.c:65
void mpeg2_set_buf(mpeg2dec_t *mpeg2dec, uint8_t *buf[3], void *id)
Definition decode.c:328
struct mpeg2_sequence_s mpeg2_sequence_t
struct mpeg2_info_s mpeg2_info_t
void mpeg2_skip(mpeg2dec_t *mpeg2dec, int skip)
Definition decode.c:355
const mpeg2_info_t * mpeg2_info(mpeg2dec_t *mpeg2dec)
Definition decode.c:38
struct mpeg2_picture_s mpeg2_picture_t
void mpeg2_buffer(mpeg2dec_t *mpeg2dec, uint8_t *start, uint8_t *end)
Definition decode.c:111
struct mpeg2_gop_s mpeg2_gop_t
mpeg2_convert_stage_t
Definition mpeg2.h:141
@ MPEG2_CONVERT_SET
Definition mpeg2.h:142
@ MPEG2_CONVERT_STRIDE
Definition mpeg2.h:143
@ MPEG2_CONVERT_START
Definition mpeg2.h:144
void mpeg2_slice_region(mpeg2dec_t *mpeg2dec, int start, int end)
Definition decode.c:361
mpeg2dec_t * mpeg2_init(void)
Definition decode.c:411
void mpeg2_slice(mpeg2_decoder_t *decoder, int code, const uint8_t *buffer)
Definition slice.c:1775
struct mpeg2_convert_init_s mpeg2_convert_init_t
mpeg2_alloc_t
Definition mpeg2.h:189
@ MPEG2_ALLOC_CONVERT_ID
Definition mpeg2.h:193
@ MPEG2_ALLOC_YUV
Definition mpeg2.h:192
@ MPEG2_ALLOC_MPEG2DEC
Definition mpeg2.h:190
@ MPEG2_ALLOC_CHUNK
Definition mpeg2.h:191
@ MPEG2_ALLOC_CONVERTED
Definition mpeg2.h:194
void mpeg2_custom_fbuf(mpeg2dec_t *mpeg2dec, int custom_fbuf)
Definition decode.c:350
void mpeg2_tag_picture(mpeg2dec_t *mpeg2dec, uint32_t tag, uint32_t tag2)
Definition decode.c:369
void mpeg2_init_fbuf(mpeg2_decoder_t *decoder, uint8_t *current_fbuf[3], uint8_t *forward_fbuf[3], uint8_t *backward_fbuf[3])
Definition slice.c:1590
int mpeg2_convert_t(int stage, void *id, const mpeg2_sequence_t *sequence, int stride, uint32_t accel, void *arg, mpeg2_convert_init_t *result)
Definition mpeg2.h:146
mpeg2_state_t
Definition mpeg2.h:119
@ STATE_SLICE_1ST
Definition mpeg2.h:126
@ STATE_PICTURE
Definition mpeg2.h:125
@ STATE_PICTURE_2ND
Definition mpeg2.h:127
@ STATE_INVALID
Definition mpeg2.h:130
@ STATE_SEQUENCE_MODIFIED
Definition mpeg2.h:123
@ STATE_SLICE
Definition mpeg2.h:128
@ STATE_INVALID_END
Definition mpeg2.h:131
@ STATE_SEQUENCE_REPEATED
Definition mpeg2.h:122
@ STATE_BUFFER
Definition mpeg2.h:120
@ STATE_GOP
Definition mpeg2.h:124
@ STATE_SEQUENCE
Definition mpeg2.h:121
@ STATE_END
Definition mpeg2.h:129
int mpeg2_convert(mpeg2dec_t *mpeg2dec, mpeg2_convert_t convert, void *arg)
Definition decode.c:293
void mpeg2_free(void *buf)
Definition alloc.c:56
int mpeg2_stride(mpeg2dec_t *mpeg2dec, int stride)
Definition decode.c:309
unsigned int buf_size[3]
Definition mpeg2.h:136
void(* copy)(void *id, uint8_t *const *src, unsigned int v_offset)
Definition mpeg2.h:139
void(* start)(void *id, const mpeg2_fbuf_t *fbuf, const mpeg2_picture_t *picture, const mpeg2_gop_t *gop)
Definition mpeg2.h:137
unsigned int id_size
Definition mpeg2.h:135
Definition mpeg2_internal.h:64
uint8_t * buf[3]
Definition mpeg2.h:98
void * id
Definition mpeg2.h:99
uint32_t flags
Definition mpeg2.h:71
uint8_t hours
Definition mpeg2.h:67
uint8_t minutes
Definition mpeg2.h:68
uint8_t pictures
Definition mpeg2.h:70
uint8_t seconds
Definition mpeg2.h:69
const mpeg2_picture_t * current_picture
Definition mpeg2.h:105
const mpeg2_picture_t * display_picture_2nd
Definition mpeg2.h:109
const mpeg2_fbuf_t * current_fbuf
Definition mpeg2.h:107
unsigned int user_data_len
Definition mpeg2.h:113
const mpeg2_picture_t * display_picture
Definition mpeg2.h:108
const mpeg2_gop_t * gop
Definition mpeg2.h:104
const uint8_t * user_data
Definition mpeg2.h:112
const mpeg2_fbuf_t * display_fbuf
Definition mpeg2.h:110
const mpeg2_fbuf_t * discard_fbuf
Definition mpeg2.h:111
const mpeg2_picture_t * current_picture_2nd
Definition mpeg2.h:106
const mpeg2_sequence_t * sequence
Definition mpeg2.h:103
int y
Definition mpeg2.h:93
struct mpeg2_picture_s::@61 display_offset[3]
int x
Definition mpeg2.h:93
uint32_t flags
Definition mpeg2.h:91
uint32_t tag2
Definition mpeg2.h:90
uint32_t tag
Definition mpeg2.h:90
unsigned int nb_fields
Definition mpeg2.h:89
unsigned int temporal_reference
Definition mpeg2.h:88
unsigned int display_width
Definition mpeg2.h:52
unsigned int picture_width
Definition mpeg2.h:51
unsigned int byte_rate
Definition mpeg2.h:47
unsigned int pixel_height
Definition mpeg2.h:53
unsigned int width
Definition mpeg2.h:45
uint32_t flags
Definition mpeg2.h:49
unsigned int chroma_height
Definition mpeg2.h:46
unsigned int pixel_width
Definition mpeg2.h:53
unsigned int vbv_buffer_size
Definition mpeg2.h:48
unsigned int display_height
Definition mpeg2.h:52
uint8_t matrix_coefficients
Definition mpeg2.h:59
unsigned int chroma_width
Definition mpeg2.h:46
unsigned int picture_height
Definition mpeg2.h:51
unsigned int frame_period
Definition mpeg2.h:54
uint8_t profile_level_id
Definition mpeg2.h:56
unsigned int height
Definition mpeg2.h:45
uint8_t transfer_characteristics
Definition mpeg2.h:58
uint8_t colour_primaries
Definition mpeg2.h:57
char code
Definition xmllexer.c:612