Re: MMX speedup for Floyd Steinberg error diffusion
- From: "Wolfgang Kern" <spamtrap@xxxxxxxxxx>
- Date: Thu, 15 May 2008 14:04:40 +0200
Terje Mathisen wrote:
[...about color-depth reduction]
The next problem is how to make this usefully fast:
Instead of iterating multiple times over the entire lookup table, we can
(as another poster suggested?) start by inserting each pal color into
the proper lookup table slot (noting any collisions!), then for each of
them fill the surrounding slots at distance 1, then 2, then 3, stopping
as soon as you hit a previously filled entry (and change that entry to a
list). This breaks if multiple pal colors map to the same initial lookup
table slot, since you won't do any filling of the combined colors.
reading this thread now for a while ... I think my current solution
for converting RGB-values into 8-bit colors may add to the quest.
One of my 8-bit palettes (the rainbow) is ordered like:
index 00..3Fh gray (black..white)
40..7Fh RED...GREEN
80..BFh GREEN...BLUE
C0..FFh BLUE..RED
If we see the color part as biased by 40h, we get
76543210
bbggrr
So conversion of RGB into index is done by bit-combination
[just by two times 'shift/and/or' and one time 'and/or/add 40h]
the only obstacle is to check for equality to tell it's a GRAY,
best done before the shift.
Sure, this solution don't care about saturation and brightness,
but which reduced color-set would cover this anyway, except it
could use another palette like seen for fading/day/night/gamma...
__
wolfgang
.
- References:
- Re: MMX speedup for Floyd Steinberg error diffusion
- From: Novosad, Stephan R.
- 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
- Prev by Date: Re: 640x512x16bpp with VESA ?
- Next by Date: Re: 640x512x16bpp with VESA ?
- Previous by thread: Re: MMX speedup for Floyd Steinberg error diffusion
- Next by thread: Re: MMX speedup for Floyd Steinberg error diffusion
- Index(es):