Go to the documentation of this file.
50 for(
i=0;
i<buf_size;
i++){
64 for(;
i<buf_size;
i++){
84 int mb_width, mb_height;
96 mb_width = (
width + 15) >> 4;
97 mb_height = (
height + 15) >> 4;
103 if (frame_rate_code == 0 || frame_rate_code > 13) {
105 "frame_rate_code %d is invalid\n", frame_rate_code);
116 s->coded_width = 16 * mb_width;
117 s->coded_height = 16 * mb_height;
124 const uint8_t *buf,
int buf_size)
127 const uint8_t *buf_end;
128 const uint8_t *buf_ptr;
138 buf_end = buf + buf_size;
141 if ((stc & 0xFFFFFE00) || buf_ptr == buf_end)
160 const uint8_t **poutbuf,
int *poutbuf_size,
161 const uint8_t *buf,
int buf_size)
181 *poutbuf_size = buf_size;
#define AV_LOG_WARNING
Something somehow does not look correct.
av_cold void ff_parse_close(AVCodecParserContext *s)
static int parse_seq_header(AVCodecParserContext *s, AVCodecContext *avctx, GetBitContext *gb)
uint32_t state
contains the last few bytes in MSB order
static void skip_bits(GetBitContext *s, int n)
static av_cold void close(AVCodecParserContext *s)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
#define PIC_PB_START_CODE
@ AV_PICTURE_TYPE_I
Intra.
const uint8_t * avpriv_find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *state)
static int parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
static int cavs_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size)
Find the end of the current frame in the bitstream.
@ AV_PICTURE_TYPE_NONE
Undefined.
static void skip_bits1(GetBitContext *s)
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
const FFCodecParser ff_cavsvideo_parser
#define PARSER_FLAG_COMPLETE_FRAMES
#define i(width, name, range_min, range_max)
static int cavsvideo_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
#define PARSER_CODEC_LIST(...)
const AVRational ff_mpeg12_frame_rate_tab[]
main external API structure.
static int cavs_parse_frame(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t *buf, int buf_size)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.