FastLED 3.10.6
Loading...
Searching...
No Matches
fl::anonymous_namespace{gamut_map.cpp.hpp} Namespace Reference

Classes

struct  RgbFeasible
 Feasibility against the three-emitter hull. More...
 
struct  RgbwFeasible
 Feasibility against the device's real hull when it has a white emitter. More...
 
struct  RgbwwFeasible
 Feasibility against the device's real hull when it has two white emitters. More...
 

Functions

void chromaCandidateXyz (const i32(&lab)[3], i32 lightness, i32 factor, i32(&out_xyz)[3]) FL_NO_EXCEPT
 XYZ of the candidate at factor of the target's chroma.
 
i32 clampChromaFactor (i32 low, i32 high) FL_NO_EXCEPT
 The target's chroma clamped into [low, high], in factor space.
 
void clampGamutDrives (i32(&drives)[3]) FL_NO_EXCEPT
 Clamp drives into [0, 1].
 
template<typename Feasible>
bool feasibleChromaInterval (const i32(&lab)[3], i32 lightness, Feasible feasible, i32 *out_low, i32 *out_high) FL_NO_EXCEPT
 The feasible chroma interval at the target's own lightness, as factors of the target's chroma.
 
bool gamutDrivesAreInRange (const i32(&drives)[3], i32 slack) FL_NO_EXCEPT
 True when every drive is inside [0, 1], allowing slack ULP either side.
 
template<typename Feasible>
i32 highestReachableLightness (const i32(&lab)[3], i32 cap, i32 requested, Feasible feasible) FL_NO_EXCEPT
 The highest lightness at or below requested whose feasible chroma interval the probe scan can still find.
 
template<typename Feasible>
i32 largestFeasibleChroma (const i32(&lab)[3], i32 lightness, Feasible feasible) FL_NO_EXCEPT
 Largest chroma factor the hull accepts, by a fixed count of halvings.
 
i32 scaleGamutQ16 (i32 value, i32 factor) FL_NO_EXCEPT
 Scale an s16.16 value by an s16.16 factor, rounding to nearest.
 

Variables

constexpr i32 kGamutD65Q16 [3] = {62289, 65536, 71372}
 D65 in s16.16, the white the working domain is normalized to.
 
constexpr i32 kGamutFeasibilitySlack = 64
 Slack allowed on the drive bounds, in s16.16 raw units.
 
constexpr i32 kGamutFullDrive = 65536
 Full drive, as an s16.16 raw value.
 
constexpr int kGamutMapProbes = 8
 Probes used to find a seed inside the feasible chroma interval when the target is brighter than the device's brightest neutral (#4245).
 
constexpr i32 kGamutProbeCeilingQ16 = 4 << 16
 How far above the target's own chroma the probes reach, in Q16.