summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2006-09-09 11:32:36 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2006-09-09 11:32:36 +0000
commit767516533df0f68fe2906990b6cf0d7d3061495d (patch)
tree432e557f71a9be650506acad3c8f4c67e92fe1e9 /libavcodec
parentd429c9820875ec6d4e5f4c73af1a9d5123363b2f (diff)
Support for BI-frames in Advanced Profile
Originally committed as revision 6211 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vc1.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 5c6d5f6f87..79c1d2e62e 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -1326,7 +1326,7 @@ static int decode_entry_point(AVCodecContext *avctx, GetBitContext *gb)
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 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
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 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
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 @@ static int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
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;
}