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

◆ wideWhiteColumnQ16()

bool fl::anonymous_namespace{pipeline.cpp.hpp}::wideWhiteColumnQ16 ( const float(&) xy[2],
float luminance,
i32(&) out[3] )

Definition at line 59 of file pipeline.cpp.hpp.

60 {
61 i32 xy_q16[2];
62 i32 luminance_q16 = 0;
63 if (!q16FromFloatBits(xy[0], &xy_q16[0]) ||
64 !q16FromFloatBits(xy[1], &xy_q16[1]) ||
65 !q16FromFloatBits(luminance, &luminance_q16) ||
66 luminance_q16 <= 0) return false;
67 i64 column[3];
68 if (!detail::xyzColumnQ16(xy_q16, luminance_q16, column)) return false;
69 for (int i = 0; i < 3; ++i) {
70 if (column[i] < 0 || column[i] > 2147483647LL) return false;
71 out[i] = static_cast<i32>(column[i]);
72 }
73 return true;
74}
unsigned int xy(unsigned int x, unsigned int y)
bool xyzColumnQ16(const i32(&xy)[2], i32 luminance, i64(&column)[3]) FL_NO_EXCEPT
XYZ of chromaticity xy at luminance luminance, all s16.16; false for a non-positive or out-of-simplex...
bool q16FromFloatBits(float value, i32 *out) FL_NO_EXCEPT
s16.16 of a float, rounded to nearest, computed from its IEEE-754 bits with integer arithmetic only –...
fl::i64 i64
Definition stdint.h:221

References fl::FL_NO_EXCEPT, fl::q16FromFloatBits(), wideWhiteColumnQ16(), xy(), and fl::detail::xyzColumnQ16().

Referenced by buildWidePipelineQ16(), and wideWhiteColumnQ16().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: