[Liboil] 2D convolution with Orc

jcupitt at gmail.com jcupitt at gmail.com
Mon Oct 18 08:47:33 PDT 2010


I got it working for a 3x3 convolution. I had to do it in two passes
to get the scaling and rounding working, I think I was running out of
temporaries.

My timings for a 10,000 x 10,000 8-bit RGB image on a 2 x Opteron 254
machine at 2.7 Ghz were:

$ time vips im_conv wtc.v wtc2.v blur.con
real	0m11.990s
user	0m7.790s
sys	0m0.620s

$ time vips --vips-orc im_conv wtc.v wtc2.v blur.con
real	0m7.209s
user	0m4.210s
sys	0m0.620s

So the Orc version is a little less than twice as fast as plain C. I
might try timing on a core2duo as well, I think it has a better sse
unit and I'd see a larger speedup.

I think array tiling could extend it to any size mask with a similar
speedup. But I might hold off on trying that until David's additions
for more constants are added to Orc.

John


More information about the Liboil mailing list