summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg4videodec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-11 17:35:30 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-11 17:35:30 +0200
commit8e119a22c48295507aa2b54954b4c5e525ec3a2f (patch)
tree912db46848158298443426e778cd5dba8951d502 /libavcodec/mpeg4videodec.c
parent06137a496b93230326e62c9c7c220364fa6706df (diff)
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>
Diffstat (limited to 'libavcodec/mpeg4videodec.c')
-rw-r--r--libavcodec/mpeg4videodec.c17
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 */