packetizer: hevc: add hevc_get_chroma_luma
authorFrancois Cartegnie <fcvlcdev@free.fr>
Mon, 26 Feb 2018 10:11:16 +0000 (11:11 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Mon, 26 Feb 2018 10:22:12 +0000 (11:22 +0100)
modules/packetizer/hevc_nal.c
modules/packetizer/hevc_nal.h

index 09a4cc9..8e649b9 100644 (file)
@@ -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,
index 777622d..27fec6d 100644 (file)
@@ -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,