[vlc-commits] codec: videotoolbox: get colorimetry from the SPS

Thomas Guillem git at videolan.org
Wed Sep 13 11:15:23 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Sep 13 11:08:32 2017 +0200| [bb6d9c8460a1ead10f9367e33236e27b0c9f855e] | committer: Thomas Guillem

codec: videotoolbox: get colorimetry from the SPS

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

 modules/codec/videotoolbox.m | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index f0cea3fd70..2ac35149d2 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1159,10 +1159,15 @@ static int SetH264DecoderInfo(decoder_t *p_dec, CFMutableDictionaryRef extradata
                                                  &i_video_width, &i_video_height);
     if (i_ret != VLC_SUCCESS)
         return i_ret;
+
     i_ret = h264_helper_get_current_sar(&p_sys->hh, &i_sar_num, &i_sar_den);
     if (i_ret != VLC_SUCCESS)
         return i_ret;
 
+    hxxx_helper_get_colorimetry(&p_sys->hh, &p_dec->fmt_out.video.primaries,
+                                &p_dec->fmt_out.video.transfer,
+                                &p_dec->fmt_out.video.space,
+                                &p_dec->fmt_out.video.b_color_range_full);
     p_dec->fmt_out.video.i_visible_width =
     p_dec->fmt_out.video.i_width = i_video_width;
     p_dec->fmt_out.video.i_visible_height =



More information about the vlc-commits mailing list