codecparsers: mpegvideo: Parse more slice header fields

https://bugzilla.gnome.org/show_bug.cgi?id=733872
This commit is contained in:
Sreerenj Balachandran 2014-07-28 12:14:02 +03:00 committed by Jan Schmidt
parent 51c7526030
commit 8f853cfed5
2 changed files with 15 additions and 4 deletions

View file

@ -963,6 +963,9 @@ gst_mpeg_video_packet_parse_slice_header (const GstMpegVideoPacket * packet,
if (height > 2800)
READ_UINT8 (&br, vertical_position_extension, 3);
slice_hdr->vertical_position = packet->type;
slice_hdr->vertical_position_ext = vertical_position_extension;
if (seqscaleext)
if (seqscaleext->scalable_mode ==
GST_MPEG_VIDEO_SEQ_SCALABLE_MODE_DATA_PARTITIONING)
@ -970,12 +973,12 @@ gst_mpeg_video_packet_parse_slice_header (const GstMpegVideoPacket * packet,
READ_UINT8 (&br, slice_hdr->quantiser_scale_code, 5);
READ_UINT8 (&br, extra_bits, 1);
if (!extra_bits)
READ_UINT8 (&br, slice_hdr->slice_ext_flag, 1);
if (!slice_hdr->slice_ext_flag)
slice_hdr->intra_slice = 0;
else {
READ_UINT8 (&br, slice_hdr->intra_slice, 1);
SKIP (&br, 1);
READ_UINT8 (&br, slice_hdr->slice_picture_id_enable, 1);
READ_UINT8 (&br, slice_hdr->slice_picture_id, 6);
READ_UINT8 (&br, bits, 1);

View file

@ -450,10 +450,13 @@ struct _GstMpegVideoGop
/**
* GstMpegVideoSliceHdr:
* @slice_vertical_position_extension: Extension to slice_vertical_position
* @vertical_position: slice vertical position
* @vertical_position_extension: Extension to slice_vertical_position
* @priority_breakpoint: Point where the bitstream shall be partitioned
* @quantiser_scale_code: Quantiser value (range: 1-31)
* @slice_ext_flag: Slice Extension flag
* @intra_slice: Equal to one if all the macroblocks are intra macro blocks.
* @slice_picture_id_enable: controls the semantics of slice_picture_id
* @slice_picture_id: Intended to aid recovery on severe bursts of
* errors for certain types of applications
*
@ -463,9 +466,14 @@ struct _GstMpegVideoGop
*/
struct _GstMpegVideoSliceHdr
{
guint8 vertical_position;
guint8 vertical_position_ext;
guint8 priority_breakpoint;
guint8 quantiser_scale_code;
guint8 slice_ext_flag;
guint8 intra_slice;
guint8 slice_picture_id_enable;
guint8 slice_picture_id;
/* Calculated values */