diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 13:13:12 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 13:13:12 +0100 |
commit | 756dc7bd18b88fdde5c06c701375a6570500e58c (patch) | |
tree | 731502f3a57bdcc81d35202cc50da7770f38ef68 /libavcodec/h264_parser.c | |
parent | 06c70d45373dedc600f28e345685b130b60203c1 (diff) | |
parent | 92c6c2a605f9b077b8fbc25b7ed6625541232b87 (diff) | |
download | ffmpeg-756dc7bd18b88fdde5c06c701375a6570500e58c.tar.gz |
Merge commit '92c6c2a605f9b077b8fbc25b7ed6625541232b87'
* commit '92c6c2a605f9b077b8fbc25b7ed6625541232b87':
h264: split weighted pred-related vars into per-slice context
Conflicts:
libavcodec/h264.c
libavcodec/h264.h
libavcodec/h264_mb.c
libavcodec/svq3.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r-- | libavcodec/h264_parser.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 8eda6b88a9..e906fd53cf 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -133,6 +133,7 @@ static int scan_mmco_reset(AVCodecParserContext *s) { H264ParseContext *p = s->priv_data; H264Context *h = &p->h; + H264SliceContext *sl = &h->slice_ctx[0]; h->slice_type_nos = s->pict_type & 3; @@ -172,7 +173,7 @@ static int scan_mmco_reset(AVCodecParserContext *s) if ((h->pps.weighted_pred && h->slice_type_nos == AV_PICTURE_TYPE_P) || (h->pps.weighted_bipred_idc == 1 && h->slice_type_nos == AV_PICTURE_TYPE_B)) - ff_pred_weight_table(h); + ff_pred_weight_table(h, sl); if (get_bits1(&h->gb)) { // adaptive_ref_pic_marking_mode_flag int i; @@ -603,6 +604,12 @@ static av_cold int init(AVCodecParserContext *s) { H264ParseContext *p = s->priv_data; H264Context *h = &p->h; + + h->slice_ctx = av_mallocz(sizeof(*h->slice_ctx)); + if (!h->slice_ctx) + return 0; + h->nb_slice_ctx = 1; + h->thread_context[0] = h; h->slice_context_count = 1; ff_h264dsp_init(&h->h264dsp, 8, 1); |