FastLED 3.9.15
Loading...
Searching...
No Matches

◆ vpass_full()

template<int R, typename RGB_T, typename acc_t, bool ApplyAlpha, typename AlphaT>
static void fl::gfx::blur_detail::vpass_full ( RGB_T * pixels,
int w,
int h,
RGB_T * scratch,
AlphaT alpha )
static

Definition at line 1088 of file blur.cpp.hpp.

1088 {
1089#if defined(FL_IS_AVR)
1090 // AVR: column-by-column with per-channel noinline + O3.
1091 FL_BUILTIN_MEMSET(scratch, 0, R * sizeof(RGB_T));
1092 FL_BUILTIN_MEMSET(scratch + R + h, 0, R * sizeof(RGB_T));
1093
1094 for (int x = 0; x < w; ++x) {
1095 // Linearize column into padded region.
1096 {
1097 const RGB_T *src = pixels + x;
1098 RGB_T *dst = scratch + R;
1099 for (int i = 0; i < h; ++i) {
1100 *dst++ = *src;
1101 src += w;
1102 }
1103 }
1104 if (ApplyAlpha)
1105 apply_pass_alpha_1ch<R>(scratch, pixels + x, h, w, alpha);
1106 else
1107 apply_pass_1ch<R>(scratch, pixels + x, h, w);
1108 }
1109#else
1110 // Non-AVR: row-major vertical pass for cache efficiency.
1111 // Direct R=2 V-pass using exact [1,4,6,4,1] kernel (no cascaded R=1).
1112 if (ApplyAlpha) {
1114 pixels, w, h, scratch, alpha);
1115 } else {
1117 pixels, w, h, scratch, alpha);
1118 }
1119#endif
1120}
static FL_OPTIMIZE_FUNCTION void vpass_rowmajor_impl(RGB_T *pixels, int w, int h, RGB_T *scratch, AlphaT alpha)
Definition blur.cpp.hpp:967
#define FL_BUILTIN_MEMSET(dest, val, n)

References FL_BUILTIN_MEMSET, vpass_rowmajor_impl(), and fl::x.

Referenced by fl::gfx::blurGaussianImpl().

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