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
This commit is contained in:
dyphire 2023-02-02 11:22:13 +08:00 committed by Dudemanguy
parent cc87a25f7d
commit 070287aebb
1 changed files with 1 additions and 1 deletions

View File

@ -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})