On Tue, 14 May 2013, Kostya Shishkov wrote:
On Tue, May 14, 2013 at 12:21:30PM +0300, Martin Storsjö wrote:
From: Hendrik Leppkes <[email protected]>
---
This was ok'd by Mashiat in a comment at
https://github.com/mstorsjo/libav/commit/998ddfda019d4d91d89d6c22be49fd91c639cc41#commitcomment-3204738.
---
libavcodec/vc1.c | 42 +++++++++++++++++++++++++++++++++++++++---
1 file changed, 39 insertions(+), 3 deletions(-)
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 719c28d..56bd651 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -1138,9 +1138,14 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v,
GetBitContext* gb)
}
break;
case AV_PICTURE_TYPE_B:
- // TODO: implement interlaced frame B picture decoding
- if (v->fcm == ILACE_FRAME)
- return -1;
+ if (v->fcm == ILACE_FRAME) {
+ v->bfraction_lut_index = get_vlc2(gb, ff_vc1_bfraction_vlc.table,
VC1_BFRACTION_VLC_BITS, 1);
+ v->bfraction =
ff_vc1_bfraction_lut[v->bfraction_lut_index];
+ if (v->bfraction == 0) {
+ return -1;
+ }
+ return -1; // This codepath is still incomplete thus it is disabled
+ }
if (v->extended_mv)
v->mvrange = get_unary(gb, 0, 3);
else
@@ -1186,6 +1191,37 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v,
GetBitContext* gb)
v->fourmvbp_vlc = &ff_vc1_4mv_block_pattern_vlc[fourmvbptab];
}
v->numref = 1; // interlaced field B pictures are always 2-ref
+ } else if (v->fcm == ILACE_FRAME) {
+ if (v->extended_dmv)
+ v->dmvrange = get_unary(gb, 0, 3);
+ get_bits1(gb); /* intcomp - present but shall always be 0 */
+ v->intcomp = 0;
would be better to assign and spit a warning when it's nonzero
Probably, yes. What about this:
+ if (get_bits1(gb)) /* intcomp - present but shall always be 0 */
+ av_log(v->s.avctx, AV_LOG_WARNING, "intcomp bit set where it should
be unset\n");
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel