From: Sreerenj Balachandran Date: Wed, 5 Aug 2015 02:23:20 +0000 (+0300) Subject: decoder: hevc: Fix the decoding of dependent slice segment X-Git-Tag: 1.19.3~503^2~1693 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb8b2af5f0fb7c0d5579e2c3e39e33b79ce60431;p=platform%2Fupstream%2Fgstreamer.git decoder: hevc: Fix the decoding of dependent slice segment Decoding process for reference picture list construction needs to be invoked only for P and B slice and the value for slice_type of dependent slice segment should be taken from the previous independent slice segment header of the same pic. https://bugzilla.gnome.org/show_bug.cgi?id=753226 Signed-off-by: Sreerenj Balachandran --- diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c index 25d0ebe..4767fbc 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c @@ -1620,10 +1620,6 @@ init_picture_refs (GstVaapiDecoderH265 * decoder, memset (priv->RefPicList1, 0, sizeof (GstVaapiPictureH265 *) * 16); priv->RefPicList0_count = priv->RefPicList1_count = 0; - if ((slice_hdr->type != GST_H265_B_SLICE) && - (slice_hdr->type != GST_H265_P_SLICE)) - return; - if (slice_hdr->dependent_slice_segment_flag) { GstH265SliceHdr *tmp = &priv->prev_independent_slice_pi->data.slice_hdr; num_ref_idx_l0_active_minus1 = tmp->num_ref_idx_l0_active_minus1; @@ -1637,6 +1633,11 @@ init_picture_refs (GstVaapiDecoderH265 * decoder, type = slice_hdr->type; } + /* decoding process for reference picture list construction needs to be + * invoked only for P and B slice */ + if (type == GST_H265_I_SLICE) + return; + NumRpsCurrTempList0 = MAX ((num_ref_idx_l0_active_minus1 + 1), priv->NumPocTotalCurr); NumRpsCurrTempList1 =