vdpauh264dec: fix initialization of fallback scaling matrix

This commit is contained in:
Carl-Anton Ingmarsson 2010-06-22 14:25:17 +02:00
parent 3ea3a084e4
commit 8eed6f2ab9

View file

@ -539,11 +539,6 @@ gst_h264_parser_parse_picture (GstH264Parser * parser, guint8 * data,
pic = g_slice_new (GstH264Picture); 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, pic->id, 0, 255);
READ_UE_ALLOWED (&reader, seq_parameter_set_id, 0, 31); READ_UE_ALLOWED (&reader, seq_parameter_set_id, 0, 31);
seq = g_hash_table_lookup (parser->sequences, &seq_parameter_set_id); 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; 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->entropy_coding_mode_flag, 1);
READ_UINT8 (&reader, pic->pic_order_present_flag, 1); READ_UINT8 (&reader, pic->pic_order_present_flag, 1);
READ_UE_ALLOWED (&reader, pic->num_slice_groups_minus1, 0, 7); 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)) default_8x8_inter, default_8x8_intra, seq->chroma_format_idc))
goto error; 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); READ_SE_ALLOWED (&reader, pic->second_chroma_qp_index_offset, -12, 12);