Tech●●●●●Difficulty 3 of 5

How did one 1972 idea end up inside your photos, videos and music?

JPEG photos, MPEG video and MP3 songs all lean on the same piece of math, proposed by one engineer in 1972 for compressing images.

▶ Start the story

Through a piece of math called the discrete cosine transform, or DCT. It rewrites a list of data points, like a row of pixel values or a slice of sound, as a sum of cosine waves at different frequencies. In typical uses, most of the signal's information ends up concentrated in a few low-frequency waves, so the others can be stored roughly or dropped. That trick now runs inside most digital media: images such as JPEG and HEIF, video such as MPEG and H.26x, and audio such as Dolby Digital, MP3 and AAC.

A grid of 64 small black-and-white patterns, each showing a different cosine wave shape, from flat gray to tightly spaced stripes.
The 64 cosine wave patterns that the DCT combines to rebuild an 8-by-8 block of pixels, from flat (top left) to finely striped (bottom right).Photo: Hanakus · Public domain

It started with one engineer. Nasir Ahmed conceived the DCT while working at Kansas State University and proposed it to the National Science Foundation in 1972, with image compression in mind. In 1973 he turned it into a practical algorithm with T. Raj Natarajan and K. R. Rao, and the three published it in a January 1974 paper simply titled Discrete Cosine Transform.

Then it spread. In 1975, John Roese and Guner Robinson adapted it for video and found it more efficient than the fast Fourier transform, thanks to its reduced complexity. In 1987, researchers at the University of Surrey developed a variant, the modified DCT, now used in most modern audio formats, including MP3, AAC and Vorbis. And in 1992, the Joint Photographic Experts Group cited Ahmed's paper as a basis for JPEG, which typically shrinks a photo about tenfold.

Today the DCT is by far the most widely used linear transform in data compression. Its weakness shows only when it is pushed too hard: heavy DCT compression leaves the blocky artifacts you may have seen in an over-squeezed photo.

Quiz me

0/3

  1. 1.Why can DCT-based compression drop a lot of data without ruining a picture or a sound?
  2. 2.What did Roese and Robinson find in 1975 when they compared the DCT with the fast Fourier transform for video?
  3. 3.How does the DCT relate to the discrete Fourier transform?

Recap

Most of a picture or a sound lives in a few smooth waves, and the DCT is how computers find them.

Surprising fact · Nasir Ahmed proposed it in 1972 for image compression; variants now also compress video and most modern audio formats.

Sources (2)

No source, no claim. Every fact in this lesson (23 claims) cites at least one of these.

  1. [1]Discrete cosine transform · Wikipedia
  2. [2]JPEG · Wikipedia
More lessons in 💻 Tech (3) See all tech lessons →

One more light on your map.

Get one lesson like this every day, about the things you love. Free, in two or five minutes.

Get the share card for this lesson ↗