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

◆ compute_twiddle_factors()

static void fl::third_party::vorbis::compute_twiddle_factors ( int32_t n,
float * A,
float * B,
float * C )
static

Definition at line 978 of file stb_vorbis.cpp.hpp.

979{
980 int32_t n4 = n >> 2, n8 = n >> 3;
981 int32_t k,k2;
982
983 for (k=k2=0; k < n4; ++k,k2+=2) {
984 A[k2 ] = (float) cos(4*k*FL_PI/n);
985 A[k2+1] = (float) -sin(4*k*FL_PI/n);
986 B[k2 ] = (float) cos((k2+1)*FL_PI/n/2) * 0.5f;
987 B[k2+1] = (float) sin((k2+1)*FL_PI/n/2) * 0.5f;
988 }
989 for (k=k2=0; k < n8; ++k,k2+=2) {
990 C[k2 ] = (float) cos(2*(k2+1)*FL_PI/n);
991 C[k2+1] = (float) -sin(2*(k2+1)*FL_PI/n);
992 }
993}
#define FL_PI
Definition math.h:26
static constexpr int8_t C
enable_if< is_fixed_point< T >::value, T >::type cos(T angle) FL_NOEXCEPT
enable_if< is_fixed_point< T >::value, T >::type sin(T angle) FL_NOEXCEPT
fl::i32 int32_t
Definition coder.h:220
FL_DISABLE_WARNING_PUSH unsigned char * B

References fl::B, C, cos(), FL_NOEXCEPT, FL_PI, and sin().

Referenced by init_blocksize().

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