MCPcopy Create free account
hub / github.com/FastLED/FastLED / apply_pass_alpha

Function apply_pass_alpha

src/fl/gfx/blur.cpp.hpp:577–590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575
576template <int R, typename RGB_T, typename acc_t, typename AlphaT>
577FL_NO_INLINE_IF_AVR FL_OPTIMIZE_FUNCTION
578static void apply_pass_alpha(const RGB_T *pad, RGB_T *out, int count,
579 int stride, AlphaT alpha) {
580 constexpr int shift = 2 * R;
581 using P = pixel_ops<RGB_T>;
582 for (int i = 0; i < count; ++i) {
583 acc_t r, g, b;
584 interior_row<R, RGB_T, acc_t>::apply(pad, R + i, r, g, b);
585 *out = P::make(static_cast<acc_t>(r >> shift),
586 static_cast<acc_t>(g >> shift),
587 static_cast<acc_t>(b >> shift), alpha);
588 out += stride;
589 }
590}
591
592
593// ── Platform-neutral SIMD byte-level convolution kernels ────────────────

Callers

nothing calls this directly

Calls 1

makeFunction · 0.85

Tested by

no test coverage detected