summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2018-02-27 11:30:15 +0100
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2018-03-05 13:21:33 -0500
commit977af86e8b413f953e24c830f1346b741c627e95 (patch)
tree3a9468cd4f2cab86410848edd16b701c340da385 /gst-libs
parentd252f503fc2cd9e373e1467cdf3f0de34345359a (diff)
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
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/codecparsers/gsth265parser.c13
-rw-r--r--gst-libs/gst/codecparsers/gsth265parser.h22
2 files changed, 34 insertions, 1 deletions
diff --git a/gst-libs/gst/codecparsers/gsth265parser.c b/gst-libs/gst/codecparsers/gsth265parser.c
index 0b2d68c88..01f9d587a 100644
--- a/gst-libs/gst/codecparsers/gsth265parser.c
+++ b/gst-libs/gst/codecparsers/gsth265parser.c
@@ -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);
diff --git a/gst-libs/gst/codecparsers/gsth265parser.h b/gst-libs/gst/codecparsers/gsth265parser.h
index 8fa807a1e..45c5e5484 100644
--- a/gst-libs/gst/codecparsers/gsth265parser.h
+++ b/gst-libs/gst/codecparsers/gsth265parser.h
@@ -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];