|
FastLED 3.10.6
|
| i32 fl::anonymous_namespace{gamut_map.cpp.hpp}::highestReachableLightness | ( | const i32(&) | lab[3], |
| i32 | cap, | ||
| i32 | requested, | ||
| Feasible | feasible ) |
The highest lightness at or below requested whose feasible chroma interval the probe scan can still find.
Without this the mapper is discontinuous at the top of the reachable region, and badly: holding the requested lightness works until the probes stop landing inside the interval, and the fallback then drops all the way to the neutral cap. Swept along a fixed hue at chroma 0.10 that step measured 0.91 in summed drive – 234 eight-bit codes, against the ~1 code the rest of the mapper's paths stay inside.
Bisecting instead lands on the edge of the region rather than jumping past it, so the answer walks down continuously as the target rises. The neutral cap is the low end of the bracket because chroma zero is feasible there by construction, which is the invariant the search needs.
Costs kGamutMapHalvings * kGamutMapProbes feasibility tests, and only on an above-cap target whose interval was not found at its own lightness.
Definition at line 258 of file gamut_map.cpp.hpp.
References feasibleChromaInterval(), fl::FL_NO_EXCEPT, highestReachableLightness(), fl::kGamutMapHalvings, and fl::step().
Referenced by highestReachableLightness().
Here is the call graph for this function:
Here is the caller graph for this function: