Lines Matching refs:pc
30 ParseContext pc;
41 static int mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf,
45 uint32_t state = pc->state;
60 av_assert1(pc->frame_start_found >= 0 && pc->frame_start_found <= 4);
61 if (pc->frame_start_found & 1) {
63 pc->frame_start_found--;
66 pc->frame_start_found = 0;
68 pc->frame_start_found = (pc->frame_start_found + 1) & 3;
73 if (pc->frame_start_found == 0 && state >= SLICE_MIN_START_CODE && state <= SLICE_MAX_START_CODE) {
75 pc->frame_start_found = 4;
78 pc->frame_start_found = 0;
79 pc->state = -1;
82 if (pc->frame_start_found == 2 && state == SEQ_START_CODE)
83 pc->frame_start_found = 0;
84 if (pc->frame_start_found < 4 && state == EXT_START_CODE)
85 pc->frame_start_found++;
86 if (pc->frame_start_found == 4 && (state & 0xFFFFFF00) == 0x100) {
88 pc->frame_start_found = 0;
89 pc->state = -1;
93 if (pc->frame_start_found == 0 && s && state == PICTURE_START_CODE) {
98 pc->state = state;
107 struct MpvParseContext *pc = s->priv_data;
137 pc->width = (buf[0] << 4) | (buf[1] >> 4);
138 pc->height = ((buf[1] & 0x0f) << 8) | buf[2];
140 set_dim_ret = ff_set_dimensions(avctx, pc->width, pc->height);
145 pc->frame_rate = avctx->framerate = ff_mpeg12_frame_rate_tab[frame_rate_index];
162 pc->progressive_sequence = buf[1] & (1 << 3);
172 pc->width = (pc->width & 0xFFF) | (horiz_size_ext << 12);
173 pc->height = (pc->height& 0xFFF) | ( vert_size_ext << 12);
176 set_dim_ret = ff_set_dimensions(avctx, pc->width, pc->height);
177 avctx->framerate.num = pc->frame_rate.num * (frame_rate_ext_n + 1);
178 avctx->framerate.den = pc->frame_rate.den * (frame_rate_ext_d + 1);
192 if (pc->progressive_sequence) {
202 if (!pc->progressive_sequence && !progressive_frame) {
239 s->width = pc->width;
240 s->height = pc->height;
241 s->coded_width = FFALIGN(pc->width, 16);
242 s->coded_height = FFALIGN(pc->height, 16);
257 ParseContext *pc= &pc1->pc;
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) {