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

◆ reseed()

static FASTLED_FORCE_INLINE void fl::BinaryDither::reseed ( u8(&) d[3],
const u8(&) e[3],
u8 frame )
inlinestatic

Re-point d at frame, keeping the ranges init left in e.

reseed(d, e, f) leaves the same d as init(d, e, scale, f).

Definition at line 167 of file binary_dither.h.

167 {
168 const u8 q = phase(frame);
169 for (int i = 0; i < 3; ++i) {
170 // `e[i]` is init's range less one; zero only for an unlit
171 // channel, which carries no offset.
172 d[i] = e[i] ? offset(q, static_cast<u8>(e[i] + 1)) : 0;
173 }
174 }
unsigned char u8
Definition stdint.h:131
static FASTLED_FORCE_INLINE u8 phase(u8 frame) FL_NO_EXCEPT
The frame's offset pattern value Q: frame wrapped to VIRTUAL_BITS, bit-reversed so consecutive frames...
static FASTLED_FORCE_INLINE u8 offset(u8 q, u8 range) FL_NO_EXCEPT
Q scaled into [0, range): the offset for one channel.

References FASTLED_FORCE_INLINE, fl::FL_NO_EXCEPT, offset(), and phase().

Referenced by PixelController< RGB_ORDER, LANES, MASK >::reseed_binary_dithering().

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