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