Re: [AD] Colorconv blitters

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


On Tuesday 18 October 2005 03:01, Peter Hull wrote:
> Can someone have a quick look at the 8 bit to 8 bit blitter in 
> ccolconv.c? It shouldn't need to do byte-swapping, depending on the 
> value of ALLEGRO_LITTLE_ENDIAN, should it?

It doesn't have to do any weird things, as far as I can see. So no, I don't 
think so. It should just be able to do
*(unsigned int *)dest  = *(unsigned int *)src;
src += 4;
dest += 4;
Those unsigned ints should really be uint32's too, but I guess it doesn't 
really matter in this case.

But this aside, there's nothing special going on here so why don't we use 
memcpy(dest, source, width) instead of the complicated inner loop of 
for(y...)? The standard library would be able to do what we're doing just 
as well as we could and may actually do better on some hardware.

Evert




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