Lines Matching defs:buf
41 static int mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf,
62 if (state == EXT_START_CODE && (buf[i] & 0xF0) != 0x80)
65 if ((buf[i] & 3) == 3)
72 i = avpriv_find_start_code(buf + i, buf + buf_size, &state) - buf - 1;
105 const uint8_t *buf, int buf_size)
108 const uint8_t *buf_end = buf + buf_size;
123 while (buf < buf_end) {
125 buf= avpriv_find_start_code(buf, buf_end, &start_code);
126 bytes_left = buf_end - buf;
130 s->pict_type = (buf[1] >> 3) & 7;
132 vbv_delay = ((buf[1] & 0x07) << 13) | (buf[2] << 5) | (buf[3] >> 3);
137 pc->width = (buf[0] << 4) | (buf[1] >> 4);
138 pc->height = ((buf[1] & 0x0f) << 8) | buf[2];
144 frame_rate_index = buf[3] & 0xf;
146 bit_rate = (buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6);
153 ext_type = (buf[0] >> 4);
157 horiz_size_ext = ((buf[1] & 1) << 1) | (buf[2] >> 7);
158 vert_size_ext = (buf[2] >> 5) & 3;
159 bit_rate_ext = ((buf[2] & 0x1F)<<7) | (buf[3]>>1);
160 frame_rate_ext_n = (buf[5] >> 5) & 3;
161 frame_rate_ext_d = (buf[5] & 0x1f);
162 pc->progressive_sequence = buf[1] & (1 << 3);
163 avctx->has_b_frames= !(buf[5] >> 7);
165 chroma_format = (buf[1] >> 1) & 3;
185 top_field_first = buf[3] & (1 << 7);
186 repeat_first_field = buf[3] & (1 << 1);
187 progressive_frame = buf[4] & (1 << 7);
254 const uint8_t *buf, int buf_size)
264 next= ff_mpeg1_find_frame_end(pc, buf, buf_size, s);
266 next = mpeg1_find_frame_end(pc, buf, buf_size, s);
269 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
279 mpegvideo_extract_headers(s, avctx, buf, buf_size);
283 *poutbuf = buf;