From a12d3188cbec15e22070e139fa5cc541da07e2c3 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 29 Jan 2015 08:42:14 +0100 Subject: h264: use a smaller struct for the ref lists There is no need to store a whole H264Picture, with a full AVFrame embedded in it. This should allow getting rid of the embedded AVFrame later. --- libavcodec/h264_slice.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavcodec/h264_slice.c') diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 4044ba2ead..d0438fd00c 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -819,7 +819,7 @@ static void implicit_weight_table(const H264Context *h, H264SliceContext *sl, in int poc0 = sl->ref_list[0][ref0].poc; for (ref1 = ref_start; ref1 < ref_count1; ref1++) { int w = 32; - if (!sl->ref_list[0][ref0].long_ref && !sl->ref_list[1][ref1].long_ref) { + if (!sl->ref_list[0][ref0].parent->long_ref && !sl->ref_list[1][ref1].parent->long_ref) { int poc1 = sl->ref_list[1][ref1].poc; int td = av_clip_int8(poc1 - poc0); if (td) { @@ -1652,9 +1652,9 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl) for (i = 0; i < 16; i++) { id_list[i] = 60; if (j < sl->list_count && i < sl->ref_count[j] && - sl->ref_list[j][i].f.buf[0]) { + sl->ref_list[j][i].parent->f.buf[0]) { int k; - AVBuffer *buf = sl->ref_list[j][i].f.buf[0]->buffer; + AVBuffer *buf = sl->ref_list[j][i].parent->f.buf[0]->buffer; for (k = 0; k < h->short_ref_count; k++) if (h->short_ref[k]->f.buf[0]->buffer == buf) { id_list[i] = k; -- cgit v1.2.3