[vlc-commits] packetizer: h264: set proper chroma/luma defaults

Francois Cartegnie git at videolan.org
Sat Mar 17 20:32:25 CET 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Mar 16 18:51:26 2018 +0100| [3d05a68e51c1966e63db3b28f4f8e784ea218d43] | committer: Francois Cartegnie

packetizer: h264: set proper chroma/luma defaults

(cherry picked from commit dbc434e844e3d2463d7506768899251d7b5ff46c)

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

 modules/packetizer/h264_nal.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/packetizer/h264_nal.c b/modules/packetizer/h264_nal.c
index 847f976a44..6e8f9df1d8 100644
--- a/modules/packetizer/h264_nal.c
+++ b/modules/packetizer/h264_nal.c
@@ -336,7 +336,9 @@ static bool h264_parse_sequence_parameter_set_rbsp( bs_t *p_bs,
     }
     else
     {
-        p_sps->i_chroma_idc = 1; /* Not present == inferred to 4:2:2 */
+        p_sps->i_chroma_idc = 1; /* Not present == inferred to 4:2:0 */
+        p_sps->i_bit_depth_luma = 8;
+        p_sps->i_bit_depth_chroma = 8;
     }
 
     /* Skip i_log2_max_frame_num */
@@ -790,8 +792,6 @@ bool h264_get_picture_size( const h264_sequence_parameter_set_t *p_sps, unsigned
 bool h264_get_chroma_luma( const h264_sequence_parameter_set_t *p_sps, uint8_t *pi_chroma_format,
                            uint8_t *pi_depth_luma, uint8_t *pi_depth_chroma )
 {
-    if( p_sps->i_bit_depth_luma == 0 )
-        return false;
     *pi_chroma_format = p_sps->i_chroma_idc;
     *pi_depth_luma = p_sps->i_bit_depth_luma;
     *pi_depth_chroma = p_sps->i_bit_depth_chroma;



More information about the vlc-commits mailing list