[vlc-devel] [PATCH 1/2] packetizer: h264: fill colorimetry

Thomas Guillem thomas at gllm.fr
Sat Apr 16 17:06:16 CEST 2016


---
 modules/packetizer/h264.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index a918f58..143691e 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -765,6 +765,13 @@ static void PutSPS( decoder_t *p_dec, block_t *p_frag )
             p_dec->fmt_out.video.i_frame_rate_base = p_sps->vui.i_num_units_in_tick;
             p_dec->fmt_out.video.i_frame_rate = p_sps->vui.i_time_scale;
         }
+        p_dec->fmt_out.video.primaries =
+            hxxx_colour_primaries_to_vlc( p_sps->vui.colour.i_colour_primaries );
+        p_dec->fmt_out.video.transfer =
+            hxxx_transfer_characteristics_to_vlc( p_sps->vui.colour.i_transfer_characteristics );
+        p_dec->fmt_out.video.space =
+            hxxx_matrix_coeffs_to_vlc( p_sps->vui.colour.i_matrix_coefficients,
+                                       p_sps->vui.colour.b_full_range );
     }
     /* We have a new SPS */
     if( !p_sys->b_sps )
-- 
2.8.0.rc3



More information about the vlc-devel mailing list