home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!agate!mickey!bsmith
- From: bsmith@mickey.NoSubdomain.NoDomain (Brian Smith)
- Newsgroups: comp.compression
- Subject: Re: JPEG compression
- Date: 25 Jan 1993 17:47:52 GMT
- Organization: University of California, Berkeley
- Lines: 41
- Sender: bsmith@mickey (Brian Smith)
- Distribution: world
- Message-ID: <1k1948$6v5@agate.berkeley.edu>
- References: <peterb.727926960@wambenger>
- NNTP-Posting-Host: mickey.cs.berkeley.edu
- Keywords: JPEG, compression
-
- In article <peterb.727926960@wambenger>, peterb@cs.uwa.oz.au
- (Peter Bousfield) writes:
- |> Hello fellow compressors,
- |>
- |> It is my understanding that JPEG compression
- |> works in basically two parts.
- |> Step 1: DCT (Discrete Cosine Transform)
- |> and
- |> Step 2: Huffman Coding (for those of us
- |> who don't wish to
- |> pay for a license.)
- |>
- |> I was wanting to know which of these
- |> two steps contributes more to the compression.
- |> That is, how good is the compression without
- |> Huffman coding (eg is it 50% worse or only 10%
- |> worse.)
-
- The DCT doesn't really do any compression, it just concentrates the
- energy of the image into a few coefficients, so that the coefficients
- near zero can be set to zero.
-
- I ran some experiments a while ago to get the answer to precisely this
- question. Twenty five 640x480 images were used in the experiment, with
- the default quantization tables suggested in Annex K of the JPEG standard.
- After quantization, an average of 3-4 of the coefficients in a typical
- 8x8 block were non-zero (the mean was 3.52). One was almost always the
- DC component. The rest were zero.
-
- Now, after quantization, JPEG codes the DC term and run-length encodes
- the AC terms as (run,value) pairs. In other words, every non-zero term
- gives rise to two integers (this is a bit simplified, but good enough).
- This leads to 5-7 ints that describe an 8x8 block, for an overall
- compression of about 10:1. The values are clustered pretty well around
- zero, so Huffman coding gives an additional 2.5:1
-
- Hope this helps.
- -------
- Brian C. Smith arpa: bsmith@cs.Berkeley.EDU
- University of California, Berkeley uucp: uunet!ucbvax!postgres!bsmith
- Computer Sciences Department phone: (510)642-9585
-