summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/vdpau/gstvdpmpegdecoder.c10
-rw-r--r--sys/vdpau/mpegutil.c15
2 files changed, 12 insertions, 13 deletions
diff --git a/sys/vdpau/gstvdpmpegdecoder.c b/sys/vdpau/gstvdpmpegdecoder.c
index 7aefe73c..be432281 100644
--- a/sys/vdpau/gstvdpmpegdecoder.c
+++ b/sys/vdpau/gstvdpmpegdecoder.c
@@ -355,15 +355,15 @@ gst_vdp_mpeg_decoder_chain (GstPad * pad, GstBuffer * buffer)
gst_vdp_mpeg_decoder_parse_picture_coding (mpeg_dec, packet_start,
packet_end);
break;
+ case MPEG_PACKET_EXT_QUANT_MATRIX:
+ GST_DEBUG_OBJECT (mpeg_dec, "MPEG_PACKET_EXT_QUANT_MATRIX");
+ gst_vdp_mpeg_decoder_parse_quant_matrix (mpeg_dec, packet_start,
+ packet_end);
+ break;
default:
break;
}
break;
- case MPEG_PACKET_EXT_QUANT_MATRIX:
- GST_DEBUG_OBJECT (mpeg_dec, "MPEG_PACKET_EXT_QUANT_MATRIX");
- gst_vdp_mpeg_decoder_parse_quant_matrix (mpeg_dec, packet_start,
- packet_end);
- break;
case MPEG_PACKET_GOP:
GST_DEBUG_OBJECT (mpeg_dec, "MPEG_PACKET_GOP");
gst_vdp_mpeg_decoder_parse_gop (mpeg_dec, packet_start, packet_end);
diff --git a/sys/vdpau/mpegutil.c b/sys/vdpau/mpegutil.c
index 3a4a63de..7ef46fb2 100644
--- a/sys/vdpau/mpegutil.c
+++ b/sys/vdpau/mpegutil.c
@@ -385,31 +385,30 @@ mpeg_util_parse_quant_matrix (MPEGQuantMatrix * qm, guint8 * data, guint8 * end)
code = GST_READ_UINT32_BE (data);
- if (G_UNLIKELY (G_UNLIKELY (code != (0x00000100 | MPEG_PACKET_GOP))))
+ if (G_UNLIKELY (G_UNLIKELY (code != (0x00000100 | MPEG_PACKET_EXTENSION))))
return FALSE;
/* Skip the sync word */
data += 4;
- load_intra_flag = read_bits (data, 0, 1);
+ load_intra_flag = read_bits (data, 4, 1);
if (load_intra_flag) {
if (G_UNLIKELY ((end - data) < 64))
return FALSE;
- for (i = 0; i < 64; i++) {
- qm->intra_quantizer_matrix[mpeg2_scan[i]] = read_bits (data + i, 1, 8);
- }
- data += 64;
+ for (i = 0; i < 64; i++)
+ qm->intra_quantizer_matrix[mpeg2_scan[i]] = read_bits (data + i, 5, 8);
+ data += 64;
} else
memcpy (qm->intra_quantizer_matrix, default_intra_quantizer_matrix, 64);
- load_non_intra_flag = read_bits (data, 1 + load_intra_flag, 1);
+ load_non_intra_flag = read_bits (data, 5 + load_intra_flag, 1);
if (load_non_intra_flag) {
if (G_UNLIKELY ((end - data) < 64))
return FALSE;
for (i = 0; i < 64; i++)
qm->non_intra_quantizer_matrix[mpeg2_scan[i]] =
- read_bits (data + i, 2 + load_intra_flag, 8);
+ read_bits (data + i, 6 + load_intra_flag, 8);
} else
memset (qm->non_intra_quantizer_matrix, 16, 64);