Re: [AD] Optimized blitting between color depths

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


On Sun, 2004-10-31 at 16:28 +0100, Sven Sandberg wrote:
> Hello,
> The attached patch does two optimizations:
>   - Various small tricks to improve the speed of makecol15_dither() and 
> makecol16_dither().
>   - The code in blit.c to convert between color depths with 
> COLCONV_KEEP_TRANS was unnecessarily involved. I re-factored it to 
> improve both readability and speed (and reduce code size).
> 
> On my AMD Athlon it gives roughly the following improvements depending 
> on the color conversion and dithering flags set by 
> set_color_conversion() (the time per call after the patch, in percent of 
> the time per call before the patch, so small is good):
> 
>   45% for COLCONV_KEEP_TRANS
>   68% for COLCONV_DITHERED | COLCONV_KEEP_TRANS
>   94% for COLCONV_DITHERED
> 
> I put my test program, together with the test results on my computer, at 
> http://user.it.uu.se/~svens/convert-blit.zip
> 

I get this results (running your test program 3 times), Intel P4:

54,54,54 dithered, keep trans  
63,62,63 dithered, no keep trans
55,55,55 non-dithered, keep trans
107,107,107 non-dithered, no keep trans

The first 3 lines look good - but what does the last line mean?

-- 
Elias Pschernig





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