[vlc-commits] packetizer: hevc: add hevc_get_chroma_luma

Francois Cartegnie git at videolan.org
Thu Mar 1 10:28:45 CET 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Feb 26 11:11:16 2018 +0100| [1abcc2975794f4e196a3aff86472d2cde1cc1f0f] | committer: Thomas Guillem

packetizer: hevc: add hevc_get_chroma_luma

(cherry picked from commit 7729ccefe4e7b1dc9be893c54636bc264118db5f)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 modules/packetizer/hevc_nal.c | 9 +++++++++
 modules/packetizer/hevc_nal.h | 2 ++
 2 files changed, 11 insertions(+)

diff --git a/modules/packetizer/hevc_nal.c b/modules/packetizer/hevc_nal.c
index 0e6d71df8d..e4f68afa23 100644
--- a/modules/packetizer/hevc_nal.c
+++ b/modules/packetizer/hevc_nal.c
@@ -1143,6 +1143,15 @@ bool hevc_get_aspect_ratio( const hevc_sequence_parameter_set_t *p_sps,
     return false;
 }
 
+bool hevc_get_chroma_luma( const hevc_sequence_parameter_set_t *p_sps, uint8_t *pi_chroma_format,
+                           uint8_t *pi_depth_luma, uint8_t *pi_depth_chroma )
+{
+    *pi_chroma_format = p_sps->chroma_format_idc;
+    *pi_depth_luma = p_sps->bit_depth_chroma_minus8 + 8;
+    *pi_depth_chroma = p_sps->bit_depth_chroma_minus8 + 8;
+    return true;
+}
+
 bool hevc_get_colorimetry( const hevc_sequence_parameter_set_t *p_sps,
                            video_color_primaries_t *p_primaries,
                            video_transfer_func_t *p_transfer,
diff --git a/modules/packetizer/hevc_nal.h b/modules/packetizer/hevc_nal.h
index 777622d903..27fec6d89c 100644
--- a/modules/packetizer/hevc_nal.h
+++ b/modules/packetizer/hevc_nal.h
@@ -185,6 +185,8 @@ bool hevc_get_frame_rate( const hevc_sequence_parameter_set_t *,
                           unsigned *pi_num, unsigned *pi_den );
 bool hevc_get_aspect_ratio( const hevc_sequence_parameter_set_t *,
                             unsigned *pi_num, unsigned *pi_den );
+bool hevc_get_chroma_luma( const hevc_sequence_parameter_set_t *, uint8_t *pi_chroma_format,
+                           uint8_t *pi_depth_luma, uint8_t *pi_depth_chroma );
 bool hevc_get_colorimetry( const hevc_sequence_parameter_set_t *p_sps,
                            video_color_primaries_t *p_primaries,
                            video_transfer_func_t *p_transfer,



More information about the vlc-commits mailing list