Mercurial > libavcodec.hg
comparison h264_direct.c @ 11085:27b5a2bd1dfe libavcodec
Fix reference selection for colocated MBs from frames to fields.
author | michael |
---|---|
date | Sun, 07 Feb 2010 01:17:13 +0000 |
parents | 6e564ab180d1 |
children | d4222f5b6dea |
comparison
equal
deleted
inserted
replaced
11084:6e564ab180d1 | 11085:27b5a2bd1dfe |
---|---|
120 | 120 |
121 cur->mbaff= FRAME_MBAFF; | 121 cur->mbaff= FRAME_MBAFF; |
122 | 122 |
123 if(cur->pict_type != FF_B_TYPE || h->direct_spatial_mv_pred) | 123 if(cur->pict_type != FF_B_TYPE || h->direct_spatial_mv_pred) |
124 return; | 124 return; |
125 | |
126 if(s->picture_structure == PICT_FRAME){ | |
127 int cur_poc = s->current_picture_ptr->poc; | |
128 int *col_poc = h->ref_list[1]->field_poc; | |
129 ref1sidx=sidx= (FFABS(col_poc[0] - cur_poc) >= FFABS(col_poc[1] - cur_poc)); | |
130 } | |
125 | 131 |
126 for(list=0; list<2; list++){ | 132 for(list=0; list<2; list++){ |
127 fill_colmap(h, h->map_col_to_list0, list, sidx, ref1sidx, 0); | 133 fill_colmap(h, h->map_col_to_list0, list, sidx, ref1sidx, 0); |
128 for(field=0; field<2; field++) | 134 for(field=0; field<2; field++) |
129 fill_colmap(h, h->map_col_to_list0_field[field], list, field, field, 1); | 135 fill_colmap(h, h->map_col_to_list0_field[field], list, field, field, 1); |