[FFmpeg-cvslog] Merge commit 'b16e9b9ac9db449cae2242767dd3c3fc309357c4'

Clément Bœsch git at videolan.org
Wed Jun 29 15:05:45 CEST 2016


ffmpeg | branch: master | Clément Bœsch <clement at stupeflix.com> | Wed Jun 29 15:03:12 2016 +0200| [d7a2451688442d2736f4811267277c7051f414a6] | committer: Clément Bœsch

Merge commit 'b16e9b9ac9db449cae2242767dd3c3fc309357c4'

* commit 'b16e9b9ac9db449cae2242767dd3c3fc309357c4':
  h264: move initialising the explicit pred weight table for MBAFF

Merged-by: Clément Bœsch <clement at stupeflix.com>

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

 libavcodec/h264_parse.c |   10 +++++++++-
 libavcodec/h264_refs.c  |    7 -------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/libavcodec/h264_parse.c b/libavcodec/h264_parse.c
index a63530d..b7f9a2e 100644
--- a/libavcodec/h264_parse.c
+++ b/libavcodec/h264_parse.c
@@ -26,7 +26,7 @@ int ff_h264_pred_weight_table(GetBitContext *gb, const SPS *sps,
                               const int *ref_count, int slice_type_nos,
                               H264PredWeightTable *pwt, void *logctx)
 {
-    int list, i;
+    int list, i, j;
     int luma_def, chroma_def;
 
     pwt->use_weight             = 0;
@@ -88,6 +88,14 @@ int ff_h264_pred_weight_table(GetBitContext *gb, const SPS *sps,
                     }
                 }
             }
+
+            // for MBAFF
+            pwt->luma_weight[16 + 2 * i][list][0] = pwt->luma_weight[16 + 2 * i + 1][list][0] = pwt->luma_weight[i][list][0];
+            pwt->luma_weight[16 + 2 * i][list][1] = pwt->luma_weight[16 + 2 * i + 1][list][1] = pwt->luma_weight[i][list][1];
+            for (j = 0; j < 2; j++) {
+                pwt->chroma_weight[16 + 2 * i][list][j][0] = pwt->chroma_weight[16 + 2 * i + 1][list][j][0] = pwt->chroma_weight[i][list][j][0];
+                pwt->chroma_weight[16 + 2 * i][list][j][1] = pwt->chroma_weight[16 + 2 * i + 1][list][j][1] = pwt->chroma_weight[i][list][j][1];
+            }
         }
         if (slice_type_nos != AV_PICTURE_TYPE_B)
             break;
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index 2f80de1..b6bb8f2 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -422,13 +422,6 @@ void ff_h264_fill_mbaff_ref_list(H264SliceContext *sl)
                 field[1].data[j] += frame->parent->f->linesize[j];
             field[1].reference = PICT_BOTTOM_FIELD;
             field[1].poc       = field[1].parent->field_poc[1];
-
-            sl->pwt.luma_weight[16 + 2 * i][list][0] = sl->pwt.luma_weight[16 + 2 * i + 1][list][0] = sl->pwt.luma_weight[i][list][0];
-            sl->pwt.luma_weight[16 + 2 * i][list][1] = sl->pwt.luma_weight[16 + 2 * i + 1][list][1] = sl->pwt.luma_weight[i][list][1];
-            for (j = 0; j < 2; j++) {
-                sl->pwt.chroma_weight[16 + 2 * i][list][j][0] = sl->pwt.chroma_weight[16 + 2 * i + 1][list][j][0] = sl->pwt.chroma_weight[i][list][j][0];
-                sl->pwt.chroma_weight[16 + 2 * i][list][j][1] = sl->pwt.chroma_weight[16 + 2 * i + 1][list][j][1] = sl->pwt.chroma_weight[i][list][j][1];
-            }
         }
     }
 }


======================================================================

diff --cc libavcodec/h264_parse.c
index a63530d,052e8e4..b7f9a2e
--- a/libavcodec/h264_parse.c
+++ b/libavcodec/h264_parse.c
@@@ -24,9 -24,9 +24,9 @@@
  
  int ff_h264_pred_weight_table(GetBitContext *gb, const SPS *sps,
                                const int *ref_count, int slice_type_nos,
 -                              H264PredWeightTable *pwt)
 +                              H264PredWeightTable *pwt, void *logctx)
  {
-     int list, i;
+     int list, i, j;
      int luma_def, chroma_def;
  
      pwt->use_weight             = 0;



More information about the ffmpeg-cvslog mailing list