FastLED 3.10.8
Loading...
Searching...
No Matches

◆ init_binary_dithering()

template<EOrder RGB_ORDER, int LANES = 1, fl::u32 MASK = 0xFFFFFFFF>
void PixelController< RGB_ORDER, LANES, MASK >::init_binary_dithering ( )
inline

Set up the values for binary dithering from the shared frame phase.

Definition at line 250 of file pixel_controller.h.

250 {
251 fl::u8 frame = 0;
253#if FL_PLATFORM_HAS_TINY_MEMORY
254 // Tiny targets retain their one-byte local phase counter.
255 static fl::u8 R = 0; // okay static in header: preserves the tiny-target footprint
256 frame = ++R;
257#else
258 // Other targets share a phase once per logical frame.
260#endif
261 }
262 fl::Dither::init(d, e, mColorAdjustment.premixed.raw, frame);
263 }
u8 ditherFrame() FL_NO_EXCEPT
Return the temporal-dither phase shared by all controllers in this frame.
fl::u8 e[3]
[DITHER] Max dither range per R,G,B channel (inversely proportional to brightness)
fl::u8 d[3]
[DITHER] Current dither offset per R,G,B channel (toggles via stepDithering)
ColorAdjustment mColorAdjustment
Pixel controller class.
static FASTLED_FORCE_INLINE void init(u8(&d)[3], u8(&e)[3], const u8(&scale)[3], u8 frame) FL_NO_EXCEPT
Set up e from the per-channel brightness scale and d from frame.

References d, fl::detail::ditherFrame(), e, FL_NO_EXCEPT, fl::BinaryDither::init(), fl::BinaryDither::kEnabled, and mColorAdjustment.

Referenced by enable_dithering().

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