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/dxva2_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/dxva2_h264.c')
-rw-r--r-- | libavcodec/dxva2_h264.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c index b1abb9a9af..7048c4aada 100644 --- a/libavcodec/dxva2_h264.c +++ b/libavcodec/dxva2_h264.c @@ -232,8 +232,8 @@ static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice, slice->slice_type = ff_h264_get_slice_type(sl); if (sl->slice_type_fixed) slice->slice_type += 5; - slice->luma_log2_weight_denom = sl->luma_log2_weight_denom; - slice->chroma_log2_weight_denom = sl->chroma_log2_weight_denom; + slice->luma_log2_weight_denom = sl->pwt.luma_log2_weight_denom; + slice->chroma_log2_weight_denom = sl->pwt.chroma_log2_weight_denom; if (sl->list_count > 0) slice->num_ref_idx_l0_active_minus1 = sl->ref_count[0] - 1; if (sl->list_count > 1) @@ -257,15 +257,15 @@ static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice, sl->ref_list[list][i].reference == PICT_BOTTOM_FIELD); for (plane = 0; plane < 3; plane++) { int w, o; - if (plane == 0 && sl->luma_weight_flag[list]) { - w = sl->luma_weight[i][list][0]; - o = sl->luma_weight[i][list][1]; - } else if (plane >= 1 && sl->chroma_weight_flag[list]) { - w = sl->chroma_weight[i][list][plane-1][0]; - o = sl->chroma_weight[i][list][plane-1][1]; + if (plane == 0 && sl->pwt.luma_weight_flag[list]) { + w = sl->pwt.luma_weight[i][list][0]; + o = sl->pwt.luma_weight[i][list][1]; + } else if (plane >= 1 && sl->pwt.chroma_weight_flag[list]) { + w = sl->pwt.chroma_weight[i][list][plane-1][0]; + o = sl->pwt.chroma_weight[i][list][plane-1][1]; } else { - w = 1 << (plane == 0 ? sl->luma_log2_weight_denom : - sl->chroma_log2_weight_denom); + w = 1 << (plane == 0 ? sl->pwt.luma_log2_weight_denom : + sl->pwt.chroma_log2_weight_denom); o = 0; } slice->Weights[list][i][plane][0] = w; |