mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
mpeg2: fix decoding of 4K videos.
Account for slice_vertical_position_extension when vertical_size > 2800.
This commit is contained in:
parent
564ca5d221
commit
06725d651e
1 changed files with 3 additions and 2 deletions
|
@ -1127,7 +1127,7 @@ parse_slice(GstVaapiDecoderMpeg2 *decoder,
|
||||||
GstMpegVideoSliceHdr *slice_hdr;
|
GstMpegVideoSliceHdr *slice_hdr;
|
||||||
GstBitReader br;
|
GstBitReader br;
|
||||||
gint mb_x, mb_y, mb_inc;
|
gint mb_x, mb_y, mb_inc;
|
||||||
guint8 slice_vertical_position_extension;
|
guint8 slice_vertical_position_extension = 0;
|
||||||
guint8 extra_bit_slice, junk8;
|
guint8 extra_bit_slice, junk8;
|
||||||
|
|
||||||
priv->state &= (GST_MPEG_VIDEO_STATE_GOT_SEQ_HDR|
|
priv->state &= (GST_MPEG_VIDEO_STATE_GOT_SEQ_HDR|
|
||||||
|
@ -1164,7 +1164,8 @@ parse_slice(GstVaapiDecoderMpeg2 *decoder,
|
||||||
}
|
}
|
||||||
slice_hdr->header_size = 32 + gst_bit_reader_get_pos(&br);
|
slice_hdr->header_size = 32 + gst_bit_reader_get_pos(&br);
|
||||||
|
|
||||||
mb_y = packet->type - GST_MPEG_VIDEO_PACKET_SLICE_MIN;
|
mb_y = ((guint)slice_vertical_position_extension << 7) +
|
||||||
|
packet->type - GST_MPEG_VIDEO_PACKET_SLICE_MIN;
|
||||||
mb_x = -1;
|
mb_x = -1;
|
||||||
do {
|
do {
|
||||||
if (!decode_vlc(&br, &mb_inc, mpeg2_mbaddr_vlc_table,
|
if (!decode_vlc(&br, &mb_inc, mpeg2_mbaddr_vlc_table,
|
||||||
|
|
Loading…
Reference in a new issue