Media compression (JPEG, MP3, video)

Level AdvancedDifficulty ★★★★★Application⌖ Open in the map

What is it?

Transform the signal into a basis where most coefficients are tiny (cosine transforms, wavelets), quantize them coarsely where the eye or ear will not notice, and entropy-code the rest. Video adds motion compensation between frames.

Formulas

Xk=∑n=0N−1xncos⁡[πN(n+12)k]X_k = \sum_{n=0}^{N-1}x_n\cos\Big[\frac{\pi}{N}\Big(n + \frac12\Big)k\Big]
DCT-II, the transform of JPEG (on 8×8 blocks)

The mathematics behind it

  • Fourier series★★★★★frequent

    JPEG and MP3 use cosine transforms (DCT/MDCT), close relatives of Fourier series, then drop small coefficients.

  • Wavelets★★★★★frequent

    JPEG 2000 and many medical/scientific image formats use wavelet transforms.

  • Fractals★★★★★historical

    Fractal image compression (1990s) encoded images as self-similar maps; it was abandoned for transform coding.

This page has the essentials. A fuller treatment (intuition, formal definition, worked example) is on the way.

↑ ↓ to navigate · ↵ · Esc