diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-11 17:35:30 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-11 17:35:30 +0200 |
commit | 8e119a22c48295507aa2b54954b4c5e525ec3a2f (patch) | |
tree | 912db46848158298443426e778cd5dba8951d502 | |
parent | 06137a496b93230326e62c9c7c220364fa6706df (diff) | |
download | ffmpeg-8e119a22c48295507aa2b54954b4c5e525ec3a2f.tar.gz |
mpeg4videodec: Parse newpred headers
This is untested due to lack of a non broken file using new pred
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/mpeg4videodec.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 63508ef252..84a0dac88b 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -356,6 +356,17 @@ static int mpeg4_decode_sprite_trajectory(MpegEncContext * s, GetBitContext *gb) return 0; } +static int decode_new_pred(MpegEncContext *s, GetBitContext *gb){ + int len = FFMIN(s->time_increment_bits + 3, 15); + + get_bits(gb, len); + if (get_bits1(gb)) + get_bits(gb, len); + check_marker(gb, "after new_pred"); + + return 0; +} + /** * Decode the next video packet. * @return <0 if something went wrong @@ -438,7 +449,8 @@ int ff_mpeg4_decode_video_packet_header(MpegEncContext *s) } } } - //FIXME new-pred stuff + if (s->new_pred) + decode_new_pred(s, &s->gb); return 0; } @@ -2024,6 +2036,9 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ av_log(s->avctx, AV_LOG_ERROR, "vop not coded\n"); return FRAME_SKIPPED; } + if (s->new_pred) + decode_new_pred(s, gb); + if (s->shape != BIN_ONLY_SHAPE && ( s->pict_type == AV_PICTURE_TYPE_P || (s->pict_type == AV_PICTURE_TYPE_S && s->vol_sprite_usage==GMC_SPRITE))) { /* rounding type for motion estimation */ |