On Saturday, July 14, 2018 at 11:46:59 PM UTC-7, Christian Gollwitzer wrote:
> Am 15.07.18 um 08:17 schrieb RichD:
> > The mp3 standard uses the discrete cosine transform (DCT),
> > rather than the full DFT.
> > Doesn't that imply throwing away half the information?
> No. It implies different boundary conditions. While the mathematical
> definition of the (continuous) Fourier transform operates on an infinite
> signal, these discrete transforms only operate over a buffer. Therefore,
> it needs to be defined, what the data "outside" this buffer looks like.
> If you do DFT (or FFT, which is the same result but faster), then it is
> assumed that everything repeats at the boundary from start. If you do
> DCT, it is assumed that it is mirrored. Let's say your buffer contains
The more usual description is that the FFT has periodic boundary
conditions, DST has the function go to zero at the boundary,
and DCT has the derivative go to zero.
Putting transform blocks together, as is usually done in
image reconstruction, the boundaries are less visible with DCT.
> Then for DFT it is assumed to be
Specifically periodic boundary conditions.
> For DCT:
The derivative is zero, such that the basis functions,
and so the result of the transform have reflection
> When the latter is transformed, due to symmetry, only cosine terms can
> be there, the sine terms give zero. When you transform the former, due
> to symmetry, half of the coefficients are the complex conjugate of the
> other and also redundant. Therefore, there is always the same amount of
> The DCT assumption has the advantage that there is can not be a jump at
> the boundary.
The derivative has a jump, though.
It is the same math as standing waves with shorted (DST)
or open (DCT) boundary conditions on a transmission line.
As to the OP question, there are the same number of basis
functions, but they are different functions.
In the 8 element case, the DFT has four sines and four cosines,
DST has 8 sines, and DCT has 8 cosines. (Given real input data.)