Faster 32bpp To 16bpp Blit


HenrikE

Still Fresh
Joined
Jun 18, 2007
Messages
42
(mods: not sure if this belongs here or in General Talk, feel free to move it. Just figured it would be of interest to a lot of projects that do 32-bit surfaces etc)

My first optimization in ARM asm on GP2X :ph34r:

http://www.scoopex1988.org/article-gp2x-ar...6-bpp-blit.html

Derived from Senor Quack's (ie. A_SN's) version, it uses 8 instructions per pixel-pair instead of 12, and one big burst read from memory per iteration instead of two.

Version 2 will have some small optimizations, this version is for comparison and readability, and direct replacement. I will also make a full speed comparison, but I figure an execution time a little over 67% compared to the one on the wiki.

I'd be happy to collab with lib and engine people!
 
Last edited by a moderator:
f-cycles said:
Hi Henrik,

The link is broken... :( I don't know if you can still post-it today... here, Thanks!

Regards,


Here is the link:
http://www.scoopex1988.org/article-gp2x-arm-linux-faster-32-bpp-to-16-bpp-blit.html


It is an optimization of my crappy asm:
http://wiki.gp2x.org/wiki/Fast_32-bit_to_16-bit_framebuffer_blit

Also I believe his version trashes the alpha channel or relies on it to be a certain value (can't remember) but my version saves the alpha channel.
 
Last edited by a moderator:
Thanks Senor Quack!

I didn't get in touch with the asm code so far.. beside very few asm line to work with the 940T.

I wonder if there has been comparaison between this method and the hardware blitter?
Mmhhh.. Anyway, having the cpu capable of doing things faster and better than a previous version is always interesting! :)

Regards,
 
f-cycles said:
Thanks Senor Quack!

I didn't get in touch with the asm code so far.. beside very few asm line to work with the 940T.

I wonder if there has been comparaison between this method and the hardware blitter?
Mmhhh.. Anyway, having the cpu capable of doing things faster and better than a previous version is always interesting! :)

Regards,

The hardware blitter can't convert from 32bpp to 16bpp.
 
Last edited by a moderator:
Exophase said:
f-cycles said:
Thanks Senor Quack!

I didn't get in touch with the asm code so far.. beside very few asm line to work with the 940T.

I wonder if there has been comparaison between this method and the hardware blitter?
Mmhhh.. Anyway, having the cpu capable of doing things faster and better than a previous version is always interesting! :)

Regards,

The hardware blitter can't convert from 32bpp to 16bpp.


Hum.. I should have read the source code before replying... :blink:
 
Last edited by a moderator:
Back
Top