Quick summary of changes:
- Move list of cairo source files out of src/Makefile.am and into
src/Sources.mk,
- Generate files src/Config.mk and src/Config.mk.win32 that choose
the right set of source files and headers based on configured
backends and features. This drastically simplifies building
using other build systems. The src/Makefile.win32 file needs
to be updated to reflect these changes.
- Add README files to various directories,
- Add toplevel HACKING file.
The Laplacian pyramid can only work on images larger than 3x3 due to the
size of its convolution kernel. So if the image is too small return an
error (-1) before attempting to construction the pyramid.
Currently the convolution code uses the formula 2*(N-1)-n to reflect the index
n when n is greater than or equal to N.
This is wrong as n=N -> 2*(N-1)-N = N-2 instead of N-1.
Furthermore when the image is small, e.g. at the highest levels of the
pyramid, this causes the code to index before the start of the array and
causes valgrind to issue a warning.
The float version of many math functions were introduced in C99, and were
causing compile failure on systems like OS X. We now define them to their
double variant if __USE_ISOC99 is not defined. We may want to expand it later
to cover non-gcc compilers too, but since this is pdiff only, it's not really
important.
I've given up on trying to preserve the old code formatting
for compatibility. We're not planning on augmenting the algorithm
itself, just integrating it into cairo. So I don't expect to
make changes that we'll be all that interested in pushing
upstream.
The perceptualdiff program was written by Hector Yee with contributions
from Scott Corley and Mick Weiss. It is hosted at http://pdiff.sourceforge.net
The source code added here was obtained by:
svn co https://svn.sourceforge.net/svnroot/pdiff/trunk pdiff
which gave revision 22 of the source code.
The perceptualdiff program is available under the terms of the GNU GPL,
so I've added a note to COPYING about this program, (and the fact that
it is auxiliary only, and does not affect the license of the implementation
of cairo itself).