Diffusion Krita 1b20c6e2fdd1

Fix tone reproduction curve estimation

Authored by mwein on Apr 21 2020, 9:58 PM.

Description

Fix tone reproduction curve estimation

The ITUR_2100_PQ_FULL.ICC has no colorants and revealed the bugs.
Iteration order was inverted so normalization didn't work.
Also only the first colorant was ever written, and
consequently the luma coefficients were also incomplete.

Additionally, RGB vs. BGR channel ordering was not respected,
and the sum of luma coefficients needs to be 1.0 for HSY
color space calculations.

And while at it, calculate a few more points so the graph in
the color space browser looks at least somewhat like a curve.