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 <sreerenj.balachandran@intel.com>
This commit is contained in:
Sreerenj Balachandran 2015-08-05 05:23:20 +03:00
parent 9bdf43a843
commit cb8b2af5f0

View file

@ -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 =