Re: [AD] SSE2 vs malloc()

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


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].

And also, you can't gaurantee the alignment of video bitmaps, can you?




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