summaryrefslogtreecommitdiffstats
path: root/player/lua/stats.lua
diff options
context:
space:
mode:
authordyphire <qimoge@gmail.com>2023-02-02 11:22:13 +0800
committerDudemanguy <random342@airmail.cc>2023-02-02 14:22:40 +0000
commit070287aebba648439834e4e98c95163f988a9bd2 (patch)
tree595e7be026942e3e135c5d1f3aed91c1aca850c8 /player/lua/stats.lua
parentcc87a25f7d2ae3f8191741487cdb5da584559026 (diff)
downloadmpv-070287aebba648439834e4e98c95163f988a9bd2.tar.bz2
mpv-070287aebba648439834e4e98c95163f988a9bd2.tar.xz
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
Diffstat (limited to 'player/lua/stats.lua')
-rw-r--r--player/lua/stats.lua2
1 files changed, 1 insertions, 1 deletions
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})