Scaling optimizations

Michael Thaler michael.thaler at ph.tum.de
Wed Jun 29 20:18:33 CEST 2005


Hello,

I worked a little more on optimizing the scaling algorithm. Right now the 
scaling algorithm is copying each line 5 times to a temporary arraw for the 
Mitchell filter. I tried to optimize this by writing an algorithm that checks 
if we already read the line in the last step. I got it working, but the 
result was a little bit surprising: it was actually more or less as fast as 
before. I think the reason is, that copying data with readBytes to a 
temporary array is actually much faster then I thought. Which is a good 
thing:-) I could probably work on my caching algorithm, but I guess it is 
just not worth the trouble. I doubt that I can archive a huge speedup with 
this.

Before Optimizations:

Mitchell Filter:
1600 x 1200, 150%
krita: time needed for scaling: 3356ms
krita: time needed for scaling: 3446ms
krita: time needed for scaling: 3458ms

1600 x 1200, 50%
krita: time needed for scaling: 1238ms

Box Filter:
1600 x 1200, 150%
krita: time needed for scaling: 1654ms

1600 x 1200, 50%
krita: time needed for scaling: 687ms

After Optimizations:

Mitchell Filter:
1600 x 1200, 150%
krita: time needed for scaling: 3589ms
krita: time needed for scaling: 3400ms
krita: time needed for scaling: 3621ms
krita: time needed for scaling: 3652ms
1600 x 1200, 50%
krita: time needed for scaling: 1169ms

Box Filter:
1600 x 1200, 150%
krita: time needed for scaling: 1637ms
1600 x 1200, 50%
krita: time needed for scaling: 659ms

Greetings,
Michael


More information about the kimageshop mailing list