Need help with testing vector composition branch

Dmitry Kazakov dimula73 at gmail.com
Thu Oct 25 18:42:46 UTC 2012


Hi!

I've just finished the porting of two composite ops (OVER and ALPHA_DARKEN)
to the Vc library. So I need your help with evaluating, reviewing and
testing it ;)

Well, there were many problems with implementing it, but now it seems like
most of them are gone.

In the attachment you can find a table showing the speed gain achieved with
vector instructions on a set of test cases operating with 1024 tiles
generated according to a predefined set of rules (different alignment,
content of alpha channel). You can run this set of benchmarks on your own
machine by executing "krita/benchmarks/KisCompositionBenchmark" benchmark.
The results in attachment are produced by Core i7-2600 CPU with AVX
instructions available.
*
A very brief summary:*

1) In the most general case (random alpha, selection mask is present) the
ALPHA_DARKEN and OVER composite ops show 1.46 and 2.45 better times
correspondingly.
2) The unaligned source and destination can degrade this boost down to 1.27
and 1.66 times.
3) In other quite common cases (one of the alpha channels is 255 or 0) the
boost varies from 1.25 to 4.50 times.

4) *Some* of the tests of KisStrokeBenchmark became 10-15% faster, others
didn't change.

5) Two benchmarks of KisPainterBenchmark (benchmarkFixedBitBlt and
benchmarkFixedBitBltSelection) became about 15% faster. One benchmark
(benchmarkDrawThickLine) became 30% slower. This happened because very
small chunks of data (less than 16 pixels on machine) are now processed
with FPU, without use of neither vector nor integer arithmetic. Btw,
integer arithmetic cannot be used alongside with the vector calculations,
because it generates artifacts due to various rounding effects.


So, it would be really cool if someone could test these changes and tell
his opinion about them.

*What should be tested:
*
1) Whether there are no regressions when painting in both "Build-Up" and
"Incremental" modes using "Normal" composition.
2) Whether you feel any speed gain while painting on single-layer image ;)
According to my previous research, making the composition twice faster
should have done the painting about 10-15% faster.
3) The painting on the image with multiple layers should become much more
faster, because composition eats bigger portion of time there.
4) Check whether painting with really small brushes (<10px) became slower
or not.
5) It would be cool if you'd send me the output of
"krita/benchmarks/KisCompositionBenchmark" benchmark and the model of your
cpu. You can get the model the cpu by checking output of 'cat
/proc/cpuinfo'.

*How to test:*

1) Update your repository:
git fetch

2) Checkout the branch:
git checkout origin/vector_compositioning_kazakov

3) Build Krita and have fun!

*How to run a benchmark:*

Go to Krita benchmarks folder and run it:

cd ./krita/benchmarks/
./KisCompositionBenchmark

-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20121025/52b5ba22/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vector_compositioning_benchmark_results.pdf
Type: application/pdf
Size: 28375 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20121025/52b5ba22/attachment-0001.pdf>


More information about the kimageshop mailing list