Go to the documentation of this file.
34 for (; cur < buf_size; ++cur) {
47 for (; cur < buf_size; cur++) {
69 int chroma, sample_precision, encoding_precision = 1;
71 static const uint8_t precision[8] = { 0, 8, 10 };
72 unsigned aspect_ratio;
73 unsigned frame_rate_code;
76 const int buf_size_min = 15;
78 if (buf_size < buf_size_min)
99 encoding_precision =
get_bits(&gb, 3);
122 "AVS2 parse seq HDR: profile %x, level %x, "
123 "width %d, height %d, "
124 "chroma %d, sample_precision %d bits, encoding_precision %d bits, "
125 "aspect_ratio 0x%x, framerate %d/%d, low_delay %d\n",
128 chroma, precision[sample_precision], precision[encoding_precision],
138 if (!(buf[0] == 0x0 && buf[1] == 0x0 && buf[2] == 0x1))
152 int pic_code_type = buf[8] & 0x3;
153 if (pic_code_type == 1)
155 else if (pic_code_type == 3)
165 const uint8_t **poutbuf,
int *poutbuf_size,
166 const uint8_t *buf,
int buf_size)
185 *poutbuf_size = buf_size;
static int avs2_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
void ff_parse_close(AVCodecParserContext *s)
uint32_t state
contains the last few bytes in MSB order
static void parse_avs2_units(AVCodecParserContext *s, const uint8_t *buf, int buf_size, AVCodecContext *avctx)
static void skip_bits(GetBitContext *s, int n)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
@ AVS2_INTER_PIC_START_CODE
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
int has_b_frames
Size of the frame reordering buffer in the decoder.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
const AVRational ff_avs2_frame_rate_tab[16]
@ AV_PICTURE_TYPE_I
Intra.
@ AVS2_INTRA_PIC_START_CODE
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
main external API structure.
static void parse_avs2_seq_header(AVCodecParserContext *s, const uint8_t *buf, int buf_size, AVCodecContext *avctx)
@ AV_PICTURE_TYPE_B
Bi-dir predicted.
@ AV_PICTURE_TYPE_P
Predicted.
const AVCodecParser ff_avs2_parser
@ AV_PICTURE_TYPE_S
S(GMC)-VOP MPEG-4.
static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size)