mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
codecparsers: mpegvideo: Parse more slice header fields
https://bugzilla.gnome.org/show_bug.cgi?id=733872
This commit is contained in:
parent
51c7526030
commit
8f853cfed5
2 changed files with 15 additions and 4 deletions
|
@ -963,6 +963,9 @@ gst_mpeg_video_packet_parse_slice_header (const GstMpegVideoPacket * packet,
|
||||||
if (height > 2800)
|
if (height > 2800)
|
||||||
READ_UINT8 (&br, vertical_position_extension, 3);
|
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)
|
||||||
if (seqscaleext->scalable_mode ==
|
if (seqscaleext->scalable_mode ==
|
||||||
GST_MPEG_VIDEO_SEQ_SCALABLE_MODE_DATA_PARTITIONING)
|
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, slice_hdr->quantiser_scale_code, 5);
|
||||||
|
|
||||||
READ_UINT8 (&br, extra_bits, 1);
|
READ_UINT8 (&br, slice_hdr->slice_ext_flag, 1);
|
||||||
if (!extra_bits)
|
if (!slice_hdr->slice_ext_flag)
|
||||||
slice_hdr->intra_slice = 0;
|
slice_hdr->intra_slice = 0;
|
||||||
else {
|
else {
|
||||||
READ_UINT8 (&br, slice_hdr->intra_slice, 1);
|
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, slice_hdr->slice_picture_id, 6);
|
||||||
|
|
||||||
READ_UINT8 (&br, bits, 1);
|
READ_UINT8 (&br, bits, 1);
|
||||||
|
|
|
@ -450,10 +450,13 @@ struct _GstMpegVideoGop
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstMpegVideoSliceHdr:
|
* 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
|
* @priority_breakpoint: Point where the bitstream shall be partitioned
|
||||||
* @quantiser_scale_code: Quantiser value (range: 1-31)
|
* @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.
|
* @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
|
* @slice_picture_id: Intended to aid recovery on severe bursts of
|
||||||
* errors for certain types of applications
|
* errors for certain types of applications
|
||||||
*
|
*
|
||||||
|
@ -463,9 +466,14 @@ struct _GstMpegVideoGop
|
||||||
*/
|
*/
|
||||||
struct _GstMpegVideoSliceHdr
|
struct _GstMpegVideoSliceHdr
|
||||||
{
|
{
|
||||||
|
guint8 vertical_position;
|
||||||
|
guint8 vertical_position_ext;
|
||||||
|
|
||||||
guint8 priority_breakpoint;
|
guint8 priority_breakpoint;
|
||||||
guint8 quantiser_scale_code;
|
guint8 quantiser_scale_code;
|
||||||
|
guint8 slice_ext_flag;
|
||||||
guint8 intra_slice;
|
guint8 intra_slice;
|
||||||
|
guint8 slice_picture_id_enable;
|
||||||
guint8 slice_picture_id;
|
guint8 slice_picture_id;
|
||||||
|
|
||||||
/* Calculated values */
|
/* Calculated values */
|
||||||
|
|
Loading…
Reference in a new issue