vlc | branch: master | Steve Lhomme <[email protected]> | Thu Apr 6 13:41:54 2017 +0200| [02052a8ea2a11305f095f2f4614b7f2bf282912a] | committer: Jean-Baptiste Kempf
es_out: display HDR metadata Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=02052a8ea2a11305f095f2f4614b7f2bf282912a --- src/input/es_out.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/input/es_out.c b/src/input/es_out.c index 384c09a..2beb19a 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -3188,6 +3188,58 @@ static void EsOutUpdateInfo( es_out_t *out, es_out_id_t *es, const es_format_t * info_category_AddInfo( p_cat, _("Field of view"), "%.2f", fmt->video.pose.f_fov_degrees ); } + if ( fmt->video.mastering.max_luminance ) + { + float luminance = (float)fmt->video.mastering.max_luminance / + 10000.f; + info_category_AddInfo( p_cat, _("Max luminance"), "%.4f cd/m²", + luminance ); + } + if ( fmt->video.mastering.min_luminance ) + { + float luminance = (float)fmt->video.mastering.min_luminance / + 10000.f; + info_category_AddInfo( p_cat, _("Min luminance"), "%.4f cd/m²", + luminance ); + } + if ( fmt->video.mastering.primaries[4] && + fmt->video.mastering.primaries[5] ) + { + float x = (float)fmt->video.mastering.primaries[4] / 50000.f; + float y = (float)fmt->video.mastering.primaries[5] / 50000.f; + info_category_AddInfo( p_cat, _("Primary R"), "x=%.4f y=%.4f", x, y ); + } + if ( fmt->video.mastering.primaries[0] && + fmt->video.mastering.primaries[1] ) + { + float x = (float)fmt->video.mastering.primaries[0] / 50000.f; + float y = (float)fmt->video.mastering.primaries[1] / 50000.f; + info_category_AddInfo( p_cat, _("Primary G"), "x=%.4f y=%.4f", x, y ); + } + if ( fmt->video.mastering.primaries[2] && + fmt->video.mastering.primaries[3] ) + { + float x = (float)fmt->video.mastering.primaries[2] / 50000.f; + float y = (float)fmt->video.mastering.primaries[3] / 50000.f; + info_category_AddInfo( p_cat, _("Primary B"), "x=%.4f y=%.4f", x, y ); + } + if ( fmt->video.mastering.white_point[0] && + fmt->video.mastering.white_point[1] ) + { + float x = (float)fmt->video.mastering.white_point[0] / 50000.f; + float y = (float)fmt->video.mastering.white_point[1] / 50000.f; + info_category_AddInfo( p_cat, _("White point"), "x=%.4f y=%.4f", x, y ); + } + if ( fmt->video.ligthing.MaxCLL ) + { + info_category_AddInfo( p_cat, _("MaxCLL"), "%d cd/m²", + fmt->video.ligthing.MaxCLL ); + } + if ( fmt->video.ligthing.MaxFALL ) + { + info_category_AddInfo( p_cat, _("MaxFALL"), "%d cd/m²", + fmt->video.ligthing.MaxFALL ); + } break; case SPU_ES: _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
