From c335e84230916d7d7a38288031516e8b2ec1c36b Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sat, 10 Jun 2017 14:01:25 +0200 Subject: video: refactor HDR implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List of changes: 1. Kill nom_peak, since it's a pointless non-field that stores nothing of value and is _always_ derived from ref_white anyway. 2. Kill ref_white/--target-brightness, because the only case it really existed for (PQ) actually doesn't need to be this general: According to ITU-R BT.2100, PQ *always* assumes a reference monitor with a white point of 100 cd/m². 3. Improve documentation and comments surrounding this stuff. 4. Clean up some of the code in general. Move stuff where it belongs. --- demux/demux_mkv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demux') diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index c3988b8bf8..da50b1ee0f 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -572,7 +572,7 @@ static void parse_trackcolour(struct demuxer *demuxer, struct mkv_track *track, struct ebml_mastering_metadata *mastering = &colour->mastering_metadata; if (mastering->n_luminance_max) { - track->color.sig_peak = mastering->luminance_max; + track->color.sig_peak = mastering->luminance_max / MP_REF_WHITE; MP_VERBOSE(demuxer, "| + HDR peak: %f\n", track->color.sig_peak); } } -- cgit v1.2.3