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

◆ loadAndScaleChannel()

template<EOrder RGB_ORDER, int LANES = 1, fl::u32 MASK = 0xFFFFFFFF>
FASTLED_FORCE_INLINE fl::u8 PixelController< RGB_ORDER, LANES, MASK >::loadAndScaleChannel ( fl::u8 c)
inline

One source channel, loaded, dithered and scaled – loadAndScale<SLOT> with RO(SLOT) replaced by a runtime channel index.

Same arithmetic, same tables: d[c] and premixed.raw[c] are indexed by source channel in both, which is what makes a colour order a pure permutation of these three values (FastLED#4402).

Definition at line 507 of file pixel_controller.h.

507 {
508 const fl::u8 b = mData[c];
509 return fl::scale8(fl::Dither::apply(b, d[c]), mColorAdjustment.premixed.raw[c]);
510 }
fl::u8 d[3]
[DITHER] Current dither offset per R,G,B channel (toggles via stepDithering)
ColorAdjustment mColorAdjustment
const fl::u8 * mData
pointer to the underlying LED data
Pixel controller class.

References fl::BinaryDither::apply(), d, FASTLED_FORCE_INLINE, mColorAdjustment, and mData.

Referenced by loadAndScaleRGBWUnordered(), and loadAndScaleRGBWWUnordered().

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