backends/drm: use max frame average brightness instead of max brightness in HDR metadata

Using the peak maximum brightness can cause displays to do more agressive tone mapping, which
overall darkens the image without any reason. Instead, send the max fame average brightness,
which the display can always do over the whole screen
remotes/origin/work/zzag/window-update-layer-simplify
Xaver Hugl 3 years ago
parent e6d2607fe3
commit 10c1e7892e
  1. 4
      src/backends/drm/drm_pipeline.cpp

@ -757,11 +757,11 @@ std::shared_ptr<DrmBlob> DrmPipeline::createHdrMetadata(NamedTransferFunction tr
},
.white_point = {to16Bit(colorimetry.white.x()), to16Bit(colorimetry.white.y())},
// in nits
.max_display_mastering_luminance = uint16_t(std::round(metadata.desiredContentMaxLuminance)),
.max_display_mastering_luminance = uint16_t(std::round(metadata.desiredMaxFrameAverageLuminance)),
// in 0.0001 nits
.min_display_mastering_luminance = uint16_t(std::round(metadata.desiredContentMinLuminance * 10000)),
// in nits
.max_cll = uint16_t(std::round(metadata.desiredContentMaxLuminance)),
.max_cll = uint16_t(std::round(metadata.desiredMaxFrameAverageLuminance)),
.max_fall = uint16_t(std::round(metadata.desiredMaxFrameAverageLuminance)),
},
};

Loading…
Cancel
Save