]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vaapi_h264.c
Merge commit 'ea6ab02a174bcc11f3eaa1b840c9a4c895968690'
[ffmpeg] / libavcodec / vaapi_h264.c
index ded2cb3d49146b52f141ac6bd05f3cef3ee31f47..b02473851e248e4a792641e103da0d28bb0c6801 100644 (file)
@@ -196,25 +196,25 @@ static void fill_vaapi_plain_pred_weight_table(H264Context   *h,
     H264SliceContext *sl = &h->slice_ctx[0];
     unsigned int i, j;
 
-    *luma_weight_flag    = sl->luma_weight_flag[list];
-    *chroma_weight_flag  = sl->chroma_weight_flag[list];
+    *luma_weight_flag    = sl->pwt.luma_weight_flag[list];
+    *chroma_weight_flag  = sl->pwt.chroma_weight_flag[list];
 
     for (i = 0; i < sl->ref_count[list]; i++) {
         /* VA API also wants the inferred (default) values, not
            only what is available in the bitstream (7.4.3.2). */
-        if (sl->luma_weight_flag[list]) {
-            luma_weight[i] = sl->luma_weight[i][list][0];
-            luma_offset[i] = sl->luma_weight[i][list][1];
+        if (sl->pwt.luma_weight_flag[list]) {
+            luma_weight[i] = sl->pwt.luma_weight[i][list][0];
+            luma_offset[i] = sl->pwt.luma_weight[i][list][1];
         } else {
-            luma_weight[i] = 1 << sl->luma_log2_weight_denom;
+            luma_weight[i] = 1 << sl->pwt.luma_log2_weight_denom;
             luma_offset[i] = 0;
         }
         for (j = 0; j < 2; j++) {
-            if (sl->chroma_weight_flag[list]) {
-                chroma_weight[i][j] = sl->chroma_weight[i][list][j][0];
-                chroma_offset[i][j] = sl->chroma_weight[i][list][j][1];
+            if (sl->pwt.chroma_weight_flag[list]) {
+                chroma_weight[i][j] = sl->pwt.chroma_weight[i][list][j][0];
+                chroma_offset[i][j] = sl->pwt.chroma_weight[i][list][j][1];
             } else {
-                chroma_weight[i][j] = 1 << sl->chroma_log2_weight_denom;
+                chroma_weight[i][j] = 1 << sl->pwt.chroma_log2_weight_denom;
                 chroma_offset[i][j] = 0;
             }
         }
@@ -341,8 +341,8 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx,
     slice_param->disable_deblocking_filter_idc  = sl->deblocking_filter < 2 ? !sl->deblocking_filter : sl->deblocking_filter;
     slice_param->slice_alpha_c0_offset_div2     = sl->slice_alpha_c0_offset / 2;
     slice_param->slice_beta_offset_div2         = sl->slice_beta_offset     / 2;
-    slice_param->luma_log2_weight_denom         = sl->luma_log2_weight_denom;
-    slice_param->chroma_log2_weight_denom       = sl->chroma_log2_weight_denom;
+    slice_param->luma_log2_weight_denom         = sl->pwt.luma_log2_weight_denom;
+    slice_param->chroma_log2_weight_denom       = sl->pwt.chroma_log2_weight_denom;
 
     fill_vaapi_RefPicList(slice_param->RefPicList0, sl->ref_list[0], sl->list_count > 0 ? sl->ref_count[0] : 0);
     fill_vaapi_RefPicList(slice_param->RefPicList1, sl->ref_list[1], sl->list_count > 1 ? sl->ref_count[1] : 0);