From b77fffa127663028169c5ed543956af4b9496c29 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 13 Apr 2016 13:52:36 +0200 Subject: h264: make slice threading work with deblocking_filter=1 In such a case, decode the MBs in parallel without the loop filter, then execute the filter serially. The ref2frm array was previously moved to H264SliceContext. That was incorrect, since it applies to all the slices and should properly be in H264Context (it did not actually break decoding, since this distinction only becomes relevant with slice threading and deblocking_filter=1, which was not implemented before this commit). The ref2frm array is thus moved back to H264Context. --- libavcodec/h264.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'libavcodec/h264.c') diff --git a/libavcodec/h264.c b/libavcodec/h264.c index c024d7e03a..27cbcd21aa 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -837,7 +837,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size) nal->ref_idc == 0 && nal->type != NAL_SEI) continue; -again: // FIXME these should stop being context-global variables h->nal_ref_idc = nal->ref_idc; h->nal_unit_type = nal->type; @@ -947,10 +946,6 @@ again: if (err < 0) { av_log(h->avctx, AV_LOG_ERROR, "decode_slice_header error\n"); sl->ref_count[0] = sl->ref_count[1] = sl->list_count = 0; - } else if (err == 1) { - /* Slice could not be decoded in parallel mode, restart. */ - sl = &h->slice_ctx[0]; - goto again; } } if (context_count) { -- cgit v1.2.3