2000.03.21 10:13 "Re: raster scaling", by Frank D. Cringle
Take a look at the ZoomImage() function in viewfax.c in ftp://ftp.sgi.com/sgi/fax/contrib/viewfax/viewfax-2.4.tar.gz
It only does 2:1 linear (4 pixels to 1 pixel) zooms. Higher factors (of 2) are achieved by calling the function repeatedly. It uses a lookup table to convert 8 input pixels to 2 output pixels. The same principle can be extended to use a bigger table and more highly unrolled inner loops, but at some stage cache misses start slowing things down.
Frank Cringle, firstname.lastname@example.org
voice: (+49 2304) 467101; fax: 943357