[vlc-commits] packetizer: hevc: parse slices poc lsb

Francois Cartegnie git at videolan.org
Fri Mar 31 14:52:07 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Mar 30 19:09:38 2017 +0200| [b8e7f28a8746c4c11c8c4960691ef4a3614bca3f] | committer: Francois Cartegnie

packetizer: hevc: parse slices poc lsb

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

 modules/packetizer/hevc_nal.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/modules/packetizer/hevc_nal.c b/modules/packetizer/hevc_nal.c
index 3229c7a..ee0d8eb 100644
--- a/modules/packetizer/hevc_nal.c
+++ b/modules/packetizer/hevc_nal.c
@@ -317,6 +317,8 @@ struct hevc_slice_segment_header_t
     // slice_segment_address; read but discarded
     nal_ue_t slice_type;
     nal_u1_t pic_output_flag;
+
+    uint32_t pic_order_cnt_lsb;
     /* incomplete */
 
 };
@@ -1163,6 +1165,14 @@ static bool hevc_parse_slice_segment_header_rbsp( bs_t *p_bs,
             p_sl->pic_output_flag = bs_read1( p_bs );
     }
 
+    if( p_sps->separate_colour_plane_flag )
+        bs_skip( p_bs, 2 ); /* colour_plane_id */
+
+    if( p_sl->nal_type != HEVC_NAL_IDR_W_RADL && p_sl->nal_type != HEVC_NAL_IDR_N_LP )
+        p_sl->pic_order_cnt_lsb = bs_read( p_bs, p_sps->log2_max_pic_order_cnt_lsb_minus4 + 4 );
+    else
+        p_sl->pic_order_cnt_lsb = 0;
+
     if( bs_remain( p_bs ) < 1 )
         return false;
 



More information about the vlc-commits mailing list