Re: [AD] SSE2 vs malloc() |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Chris wrote:
On Friday 14 October 2005 10:13 am, aj wrote:Robert Ohannessian wrote:What do you do about odd-sized bitmaps?alignment has little to do with the bitmaps size.But if you have, say, a 299x645 memory bitmap, then the line[] pointers won't be 16-byte aligned. You could get around this by making the bitmap pitch ((w*bytes_per_pixel + 15) & ~15), but I'm sure some programs will break if there's space between the end of line[x] and the beginning of line[x+1].
As has been mentioned before, anyone that uses the ->dat[] to manipulate bits is doing it wrong. The docs say to use the line[] not the dat[]. This has been the case for a while, anyone that has used the ->dat[] would probably require an older allegro anyway, due to the other changes that have occurred laterly. Im still propossing this _aligned_malloc() as a #define-able thing, that only gets set specifically by the user, default will use regular malloc()
And also, you can't gaurantee the alignment of video bitmaps, can you?
You would not be doing SSE2 instructions on video bitmaps, it makes no sense to do so.
Do video bitmaps use malloc() ?
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |