prohdreviews

00VIDEO CODECS, EXPLAINED

Most of the picture
is a prediction.

A video editing desk at night with a monitor showing a green river valley above a strip of picture thumbnails
AI-generated image, not a photograph of a real person or place.

Video is shrunk by not sending what the decoder can guess.

Neighbouring pixels look alike, and one frame looks a lot like the next. Codecs such as MPEG-2, H.264 and HEVC exploit both, and also throw away fine detail the eye barely notices. The result is a stream a fraction of the size of the raw picture.

CODECcoder plus decoderUpdated

Meet the frames

01Principles

  • Predict from the last frame
  • Send only the difference
  • Drop what eyes miss
  • Compression you rarely notice

02THE SHORT ANSWER

Two kinds of
waste removed.

Codecs remove redundancy in the signal
and detail the human eye will not miss.

IN TIME

One frame predicts the next

Motion-compensated prediction builds each frame from a previous reference frame, then sends only the prediction error.

Meet the frames

FAST MOTION

Where squeezing shows

Each frame's motion is predicted, and the leftover error is coded. The BBC paper notes that at the lower bit rates the coding impairments become increasingly objectionable.

See the numbers

IN SPACE

Blocks and fine detail

Small 8 by 8 pixel blocks are transformed and their fine-detail values coarsened, because the eye responds less to fine spatial detail.

How blocks work

03MEET THE FRAMES

Not every frame
is equal.

MPEG-2 defines three picture types, and later codecs build on the idea. Pick one to see how it is coded. The bar shows how much compression it offers.

Based on the Library of Congress format description for MPEG-2 video and a 1995 BBC R&D paper.

Frame check

Choose a picture type
I-frame (intra)Stands alone

Coded without reference to other pictures. I-frames appear periodically as access points where decoding can begin.

P-frame (predictive)Looks back

Uses the previous I- or P-picture for motion compensation, and may itself be a reference for further prediction.

B-frame (bidirectional)Looks both ways

Can use the previous and next I- or P-pictures, and offers the highest degree of compression. The coder reorders pictures so the future reference arrives first.

Source: Library of Congress, MPEG-2 Video Encoding (H.262) format description.

04TWO NUMBERS WORTH KNOWING

Big raw pictures,
better codecs.

One figure on the raw signal,
one on how far codecs have moved.

124 Mbit/s

Uncompressed standard-definition TV, 4:2:0

A 720 by 576 picture at 25 frames a second needs about 124 Mbit/s raw. The BBC paper says around 6 Mbit/s was thought a good compromise for terrestrial broadcasts.

RAW VIDEO · BBC R&D 1995

22–43%

Objective efficiency gain of HEVC over H.264

Across four sets of coding choices, HEVC improved on H.264 by 22% to 43% on an objective measure. Subjective tests suggested bit rate savings of 55% to 87%.

HEVC VS H.264 · LIBRARY OF CONGRESS

The same Library of Congress description notes up to 76% improvement in a separate objective test at 4K (3,840 by 2,160 pixels).

05FOUR THINGS TO KNOW

Reading what
you see.

Once you know how a codec works, some familiar picture faults make sense.

  1. Blocks at low bit rates

    Squeeze the stream too hard and coding impairments become increasingly visible.

  2. Smoother edges in newer codecs

    H.264 and HEVC include a deblocking filter that smooths block edges.

  3. Starting mid-stream

    Decoding can begin only at access points, which I-frames provide periodically.

  4. Lossy by design

    Quantisation is not reversible, so a compressed picture is a close approximation, not a copy.

Rows of rack-mounted broadcast equipment with small green status lights in a dim server room
AI-generated image, not a photograph of a real person or place.

06INSIDE A BLOCK

Transform,
then coarsen.

A cyclist blurred in motion on a city street at dusk, the kind of fast movement a codec has to predict
AI-generated image, not a photograph of a real person or place.

In MPEG-2, each 8 by 8 block goes through a discrete cosine transform, which tends to concentrate the picture's energy into a few low-frequency values. Those values are then quantised, with high-frequency detail coarsened most, and the result is scanned in a zigzag and coded compactly.

Later codecs made the blocks flexible. H.264 used a fixed 16 by 16 macroblock; HEVC uses a coding tree unit of up to 64 by 64 that can split down to 4 by 4, which helps especially at high resolutions.

07Questions

Questions people ask

What does codec mean?

A coder and decoder pair. The BBC R&D paper describes a bit rate reduction system that removes redundant information at the coder and re-inserts it at the decoder.

Is video compression lossless?

Usually not. The H.264 specification, quoted by the Library of Congress, says the algorithm is not lossless, and quantisation discards less important visual information.

When did MPEG start?

The Moving Picture Experts Group started in 1988 within ISO/IEC. MPEG-1 was published in 1993, and MPEG-2 had its first approvals in 1994.

What did MPEG-2 aim at?

Broadcast formats: standard-definition TV at about 3 to 15 Mbit/s and high-definition TV at 15 to 30 Mbit/s, according to the 1995 BBC paper. It was widely adopted for DVD.

When was HEVC published?

HEVC, also called H.265, was first published in 2013 by ISO/IEC and ITU-T, as an evolution of earlier standards including H.264.

08Sources

ABOUT THIS NAME

Interested in leasing prohdreviews.com?

prohdreviews.com is part of the DoodleSale portfolio. It isn't in an auction right now, but you can ask about leasing it.

Ask about this name