From 041e9c6338403afdbb7a442b2f8fac190e957157 Mon Sep 17 00:00:00 2001 From: Francois Cartegnie Date: Wed, 14 Mar 2018 17:38:20 +0100 Subject: [PATCH] demux: heif: apply colr --- modules/demux/mp4/heif.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/demux/mp4/heif.c b/modules/demux/mp4/heif.c index ae8a8e96ad..e7c415e3af 100644 --- a/modules/demux/mp4/heif.c +++ b/modules/demux/mp4/heif.c @@ -32,6 +32,7 @@ #include "libmp4.h" #include "heif.h" +#include "color_config.h" struct heif_private_t { @@ -337,6 +338,15 @@ static int DemuxHEIF( demux_t *p_demux ) case 270: fmt.video.orientation = ORIENT_ROTATED_270 ; break; } break; + case ATOM_colr: + fmt.video.primaries = iso_23001_8_cp_to_vlc_primaries( + p_prop->data.p_colr->nclc.i_primary_idx ); + fmt.video.transfer = iso_23001_8_tc_to_vlc_xfer( + p_prop->data.p_colr->nclc.i_transfer_function_idx ); + fmt.video.space = iso_23001_8_mc_to_vlc_coeffs( + p_prop->data.p_colr->nclc.i_matrix_idx ); + fmt.video.b_color_range_full = p_prop->data.p_colr->nclc.i_full_range; + break; } } } -- GitLab