Ch. 2 · Principles of Compression

한국어日本語
6 min

PSNR vs SSIM: Measuring Video Quality With Numbers

PSNR is easy to compute but matches human vision poorly. Learn the PSNR formula, typical dB ranges, and how SSIM tries to close the gap.

To tune an encoder or compare two codecs, you need to measure 'quality' as a number. Let's start with the oldest and most common metric.

PSNR — Peak Signal-to-Noise Ratio

The PSNR formula
MSE = (1/N) Σ (original[i] - reconstructed[i])²

PSNR = 10 · log10( MAX² / MSE )   [unit: dB]

  MAX : the maximum pixel value (255 for 8-bit)
  The smaller the MSE, the larger the PSNR (better quality)
PSNR (dB)Perceived quality
45 or higherNearly indistinguishable from the original
38 ~ 42The typical range for high-quality streaming
30 ~ 35Visible degradation; the minimum for broadcast
Below 30Clear artifacts such as blocking

These aren't absolute thresholds. Depending on the content, the same PSNR can look very different.

PSNR's fatal weakness

PSNR looks only at per-pixel arithmetic error. It knows nothing about the 'structure' the human eye cares about. For example, shifting the whole picture slightly brighter makes PSNR drop sharply, yet the eye barely notices. Conversely, blur costs little PSNR but is plainly irritating to the eye. The industry generally agrees that PSNR is useful as a regression test during encoder development, but not enough to judge final perceived quality.

SSIM — Structural Similarity

SSIM, proposed in 2004 by Zhou Wang and colleagues, compares not pixel values but three similarities — luminance, contrast, and structure — over local windows. It starts from the observation that people perceive images by their 'structure.'

Luminance Same mean brightness? Contrast Same brightness spread? Structure Same pattern correlation?
The three components SSIM compares

SSIM values lie between -1 and 1 (in practice usually 0 to 1), where 1 means identical. In broadcast and streaming, people more often use SSIM (dB), converted as -10·log10(1-SSIM), or MS-SSIM (computed at several resolution scales and averaged).

In the field

SSIM correlates better with human perception than PSNR, but it's still not perfect. It tends to be insensitive to compression-specific artifacts in particular (blocking, ringing, mosquito noise). That's why VMAF, created by Netflix, has become today's industry standard — we'll cover it in the next lesson.

PSNRPeak signal-to-noise ratio

A quality metric based on pixel error. Easy to compute but weakly correlated with perception.

MSEMean squared error

Mean Squared Error. The basis of the PSNR calculation.

SSIMStructural similarity

A metric that compares luminance, contrast, and structure. Correlates better with perception than PSNR.

MS-SSIMMulti-scale SSIM

A metric that combines SSIM computed at several resolutions.

Check yourself

What is PSNR's biggest weakness?