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

◆ idct9()

static __inline void fl::third_party::idct9 ( int32_t * x)
static

Definition at line 272 of file imdct.hpp.

273{
274 int32_t a1, a2, a3, a4, a5, a6, a7, a8, a9;
275 int32_t a10, a11, a12, a13, a14, a15, a16, a17, a18;
276 int32_t a19, a20, a21, a22, a23, a24, a25, a26, a27;
277 int32_t m1, m3, m5, m6, m7, m8, m9, m10, m11, m12;
278 int32_t x0, x1, x2, x3, x4, x5, x6, x7, x8;
279
280 x0 = x[0]; x1 = x[1]; x2 = x[2]; x3 = x[3]; x4 = x[4];
281 x5 = x[5]; x6 = x[6]; x7 = x[7]; x8 = x[8];
282
283 a1 = x0 - x6;
284 a2 = x1 - x5;
285 a3 = x1 + x5;
286 a4 = x2 - x4;
287 a5 = x2 + x4;
288 a6 = x2 + x8;
289 a7 = x1 + x7;
290
291 a8 = a6 - a5; /* ie x[8] - x[4] */
292 a9 = a3 - a7; /* ie x[5] - x[7] */
293 a10 = a2 - x7; /* ie x[1] - x[5] - x[7] */
294 a11 = a4 - x8; /* ie x[2] - x[4] - x[8] */
295
296 /* do the << 1 as constant shifts where mX is actually used (free, no stall or extra inst.) */
297 m1 = MULSHIFT32(c9_0, x3);
298 m3 = MULSHIFT32(c9_0, a10);
299 m5 = MULSHIFT32(c9_1, a5);
300 m6 = MULSHIFT32(c9_2, a6);
301 m7 = MULSHIFT32(c9_1, a8);
302 m8 = MULSHIFT32(c9_2, a5);
303 m9 = MULSHIFT32(c9_3, a9);
304 m10 = MULSHIFT32(c9_4, a7);
305 m11 = MULSHIFT32(c9_3, a3);
306 m12 = MULSHIFT32(c9_4, a9);
307
308 a12 = x[0] + (x[6] >> 1);
309 a13 = a12 + ( m1 * 2L);
310 a14 = a12 - ( m1 * 2L);
311 a15 = a1 + ( a11 >> 1);
312 a16 = ( m5 * 2L) + (m6 * 2L);
313 a17 = ( m7 * 2L) - (m8 * 2L);
314 a18 = a16 + a17;
315 a19 = ( m9 * 2L) + (m10 * 2L);
316 a20 = (m11 * 2L) - (m12 * 2L);
317
318 a21 = a20 - a19;
319 a22 = a13 + a16;
320 a23 = a14 + a16;
321 a24 = a14 + a17;
322 a25 = a13 + a17;
323 a26 = a14 - a18;
324 a27 = a13 - a18;
325
326 x0 = a22 + a19; x[0] = x0;
327 x1 = a15 + (m3 * 2L); x[1] = x1;
328 x2 = a24 + a20; x[2] = x2;
329 x3 = a26 - a21; x[3] = x3;
330 x4 = a1 - a11; x[4] = x4;
331 x5 = a27 + a21; x[5] = x5;
332 x6 = a25 - a20; x[6] = x6;
333 x7 = a15 - (m3 * 2L); x[7] = x7;
334 x8 = a23 - a19; x[8] = x8;
335}
static const int32_t c9_2
Definition imdct.hpp:260
__inline int32_t MULSHIFT32(int32_t x, int32_t y) FL_NOEXCEPT
Multiply together two 32-bit numbers and return the top 32-bits of the result.
Definition assembly.h:503
static const int32_t c9_4
Definition imdct.hpp:262
static const int32_t c9_1
Definition imdct.hpp:259
static const int32_t c9_0
Definition imdct.hpp:258
fl::i32 int32_t
Definition coder.h:220
static const int32_t c9_3
Definition imdct.hpp:261

References c9_0, c9_1, c9_2, c9_3, c9_4, FL_NOEXCEPT, MULSHIFT32(), and fl::x.

Referenced by IMDCT36().

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