mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
codecparsers: h265: Fix the selection of Active Ref Pic Set
If short_term_ref_pic_set_sps_flag is FALSE, the ShortTermRefPicSet structure is supposed to derive from slice header. Which means, CurrRpsIdx is equal to num_short_term_ref_pic_sets. But the number of refpicsets communicated via sps header is only num_short_term_ref_pic_sets - 1. And we are using slice_header structure to reference the last entry, which is ShortTermRefPicSet[num_short_term_ref_pic_sets]. https://bugzilla.gnome.org/show_bug.cgi?id=754834
This commit is contained in:
parent
81435c8891
commit
fcd42b7d77
1 changed files with 3 additions and 4 deletions
|
@ -1985,7 +1985,6 @@ gst_h265_parser_parse_slice_hdr (GstH265Parser * parser,
|
|||
GstH265PPS *pps;
|
||||
GstH265SPS *sps;
|
||||
guint i;
|
||||
guint CurrRpsIdx = 0;
|
||||
GstH265ShortTermRefPicSet *stRPS = NULL;
|
||||
guint32 UsedByCurrPicLt[16];
|
||||
guint32 PicSizeInCtbsY;
|
||||
|
@ -2150,10 +2149,10 @@ gst_h265_parser_parse_slice_hdr (GstH265Parser * parser,
|
|||
|
||||
/* calculate NumPocTotalCurr */
|
||||
if (slice->short_term_ref_pic_set_sps_flag)
|
||||
CurrRpsIdx = slice->short_term_ref_pic_set_idx;
|
||||
stRPS = &sps->short_term_ref_pic_set[slice->short_term_ref_pic_set_idx];
|
||||
else
|
||||
CurrRpsIdx = sps->num_short_term_ref_pic_sets;
|
||||
stRPS = &sps->short_term_ref_pic_set[CurrRpsIdx];
|
||||
stRPS = &slice->short_term_ref_pic_sets;
|
||||
|
||||
for (i = 0; i < stRPS->NumNegativePics; i++)
|
||||
if (stRPS->UsedByCurrPicS0[i])
|
||||
NumPocTotalCurr++;
|
||||
|
|
Loading…
Reference in a new issue