Set up the values for binary dithering.
Definition at line 231 of file pixel_controller.h.
231 {
232#if !defined(NO_DITHERING) || (NO_DITHERING != 1)
233
236
237
238
241
242
243
244
246
247
248 {
249 if(
R & 0x01) {
Q |= 0x80; }
250 if(
R & 0x02) {
Q |= 0x40; }
251 if(
R & 0x04) {
Q |= 0x20; }
252 if(
R & 0x08) {
Q |= 0x10; }
253 if(
R & 0x10) {
Q |= 0x08; }
254 if(
R & 0x20) {
Q |= 0x04; }
255 if(
R & 0x40) {
Q |= 0x02; }
256 if(
R & 0x80) {
Q |= 0x01; }
257 }
258
259
260
261
262
265 }
266
267
268
269
270
271
272 for(
int i = 0;
i < 3; ++
i) {
274 e[
i] =
s ? (256/
s) + 1 : 0;
276#if (FASTLED_SCALE8_FIXED == 1)
278#endif
280 }
281#endif
282 }
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().