solve for minimum and maximum value of dct coefficient

Solve for minimum and maximum value of dct coefficient

  • $\begingroup$ I assume it happens at the DC coefficient of $C[k_1,k_2]$... Do you know where the DC coef is ? $\endgroup$
    – Fat32
    Dec 4, 2020 at 19:53
  • 1
    $\begingroup$ Please write the question using LaTeX instead of posting the image. $\endgroup$
    – Royi
    Dec 5, 2020 at 10:09

1 Answer 1


The max value for a DCT coefficient with this formula would be when $k_1 = 0$ and $k_2 = 0$. Using this give us the $\cos(0) = 1$ so you simply sum up the pixel values. Since the pixel values are $0-255$, then the max value is $64*255 = 16320$.

The min value can be computed by putting a pixel value of $255$ whenever the product of the cosines is negative, and a zero when it is positive. You would have to iterate through the $k_1$ and $k_2$ values to find the smallest value.

  • $\begingroup$ Nicely put. As DCT coefficients for JPEG are integers, some rounding can even be added on the final result $\endgroup$ Dec 5, 2020 at 9:57

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