Re: [AD] small bug in 15 and 16 bit asm color converters

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> Thinking about this.. now color 0/0/0 gets 7/3/7. This needs a better
> soltuion - but my asm skills aren't good enough for that :| And it will
> probably get slower, since it will need a lookup table (like the C
> version). Or maybe there's some clever trick to get this "almost" right?

The non-MMX asm code uses a lookup table too.

> Like, use some clever shift-rotate instructions which will leave the 0
> bits as 0 for small color components, and only fill the 1 bits in for
> high ones?

We could probably devise something along this way.  Not sure whether this is 
worth the pain though.

-- 
Eric Botcazou




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/