Set up the values for binary dithering.
Definition at line 238 of file pixel_controller.h.
238 {
239#if !defined(NO_DITHERING) || (NO_DITHERING != 1)
240
243
244
245
248
249
250
251
253
254
255 {
256 if(
R & 0x01) {
Q |= 0x80; }
257 if(
R & 0x02) {
Q |= 0x40; }
258 if(
R & 0x04) {
Q |= 0x20; }
259 if(
R & 0x08) {
Q |= 0x10; }
260 if(
R & 0x10) {
Q |= 0x08; }
261 if(
R & 0x20) {
Q |= 0x04; }
262 if(
R & 0x40) {
Q |= 0x02; }
263 if(
R & 0x80) {
Q |= 0x01; }
264 }
265
266
267
268
269
272 }
273
274
275
276
277
278
279 for(
int i = 0;
i < 3; ++
i) {
281 e[
i] =
s ? (256/
s) + 1 : 0;
283#if (FASTLED_SCALE8_FIXED == 1)
285#endif
287 }
288#endif
289 }
LIB8STATIC_ALWAYS_INLINE uint8_t scale8(uint8_t i, fract8 scale)
Scale one byte by a second one, which is treated as the numerator of a fraction whose denominator is ...
uint8_t d[3]
values for the scaled dither signal
ColorAdjustment mColorAdjustment
uint8_t e[3]
values for the unscaled dither signal
References d, e, mColorAdjustment, scale8(), and VIRTUAL_BITS.
Referenced by enable_dithering().