JPEG DCT, Discrete Cosine Transform (JPEG Pt2)- Computerphile
Channel:Computerphile · Length:15:11 · Published:2015-05-22 · Views:699257
Summary
Mike Pound explains the discrete cosine transform and how it underpins JPEG compression. It is part two of Computerphile's JPEG series.
Why HN recommends it
HN recommends it as an easy, clear intro to the DCT that finally made it click for several commenters.
I finally understood DCT after watching — HN, 2026
Computer vision, speech & NLP · Information theory & signal processing
Subtitles (excerpt)
In the last video, we talked about the beginnings of JPEG, so what do we do at the beginning of the process to start preparing for the discrete cosine transform, which is really how the lossy compression happens within a JPEG. We start with our RGB image, we convert that into YCbCr color space, which separates illuminance and chrominance. And then we can down sample the chrominance if we want, and we can kind of get away with quite a bit of down sampling there that people won't be able to see. The next step is the discrete cosine transform. Before we start talking about how images are compressed using the discrete cosine transform, it's much better just to start with a simple example of what a discrete cosine transform is and how it works. A cosine function, for anyone who isn't familiar with it, is a function that goes between 1 and -1. What we tend to do on this x-axis is go from 0, to pi, to 2*pi. This is in radians, those of you familiar with degrees, this is 180° at pi, and 360° at 2*pi. And the cosine wave looks like this. So it's 1 at 0, and then at pi, it goes down to -1, And then it goes back up to one at 2*pi. And it just goes on and on like this up and down as you increase.
On Hacker News
There's a series of videos showing the algorithm: [LINK] I finally understood DCT after watching [VIDEO] And someone created a "JPEG to PNG" tool that "finds the smoothest possible picture that encodes to the given JPEG file": [LINK] . I tried it with some very terribly compressed images, and the outputs were a lot better. — netsharc, 2026-07
It receives information about the spacial frequency content of the image. If you're unfamiliar, it's definitely worth looking into the specifics of how this works, as it's quite impressive! Here's a few relevant Wikipedia articles, and a Computerphile video: [LINK] [LINK] [VIDEO] — itishappy, 2024-04
There is a good video[1] from the Computerphile channel describing the concept in the context of JPEG. [1] [VIDEO] — boolemancer, 2023-12
The Computerphile channel has a nice series of videos on JPEG and one focusing on DCT [0]. It's a nice ans easy intro to the subject. [0]: [VIDEO] — skywal_l, 2022-12
Pretty cool! I would add Computerphile's Youtube Video as a watch after this: [VIDEO] . This is a part of their 4-video series on JPEG: [LINK] — walagran, 2020-08
Related videos
- CppCon 2015: Greg Law " Give me 15 minutes & I'll change your view of GDB" · CppCon · 14:46
- Feynman: Magnets (and Why?) FUN TO IMAGINE 4/ higher quality version! · Christopher Sykes · 7:34
- I’m Legally Obligated to Disclose This - Framework investment · Linus Tech Tips · 15:59
- Miniatur Wunderland *** official video *** largest model railway / railroad of the world · Miniatur Wunderland · 4:55
- Alain de Botton: Status Anxiety · Alain de Botton · 2:23:07
- We're building a dystopia just to make people click on ads | Zeynep Tufekci · TED · 22:55
- Ideas about a new programming language for games. · Jonathan Blow · 1:55:24
- But what is the Fourier Transform? A visual introduction. · 3Blue1Brown · 19:41
- D/A and A/D | Digital Show and Tell (Monty Montgomery @ xiph.org) · FL Studio · 23:52
- The Fast Fourier Transform (FFT): Most Ingenious Algorithm Ever? · Reducible · 28:23
- Bay Area Vision Meeting: Unsupervised Feature Learning and Deep Learning · Google TechTalks · 48:10
- "Voice Driven Development: Who needs a keyboard anyway?" by Emily Shea · Strange Loop Conference · 41:17
- Andrej Karpathy - AI for Full-Self Driving at Tesla · Matroid · 30:08
- (1/4) Intro/History: Introducing a 100-year-old mechanical computer · engineerguy · 3:38
- Tensorflow and deep learning - without a PhD by Martin Görner · Devoxx · 2:35:53
- David Kriesel: Traue keinem Scan, den du nicht selbst gefälscht hast · media.ccc.de · 1:03:40