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

◆ wave8_transpose_16_bf1()

void fl::detail::wave8_transpose_16_bf1 ( const u8 lanes[16],
u8 W0,
u8 W1,
u8 output[16 *sizeof(Wave8Byte)] )

Definition at line 181 of file wave8.cpp.hpp.

183 {
184 u8 d_mask[8];
185 u8 m0_mask[8];
186 const u8 D_byte = W0 ^ W1;
187 for (int p = 0; p < 8; ++p) {
188 const int shift = 7 - p;
189 d_mask[p] = ((D_byte >> shift) & 1) ? 0xFFu : 0x00u;
190 m0_mask[p] = ((W0 >> shift) & 1) ? 0xFFu : 0x00u;
191 }
192 u8 cols[16];
193 spread_transpose16_symbol(lanes, cols);
194 for (int s = 0; s < 8; ++s) {
195 const u8 col_lo = cols[2 * s + 0];
196 const u8 col_hi = cols[2 * s + 1];
197 for (int p = 0; p < 8; ++p) {
198 output[s * 16 + p * 2 + 0] = m0_mask[p] ^ (col_lo & d_mask[p]);
199 output[s * 16 + p * 2 + 1] = m0_mask[p] ^ (col_hi & d_mask[p]);
200 }
201 }
202}
FASTLED_FORCE_INLINE FL_IRAM FL_OPTIMIZE_FUNCTION void spread_transpose16_symbol(const u8 l[16], u8 out[16])
Transpose one symbol of 16 lanes (16 input bytes) into 16 output bytes: 8 pulses × 2 bytes,...
unsigned char u8
Definition stdint.h:131
@ W1
White is second.
Definition eorder.h:26
@ W0
White is first.
Definition eorder.h:27

References fl::FL_NO_EXCEPT, spread_transpose16_symbol(), fl::W0, and fl::W1.

Referenced by fl::wave8Transpose_16_bf1().

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