summaryrefslogtreecommitdiff
path: root/src/audio/dct.h
blob: ca423c29f8e0c72fd65ea3f3549229b52a9faf21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// This file is part of the 64k demo project.
// It defines constants and shared structures for DCT operations.
// The demo uses a 512-point DCT for spectral synthesis.

#pragma once

#define DCT_SIZE     512
#define OLA_HOP_SIZE 256
#define OLA_OVERLAP  256

// Forward declarations
void fdct_512(const float* input, float* output);
void idct_512(const float* input, float* output);
// IMDCT: N=512 coefficients -> 2*DCT_SIZE=1024 samples.
// Window with Hann(1024) and OLA with hop DCT_SIZE for perfect reconstruction.
void imdct_512(const float* input, float* output);