h264: correct implicit_weight for field-interlaced pictures.

(cherry picked from commit 4418aa9cb3)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
Ronald S. Bultje
2011-10-03 08:41:51 -07:00
committed by Reinhard Tartler
parent ec2a1d91e2
commit 485f85aa90

View File

@@ -2199,7 +2199,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;