FastLED 3.10.8
Loading...
Searching...
No Matches

◆ spread_transpose16_symbol()

FASTLED_FORCE_INLINE FL_IRAM FL_OPTIMIZE_FUNCTION void fl::detail::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, low byte = lanes 0-7, high byte = lanes 8-15, pulse order 7..0 (out[0] = pulse 7 low).

Matches the naive layout.

Definition at line 44 of file bit_spread_lut.hpp.

44 {
45 const u32 aLo = spreadA(l[0]) | spreadA(l[1]) << 1 | spreadA(l[2]) << 2 | spreadA(l[3]) << 3 |
46 spreadA(l[4]) << 4 | spreadA(l[5]) << 5 | spreadA(l[6]) << 6 | spreadA(l[7]) << 7;
47 const u32 bLo = spreadB(l[0]) | spreadB(l[1]) << 1 | spreadB(l[2]) << 2 | spreadB(l[3]) << 3 |
48 spreadB(l[4]) << 4 | spreadB(l[5]) << 5 | spreadB(l[6]) << 6 | spreadB(l[7]) << 7;
49 const u32 aHi = spreadA(l[8]) | spreadA(l[9]) << 1 | spreadA(l[10]) << 2 | spreadA(l[11]) << 3 |
50 spreadA(l[12]) << 4 | spreadA(l[13]) << 5 | spreadA(l[14]) << 6 | spreadA(l[15]) << 7;
51 const u32 bHi = spreadB(l[8]) | spreadB(l[9]) << 1 | spreadB(l[10]) << 2 | spreadB(l[11]) << 3 |
52 spreadB(l[12]) << 4 | spreadB(l[13]) << 5 | spreadB(l[14]) << 6 | spreadB(l[15]) << 7;
53 out[0] = static_cast<u8>(aLo); out[1] = static_cast<u8>(aHi);
54 out[2] = static_cast<u8>(aLo >> 8); out[3] = static_cast<u8>(aHi >> 8);
55 out[4] = static_cast<u8>(aLo >> 16); out[5] = static_cast<u8>(aHi >> 16);
56 out[6] = static_cast<u8>(aLo >> 24); out[7] = static_cast<u8>(aHi >> 24);
57 out[8] = static_cast<u8>(bLo); out[9] = static_cast<u8>(bHi);
58 out[10] = static_cast<u8>(bLo >> 8); out[11] = static_cast<u8>(bHi >> 8);
59 out[12] = static_cast<u8>(bLo >> 16); out[13] = static_cast<u8>(bHi >> 16);
60 out[14] = static_cast<u8>(bLo >> 24); out[15] = static_cast<u8>(bHi >> 24);
61}
FASTLED_FORCE_INLINE u32 spreadB(u8 v) FL_NO_EXCEPT
Pulses 3,2,1,0 of v (byte j = bit (3-j)). Depends only on the low nibble.
FASTLED_FORCE_INLINE u32 spreadA(u8 v) FL_NO_EXCEPT
Pulses 7,6,5,4 of v (byte j = bit (7-j)). Depends only on the high nibble.
unsigned char u8
Definition stdint.h:131

References fl::FL_NO_EXCEPT, spreadA(), and spreadB().

Referenced by wave3_transpose_16(), wave8_transpose_16(), wave8_transpose_16_bf1(), wave8_transpose_16x2_pipe2(), wave8_transpose_16x4_bf1_pipe4(), and wave8_transpose_16x4_pipe4().

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