SSE2 optimization for scaled over_8888_8888 operation with nearest filter
authorSiarhei Siamashka <siarhei.siamashka@nokia.com>
Wed, 8 Sep 2010 06:16:12 +0000 (09:16 +0300)
committerSiarhei Siamashka <siarhei.siamashka@nokia.com>
Tue, 21 Sep 2010 10:33:57 +0000 (13:33 +0300)
commit517a77a992255cb6dae7e74bc6f6b9ac21003ac1
tree2bf4f217b214f0de7744c4f2c9b0674259ecc9c3
parentabc90dad57f03bf9293fc825835c6f0fddc6771b
SSE2 optimization for scaled over_8888_8888 operation with nearest filter

This is the first demo implementation, it should be possible to
generalize it later to cover more operations with less lines of code.

It should be also possible to introduce the use of '__builtin_constant_p'
gcc builtin function for an efficient way of checking if 'unit_x' is known
to be zero at compile time (when processing padding pixels for NONE, or
PAD repeat).

Benchmarks from Intel Core i7 860:

== before (nearest OVER) ==
op=3, src_fmt=20028888, dst_fmt=20028888, speed=142.01 MPix/s

== after (nearest OVER) ==
op=3, src_fmt=20028888, dst_fmt=20028888, speed=314.99 MPix/s

== performance of nonscaled operation as a reference ==
op=3, src_fmt=20028888, dst_fmt=20028888, speed=652.09 MPix/s
pixman/pixman-sse2.c