OpenImageIO/oiio — pull request #808 by lgritz (2014-02-22 07:08:15+00:00)
Title: resize performance improvements

1. Refactor IBA::resize to hoist redundant filter evaluations out of the inner loops, when using separable filters. Each scanline will use the same set of y filter tap weights all the way across the image. For each pixel within that scanline, we can further use the same set of x pixel tap weights for each of the y pixel taps.

2. Speed up Lanczos filter evaluation by replacing the sin calls with a fast polynomial approximation (maximum absolute error ~0.001, which I think is fine for this usage).

The combination of these two optimization reduces the time it takes for 'oiiotool --resize' of an 8k image down to 512 by 25-50% (depending on threads, platform, etc.). This is a substantial improvement.

Some testsuite reference images needed to be updated because LSB differences due to the slightly differing filter weights with the sin approximation and the slightly different order of computations of the weighted sum of sample contributions.