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

Classes

struct  SplitBound
 A bound on the split, as (numerator + slope * s) / denominator with a positive denominator. More...
 

Functions

i64 divideWhiteQ16 (i32 numerator, i32 denominator) FL_NO_EXCEPT
 (numerator << 16) / denominator as s16.16, kept in i64.
 
bool narrowTotalForPair (const SplitBound &lower, const SplitBound &upper, i64 *low, i64 *high) FL_NO_EXCEPT
 The totals at which lower <= upper holds, narrowed into [*low, *high].
 
SplitBound normalizedSplitBound (i32 numerator, i32 slope, i32 denominator) FL_NO_EXCEPT
 Fold a negative denominator into the numerator and slope, so every bound compares the same way round.
 
i32 scaleWhiteQ16 (i32 value, i32 factor) FL_NO_EXCEPT
 Scale an s16.16 value by an s16.16 factor, rounding to nearest.
 
i64 splitBoundAt (const SplitBound &bound, i64 total) FL_NO_EXCEPT
 value at total s, in s16.16.
 
bool splitBoundInRange (const SplitBound &bound) FL_NO_EXCEPT
 Whether every part of a bound stays inside the range the accumulators were sized for.
 

Variables

constexpr i32 kTwoWhiteBoundSlack = kWhiteSlack / 2
 How far past full drive the bounds let an RGB drive reach.
 
constexpr i32 kTwoWhiteMaxColumn = 8 * 65536
 The largest magnitude a per-white column or a solved drive may reach before the pairwise bounds stop fitting.
 
constexpr i32 kWhiteFullDrive = 65536
 Full drive, as an s16.16 raw value.
 
constexpr i32 kWhiteSlack = 64
 The same allowance, uniform, for the two-white (RGBWW) path.
 
constexpr i32 kWhiteSlackAtUnitColumn = 64
 Slack on the drive bounds, for an emitter whose XYZ column peaks at 1.