Mercurial > libavcodec.hg
changeset 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 |
files | h264_direct.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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++)