dsh
Still Fresh
Hello I started writing my own blitter as I suspect that SDL does poor at alpha blended blitting.
So i wrote a "basic", simple, not optimized, reference code to see how it goes.
On my laptop I get (quite nice result for an unoptimized version):
~250fps with SDL
~210fps with my blitter (even though it memcpy's the final image to sdl's screen surface every frame)
On dingoo (dingux) on the other hand I get*:
~90-100fps with SDL
~20fps with my blitter
*no SDL Video - straight to mmaped fb transfer, and this is not the problem since the memcpy-to-sdl-screen version runs with similar performance
This difference is quite mind-numbing since from what I've heard, SDL is highly otimized with hand crafted assembly as far as x86 is concerned, but lacks such optimizations for architectures often used in embedded solutions, i.e. arm, mips.
I use only integer math. Is there something I should know about mips. Any operations that are particularly slow? Any types I should avoid? Any compiler switches I should use?
I tried to compile with various levels of optimization and compiler flags, to no avail.
The blitting function: http://pastebin.com/47kZ5yvb
The macros: http://pastebin.com/6vWWiwq6
Could somebody look at this and tell me what's wrong with that? 50% in comparison to SDL would be pretty slow but acceptable given no optimizations, but 20% of SDL (taking into accound that it's ~85% on the PC)? Come on.
So i wrote a "basic", simple, not optimized, reference code to see how it goes.
On my laptop I get (quite nice result for an unoptimized version):
~250fps with SDL
~210fps with my blitter (even though it memcpy's the final image to sdl's screen surface every frame)
On dingoo (dingux) on the other hand I get*:
~90-100fps with SDL
~20fps with my blitter
*no SDL Video - straight to mmaped fb transfer, and this is not the problem since the memcpy-to-sdl-screen version runs with similar performance
This difference is quite mind-numbing since from what I've heard, SDL is highly otimized with hand crafted assembly as far as x86 is concerned, but lacks such optimizations for architectures often used in embedded solutions, i.e. arm, mips.
I use only integer math. Is there something I should know about mips. Any operations that are particularly slow? Any types I should avoid? Any compiler switches I should use?
I tried to compile with various levels of optimization and compiler flags, to no avail.
The blitting function: http://pastebin.com/47kZ5yvb
The macros: http://pastebin.com/6vWWiwq6
Could somebody look at this and tell me what's wrong with that? 50% in comparison to SDL would be pretty slow but acceptable given no optimizations, but 20% of SDL (taking into accound that it's ~85% on the PC)? Come on.