I've been reading a little bit about how DCT works in image compression using the 2D transform, however I don't know how this applies to audio using a 1D transform.

Suppose I have an audio segment, I mean, some samples of a mono audio vector.

Ai = [-0.0288,-0.0304,-0.0354,-0.0406,-0.0469,-0.0518,-0.0647,-0.0831 ...]

And then I calculate 1D DCT on that vector.

R = dct(Ai)

The result would be something like this:

0.2143   -0.3158   -0.6354   -0.3877    0.5503    0.2330   -0.1690    0.0203

How should I interpret this result? Are the high energy coefficient the ones with a greater value?(I'm still a noob on this). Is the first value the DC coefficient? Is there a special way to read the vector (zig-zag or something)?

Any help will be appreciated, btw I'm working with matlab. Thanks


1 Answer 1


When we calculate 1D DCT of a signal (vector) we will get the DCT coefficients of same length.

The first value in this is the DC coefficient and low frequency components are at the begnning, as the index increases the frequency also increases. And hence the last value in DCT coeffs is the highest frequency (ie. fs/2).

Zig zag scanning is done in 2D DCT to read the coefficients in the increasing order of frequency. But in 1D DCT there is no need of zig zag scan as it contains only one row (or 1 column), it is already in ascending order of frequency (starting from Dc value and ends at maximum frequency ie. fs/2).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.