diff options
author | Nekopanda <pianoyayaninth-at-yahoo.co.jp@ffmpeg.org> | 2018-02-10 12:36:32 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-02-11 04:16:40 +0300 |
commit | 8b154cb3e90a3e599cadf477d815a9854b7bb4e1 (patch) | |
tree | c19f2fc49c4e249226a05ea1c33f530583740c91 /libavcodec/mpeg12dec.c | |
parent | 063be4fe2cc631315fac028b5e5642e451304807 (diff) |
avcodec/mpeg2dec: Fix field selection for skipped macroblocks
For B field pictures, the spec says,
> The prediction shall be made from the field of the same parity as the field being predicted.
I did it.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r-- | libavcodec/mpeg12dec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index f5f2c696c0..9e076e89da 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -1969,6 +1969,8 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y, s->mv[0][0][1] = s->last_mv[0][0][1]; s->mv[1][0][0] = s->last_mv[1][0][0]; s->mv[1][0][1] = s->last_mv[1][0][1]; + s->field_select[0][0] = (s->picture_structure - 1) & 1; + s->field_select[1][0] = (s->picture_structure - 1) & 1; } } } |