h265parser: parse extra profile fields

Those fields have been introduced in version 2 and later to define new
profiles like the format range extensions profiles (A.3.5).

NOTE: This patch breaks the parser ABI, rebuild needed.

https://bugzilla.gnome.org/show_bug.cgi?id=793876
This commit is contained in:
Guillaume Desmottes 2018-02-27 11:30:15 +01:00 committed by Nicolas Dufresne
parent d252f503fc
commit 977af86e8b
2 changed files with 34 additions and 1 deletions

View file

@ -264,8 +264,19 @@ gst_h265_parse_profile_tier_level (GstH265ProfileTierLevel * ptl,
READ_UINT8 (nr, ptl->non_packed_constraint_flag, 1);
READ_UINT8 (nr, ptl->frame_only_constraint_flag, 1);
READ_UINT8 (nr, ptl->max_12bit_constraint_flag, 1);
READ_UINT8 (nr, ptl->max_10bit_constraint_flag, 1);
READ_UINT8 (nr, ptl->max_8bit_constraint_flag, 1);
READ_UINT8 (nr, ptl->max_422chroma_constraint_flag, 1);
READ_UINT8 (nr, ptl->max_420chroma_constraint_flag, 1);
READ_UINT8 (nr, ptl->max_monochrome_constraint_flag, 1);
READ_UINT8 (nr, ptl->intra_constraint_flag, 1);
READ_UINT8 (nr, ptl->one_picture_only_constraint_flag, 1);
READ_UINT8 (nr, ptl->lower_bit_rate_constraint_flag, 1);
READ_UINT8 (nr, ptl->max_14bit_constraint_flag, 1);
/* skip the reserved zero bits */
if (!nal_reader_skip (nr, 44))
if (!nal_reader_skip (nr, 34))
goto error;
READ_UINT8 (nr, ptl->level_idc, 8);

View file

@ -316,6 +316,16 @@ struct _GstH265NalUnit
* @non_packed_constraint_flag: indicate the presence of frame packing
* arragement sei message
* @frame_only_constraint_flag: recognize the field_seq_flag
* @max_12bit_constraint_flag: used to define profile extensions, see Annex A
* @max_10bit_constraint_flag: used to define profile extensions, see Annex A
* @max_8bit_constraint_flag: used to define profile extensions, see Annex A
* @max_422chroma_constraint_flag: used to define profile extensions, see Annex A
* @max_420chroma_constraint_flag: used to define profile extensions, see Annex A
* @max_monochrome_constraint_flag: used to define profile extensions, see Annex A
* @intra_constraint_flag: used to define profile extensions, see Annex A
* @one_picture_only_constraint_flag: used to define profile extensions, see Annex A
* @lower_bit_rate_constraint_flag: used to define profile extensions, see Annex A
* @max_14bit_constraint_flag: used to define profile extensions, see Annex A
* @level idc: indicate the level which the CVS confirms
* @sub_layer_profile_present_flag: sublayer profile presence ind
* @sub_layer_level_present_flag:sublayer level presence indicator.
@ -344,6 +354,18 @@ struct _GstH265ProfileTierLevel {
guint8 interlaced_source_flag;
guint8 non_packed_constraint_flag;
guint8 frame_only_constraint_flag;
guint8 max_12bit_constraint_flag;
guint8 max_10bit_constraint_flag;
guint8 max_8bit_constraint_flag;
guint8 max_422chroma_constraint_flag;
guint8 max_420chroma_constraint_flag;
guint8 max_monochrome_constraint_flag;
guint8 intra_constraint_flag;
guint8 one_picture_only_constraint_flag;
guint8 lower_bit_rate_constraint_flag;
guint8 max_14bit_constraint_flag;
guint8 level_idc;
guint8 sub_layer_profile_present_flag[6];