diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-10-03 19:41:51 +0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-10-05 15:01:23 +0400 |
commit | 4418aa9cb3b2f0b83748e37d2952560cf84b3611 (patch) | |
tree | 4c2c695ece158af00b381be22275c9e6c4882f8b /libavcodec/h264.c | |
parent | 330deb75923675224fb9aed311d3d6ce3ec52420 (diff) |
h264: correct implicit_weight for field-interlaced pictures.
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index e5d0ed8660..3b550cf380 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2158,7 +2158,11 @@ static void implicit_weight_table(H264Context *h, int field){ } if(field < 0){ - cur_poc = s->current_picture_ptr->poc; + if (s->picture_structure == PICT_FRAME) { + cur_poc = s->current_picture_ptr->poc; + } else { + cur_poc = s->current_picture_ptr->field_poc[s->picture_structure - 1]; + } if( h->ref_count[0] == 1 && h->ref_count[1] == 1 && !FRAME_MBAFF && h->ref_list[0][0].poc + h->ref_list[1][0].poc == 2*cur_poc){ h->use_weight= 0; |