Go to the documentation of this file.
35 for (; cur < buf_size; ++cur) {
48 for (; cur < buf_size; ++cur) {
71 if (buf[0] == 0x0 && buf[1] == 0x0 && buf[2] == 0x1) {
74 int profile, ratecode, low_delay;
95 int sample_precision =
get_bits(&gb, 3);
96 if (sample_precision == 1) {
98 }
else if (sample_precision == 2) {
123 s->width =
s->coded_width = avctx->
width;
124 s->height =
s->coded_height = avctx->
height;
127 "AVS3 parse seq HDR: profile %d; coded size: %dx%d; frame rate code: %d\n",
136 int pic_code_type = buf[8] & 0x3;
137 if (pic_code_type == 1 || pic_code_type == 3) {
149 const uint8_t **poutbuf,
int *poutbuf_size,
150 const uint8_t *buf,
int buf_size)
169 *poutbuf_size = buf_size;
static int avs3_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
static int avs3_find_frame_end(ParseContext *pc, 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 skip_bits(GetBitContext *s, int n)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
const AVCodecParser ff_avs3_parser
@ AV_PIX_FMT_YUV420P10LE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
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 AVS3_INTRA_PIC_START_CODE
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
@ AV_PICTURE_TYPE_I
Intra.
static const AVRational ff_avs3_frame_rate_tab[16]
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 void parse_avs3_nal_units(AVCodecParserContext *s, const uint8_t *buf, int buf_size, AVCodecContext *avctx)
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
#define AVS3_SEQ_START_CODE
main external API structure.
@ AV_PICTURE_TYPE_B
Bi-dir predicted.
@ AV_PICTURE_TYPE_P
Predicted.
int width
picture width / height.
#define AVS3_INTER_PIC_START_CODE
#define AVS3_PROFILE_BASELINE_MAIN10