FastLED 3.10.6
Loading...
Searching...
No Matches
fl::BinaryDither Struct Reference

Detailed Description

Temporal binary dithering over caller-owned d[3]/e[3].

Definition at line 114 of file binary_dither.h.

#include <binary_dither.h>

Public Types

enum  { kEnabled = 1 }
 

Static Public Member Functions

static FASTLED_FORCE_INLINE bool active (const u8(&e)[3]) FL_NO_EXCEPT
 
static FASTLED_FORCE_INLINE u8 apply (u8 b, u8 d) FL_NO_EXCEPT
 Add the offset to a source byte, before scaling. Black is never lifted.
 
static FASTLED_FORCE_INLINE void clear (u8(&d)[3], u8(&e)[3]) FL_NO_EXCEPT
 
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.
 
static FASTLED_FORCE_INLINE u8 offset (u8 q, u8 range) FL_NO_EXCEPT
 Q scaled into [0, range): the offset for one channel.
 
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 land far apart (0,1,2,3 -> 0,128,64,192), then shifted to the middle of its bin.
 
static FASTLED_FORCE_INLINE void reseed (u8(&d)[3], const u8(&e)[3], u8 frame) FL_NO_EXCEPT
 Re-point d at frame, keeping the ranges init left in e.
 
static FASTLED_FORCE_INLINE void step (u8(&d)[3], const u8(&e)[3]) FL_NO_EXCEPT
 Next pixel: toggle each offset to its complement in [0, e], so neighbours dither in opposite directions.
 
static FASTLED_FORCE_INLINE void stepChannel (u8(&d)[3], const u8(&e)[3], int c) FL_NO_EXCEPT
 step for a single channel (drivers that pre-step their first byte).
 

The documentation for this struct was generated from the following file: