summaryrefslogtreecommitdiff
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorSreerenj Balachandran <sreerenj.balachandran@intel.com>2015-09-04 22:02:55 +0300
committerSreerenj Balachandran <sreerenj.balachandran@intel.com>2015-09-04 22:02:55 +0300
commit8799a8044d0f0dae1c8f61310990b1222d1d5366 (patch)
tree84874d93437a01a450c54ec2f616326c59397ca7 /gst-libs/gst
parentac92e6d5bc997c2b0a43bf04adbc0395421c9588 (diff)
downloadgst-vaapi-8799a8044d0f0dae1c8f61310990b1222d1d5366.tar.gz
decoder: hevc: Fix the picture addition in dpb() based on spec H265 v3 (04/2015)
This fix is based on the V3 vesion of spec which was missing in older versions. When the current picture has PicOutputFlag equal to 1, for each picture in the DPB that is marked as "needed for output" and follows the current picture in output order, the associated variable PicLatencyCount is set equal to PicLatencyCount + 1 (C.5.2.3). https://bugzilla.gnome.org/show_bug.cgi?id=754010
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_h265.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c
index 4bd947e0..ba2ab395 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c
@@ -816,12 +816,14 @@ dpb_add (GstVaapiDecoderH265 * decoder, GstVaapiPictureH265 * picture)
guint i = 0;
/* C.5.2.3 */
- while (i < priv->dpb_count) {
- GstVaapiFrameStore *const fs = priv->dpb[i];
- tmp_pic = fs->buffer;
- if (tmp_pic->output_needed)
- tmp_pic->pic_latency_cnt += 1;
- i++;
+ if (picture->output_flag) {
+ while (i < priv->dpb_count) {
+ GstVaapiFrameStore *const fs = priv->dpb[i];
+ tmp_pic = fs->buffer;
+ if (tmp_pic->output_needed)
+ tmp_pic->pic_latency_cnt += 1;
+ i++;
+ }
}
if (picture->output_flag) {