Gratitude Day 14: Apple Video Codec
Mon 14 September 2026
I'm continuing to explore lossy compression algorithms in my "Unsung Heroes, Human and Algorithmic" sub-theme of my September Gratitude series.
The Apple Video codec from 1991 is one of my favorite codecs: not because it's particularly efficient/effective (it's horrible), nor because it's popular (you'd be insane to use it today), but because it's one of the few lossy algorithms that's actually quite easy to understand and doesn't involve any heavy mathematics.
Apple Video saves data in two lossy ways: by reducing the color depth from 24-bits to 16-bits universally, and by replacing pixels with pixels from a previous frame, or a flat color, or with pixels from a further reduced color palette.
After reducing the color depth down to 16 bits, Apple Video separates each video frame into 4x4 pixel blocks, and encodes each block in one of four ways (for simlicity, I'm going to use my own terminology for the names of the modes):
- "0-color": No 4x4 pixel block is encoded, but rather, the previous encoded block in that position from the previous frame is used. This provides for the most compression, and is equivalent to modern video codecs' P-frames, or "predictive frames" (frames that are derived from previous frames, rather than encoded independently). In videos where the background doesn't move, the "0-color" mode (my term for it, Wikipedia calls it "Skip mode") is used so that the same background doesn't have to be re-encoded for each frame, but the previous frame's image data is used. In addition the 0-color image blocks are Run-Length Encoded so that entire swaths of the frame can be copied from the previous frame very efficiently.
- "1-color": The 4x4 pixel block is reproduced by filling it with a single 16-bit color value. This is useful for when the image changes, but the image data is fairly uniform (like a fade-to-black, or a matte backdrop).
- "4-color": The 4x4 pixel block is reproduced by 16 pixels specified out of a palette of four colors, two of which are encoded explicitly, the other two are a linear extrapolation of the base two. This means that the sixteen pixels of the given block are lossy compressed from 16 bits (65,536 colors) down to 2 bits (4 colors), a savings of 8:1. In addition, runs of up to 32 consecutive blocks can be encoded using the same 4-color palette.
- "16-color": This mode offers no lossy savings (other than the global reduction down to 16-bit color) and encodes each of the sixteen pixels in the 4x4 color block individually.
Considering how incredibly math-heavy and complex modern video codecs are, Apple Video is blissfully easy to undersand, and was designed in an era where CPU performance was quite limited.
Understanding how Apple Video works really helped me understand the odd glitches and artifacts I remember seeing at the time. Unfortunately, I wasn't able to find an example of Apple Video-encoded videos online. This is because Apple Video was quickly replaced with the more advanced CinePak and later Sorenson codecs, and because the few example files I could find online, I just had no way to play or transcode.
Back to index
Category: Tech
Tags:
Computing
Entertainment
Monthly themes
Non-religious post
Retrocomputing