[FFmpeg-cvslog] h264: correct implicit_weight for field-interlaced pictures.

Ronald S. Bultje git at videolan.org
Mon Mar 19 05:30:20 CET 2012


ffmpeg | branch: release/0.8 | Ronald S. Bultje <rsbultje at gmail.com> | Mon Oct  3 08:41:51 2011 -0700| [485f85aa900df0e50dd2300509ed8331e7bf6301] | committer: Reinhard Tartler

h264: correct implicit_weight for field-interlaced pictures.
(cherry picked from commit 4418aa9cb3b2f0b83748e37d2952560cf84b3611)

Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 libavcodec/h264.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 276ace2..f2fa9aa 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2199,7 +2199,11 @@ static void implicit_weight_table(H264Context *h, int field){
     }
 
     if(field < 0){
-        cur_poc = s->current_picture_ptr->poc;
+        if (s->picture_structure == PICT_FRAME) {
+            cur_poc = s->current_picture_ptr->poc;
+        } else {
+            cur_poc = s->current_picture_ptr->field_poc[s->picture_structure - 1];
+        }
     if(   h->ref_count[0] == 1 && h->ref_count[1] == 1 && !FRAME_MBAFF
        && h->ref_list[0][0].poc + h->ref_list[1][0].poc == 2*cur_poc){
         h->use_weight= 0;



More information about the ffmpeg-cvslog mailing list