Re: [AD] Color convertors

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


> In any case, I implemented adding 0x40204 (or 0x040404 for 15bpp). The
> value can be changed later if it's not liked :)

Not very elegant, but that's probably the price to pay for maximum speed in
MMX code.

> And the non-MMX 24->32 crashes on me, with %edx being negative (??)

Confirmed. It also crashes here under very specific circumstances.

The code has got a very little flaw I never detected before (it actually
affects non-MMX asm 24->32, 8->32 and 32->24 converters): because of the
need to deeply "interweave" the two code flows to feed the U-V execution
units of the Pentium I with properly paired instructions, the two parallel
loops are slightly shifted and one of them prefetches a pixel value from the
source surface for the next iteration while the current one is ending. This
is ok until the very last iteration but eventually crashes because the
source surface is in video memory. Thanks for pointing it out.
Good old days of Pentium optimizations ;-)

Bug fix commited.

> I added an MMX 24->32 and 32->24.

Great !

---
Eric Botcazou
ebotcazou@xxxxxxxxxx



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