home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / compress / 4799 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  2.1 KB

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