[vlc-commits] packetizer: hevc: add referenced vps and sps id accessors

Francois Cartegnie git at videolan.org
Tue Aug 2 20:45:54 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jul 29 14:43:24 2016 +0200| [ed9f6af189b68be9de7988e2127c8f9ad7ad4792] | committer: Francois Cartegnie

packetizer: hevc: add referenced vps and sps id accessors

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ed9f6af189b68be9de7988e2127c8f9ad7ad4792
---

 modules/packetizer/hevc_nal.c | 10 ++++++++++
 modules/packetizer/hevc_nal.h |  4 ++++
 2 files changed, 14 insertions(+)

diff --git a/modules/packetizer/hevc_nal.c b/modules/packetizer/hevc_nal.c
index 072023d1..5b26255 100644
--- a/modules/packetizer/hevc_nal.c
+++ b/modules/packetizer/hevc_nal.c
@@ -993,6 +993,16 @@ void hevc_rbsp_release_pps( hevc_picture_parameter_set_t *p_pps )
 IMPL_hevc_generic_decode( hevc_decode_pps, hevc_picture_parameter_set_t,
                           hevc_parse_pic_parameter_set_rbsp, hevc_rbsp_release_pps )
 
+uint8_t hevc_get_sps_vps_id( const hevc_sequence_parameter_set_t *p_sps )
+{
+    return p_sps->sps_video_parameter_set_id;
+}
+
+uint8_t hevc_get_pps_sps_id( const hevc_picture_parameter_set_t *p_pps )
+{
+    return p_pps->pps_seq_parameter_set_id;
+}
+
 bool hevc_get_picture_size( const hevc_sequence_parameter_set_t *p_sps,
                             unsigned *p_w, unsigned *p_h, unsigned *p_vw, unsigned *p_vh )
 {
diff --git a/modules/packetizer/hevc_nal.h b/modules/packetizer/hevc_nal.h
index c8f1fbe..7be29f2 100644
--- a/modules/packetizer/hevc_nal.h
+++ b/modules/packetizer/hevc_nal.h
@@ -165,6 +165,10 @@ void hevc_rbsp_release_sps( hevc_sequence_parameter_set_t * );
 void hevc_rbsp_release_pps( hevc_picture_parameter_set_t * );
 void hevc_rbsp_release_slice_header( hevc_slice_segment_header_t * );
 
+/* set specific */
+uint8_t hevc_get_sps_vps_id( const hevc_sequence_parameter_set_t * );
+uint8_t hevc_get_pps_sps_id( const hevc_picture_parameter_set_t * );
+
 /* Converts HEVCDecoderConfigurationRecord to Annex B format */
 uint8_t * hevc_hvcC_to_AnnexB_NAL( const uint8_t *p_buf, size_t i_buf,
                                    size_t *pi_res, uint8_t *pi_nal_length_size );



More information about the vlc-commits mailing list