Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <clement@stupeflix.com>2016-06-29 16:29:38 +0300
committerClément Bœsch <clement@stupeflix.com>2016-06-29 16:29:38 +0300
commitcdecb39fca81967ff9e021c776b3212b1870188e (patch)
tree9da080384bd6a260d29c8963a7195b6c54dc097e /libavcodec/h264_slice.c
parent527a57932765f493529449f13d0d79ee5c7116e1 (diff)
parentfa57059079190242517701120cfdccad93c866da (diff)
Merge commit 'fa57059079190242517701120cfdccad93c866da'
* commit 'fa57059079190242517701120cfdccad93c866da': h264: move initialising the implicit pred weight table for MBAFF Merged-by: Clément Bœsch <clement@stupeflix.com>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 666d99f837..522a36cb89 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -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) {