h264: correct implicit_weight for field-interlaced pictures.

This commit is contained in:
Ronald S. Bultje 2011-10-03 08:41:51 -07:00
parent 330deb7592
commit 4418aa9cb3

View File

@ -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;