FastLED 3.10.6
Loading...
Searching...
No Matches

◆ kWhiteSlackAtUnitColumn

i32 fl::anonymous_namespace{white_allocation.cpp.hpp}::kWhiteSlackAtUnitColumn = 64
constexpr

Slack on the drive bounds, for an emitter whose XYZ column peaks at 1.

The same reason the gamut mapper carries one: a colour the device reproduces exactly does not solve to exactly 0 or 1, and without slack the allocation would reject targets it can actually hit. 64 raw units is a quarter of one code at 8-bit output.

The qualifier is the point, and was missing. This is a drive allowance and it is paid in colour, at an exchange rate of one emitter column per drive unit. A green primary at unit luminance has a column peaking at 1, so 64 units there costs what the number suggests. The blue primary of the corpus device sits at xy = (0.15, 0.06), which puts its Z at 13.17 – so the same 64 units bought thirteen times the colour error, and a target whose blue solved to -62 was reported reachable and answered 0.0125 off in Z, 26% of the target's own Z. FastLED#4303.

buildWhiteAllocationQ16 divides this by each column's peak so the colour cost is the same on every channel. Measured over 291 in-gamut targets on the xy plane at Y = 0.5: worst OKLab hue divergence falls from 0.0197 to 0.0034 and nothing exceeds 0.005, at the cost of 8 targets that the gamut mapper now compresses instead of answering wrongly.

Definition at line 33 of file white_allocation.cpp.hpp.