codecparsers: h264: record dec_ref_pic_marking() size

Some hardware decoders, for example Hantro G1, have to be told the size
of the dec_ref_pic_marking() syntax element in bits. Record the size so
it can be passed on to the hardware.
This commit is contained in:
Philipp Zabel 2019-09-04 15:57:30 +02:00 committed by Philipp Zabel
parent 6f2ab31d10
commit d0d65fa875
2 changed files with 8 additions and 0 deletions

View file

@ -704,9 +704,12 @@ gst_h264_slice_parse_dec_ref_pic_marking (GstH264SliceHdr * slice,
GstH264NalUnit * nalu, NalReader * nr)
{
GstH264DecRefPicMarking *dec_ref_pic_m;
guint start_pos;
GST_DEBUG ("parsing \"Decoded reference picture marking\"");
start_pos = nal_reader_get_pos (nr);
dec_ref_pic_m = &slice->dec_ref_pic_marking;
if (nalu->idr_pic_flag) {
@ -746,6 +749,8 @@ gst_h264_slice_parse_dec_ref_pic_marking (GstH264SliceHdr * slice,
}
}
dec_ref_pic_m->bit_size = nal_reader_get_pos (nr) - start_pos;
return TRUE;
error:

View file

@ -867,6 +867,9 @@ struct _GstH264DecRefPicMarking
guint8 adaptive_ref_pic_marking_mode_flag;
GstH264RefPicMarking ref_pic_marking[10];
guint8 n_ref_pic_marking;
/* Size of the dec_ref_pic_marking() syntax element in bits (Since: 1.18) */
guint bit_size;
};