[FFmpeg-cvslog] h264: fix fill_colmap() to not store entries mbaff style when the reference is not mbaff at all

Michael Niedermayer git at videolan.org
Thu Oct 6 23:13:40 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Oct  6 22:54:00 2011 +0200| [a3ba542af39ba4425cbb44d2a0ae09c212b40001] | committer: Michael Niedermayer

h264: fix fill_colmap() to not store entries mbaff style when the reference is not mbaff at all

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a3ba542af39ba4425cbb44d2a0ae09c212b40001
---

 libavcodec/h264_direct.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c
index ab9592b..abc0700 100644
--- a/libavcodec/h264_direct.c
+++ b/libavcodec/h264_direct.c
@@ -89,7 +89,8 @@ static void fill_colmap(H264Context *h, int map[2][16+32], int list, int field,
             for(j=start; j<end; j++){
                 if (4 * h->ref_list[0][j].frame_num + (h->ref_list[0][j].f.reference & 3) == poc) {
                     int cur_ref= mbafi ? (j-16)^field : j;
-                    map[list][2*old_ref + (rfield^field) + 16] = cur_ref;
+                    if(ref1->mbaff)
+                        map[list][2*old_ref + (rfield^field) + 16] = cur_ref;
                     if(rfield == field || !interl)
                         map[list][old_ref] = cur_ref;
                     break;



More information about the ffmpeg-cvslog mailing list