[vlc-commits] hxxx_helper: add hevc_helper_get_annexb_config

Francois Cartegnie git at videolan.org
Fri Nov 24 13:11:52 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Nov 17 16:15:16 2017 +0100| [ddb5cc2fc825638bfd5766efc7ad51a401a4f444] | committer: Thomas Guillem

hxxx_helper: add hevc_helper_get_annexb_config

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 modules/codec/hxxx_helper.c | 16 ++++++++++++++++
 modules/codec/hxxx_helper.h |  1 +
 2 files changed, 17 insertions(+)

diff --git a/modules/codec/hxxx_helper.c b/modules/codec/hxxx_helper.c
index 26384ad3d3..cefd80a3a5 100644
--- a/modules/codec/hxxx_helper.c
+++ b/modules/codec/hxxx_helper.c
@@ -692,6 +692,22 @@ h264_helper_get_annexb_config(const struct hxxx_helper *hh)
 }
 
 block_t *
+hevc_helper_get_annexb_config(const struct hxxx_helper *hh)
+{
+    if (hh->hevc.i_vps_count == 0 || hh->hevc.i_sps_count == 0 ||
+        hh->hevc.i_pps_count == 0 )
+        return NULL;
+
+    const struct hxxx_helper_nal *pp_nal_lists[] = {
+        hh->hevc.vps_list, hh->hevc.sps_list, hh->hevc.pps_list };
+    const size_t p_nal_counts[] = { hh->hevc.i_vps_count, hh->hevc.i_sps_count,
+                                    hh->hevc.i_pps_count };
+    const size_t p_nal_maxs[] = { HEVC_VPS_ID_MAX+1, HEVC_SPS_ID_MAX+1, HEVC_PPS_ID_MAX+1 };
+
+    return hxxx_helper_get_annexb_config( pp_nal_lists, p_nal_counts, p_nal_maxs, 3 );
+}
+
+block_t *
 h264_helper_get_avcc_config(const struct hxxx_helper *hh)
 {
     const struct hxxx_helper_nal *p_nal;
diff --git a/modules/codec/hxxx_helper.h b/modules/codec/hxxx_helper.h
index 6a9e51d1a2..9a87e4e2f4 100644
--- a/modules/codec/hxxx_helper.h
+++ b/modules/codec/hxxx_helper.h
@@ -86,6 +86,7 @@ int hxxx_helper_set_extra(struct hxxx_helper *hh, const void *p_extra,
                           size_t i_extra);
 
 block_t *h264_helper_get_annexb_config(const struct hxxx_helper *hh);
+block_t *hevc_helper_get_annexb_config(const struct hxxx_helper *hh);
 
 block_t *h264_helper_get_avcc_config(const struct hxxx_helper *hh);
 



More information about the vlc-commits mailing list