Skip to content

Completely refactor tone mapping, color spaces, everything

Niklas Haas requested to merge tone_mapping_v3 into master

Supersedes !210 (closed)

Adds an extra commit to completely overhaul pl_color_space, merging it with conventional HDR metadata, nuking light, changing the way SDR curves are handled in libplacebo, and simplifying a lot of stuff.

TODO:

  • Fix 3DLUT inputs (need to ingest black-scaled inputs!) (Edit: Nvm, this already round-trips because we encode in gamma light before feeding the content into the 3DLUT)
  • Use direct GLSL for naive black point compensation
  • Add fallbacks for the old fields (sig_peak etc.)
  • Add automatic tone mapping curve selection heuristics
  • Investigate possibility of black point shift (with the new ICC BPC changes)
  • Add better gamut mapping algorithms this MR is large enough
  • Parse primaries from ICC profile this MR is large enough
  • Properly respect intent needs to be coordinated with downstream first
  • fix PL_GAMUT_DARKEN black clipping
Edited by Niklas Haas

Merge request reports