summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2016-07-27 18:07:30 +0200
committerClément Bœsch <u@pkh.me>2016-07-27 18:07:30 +0200
commit6c41eda18ec0ef48763e1672266f7563f05775a5 (patch)
tree57a70af28ce9da192990ce87506e5d2d753ee40d /libavcodec/h264_slice.c
parent87d1f820591b87bec452f33f451dee4db142ee9a (diff)
parentdebca90863e4ee53447efd02483c500f89766384 (diff)
downloadffmpeg-streaming-6c41eda18ec0ef48763e1672266f7563f05775a5.zip
ffmpeg-streaming-6c41eda18ec0ef48763e1672266f7563f05775a5.tar.gz
Merge commit 'debca90863e4ee53447efd02483c500f89766384'
* commit 'debca90863e4ee53447efd02483c500f89766384': h264: store {curr,max}_pic_num in the per-slice context Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 74e8118..1fe89c3 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -418,9 +418,6 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
memcpy(&h->poc, &h1->poc, sizeof(h->poc));
- h->curr_pic_num = h1->curr_pic_num;
- h->max_pic_num = h1->max_pic_num;
-
memcpy(h->default_ref, h1->default_ref, sizeof(h->default_ref));
memcpy(h->short_ref, h1->short_ref, sizeof(h->short_ref));
memcpy(h->long_ref, h1->long_ref, sizeof(h->long_ref));
@@ -1337,7 +1334,7 @@ static int h264_field_start(H264Context *h, const H264SliceContext *sl,
return 0;
}
-static int h264_slice_header_parse(H264Context *h, H264SliceContext *sl,
+static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,
const H2645NAL *nal)
{
const SPS *sps;
@@ -1426,11 +1423,11 @@ static int h264_slice_header_parse(H264Context *h, H264SliceContext *sl,
sl->mb_field_decoding_flag = picture_structure != PICT_FRAME;
if (picture_structure == PICT_FRAME) {
- h->curr_pic_num = sl->frame_num;
- h->max_pic_num = 1 << sps->log2_max_frame_num;
+ sl->curr_pic_num = sl->frame_num;
+ sl->max_pic_num = 1 << sps->log2_max_frame_num;
} else {
- h->curr_pic_num = 2 * sl->frame_num + 1;
- h->max_pic_num = 1 << (sps->log2_max_frame_num + 1);
+ sl->curr_pic_num = 2 * sl->frame_num + 1;
+ sl->max_pic_num = 1 << (sps->log2_max_frame_num + 1);
}
if (nal->type == NAL_IDR_SLICE)
OpenPOWER on IntegriCloud