FastLED 3.10.8
Loading...
Searching...
No Matches

◆ rgbw_partial_reorder()

void fl::rgbw_partial_reorder ( EOrderW w_placement,
u8 b0,
u8 b1,
u8 b2,
u8 w,
u8 * out_b0,
u8 * out_b1,
u8 * out_b2,
u8 * out_b3 )

Definition at line 679 of file rgbw.cpp.hpp.

681 {
682
683 u8 out[4] = {b0, b1, b2, 0};
684 switch (w_placement) {
685 // unrolled loop for speed.
686 case W3:
687 out[3] = w;
688 break;
689 case W2:
690 out[3] = out[2]; // memmove and copy.
691 out[2] = w;
692 break;
693 case W1:
694 out[3] = out[2];
695 out[2] = out[1];
696 out[1] = w;
697 break;
698 case W0:
699 out[3] = out[2];
700 out[2] = out[1];
701 out[1] = out[0];
702 out[0] = w;
703 break;
704 }
705 *out_b0 = out[0];
706 *out_b1 = out[1];
707 *out_b2 = out[2];
708 *out_b3 = out[3];
709}
constexpr EOrderW W3
Definition eorder.h:24
constexpr EOrderW W2
Definition eorder.h:25
constexpr EOrderW W0
Definition eorder.h:27
constexpr EOrderW W1
Definition eorder.h:26
unsigned char u8
Definition stdint.h:131

References FL_NO_EXCEPT, W0, W1, W2, and W3.

Referenced by fl::ColorManagedPixelSource::loadAndScaleRGBW(), fl::PixelIterator::loadAndScaleRGBW(), PixelController< RGB_ORDER, LANES, MASK >::loadAndScaleRGBW(), and fl::detail::anonymous_namespace{rgbw.cpp.hpp}::rgbw_convert_pixel().

+ Here is the caller graph for this function: