diff options
author | Sreerenj Balachandran <sreerenj.balachandran@intel.com> | 2015-04-10 14:04:17 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-04-26 21:44:25 +0200 |
commit | 333ba075a5254b518f2d4fd7ecabb117854424b5 (patch) | |
tree | 2b3ef6488f8b93aabfe86b2ab9b2d90223589770 /gst-libs/gst/codecparsers | |
parent | 889cc8ee31ba03f7fc2af85893e0ba166826e52c (diff) | |
download | gstreamer-plugins-bad-333ba075a5254b518f2d4fd7ecabb117854424b5.tar.gz |
codecparser: h265: Fix the NumPocTotalCurr calculation
The NumPocToalCurr should be calculated for all B and P slices.
https://bugzilla.gnome.org/show_bug.cgi?id=747613
Diffstat (limited to 'gst-libs/gst/codecparsers')
-rw-r--r-- | gst-libs/gst/codecparsers/gsth265parser.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/gst-libs/gst/codecparsers/gsth265parser.c b/gst-libs/gst/codecparsers/gsth265parser.c index 2f5c0197e..fca3a2642 100644 --- a/gst-libs/gst/codecparsers/gsth265parser.c +++ b/gst-libs/gst/codecparsers/gsth265parser.c @@ -2075,24 +2075,25 @@ gst_h265_parser_parse_slice_hdr (GstH265Parser * parser, pps->num_ref_idx_l1_default_active_minus1; } + /* calculate NumPocTotalCurr */ + if (slice->short_term_ref_pic_set_sps_flag) + CurrRpsIdx = slice->short_term_ref_pic_set_idx; + else + CurrRpsIdx = sps->num_short_term_ref_pic_sets; + stRPS = &sps->short_term_ref_pic_set[CurrRpsIdx]; + for (i = 0; i < stRPS->NumNegativePics; i++) + if (stRPS->UsedByCurrPicS0[i]) + NumPocTotalCurr++; + for (i = 0; i < stRPS->NumPositivePics; i++) + if (stRPS->UsedByCurrPicS1[i]) + NumPocTotalCurr++; + for (i = 0; + i < (slice->num_long_term_sps + slice->num_long_term_pics); i++) + if (UsedByCurrPicLt[i]) + NumPocTotalCurr++; + slice->NumPocTotalCurr = NumPocTotalCurr; + if (pps->lists_modification_present_flag) { - /* calculate NumPocTotalCurr */ - if (slice->short_term_ref_pic_set_sps_flag) - CurrRpsIdx = slice->short_term_ref_pic_set_idx; - else - CurrRpsIdx = sps->num_short_term_ref_pic_sets; - stRPS = &sps->short_term_ref_pic_set[CurrRpsIdx]; - for (i = 0; i < stRPS->NumNegativePics; i++) - if (stRPS->UsedByCurrPicS0[i]) - NumPocTotalCurr++; - for (i = 0; i < stRPS->NumPositivePics; i++) - if (stRPS->UsedByCurrPicS1[i]) - NumPocTotalCurr++; - for (i = 0; - i < (slice->num_long_term_sps + slice->num_long_term_pics); i++) - if (UsedByCurrPicLt[i]) - NumPocTotalCurr++; - slice->NumPocTotalCurr = NumPocTotalCurr; if (NumPocTotalCurr > 1) if (!gst_h265_slice_parse_ref_pic_list_modification (slice, &nr, NumPocTotalCurr)) |