aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-h265.c
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2023-04-19 00:03:00 -0400
committerJohn Thacker <johnthacker@gmail.com>2023-04-19 13:21:38 +0000
commit32bbccd711ca0fdd795c871c981cf1305fec6500 (patch)
treee5527e872a127c85e2fbef37f6146d1b7a9738c4 /epan/dissectors/packet-h265.c
parente4496554fdc8db58712b6c8fe6f2ed3d40eb8a20 (diff)
H265: Implement access unit delimiter
Diffstat (limited to 'epan/dissectors/packet-h265.c')
-rw-r--r--epan/dissectors/packet-h265.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/epan/dissectors/packet-h265.c b/epan/dissectors/packet-h265.c
index 53f4db7785..fba066cf5a 100644
--- a/epan/dissectors/packet-h265.c
+++ b/epan/dissectors/packet-h265.c
@@ -364,6 +364,9 @@ static int hf_h265_slice_type = -1;
static int hf_h265_payloadsize = -1;
static int hf_h265_payloadtype = -1;
+/* access unit delimiter */
+static int hf_h265_pic_type = -1;
+
/* Initialize the subtree pointers */
static int ett_h265 = -1;
static int ett_h265_profile = -1;
@@ -678,6 +681,14 @@ static const value_string h265_sei_payload_vals[] = {
{ 0, NULL }
};
+/* Table 7-2 - Interpretation of pic_type */
+static const value_string h265_pic_type_vals[] = {
+ { 0, "I" },
+ { 1, "P, I" },
+ { 2, "B, P, I" },
+ { 0, NULL }
+};
+
/* Ref 7.3.2.2 Sequence parameter set RBSP syntax
* num_short_term_ref_pic_sets specifies the number of st_ref_pic_set( ) syntax structures included in the SPS. The value
* of num_short_term_ref_pic_sets shall be in the range of 0 to 64, inclusive
@@ -1658,9 +1669,17 @@ dissect_h265_sei_rbsp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint
static void
dissect_h265_access_unit_delimiter_rbsp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint offset)
{
+ gint bit_offset = offset << 3;
+
proto_tree *access_unit_delimiter_rbsp_tree;
access_unit_delimiter_rbsp_tree = proto_tree_add_subtree(tree, tvb, offset, 1, ett_h265_access_unit_delimiter_rbsp, NULL, "Access unit delimiter RBSP");
- proto_tree_add_expert(access_unit_delimiter_rbsp_tree, pinfo, &ei_h265_undecoded, tvb, offset, -1);
+
+ /* pic_type u(3) */
+ proto_tree_add_bits_item(access_unit_delimiter_rbsp_tree, hf_h265_pic_type, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
+ bit_offset += 3;
+
+ /* rbsp_trailing_bits */
+ dissect_h265_rbsp_trailing_bits(access_unit_delimiter_rbsp_tree, tvb, pinfo, bit_offset);
}
/* Ref 7.3.2.6 End of sequence RBSP syntax*/
@@ -4608,6 +4627,11 @@ proto_register_h265(void)
FT_UINT32, BASE_DEC, VALS(h265_sei_payload_vals), 0x0,
NULL, HFILL }
},
+ { &hf_h265_pic_type,
+ { "pic_type", "h265.pic_type",
+ FT_UINT8, BASE_DEC, VALS(h265_pic_type_vals), 0x0,
+ "slice_type values that may be present in the coded picture", HFILL }
+ },
/* SDP parameters*/
{ &hf_h265_sdp_parameter_sprop_vps,
{ "sprop-vps", "h265.sdp.sprop_vps",