Compressing pictures (LONG)

Michael Meissner meissner at osf.org
Sat Sep 1 00:53:22 AEST 1990


In article <1990Aug31.034936.18954 at mlb.semi.harris.com>
del at thrush.mlb.semi.harris.com (Don Lewis) writes:

| In article <6873 at milton.u.washington.edu> wiml at milton.u.washington.edu (William Lewis) writes:
| >   * Taking differences is probably much, much better than XORing, 
| >since the point is to take advantage of the vertical continuity of
| >the image. The problem is that it doubles the number of values the
| >compressor will have to deal with -- from max->min to min->max, which
| >is 2*(max-min) values. The obvious solution is to wrap around, ie, 
| >use modulo(max-min) arithmetic, except that this overlays some of the
| >least frequently used values (the extremes) on the most frequently used
| >ones (small values), making the huffman/arithmatic coder less
| >efficient.
| 
| I don't think this is a problem.  Think of the differences as signed
| twos-complement values.  There should be a nice symmetric peak in
| the histogram around zero.  The relatively few difference values
| that get aliased in with the common difference values will just
| get just as efficiently encoded as the common values.  On the other
| hand, since we are encoding the data anyway, we might look at encoding
| n+1 bit differences anyway if that happens to be more efficient (due
| to the greater skew in distribution).

If you are dealing with color, I think you might get better results by
separating out the RGB (red, green, blue) lines into separate copies.
Thus instead of 24 bits of pixel data, you would have a 8 bit red
pixel plane, a 8 bit green pixel plane, and a 8 bit blue pixel plane.
Thus you would probably get smaller differences by subtracting two
adjacent red pixels, then when the pixel is one 24 bit integer
particularly when you change colors.

Of course, if this is already done, just ignore this message.  I've
not dealt with any graphics formats at the bit level.....
--
Michael Meissner	email: meissner at osf.org		phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142

Do apple growers tell their kids money doesn't grow on bushes?



More information about the Alt.sources.d mailing list