codecparsers: mpegvideo: Add more fields to the GstMpegVideoSequenceHdr

Added the fields load_non_intra_quantiser_matrix and
load_chroma_intra_quantiser_matrix to the sequence header structure.

https://bugzilla.gnome.org/show_bug.cgi?id=733872
This commit is contained in:
Sreerenj Balachandran 2014-07-28 11:14:22 +03:00 committed by Jan Schmidt
parent a16c27895b
commit 7b0b74041e
2 changed files with 8 additions and 5 deletions

View file

@ -296,7 +296,6 @@ gst_mpeg_video_packet_parse_sequence_header (const GstMpegVideoPacket * packet,
{ {
GstBitReader br; GstBitReader br;
guint8 bits; guint8 bits;
guint8 load_intra_flag, load_non_intra_flag;
g_return_val_if_fail (seqhdr != NULL, FALSE); g_return_val_if_fail (seqhdr != NULL, FALSE);
@ -339,8 +338,8 @@ gst_mpeg_video_packet_parse_sequence_header (const GstMpegVideoPacket * packet,
READ_UINT8 (&br, seqhdr->constrained_parameters_flag, 1); READ_UINT8 (&br, seqhdr->constrained_parameters_flag, 1);
/* load_intra_quantiser_matrix */ /* load_intra_quantiser_matrix */
READ_UINT8 (&br, load_intra_flag, 1); READ_UINT8 (&br, seqhdr->load_intra_quantiser_matrix, 1);
if (load_intra_flag) { if (seqhdr->load_intra_quantiser_matrix) {
gint i; gint i;
for (i = 0; i < 64; i++) for (i = 0; i < 64; i++)
READ_UINT8 (&br, seqhdr->intra_quantizer_matrix[i], 8); READ_UINT8 (&br, seqhdr->intra_quantizer_matrix[i], 8);
@ -348,8 +347,8 @@ gst_mpeg_video_packet_parse_sequence_header (const GstMpegVideoPacket * packet,
memcpy (seqhdr->intra_quantizer_matrix, default_intra_quantizer_matrix, 64); memcpy (seqhdr->intra_quantizer_matrix, default_intra_quantizer_matrix, 64);
/* non intra quantizer matrix */ /* non intra quantizer matrix */
READ_UINT8 (&br, load_non_intra_flag, 1); READ_UINT8 (&br, seqhdr->load_non_intra_quantiser_matrix, 1);
if (load_non_intra_flag) { if (seqhdr->load_non_intra_quantiser_matrix) {
gint i; gint i;
for (i = 0; i < 64; i++) for (i = 0; i < 64; i++)
READ_UINT8 (&br, seqhdr->non_intra_quantizer_matrix[i], 8); READ_UINT8 (&br, seqhdr->non_intra_quantizer_matrix[i], 8);

View file

@ -211,7 +211,9 @@ typedef struct _GstMpegVideoPacket GstMpegVideoPacket;
* @bitrate_value: Value of the bitrate as is in the stream (400bps unit) * @bitrate_value: Value of the bitrate as is in the stream (400bps unit)
* @bitrate: the real bitrate of the Mpeg video stream in bits per second, 0 if VBR stream * @bitrate: the real bitrate of the Mpeg video stream in bits per second, 0 if VBR stream
* @constrained_parameters_flag: %TRUE if this stream uses contrained parameters. * @constrained_parameters_flag: %TRUE if this stream uses contrained parameters.
* @load_intra_quantiser_matrix: %TRUE indicates the presence of intra_quantiser_matrix
* @intra_quantizer_matrix: intra-quantization table, in zigzag scan order * @intra_quantizer_matrix: intra-quantization table, in zigzag scan order
* @load_non_intra_quantiser_matrix: %TRUE indicates the presence of non_intra_quantiser_matrix
* @non_intra_quantizer_matrix: non-intra quantization table, in zigzag scan order * @non_intra_quantizer_matrix: non-intra quantization table, in zigzag scan order
* *
* The Mpeg2 Video Sequence Header structure. * The Mpeg2 Video Sequence Header structure.
@ -226,7 +228,9 @@ struct _GstMpegVideoSequenceHdr
guint8 constrained_parameters_flag; guint8 constrained_parameters_flag;
guint8 load_intra_quantiser_matrix;
guint8 intra_quantizer_matrix[64]; guint8 intra_quantizer_matrix[64];
guint8 load_non_intra_quantiser_matrix;
guint8 non_intra_quantizer_matrix[64]; guint8 non_intra_quantizer_matrix[64];
/* Calculated values */ /* Calculated values */