FastLED 3.10.6
Loading...
Searching...
No Matches
white_allocation.cpp.hpp File Reference
+ Include dependency graph for white_allocation.cpp.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fl::anonymous_namespace{white_allocation.cpp.hpp}::SplitBound
 A bound on the split, as (numerator + slope * s) / denominator with a positive denominator. More...
 

Namespaces

namespace  fl
 Base definition for an LED controller.
 
namespace  fl::anonymous_namespace{white_allocation.cpp.hpp}
 

Functions

bool fl::allocateEmitterDrivesQ16 (const WhiteAllocationQ16 &allocation, const i32(&xyz)[3], i32(&drives)[4]) FL_NO_EXCEPT
 One pixel: XYZ in s16.16 to four drives, in the order red, green, blue, white, at whichever end of the feasible interval the profile's policy names.
 
bool fl::allocateTwoWhiteDrivesQ16 (const TwoWhiteAllocationQ16 &allocation, const i32(&xyz)[3], i32(&drives)[5]) FL_NO_EXCEPT
 One pixel: XYZ in s16.16 to five drives – red, green, blue, white1, white2 – at whichever end of the feasible total the profile's policy names.
 
bool fl::buildTwoWhiteAllocationFromSolveQ16 (const EmitterSolveMatrixQ16 &solve, const i32(&white1_xyz)[3], const i32(&white2_xyz)[3], WhiteAllocationPolicy policy, TwoWhiteAllocationQ16 *out) FL_NO_EXCEPT
 Bind two adapted white columns with an RGB solve in the same XYZ domain.
 
bool fl::buildTwoWhiteAllocationQ16 (const colorimetric_response::EmitterProfile &profile, const i32(&white1_xyz)[3], const i32(&white2_xyz)[3], WhiteAllocationPolicy policy, TwoWhiteAllocationQ16 *out) FL_NO_EXCEPT
 Derive the allocation for three primaries plus two white emitters.
 
bool fl::buildWhiteAllocationFromSolveQ16 (const colorimetric_response::EmitterProfile &profile, const EmitterSolveMatrixQ16 &solve, const i32(&white_xyz)[3], WhiteAllocationPolicy policy, WhiteAllocationQ16 *out) FL_NO_EXCEPT
 Bind from an RGB solve already adapted to the D65 working domain.
 
bool fl::buildWhiteAllocationQ16 (const colorimetric_response::EmitterProfile &profile, const i32(&white_xyz)[3], WhiteAllocationPolicy policy, WhiteAllocationQ16 *out) FL_NO_EXCEPT
 Derive the allocation for a three-primary profile plus one white emitter.
 
i64 fl::anonymous_namespace{white_allocation.cpp.hpp}::divideWhiteQ16 (i32 numerator, i32 denominator) FL_NO_EXCEPT
 (numerator << 16) / denominator as s16.16, kept in i64.
 
bool fl::anonymous_namespace{white_allocation.cpp.hpp}::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 fl::anonymous_namespace{white_allocation.cpp.hpp}::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 fl::anonymous_namespace{white_allocation.cpp.hpp}::scaleWhiteQ16 (i32 value, i32 factor) FL_NO_EXCEPT
 Scale an s16.16 value by an s16.16 factor, rounding to nearest.
 
i64 fl::anonymous_namespace{white_allocation.cpp.hpp}::splitBoundAt (const SplitBound &bound, i64 total) FL_NO_EXCEPT
 value at total s, in s16.16.
 
bool fl::anonymous_namespace{white_allocation.cpp.hpp}::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 fl::anonymous_namespace{white_allocation.cpp.hpp}::kTwoWhiteBoundSlack = kWhiteSlack / 2
 How far past full drive the bounds let an RGB drive reach.
 
constexpr i32 fl::anonymous_namespace{white_allocation.cpp.hpp}::kTwoWhiteMaxColumn = 8 * 65536
 The largest magnitude a per-white column or a solved drive may reach before the pairwise bounds stop fitting.
 
constexpr i32 fl::anonymous_namespace{white_allocation.cpp.hpp}::kWhiteFullDrive = 65536
 Full drive, as an s16.16 raw value.
 
constexpr i32 fl::anonymous_namespace{white_allocation.cpp.hpp}::kWhiteSlack = 64
 The same allowance, uniform, for the two-white (RGBWW) path.
 
constexpr i32 fl::anonymous_namespace{white_allocation.cpp.hpp}::kWhiteSlackAtUnitColumn = 64
 Slack on the drive bounds, for an emitter whose XYZ column peaks at 1.
 

Class Documentation

◆ fl::anonymous_namespace{white_allocation.cpp.hpp}::SplitBound

struct fl::anonymous_namespace{white_allocation.cpp.hpp}::SplitBound
Class Members
i32 denominator
i32 numerator
i32 slope