Re: [AD] Color convertors

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


Eric Botcazou wrote:
Of course. The windowed driver already makes use of a trick to ensure that
the window (position) is always aligned on a 4-byte boundary, that is
2-pixel alignment on 15/16-bit desktops and 4-pixel alignment on 24-bit
desktop.

Going with 8 byte alignment will benefit the MMX code, since memory read/writes won't need to be split in 2 by the memory controler. I don't know how this affects non-686s, but on the 686 the cost is twice that of reading on aligned boundaries (since the memory controlers does 2 reads then combines the result). Athlons seem to be immune to unligned memory accesses though.

The non-MMX code will sufer a slight penalty since I'll be needing an
extra register.

Playing with the legacy 80386 registers is a very fun game ;-)

Actually, it turns out I didn't need one!
In the 24->32 non-mmx code, the penalty is 4.5 cycles/line on Pentiums, so I don't think it'll affect speed much.

--
- Robert J Ohannessian
"Microsoft code is probably O(n^20)" (my CS prof)
http://pages.infinit.net/voidstar/



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