summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulian Scheel <julian@jusst.de>2010-06-13 13:50:16 +0200
committerJulian Scheel <julian@jusst.de>2010-06-13 13:50:16 +0200
commitcf7fb043028f2dac8f33c1a3dcff14c802b30e6c (patch)
tree1bbfa2646ea9e479dc8a7595578c6d3d35b0774c /src
parent3483c086900b46f159c0cbe8a4e4fe0b80e7948c (diff)
downloadxine-lib-cf7fb043028f2dac8f33c1a3dcff14c802b30e6c.tar.gz
xine-lib-cf7fb043028f2dac8f33c1a3dcff14c802b30e6c.tar.bz2
fix reference marking
- only mark pictures as reference for vdpau, where actually the slice nals are used for reference
Diffstat (limited to 'src')
-rw-r--r--src/video_dec/libvdpau/h264_parser.c13
-rw-r--r--src/video_dec/libvdpau/vdpau_h264.c2
2 files changed, 13 insertions, 2 deletions
diff --git a/src/video_dec/libvdpau/h264_parser.c b/src/video_dec/libvdpau/h264_parser.c
index c4c5ed718..4794b5b9e 100644
--- a/src/video_dec/libvdpau/h264_parser.c
+++ b/src/video_dec/libvdpau/h264_parser.c
@@ -1941,8 +1941,19 @@ int parse_nal(uint8_t *buf, int buf_len, struct h264_parser *parser,
parser->pic->flag_mask |= IDR_PIC;
}
- if (nal->nal_ref_idc) {
+ /* reference flag is only set for slice NALs,
+ * as PPS/SPS/SEI only references are not relevant
+ * for the vdpau decoder.
+ */
+ if (nal->nal_ref_idc &&
+ nal->nal_unit_type <= NAL_SLICE_IDR) {
parser->pic->flag_mask |= REFERENCE;
+ } else if (!nal->nal_ref_idc &&
+ nal->nal_unit_type >= NAL_SLICE &&
+ nal->nal_unit_type <= NAL_PART_C) {
+ /* remove reference flag if a picture is not
+ * continously flagged as reference. */
+ parser->pic->flag_mask &= ~REFERENCE;
}
if (nal->nal_unit_type >= NAL_SLICE &&
diff --git a/src/video_dec/libvdpau/vdpau_h264.c b/src/video_dec/libvdpau/vdpau_h264.c
index 153d88438..706443bb7 100644
--- a/src/video_dec/libvdpau/vdpau_h264.c
+++ b/src/video_dec/libvdpau/vdpau_h264.c
@@ -499,7 +499,7 @@ static int vdpau_decoder_render(video_decoder_t *this_gen, VdpBitstreamBuffer *v
fill_vdpau_pictureinfo_h264(this_gen, slice_count, &pic);
- #ifdef DEBUG_H264
+#ifdef DEBUG_H264
dump_pictureinfo_h264(&pic);
int i;