Re: MMX speedup for Floyd Steinberg error diffusion
- From: rep_movsd <spamtrap@xxxxxxxxxx>
- Date: Sat, 10 May 2008 00:28:25 -0700 (PDT)
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
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
algorithm doesnt scale to 256 colors.
Ill try out your approach with palette lists and see how it goes...
The color space should probably be gamma-adjusted, and the error terms
should be calculated in a linear space, otherwise the error diffusion
terms won't add up properly.
OTOH, at the time we start to worry about stuff like this, 8-bit GIF
images with palettized colors shouldn't be considered for the job,
right? :-)
It seems to be a tribute to the human eye that even when the image
information is reduced by a factor of 2^16, the artifacts of
palettization and dithering are hardly noticed. Combined with the fact
that many input videos are blocky due to video compression, and the
fact that each frame appears for a fraction of a second, minor errors
in error diffusion ( he he ) are not noticed.
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.
Vivek
.
- Follow-Ups:
- Re: MMX speedup for Floyd Steinberg error diffusion
- From: Terje Mathisen
- Re: MMX speedup for Floyd Steinberg error diffusion
- From: Phil Carmody
- Re: MMX speedup for Floyd Steinberg error diffusion
- References:
- MMX speedup for Floyd Steinberg error diffusion
- From: rep_movsd
- Re: MMX speedup for Floyd Steinberg error diffusion
- From: Maarten Kronenburg
- Re: MMX speedup for Floyd Steinberg error diffusion
- From: Maarten Kronenburg
- Re: MMX speedup for Floyd Steinberg error diffusion
- From: rep_movsd
- Re: MMX speedup for Floyd Steinberg error diffusion
- From: Terje Mathisen
- Re: MMX speedup for Floyd Steinberg error diffusion
- From: rep_movsd
- Re: MMX speedup for Floyd Steinberg error diffusion
- From: Terje Mathisen
- Re: MMX speedup for Floyd Steinberg error diffusion
- From: Phil Carmody
- Re: MMX speedup for Floyd Steinberg error diffusion
- From: Terje Mathisen
- MMX speedup for Floyd Steinberg error diffusion
- Prev by Date: Re: MMX speedup for Floyd Steinberg error diffusion
- Next by Date: Re: MMX speedup for Floyd Steinberg error diffusion
- Previous by thread: Re: MMX speedup for Floyd Steinberg error diffusion
- Next by thread: Re: MMX speedup for Floyd Steinberg error diffusion
- Index(es):
Relevant Pages
|