mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 18:50:48 +00:00
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:
parent
6f2ab31d10
commit
d0d65fa875
2 changed files with 8 additions and 0 deletions
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue