FFmpeg: report the mastering display's peak luminance in nits
QVideoFrameFormat::maxLuminance() is the maximum luminance of the
mastering display in nits, and the shaders divide it by 100 (SDR white)
to tone map PQ and HLG video to the output.
The FFmpeg backend filled it by multiplying AVMasteringDisplayMetadata's
max_luminance by 10000. That would be right for SMPTE ST 2086's unit of
0.0001 cd/m2, but FFmpeg's field is already a rational in cd/m2
(10000000/10000 for a 1000 cd/m2 display). A video mastered at 1000 nits
reported 10000000, so the tone mapper got a peak 10^4 times too high.
Use the rational as it is, and only when has_luminance says it is set.
The new test plays a HEVC file made with x265's
--master-display "...L(10000000,1)" and expects 1000; it failed before
with 1e+07.
Pick-to: 6.12
Fixes: QTBUG-149931
Assisted-by: Claude Sonnet via Claude Code
Change-Id: If131ce75b767a0a13ecf6d09783785a0ca38ca8e
Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>