1
$\begingroup$

As I know, in general, the DCT is lossless. But I'm not exactly sure about Type-2 of DCT. Is it lossless or lossy?

| improve this question | | | | |
$\endgroup$
  • 1
    $\begingroup$ Yes, it is lossless. Obviously due to it's properties (de-correlation of an input and concentration of most of the information in lower bins) it is being used in lossy algorithms. $\endgroup$ – jojek Dec 16 '15 at 12:47
  • $\begingroup$ Thanks kindly explain. Would you please let me know more about" de-correlation of an input and concentration of most of the information in lower bins"? I think your explain is very understnd $\endgroup$ – bural Dec 16 '15 at 13:06
  • $\begingroup$ it is lossy. roundoff error. $\endgroup$ – Fat32 Dec 16 '15 at 14:22
3
$\begingroup$

Mostly yes, but it depends on the context. Let us elaborate.

DCT-II is one of the many forms of Discrete Cosine Transforms, and probably the most widely used one, as it is (somehow) present in JPEG or MP3 formats. "Lossy" often refer to the compression standard which uses it, because the main loss results from quantization (and generally not the transform by itself). By itself, the transform is invertible, even more orthogonal or orthonormal, so in theory you have no loss (it is bijective).

As @Fat32 points out, its coefficients sometimes involve cosines, hence irrational numbers (except at specific values) that are not easily represented in finite arithmetic (float or int), and can induce round-off errors.

But:

  • DCT-II of size $1$ is $1$, DCT-II of size 2 (unnormalized) is: \begin{smallmatrix} 1 & 1 \\1 & -1\end{smallmatrix} so DCT-II can be lossless (in special cases though),
  • For integer data (like images), it seems possible, with enough bit-depth computations (related to the initial integer range and the DCT size), to remain practically lossless, as you know that the transform/inverse transform result should be integer,
  • Very accurate integer, or dyadic approximations exist, meant for integer hardware: for instance the binDCT.

My final answer is thus: DCT-II is mostly lossless, if you take care of it.

| improve this answer | | | | |
$\endgroup$
  • 1
    $\begingroup$ I'm now upvoting and it becomes neutral now! $\endgroup$ – Fat32 Dec 18 '15 at 0:13
  • $\begingroup$ This great move deserves a reward! $\endgroup$ – Laurent Duval Dec 18 '15 at 0:14
  • $\begingroup$ the fact that it works is enough! $\endgroup$ – Fat32 Dec 18 '15 at 0:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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