mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.83k stars 2.93k forks source link

gpu-next: Got PQ(Y): max: 1000.60nit with DoVip8.4 (HLG) #12803

Open natural-harmonia-gropius opened 1 year ago

natural-harmonia-gropius commented 1 year ago

Important Information

Reproduction steps

Play DolbyVision profile 8.4 file, Got max: 1000.60. This happens to every DoVip8.4 file I own.

--target-trc=hlg image image

Remove dovi data, 1000nit here. image

Some math wrong in HLG to PQ?

Expected behavior

Max: 1000.00nit

Actual behavior

Max: 1000.60nit

Log file

Sample files

https://github.com/mpv-player/mpv/assets/50797982/c4677289-2879-4dcf-8379-fc3be1eeac09

quietvoid commented 1 year ago

The metadata is 12 bit with 1000 nits being 3079. If you do the math with the PQ code being 3079/4095, it converts to 1000.60 nits.

haasn commented 1 year ago

Well, the current cut-off is very aggressive. We start tone-mapping at a delta of only 0.01 nits.

Probably, a better cut-off would be 0.001 PQ (would be a tolerance of ~10 nits here). Thoughts?

quietvoid commented 1 year ago

Sounds reasonable to me.

kasper93 commented 1 year ago

Maybe we should update also stats.lua? I clamped to %.0f for max_luma, because this comes from integer metadata, but libplacebo recalculate it, so maybe 1001 is confusing? Should we show decimal places there too? (not 4, 2) Thoughts?

image