diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-26 15:04:29 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-26 15:04:29 +0100 |
commit | ee38234c43b6b3280304be7a43dc569cef683c43 (patch) | |
tree | d8988b87ec816f608ac38eb18a2d236220a3ac8a /libavcodec/vaapi_h264.c | |
parent | 79aafd43fd255fc04e4f4db4c45d6d1f5a9b9fff (diff) | |
parent | e481458bc308ee838deaeacac51929514762e7a7 (diff) | |
download | ffmpeg-ee38234c43b6b3280304be7a43dc569cef683c43.tar.gz |
Merge commit 'e481458bc308ee838deaeacac51929514762e7a7'
* commit 'e481458bc308ee838deaeacac51929514762e7a7':
h264: factor out pred weight table parsing into a separate file
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/vaapi_h264.c')
-rw-r--r-- | libavcodec/vaapi_h264.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c index ded2cb3d49..b02473851e 100644 --- a/libavcodec/vaapi_h264.c +++ b/libavcodec/vaapi_h264.c @@ -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); |