summaryrefslogtreecommitdiffstats
path: root/video/csputils.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2020-05-17 03:17:28 +0200
committerNiklas Haas <git@haasn.xyz>2020-06-15 01:24:04 +0200
commitef6bc8504a945eb6492b8ed46fd5a1afaaf32182 (patch)
tree31a0beaa61c89e4e0dacec9e0cd52c559a9b84fc /video/csputils.c
parentc7fe4ae73ad5f073bbffe3e8a3460b728e7d0f46 (diff)
downloadmpv-ef6bc8504a945eb6492b8ed46fd5a1afaaf32182.tar.bz2
mpv-ef6bc8504a945eb6492b8ed46fd5a1afaaf32182.tar.xz
vo_gpu: reinterpret SDR white levels based on ITU-R BT.2408
This standard says we should use a value of 203 nits instead of 100 for mapping between SDR and HDR. Code copied from https://code.videolan.org/videolan/libplacebo/-/commit/9d9164773 In particular, that commit also includes a test case to make sure the implementation doesn't break roundtrips. Relevant to #4248 and #7357.
Diffstat (limited to 'video/csputils.c')
-rw-r--r--video/csputils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/csputils.c b/video/csputils.c
index 6833f583fb..f9b6c98689 100644
--- a/video/csputils.c
+++ b/video/csputils.c
@@ -481,7 +481,7 @@ float mp_trc_nom_peak(enum mp_csp_trc trc)
{
switch (trc) {
case MP_CSP_TRC_PQ: return 10000.0 / MP_REF_WHITE;
- case MP_CSP_TRC_HLG: return 12.0;
+ case MP_CSP_TRC_HLG: return 12.0 / MP_REF_WHITE_HLG;
case MP_CSP_TRC_V_LOG: return 46.0855;
case MP_CSP_TRC_S_LOG1: return 6.52;
case MP_CSP_TRC_S_LOG2: return 9.212;