Lines Matching defs:buf
27 static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size)
35 state = (state << 8) | buf[cur];
36 if ((state & 0xFFFFFF00) == 0x100 && AVS2_ISPIC(buf[cur])) {
48 state = (state << 8) | buf[cur];
49 if ((state & 0xFFFFFF00) == 0x100 && AVS2_ISUNIT(buf[cur])) {
63 static void parse_avs2_seq_header(AVCodecParserContext *s, const uint8_t *buf,
81 init_get_bits8(&gb, buf, buf_size_min);
132 static void parse_avs2_units(AVCodecParserContext *s, const uint8_t *buf,
138 if (!(buf[0] == 0x0 && buf[1] == 0x0 && buf[2] == 0x1))
141 switch (buf[3]) {
143 parse_avs2_seq_header(s, buf + 4, buf_size - 4, avctx);
152 int pic_code_type = buf[8] & 0x3;
166 const uint8_t *buf, int buf_size)
174 next = avs2_find_frame_end(pc, buf, buf_size);
175 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
182 parse_avs2_units(s, buf, buf_size, avctx);
184 *poutbuf = buf;