Skip to content

Commit

Permalink
stats.lua: display HDR peak in nits
Browse files Browse the repository at this point in the history
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 mpv-player#10127
  • Loading branch information
dyphire authored and Dudemanguy committed Feb 2, 2023
1 parent cc87a25 commit 070287a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion player/lua/stats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 070287a

Please sign in to comment.