summaryrefslogtreecommitdiff
path: root/sys/vdpau
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2010-06-22 14:25:17 +0200
committerCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2010-06-23 21:51:53 +0200
commit8eed6f2ab92e194f5b4e61e5db8aac51c32f25fc (patch)
tree789e9f92f6fb5202ec844a7eb38b277a61349844 /sys/vdpau
parent3ea3a084e4f7ddf1adab1c9fb15cacdb87803b4b (diff)
vdpauh264dec: fix initialization of fallback scaling matrix
Diffstat (limited to 'sys/vdpau')
-rw-r--r--sys/vdpau/h264/gsth264parser.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/vdpau/h264/gsth264parser.c b/sys/vdpau/h264/gsth264parser.c
index 8de7c2fdb..ea37b944e 100644
--- a/sys/vdpau/h264/gsth264parser.c
+++ b/sys/vdpau/h264/gsth264parser.c
@@ -539,11 +539,6 @@ gst_h264_parser_parse_picture (GstH264Parser * parser, guint8 * data,
pic = g_slice_new (GstH264Picture);
- /* set default values for fields that might not be present in the bitstream
- and have valid defaults */
- pic->slice_group_id = NULL;
- pic->transform_8x8_mode_flag = 0;
-
READ_UE_ALLOWED (&reader, pic->id, 0, 255);
READ_UE_ALLOWED (&reader, seq_parameter_set_id, 0, 31);
seq = g_hash_table_lookup (parser->sequences, &seq_parameter_set_id);
@@ -554,6 +549,13 @@ gst_h264_parser_parse_picture (GstH264Parser * parser, guint8 * data,
}
pic->sequence = seq;
+ /* set default values for fields that might not be present in the bitstream
+ and have valid defaults */
+ pic->slice_group_id = NULL;
+ pic->transform_8x8_mode_flag = 0;
+ memcpy (&pic->scaling_lists_4x4, &seq->scaling_lists_4x4, 96);
+ memcpy (&pic->scaling_lists_8x8, &seq->scaling_lists_8x8, 384);
+
READ_UINT8 (&reader, pic->entropy_coding_mode_flag, 1);
READ_UINT8 (&reader, pic->pic_order_present_flag, 1);
READ_UE_ALLOWED (&reader, pic->num_slice_groups_minus1, 0, 7);
@@ -621,9 +623,6 @@ gst_h264_parser_parse_picture (GstH264Parser * parser, guint8 * data,
default_8x8_inter, default_8x8_intra, seq->chroma_format_idc))
goto error;
}
- } else {
- memcpy (&pic->scaling_lists_4x4, &seq->scaling_lists_4x4, 96);
- memcpy (&pic->scaling_lists_8x8, &seq->scaling_lists_8x8, 384);
}
READ_SE_ALLOWED (&reader, pic->second_chroma_qp_index_offset, -12, 12);