From 070287aebba648439834e4e98c95163f988a9bd2 Mon Sep 17 00:00:00 2001 From: dyphire Date: Thu, 2 Feb 2023 11:22:13 +0800 Subject: [PATCH] stats.lua: display HDR peak in nits The value of `sig-peak` is relative to the SDR peak. This is not a problem when used inside the player, but the `HDR peak` in stats should display human-readable information. So change to return the actual nits value of HDR. Closed https://github.com/mpv-player/mpv/issues/10127 --- player/lua/stats.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player/lua/stats.lua b/player/lua/stats.lua index c9e3afc5c0..215814d36d 100644 --- a/player/lua/stats.lua +++ b/player/lua/stats.lua @@ -737,7 +737,7 @@ local function add_video(s) local hdrpeak = r["sig-peak"] or 0 local hdrinfo = "" if hdrpeak > 1 then - hdrinfo = " (HDR peak: " .. format("%.2f", hdrpeak) .. ")" + hdrinfo = " (HDR peak: " .. format("%.2f", hdrpeak * 203) .. " nits)" end append(s, r["gamma"], {prefix="Gamma:", suffix=hdrinfo})