[vlc-commits] packetizer: hevc: add hevc_get_chroma_luma
Francois Cartegnie
git at videolan.org
Mon Feb 26 11:22:16 CET 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Feb 26 11:11:16 2018 +0100| [7729ccefe4e7b1dc9be893c54636bc264118db5f] | committer: Francois Cartegnie
packetizer: hevc: add hevc_get_chroma_luma
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7729ccefe4e7b1dc9be893c54636bc264118db5f
---
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 09a4cc90d1..8e649b93ee 100644
--- a/modules/packetizer/hevc_nal.c
+++ b/modules/packetizer/hevc_nal.c
@@ -1145,6 +1145,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