[rec.video] JPEG compression algorithm

dolf@fwi.uva.nl (Dolf Starreveld) (05/07/90)

twhlai@watdragon.waterloo.edu (Tony Lai) writes:

> The May 1990 issue of Byte mentions the proposed Joint Photographic Experts
> Group (JPEG) standard compression algorithm, which Byte says is capable of
> achieving a 10:1 compression ratio on video images.  Does anyone know
> anything about how the algorithm works?
Yes:

The algorithm takes as input a 3-component color space. Usually this is
YUV, but the algorithm does not specify this.
Next a DCT (Discrete Cosine Transform), something similar to a Fourier
transform, is performed on each 8x8 block of the each component.
This transforms the information contained in the image to the color
spatial frequency domain.
In the next step, the coefficients so obtained are quantized. This is
done using the formula:
	Quantized Coeff = (Coeff +/- Q/2) / Q
In this formula, Q is a frequency dependetn quantization value, choosen
with the properties of the human eye in mind. (Things are not so simple as
it sounds, but this will have to do). This reduces the dynamic ranges of
coefficients, but throws away information.
In the third step the 64 quantized coefficients are order accoding to
increasing spatial frequenty. Hopefully the properties of the image and
the quantization have introduced long runs of zeros in this ordering.
This and the reduced dynamic range of the coefficients is used to perform
a modified Huffman coding.

This is the compression algorithm described in simpliefied form.
Decompression performs basically all steps in reverse.
Compression ratios of 1:10 can be achieved without visible loss of quality.
This is very much dependent on the image itself however.
Some images with large planes of equal colors can get much higher
compression ratios with the same imge quality.
As an example:
At Storm Technology we have an image scanned in from a slide. It is a
32-bit quickdraw image. The original is 4.5 Mb, the compressed file is
just 115K. There is almost no visible quality loss.

For more information contact:

	Storm Technology
	220 California Avenue
	Suite 101
	Palo Alto, CA 94306
	Ph: (415) 322-0506
	Fax: (415) 494-2760

--dolf
--
Dolf Starreveld  Phone: +31 20 592 5056/5022 (FAX: 5155), TELEX: 10262 HEF NL
EMAIL:           dolf@fwi.uva.nl (dolf%fwi.uva.nl@hp4nl.nluug.nl)
SNAIL:           Dept. of Math. and Computing Science, University of Amsterdam,
                 Kruislaan 409, NL-1098 SJ  Amsterdam, The Netherlands