diff options
Diffstat (limited to 'src/audio/fdct.cpp')
| -rw-r--r-- | src/audio/fdct.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/audio/fdct.cpp b/src/audio/fdct.cpp deleted file mode 100644 index 50ab458..0000000 --- a/src/audio/fdct.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "dct.h" -#include "util/math.h" -#include <math.h> - -void fdct_512(const float input[DCT_SIZE], float output[DCT_SIZE]) { - float scale_k0 = sqrtf(1.0f / DCT_SIZE); - float scale_kn = sqrtf(2.0f / DCT_SIZE); - - for (int k = 0; k < DCT_SIZE; ++k) { - float sum = 0.0f; - for (int n = 0; n < DCT_SIZE; ++n) { - sum += input[n] * cosf((PI / DCT_SIZE) * (n + 0.5f) * k); - } - float scale = (k == 0) ? scale_k0 : scale_kn; - output[k] = sum * scale; - } -} |
