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

◆ encodeColorPipelineManagedSpi()

bool fl::anonymous_namespace{pipeline_binding.cpp.hpp}::encodeColorPipelineManagedSpi ( PixelIterator & pixels,
vector_psram< u8 > * out,
SpiChipset chip,
const CLEDController & controller )

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

242 {
243#if !FL_PLATFORM_HAS_TINY_MEMORY
244 switch (chip) {
247 return true;
250 return true;
251 default:
252 break;
253 }
254#endif
255#if FASTLED_HD_COLOR_MIXING && !FL_PLATFORM_HAS_TINY_MEMORY
256 // Non-HD APA102/SK9822: the field is held at 31 on a managed channel,
257 // whatever FASTLED_USE_GLOBAL_BRIGHTNESS says (#4457). That option
258 // derives a strip-wide field from the first pixel and rescales only that
259 // pixel -- a second shaping stage on drives the pipeline already solved,
260 // dimming every other pixel by field/31. B1's conservative treatment is a
261 // fixed field. Through the wide writer the HD path already links, pinned
262 // at 31: same framing, one quantization from the 16-bit drive, and no new
263 // encoder instantiation in sketches that bind no profile.
264 switch (chip) {
269 pixels.writeFiveBitWide(fl::back_inserter(*out), 31);
270 return true;
271 default:
272 break;
273 }
274 // The profile is read here rather than by the caller, so the accessor
275 // links only with the hook.
276 const EmitterProfile* profile = controller.emitterProfile();
277 const u8 min_field = hdMinimumField(
278 fiveBitSemanticsFor(chip, profile != nullptr
279 ? profile->five_bit_semantics
282 if (min_field >= 31) {
283 // Field held fixed: the caller's existing path is exactly that.
284 return false;
285 }
286 pixels.writeFiveBitWide(fl::back_inserter(*out), min_field);
287 return true;
288#else
289 FL_UNUSED(pixels);
290 FL_UNUSED(out);
291 FL_UNUSED(chip);
293 return false;
294#endif
295}
CLEDController * controller
void writeLPD6803Wide(OutputIterator back_ins) FL_NO_EXCEPT
LPD6803 over a colour-managed channel's 16-bit drives, quantized once to the chip's 5 bits per channe...
void writeLPD8806Wide(OutputIterator back_ins) FL_NO_EXCEPT
LPD8806 over a colour-managed channel's 16-bit drives, quantized once to the chip's 7 bits (B3: one f...
#define FL_UNUSED(x)
u8 & hdFieldFloor() FL_NO_EXCEPT
Backing store for CFastLED::setHdFieldFloor().
back_insert_iterator< Container > back_inserter(Container &c) FL_NO_EXCEPT
Helper function to create a back_insert_iterator.
Definition iterator.h:139
unsigned char u8
Definition stdint.h:131
u8 hdMinimumField(FiveBitSemantics semantics, u8 floor_setting) FL_NO_EXCEPT
The lowest field the managed HD path may choose: the configured flicker floor for a secondary slow-PW...
@ LPD6803
LPD6803 LED chipset.
@ HD107
Same as APA102, but in turbo 40-mhz mode.
@ SK9822
SK9822 LED chipset.
@ DOTSTAR
APA102 LED chipset alias.
@ APA102
APA102 LED chipset.
@ LPD8806
LPD8806 LED chipset.
FiveBitSemantics fiveBitSemanticsFor(SpiChipset chip, FiveBitSemantics profile) FL_NO_EXCEPT
The 5-bit semantics for chip, with profile overriding the chip's default when it is not NotApplicable...

References fl::APA102, fl::back_inserter(), controller, fl::DOTSTAR, encodeColorPipelineManagedSpi(), fl::colorimetric_response::EmitterProfile::five_bit_semantics, fl::fiveBitSemanticsFor(), fl::FL_NO_EXCEPT, FL_UNUSED, fl::HD107, fl::detail::hdFieldFloor(), fl::hdMinimumField(), fl::LPD6803, fl::LPD8806, fl::NotApplicable, and fl::SK9822.

Referenced by encodeColorPipelineManagedSpi().

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