Go to the documentation of this file.
23 #define UNCHECKED_BITSTREAM_READER 1
47 for (
i = 0;
i < buf_size;
i++) {
61 for (;
i < buf_size;
i++) {
63 if ((
state & 0xFFFFFF00) == 0x100) {
88 s->current_picture_ptr = &
s->current_picture;
112 s1->pict_type =
s->pict_type;
113 pc->first_picture = 0;
123 pc->first_picture = 1;
124 pc->dec_ctx.m.quant_precision = 5;
125 pc->dec_ctx.m.slice_context_count = 1;
126 pc->dec_ctx.showed_packed_warning = 1;
132 const uint8_t **poutbuf,
int *poutbuf_size,
152 *poutbuf_size = buf_size;
#define AV_LOG_WARNING
Something somehow does not look correct.
int ff_mpeg4video_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
void ff_parse_close(AVCodecParserContext *s)
void ff_mpeg4videodec_static_init(void)
uint32_t state
contains the last few bytes in MSB order
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
static int mpeg4video_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
AVCodecParser ff_mpeg4video_parser
static int mpeg4_decode_header(AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t *buf, int buf_size)
Rational number (pair of numerator and denominator).
#define AV_NOPTS_VALUE
Undefined timestamp value.
int ff_mpeg4_decode_picture_header(Mpeg4DecContext *ctx, GetBitContext *gb, int header)
Decode MPEG-4 headers.
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
#define PARSER_FLAG_COMPLETE_FRAMES
static av_cold int mpeg4video_parse_init(AVCodecParserContext *s)
#define i(width, name, range_min, range_max)
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
main external API structure.
#define PARSER_FLAG_USE_CODEC_TS
int ff_mpeg4_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size)
Find the end of the current frame in the bitstream.
int coded_width
Bitstream width / height, may be different from width/height e.g.
int ff_set_dimensions(AVCodecContext *s, int width, int height)
Check that the provided frame dimensions are valid and set them on the codec context.
int width
picture width / height.
static AVCodecContext * dec_ctx