h264parser: Expose all parsed flags of slice header

Add num_ref_idx_active_override_flag and sp_for_switch_flag to
member of GstH264SliceHdr. No reason to hiding them and
some decoder implementations (e.g., DXVA) rely on externally parsed header
data which can be provided by h264parser.
This commit is contained in:
Seungha Yang 2019-08-27 20:34:48 +09:00 committed by Nicolas Dufresne
parent e5279cd97a
commit 093caa8431
2 changed files with 7 additions and 7 deletions

View file

@ -2226,10 +2226,8 @@ gst_h264_parser_parse_slice_hdr (GstH264NalParser * nalparser,
if (GST_H264_IS_P_SLICE (slice) || GST_H264_IS_SP_SLICE (slice) ||
GST_H264_IS_B_SLICE (slice)) {
guint8 num_ref_idx_active_override_flag;
READ_UINT8 (&nr, num_ref_idx_active_override_flag, 1);
if (num_ref_idx_active_override_flag) {
READ_UINT8 (&nr, slice->num_ref_idx_active_override_flag, 1);
if (slice->num_ref_idx_active_override_flag) {
READ_UE_MAX (&nr, slice->num_ref_idx_l0_active_minus1, 31);
if (GST_H264_IS_B_SLICE (slice))
@ -2261,10 +2259,8 @@ gst_h264_parser_parse_slice_hdr (GstH264NalParser * nalparser,
READ_SE_ALLOWED (&nr, slice->slice_qp_delta, -87, 77);
if (GST_H264_IS_SP_SLICE (slice) || GST_H264_IS_SI_SLICE (slice)) {
guint8 sp_for_switch_flag;
if (GST_H264_IS_SP_SLICE (slice))
READ_UINT8 (&nr, sp_for_switch_flag, 1);
READ_UINT8 (&nr, slice->sp_for_switch_flag, 1);
READ_SE_ALLOWED (&nr, slice->slice_qs_delta, -51, 51);
}

View file

@ -928,6 +928,10 @@ struct _GstH264SliceHdr
/* Number of emulation prevention bytes (EPB) in this slice_header() */
guint n_emulation_prevention_bytes;
/* Since: 1.18 */
guint8 num_ref_idx_active_override_flag;
guint8 sp_for_switch_flag;
};