# HG changeset patch # User michael # Date 1265505433 0 # Node ID 27b5a2bd1dfe9f39d3fd67dfd019f1bebf0c0d9e # Parent 6e564ab180d12f1edc469504fce857e4f6807173 Fix reference selection for colocated MBs from frames to fields. diff -r 6e564ab180d1 -r 27b5a2bd1dfe h264_direct.c --- a/h264_direct.c Sun Feb 07 01:14:58 2010 +0000 +++ b/h264_direct.c Sun Feb 07 01:17:13 2010 +0000 @@ -123,6 +123,12 @@ if(cur->pict_type != FF_B_TYPE || h->direct_spatial_mv_pred) return; + if(s->picture_structure == PICT_FRAME){ + int cur_poc = s->current_picture_ptr->poc; + int *col_poc = h->ref_list[1]->field_poc; + ref1sidx=sidx= (FFABS(col_poc[0] - cur_poc) >= FFABS(col_poc[1] - cur_poc)); + } + for(list=0; list<2; list++){ fill_colmap(h, h->map_col_to_list0, list, sidx, ref1sidx, 0); for(field=0; field<2; field++)