Re: MMX speedup for Floyd Steinberg error diffusion



rep_movsd wrote:
Phil, you're absolutely right, and that's why "doing it right" is even
harder than you're showing here:

There is this color quantizer/ditherer program called scolorq which
uses some highly advanced techniques with floating point precision. I

I.e. convert each pixel to fp, then to a linear color space, do all error diffusion in this format, then use the final palette colors?

tried that out and it took an astonishing amount of time for a single
frame ( I let it run for 3 minutes before giving up in disgust ).
Turns out it has 5 deep nested loops. Some site online shows pretty
impressive results for reduction to 16 color images. Perhaps the

You might be able to do 16-color images by making the color diffusion are significantly larger: Keep luminance info as close as possible, but allow color to be spread across a larger area?

BTW This whole thing could be avoided if browser vendors implemented
GIF decoding exactly according to the standard. Then it would be
possible to have animations where a number of frames are rendered
instantaneously (with 0 frame duration) and we could have true true-
color GIFs.

Huh?

I guess you intend that each frame should be visible a fraction of a second, otherwise it cannot take part in the visual center averaging, right?

The problem with this idea is that color displays are digital devices, with a granularity of 60/70/80 Hz, or whatever your refresh rate happens to be. Writing two images between frame updates wil simply lose the first one. :-(

Terje

--
- <Terje.Mathisen@xxxxxxxxxxxxx>
"almost all programming can be viewed as an exercise in caching"

.



Relevant Pages