# HG changeset patch # User kostya # Date 1157801556 0 # Node ID e9be5d4bad80d7c9233804f7fb4241ed8f8f3cd8 # Parent 7857ae840b0b2c237909247f9829bd6f763c187f Support for BI-frames in Advanced Profile diff -r 7857ae840b0b -r e9be5d4bad80 vc1.c --- a/vc1.c Sat Sep 09 11:29:17 2006 +0000 +++ b/vc1.c Sat Sep 09 11:32:36 2006 +0000 @@ -1326,7 +1326,7 @@ av_log(avctx, AV_LOG_DEBUG, "Entry point: %08X\n", show_bits_long(gb, 32)); get_bits1(gb); // broken link - get_bits1(gb); // closed entry + avctx->max_b_frames = 1 - get_bits1(gb); // 'closed entry' also signalize possible B-frames v->panscanflag = get_bits1(gb); get_bits1(gb); // refdist flag v->s.loop_filter = get_bits1(gb); @@ -1592,8 +1592,7 @@ break; case 3: v->s.pict_type = BI_TYPE; - return -1; -// break; + break; case 4: v->s.pict_type = P_TYPE; // skipped pic v->p_frame_skipped = 1; @@ -1636,6 +1635,7 @@ switch(v->s.pict_type) { case I_TYPE: + case BI_TYPE: status = bitplane_decoding(v->acpred_plane, &v->acpred_is_raw, v); if (status < 0) return -1; av_log(v->s.avctx, AV_LOG_DEBUG, "ACPRED plane encoding: " @@ -1756,6 +1756,11 @@ vop_dquant_decoding(v); } + v->bi_type = 0; + if(v->s.pict_type == BI_TYPE) { + v->s.pict_type = B_TYPE; + v->bi_type = 1; + } return 0; }