mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
codecparsers: h264: Fix default ref list size
The default in PPS was not applied properly. The default does not apply for I-Slice and l1 default only applies for B-Slice. This fixes the slice values for num_ref_idx_l0_active_minus1 and num_ref_idx_l1_active_minus1. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1238>
This commit is contained in:
parent
28e30c8493
commit
d062677b3f
1 changed files with 11 additions and 2 deletions
|
@ -2253,8 +2253,17 @@ gst_h264_parser_parse_slice_hdr (GstH264NalParser * nalparser,
|
||||||
|
|
||||||
/* set default values for fields that might not be present in the bitstream
|
/* set default values for fields that might not be present in the bitstream
|
||||||
and have valid defaults */
|
and have valid defaults */
|
||||||
slice->num_ref_idx_l0_active_minus1 = pps->num_ref_idx_l0_active_minus1;
|
if (GST_H264_IS_I_SLICE (slice)) {
|
||||||
slice->num_ref_idx_l1_active_minus1 = pps->num_ref_idx_l1_active_minus1;
|
slice->num_ref_idx_l0_active_minus1 = 0;
|
||||||
|
slice->num_ref_idx_l1_active_minus1 = 0;
|
||||||
|
} else {
|
||||||
|
slice->num_ref_idx_l0_active_minus1 = pps->num_ref_idx_l0_active_minus1;
|
||||||
|
|
||||||
|
if (GST_H264_IS_B_SLICE (slice))
|
||||||
|
slice->num_ref_idx_l1_active_minus1 = pps->num_ref_idx_l1_active_minus1;
|
||||||
|
else
|
||||||
|
slice->num_ref_idx_l1_active_minus1 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (sps->separate_colour_plane_flag)
|
if (sps->separate_colour_plane_flag)
|
||||||
READ_UINT8 (&nr, slice->colour_plane_id, 2);
|
READ_UINT8 (&nr, slice->colour_plane_id, 2);
|
||||||
|
|
Loading…
Reference in a new issue