Skip to content

colorspace: add pl_color_space_nominal_luma to replace nominal_min/max

Niklas Haas requested to merge rmeove_nominal into master

Due to a multitude of problems and corner cases, I became very unhappy with the way this field was handled, and decided to re-remove it. I don't think this affects any API users, so I won't bother with a deprecation period.

The downside of using a function like this is that we increase CPU work on every usage site, but I don't really care about micro-optimizing this. (And the fact that min_luma/max_luma get defaulted to their detected values anyway at the beginning of pl_renderer makes this not so bad)

One possibly unintended consequence of this change is that pl_shader_(de)linearize now default to SDR gamma even on empty structs. This is probably intended semantics, though our test framework does need to be changed to prevent it from exploding due to the implicit clipping semantics.

Merge request reports