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

◆ MidSideProc()

void fl::third_party::MidSideProc ( int32_t x[MAX_NCHAN][MAX_NSAMP],
int32_t nSamps,
int32_t mOut[2] )

Definition at line 71 of file stproc.hpp.

72{
73 int32_t i, xr, xl, mOutL, mOutR;
74
75 /* L = (M+S)/sqrt(2), R = (M-S)/sqrt(2)
76 * NOTE: 1/sqrt(2) done in DequantChannel() - see comments there
77 */
78 mOutL = mOutR = 0;
79 for(i = 0; i < nSamps; i++) {
80 xl = x[0][i];
81 xr = x[1][i];
82 x[0][i] = xl + xr;
83 x[1][i] = xl - xr;
84 mOutL |= FASTABS(x[0][i]);
85 mOutR |= FASTABS(x[1][i]);
86 }
87 mOut[0] |= mOutL;
88 mOut[1] |= mOutR;
89}
__inline int32_t FASTABS(int32_t x) FL_NOEXCEPT
Absolute value of x.
Definition assembly.h:513
fl::i32 int32_t
Definition coder.h:220

References FASTABS(), FL_NOEXCEPT, MAX_NCHAN, MAX_NSAMP, and fl::x.

Referenced by Dequantize().

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