diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-07 01:17:13 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-07 01:17:13 +0000 |
commit | d88ea354638b3624a9658cd0702598bd64905a4b (patch) | |
tree | c632d7776ba9e67edaeb707ef5ca58a0625c9daf | |
parent | 5aa1d7598fecdfa3e304448c39fcb2815a5503d9 (diff) | |
download | ffmpeg-d88ea354638b3624a9658cd0702598bd64905a4b.tar.gz |
Fix reference selection for colocated MBs from frames to fields.
Originally committed as revision 21663 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/h264_direct.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c index fa9380d563..f8b86358f0 100644 --- a/libavcodec/h264_direct.c +++ b/libavcodec/h264_direct.c @@ -123,6 +123,12 @@ void ff_h264_direct_ref_list_init(H264Context * const h){ 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++) |