summaryrefslogtreecommitdiff
path: root/libavcodec/h264_refs.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_refs.c
parent87d1f820591b87bec452f33f451dee4db142ee9a (diff)
parentdebca90863e4ee53447efd02483c500f89766384 (diff)
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_refs.c')
-rw-r--r--libavcodec/h264_refs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index 6bac897a34..730471b21b 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -305,7 +305,7 @@ int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl)
h264_initialise_ref_list(h, sl);
for (list = 0; list < sl->list_count; list++) {
- int pred = h->curr_pic_num;
+ int pred = sl->curr_pic_num;
for (index = 0; index < sl->nb_ref_modifications[list]; index++) {
unsigned int modification_of_pic_nums_idc = sl->ref_modifications[list][index].op;
@@ -320,7 +320,7 @@ int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl)
const unsigned int abs_diff_pic_num = val + 1;
int frame_num;
- if (abs_diff_pic_num > h->max_pic_num) {
+ if (abs_diff_pic_num > sl->max_pic_num) {
av_log(h->avctx, AV_LOG_ERROR,
"abs_diff_pic_num overflow\n");
return AVERROR_INVALIDDATA;
@@ -330,7 +330,7 @@ int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl)
pred -= abs_diff_pic_num;
else
pred += abs_diff_pic_num;
- pred &= h->max_pic_num - 1;
+ pred &= sl->max_pic_num - 1;
frame_num = pic_num_extract(h, pred, &pic_structure);
@@ -844,8 +844,8 @@ int ff_h264_decode_ref_pic_marking(const H264Context *h, H264SliceContext *sl,
mmco[i].opcode = opcode;
if (opcode == MMCO_SHORT2UNUSED || opcode == MMCO_SHORT2LONG) {
mmco[i].short_pic_num =
- (h->curr_pic_num - get_ue_golomb_long(gb) - 1) &
- (h->max_pic_num - 1);
+ (sl->curr_pic_num - get_ue_golomb_long(gb) - 1) &
+ (sl->max_pic_num - 1);
#if 0
if (mmco[i].short_pic_num >= h->short_ref_count ||
!h->short_ref[mmco[i].short_pic_num]) {