diff options
author | Michael Niedermayer | 2010-02-07 01:18:00 +0000 |
---|---|---|
committer | Michael Niedermayer | 2010-02-07 01:18:00 +0000 |
commit | 488dba7000c6c24088fbb382feb94a4022aef144 (patch) | |
tree | d02564929d09239539d0d0fc997baf2f62b89670 /libavcodec/h264_direct.c | |
parent | d88ea354638b3624a9658cd0702598bd64905a4b (diff) |
Fix colocated map.
Originally committed as revision 21664 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264_direct.c')
-rw-r--r-- | libavcodec/h264_direct.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c index f8b86358f0..65fbd23949 100644 --- a/libavcodec/h264_direct.c +++ b/libavcodec/h264_direct.c @@ -71,7 +71,7 @@ static void fill_colmap(H264Context *h, int map[2][16+32], int list, int field, Picture * const ref1 = &h->ref_list[1][0]; int j, old_ref, rfield; int start= mbafi ? 16 : 0; - int end = mbafi ? 16+2*h->ref_count[list] : h->ref_count[list]; + int end = mbafi ? 16+2*h->ref_count[0] : h->ref_count[0]; int interl= mbafi || s->picture_structure != PICT_FRAME; /* bogus; fills in for missing frames */ @@ -87,10 +87,10 @@ static void fill_colmap(H264Context *h, int map[2][16+32], int list, int field, poc= (poc&~3) + rfield + 1; for(j=start; j<end; j++){ - if(4*h->ref_list[list][j].frame_num + (h->ref_list[list][j].reference&3) == poc){ + if(4*h->ref_list[0][j].frame_num + (h->ref_list[0][j].reference&3) == poc){ int cur_ref= mbafi ? (j-16)^field : j; map[list][2*old_ref + (rfield^field) + 16] = cur_ref; - if(rfield == field) + if(rfield == field || !interl) map[list][old_ref] = cur_ref; break; } |