From: Sreerenj Balachandran Date: Thu, 6 Aug 2015 01:01:24 +0000 (+0300) Subject: decoder: hevc: Fix decoding of stream when it has temporal sublayers X-Git-Tag: 1.19.3~503^2~1690 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=696b446f097a3a00e19307a1106c950a170b80a1;p=platform%2Fupstream%2Fgstreamer.git decoder: hevc: Fix decoding of stream when it has temporal sublayers We are calculating the dpb size based on max_dec_pic_buffering. But if there are more than one temporal sublayers, we are supposed to use the max_dec_pic_buffering[max_sub_layers_minus] for dpb size calculation (Assuming HighestTid as max_sub_layers_minus). Sample streams: TSCL_A_VIDYO_5.bin, TSCL_B_VIDYO_4.bin 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 4767fbc076..50a0125956 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c @@ -604,8 +604,11 @@ get_max_dec_frame_buffering (GstH265SPS * sps) sps->profile_tier_level.level_idc); max_dec_frame_buffering = 16; } + /* Fixme: Add limit check based on Annex A */ - return MAX (1, (sps->max_dec_pic_buffering_minus1[0] + 1)); + + /* Assuming HighestTid as sps_max_sub_layers_minus1 */ + return MAX (1, (sps->max_dec_pic_buffering_minus1[sps->max_sub_layers_minus1] + 1)); } static void