[cairo] Adding (GPL) perceptualdiff code to cairo/test

Carl Worth cworth at cworth.org
Tue Nov 21 12:28:21 PST 2006


On Thu, 16 Nov 2006 14:31:43 -0800, "Daniel Amelang" wrote:
> On 11/16/06, Carl Worth <cworth at cworth.org> wrote:
> > On Wed, 15 Nov 2006 15:28:54 -0800, Carl Worth wrote:
> >   *Help wanted*: Perceptual Diff fix for test suite?
> > ...
> >   before it matches). Something that might help reduce a lot of pain
> >   here is the perceptual diff stuff that was recently proposed. Is
> >   anyone looking into that?
>
> Yes, that was me that brought it up originally and I haven't forgotten
> about it. I do have a quick-and-dirty version that calls out using
> system() (pdiff currently only builds to an executable, not a library)
> which has produced some good results. But, I still need to add image
> flattening to match the way cairo-test uses the current image_diff.

I'm getting more and more interested in this now as several
performance fixes I want to land, (the gradient stuff and the 24.8
stuff), are stressing out the current pixel-perfect imagediff code,
and initial experiments with perceptualdiff suggests it does the right
thing.

> Also, the pdiff code is so small that I'd like to just rip out the
> parts we care about and create a single pdiff.c with both the
> algorithm and cairo-specific code to form a drop in replacement for
> the current image_diff, with no external dependencies. If licensing
> were a problem, I think we can easily get the pdiff author to dual
> license it or something. He seems pretty flexible and wants his code
> to be used.

It is tiny, and to start with I'm just throwing the whole
implementation of pdiff as it comes from an svn checkout (minus its
test directory) into cairo/test/pdiff. As for licensing,
perceptualdiff is currently available under the GPL. I don't have any
problem with that, and I think it's the library I would even recommend
if someone writing a utility like that were to ask my opinion.

So, I'm inclined to not even ask the author to change the license, and
instead see if we can use the code as is. This shouldn't affect cairo
licensing at all, since we're talking about the cairo/test code here
which is not used when creating the cairo library itself.

The commit I've got on my hard drive now adds the pdiff code along
with the following change to cairo's COPYING file. Does anybody see
any problem with this? My current assumption is that the only
distribution of cairo/test is through distributing the cairo source
tree itself, so the addition of GPL code to this sub-directory
shouldn't cause any problem.

-Carl

diff --git a/COPYING b/COPYING
index 145e629..cc0e4d9 100644
--- a/COPYING
+++ b/COPYING
@@ -1,6 +1,6 @@
 Cairo is free software.

-Every source file in the implementation of cairo is available to be
+Every source file in the implementation[*] of cairo is available to be
 redistributed and/or modified under the terms of either the GNU Lesser
 General Public License (LGPL) version 2.1 or the Mozilla Public
 License (MPL) version 1.1.  Some files are available under more
@@ -15,3 +15,18 @@ conditions of either license:

 Please see each file in the implementation for Copyright and licensing
 information.
+
+[*] The implementation of cairo is contained entirely within the "src"
+and "pixman" directories of the cairo source distribution. There are
+other components of the cairo source distribution (such as the "test"
+and "perf") that are auxiliary to the library itself. None of the
+source code in these directories contributes to a build of the cairo
+library itself, (libcairo.so or cairo.dll or similar).
+
+These auxiliary components are also free software, but may be under
+different license terms than cairo itself. For example, the test cases
+in the perf and test directories are made available under an MIT
+license to simplify any use of this code for reference purposes in
+using cairo itself. There is also a "perceptualdiff" program included
+in the test directory that originates outside of cairo development and
+is available under the GNU General Public License (GPL).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20061121/7642574a/attachment.pgp


More information about the cairo mailing list