FastLED 3.10.6
Loading...
Searching...
No Matches

◆ buildPipelineForChannelBinding()

bool fl::anonymous_namespace{pipeline_binding.cpp.hpp}::buildPipelineForChannelBinding ( const ColorProfileBinding & binding,
const ChannelOptions & options,
const ChipsetVariant & chipset,
StreamingPipelineQ16 * out )

Definition at line 33 of file pipeline_binding.cpp.hpp.

36 {
37 const EmitterProfile* profile = binding.profile();
38 if (profile != nullptr) {
39 const colorimetric_response::EmitterTopology topology = profile->topology;
40 const Rgbw* rgbw = options.mWhiteCfg.ptr<Rgbw>();
41 const Rgbww* rgbww = options.mWhiteCfg.ptr<Rgbww>();
42 const bool is_rgbw = rgbw != nullptr && rgbw->active();
43 const bool is_rgbww = rgbww != nullptr && rgbww->active();
44 const bool mismatch =
46 (is_rgbw || is_rgbww)) ||
48 !is_rgbw) ||
50 !is_rgbww);
51 if (mismatch) {
52 return false;
53 }
55 // RGB-only codecs call loadAndScaleRGB[16] and cannot consume a
56 // wide solve. Reject at binding instead of reading the RGB gamut
57 // that wide pipelines do not build or silently dropping W/WW.
58 if (!chipset.is<ClocklessChipset>()) {
59 return false;
60 }
61 const ClocklessEncoder encoder =
62 chipset.ptr<ClocklessChipset>()->encoder;
63 const bool supports_rgbw =
66 const bool supports_rgbww =
70 ? !supports_rgbw : !supports_rgbww) {
71 return false;
72 }
73 }
74 }
75 return buildPipelineForBinding(binding, out);
76}
Rgbw rgbw
ClocklessEncoder
Identifies which encoder to use for clockless chipsets in the Channel API.
@ CLOCKLESS_ENCODER_UCS7604_8BIT
UCS7604 8-bit 800KHz.
@ CLOCKLESS_ENCODER_TM1812_RGBWW
TM1812: two 5-byte RGBWW pixels in each 12-byte IC frame.
@ CLOCKLESS_ENCODER_WS2812
Default, no preamble (WS2812 and compatible)
bool buildPipelineForBinding(const ColorProfileBinding &binding, StreamingPipelineQ16 *out) FL_NO_EXCEPT
Build the streaming pipeline a binding describes.
fl::variant< fl::Empty, Rgbw, Rgbww > mWhiteCfg
White-channel selection (variant): Empty = plain RGB, Rgbw = 4-channel, Rgbww = 5-channel.
Definition options.h:91
Clockless chipset configuration (single data pin)
Definition config.h:33
const EmitterProfile * profile() const FL_NO_EXCEPT
Per-strip RGBWW configuration.
Definition rgbww.h:60

References fl::buildPipelineForBinding(), buildPipelineForChannelBinding(), fl::CLOCKLESS_ENCODER_TM1812_RGBWW, fl::CLOCKLESS_ENCODER_UCS7604_8BIT, fl::CLOCKLESS_ENCODER_WS2812, fl::FL_NO_EXCEPT, fl::colorimetric_response::RGB, fl::colorimetric_response::RGBW, rgbw, fl::colorimetric_response::RGBWW, and fl::colorimetric_response::EmitterProfile::topology.

Referenced by buildPipelineForChannelBinding().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: