Commit cdecb39f authored by Clément Bœsch's avatar Clément Bœsch

Merge commit 'fa570590'

* commit 'fa570590':
  h264: move initialising the implicit pred weight table for MBAFF
Merged-by: 's avatarClément Bœsch <clement@stupeflix.com>
parents 527a5793 fa570590
......@@ -1607,6 +1607,10 @@ static int h264_slice_header_parse(H264Context *h, H264SliceContext *sl)
else if (pps->weighted_bipred_idc == 2 &&
sl->slice_type_nos == AV_PICTURE_TYPE_B) {
implicit_weight_table(h, sl, -1);
if (FRAME_MBAFF(h)) {
implicit_weight_table(h, sl, 0);
implicit_weight_table(h, sl, 1);
}
} else {
sl->pwt.use_weight = 0;
for (i = 0; i < 2; i++) {
......@@ -1628,13 +1632,6 @@ static int h264_slice_header_parse(H264Context *h, H264SliceContext *sl)
return AVERROR_INVALIDDATA;
}
if (FRAME_MBAFF(h)) {
if (pps->weighted_bipred_idc == 2 && sl->slice_type_nos == AV_PICTURE_TYPE_B) {
implicit_weight_table(h, sl, 0);
implicit_weight_table(h, sl, 1);
}
}
if (sl->slice_type_nos != AV_PICTURE_TYPE_I && pps->cabac) {
tmp = get_ue_golomb_31(&sl->gb);
if (tmp > 2) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment