Commit graph

55 commits

Author SHA1 Message Date
Sylvestre Ledru
da9ef97372 Remove some useless declarations found by scan-build, the LLVM/clang static analyzer
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-05-06 10:14:53 -07:00
Bryce W. Harrington
5577223489 pdiff: Drop unused variable
Fixes:
perceptualdiff.c:35:24: warning: unused variable ‘dim’
[-Wunused-variable]

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-07-04 09:27:56 +01:00
Bryce W. Harrington
319b893582 pdiff: Quell warning about signed/unsigned comparisons
perceptualdiff.c:55:19: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
perceptualdiff.c:60:16: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
2013-07-04 09:27:55 +01:00
Andrea Canciani
b6d593dc71 build: Clean up environment variables and flags for the win32 build
Avoid ovverriding LINK, as it has a special meaning for the MSVC build
tools.
2011-06-20 10:24:21 +02:00
Andrea Canciani
5534c30524 build: Use common rules for making pdiff
Instead of providing special rules for compiling C files in pdiff, use
the common ones and build a different pdiff for debug and release.
2011-06-20 10:24:21 +02:00
Andrea Canciani
b8a7f8621a Update FSF address
I updated the Free Software Foundation address using the following script.

for i in $(git grep Temple | cut -d: -f1 )
do
  sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i"
done

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
2010-04-27 11:13:38 +02:00
Jeff Muizelaar
2d6336624c [test-win32] Fix static linking of the test suite.
Previously, the test suite needed to be dynamically linked to work.
2009-04-01 11:32:58 -04:00
Behdad Esfahbod
0ac7a242f8 [build] Add Makefile.win32.common 2008-09-22 20:11:38 -04:00
Behdad Esfahbod
de5b8bce37 Makefile.am cleanup
Use a common build/Makefile.am.common file.
2008-09-11 15:49:09 -04:00
Behdad Esfahbod
042ef899a2 [test/pdiff] Fix include syntax 2008-09-10 13:57:17 -04:00
Chris Wilson
84a7a9955c [test] Typo in Makefile.am
s/AC_CPPFLAGS/AM_CPPFLAGS/g
2008-09-10 18:23:31 +01:00
Behdad Esfahbod
43a42d0a19 [test/pdiff/Makefile.am] Another automake warning fix 2008-09-10 12:41:32 -04:00
Behdad Esfahbod
5926257770 Revamp the build system.
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.
2008-09-02 20:24:08 -04:00
Chris Wilson
08ea9d1f2a [pdiff] Get the surface data pointer once.
Don't call cairo_image_surface_get_data() for every single component of
the two surfaces to compare.
2008-08-26 23:01:30 +01:00
Chris Wilson
db7e3cb854 [Makefile.am] Delete intermediates
Clean up after calling 'gcc -save-temps'.
2008-08-17 11:39:56 +01:00
Azar@.(none)
95db215cc1 Some fixes and improvements to the Win32 build 2008-02-06 21:45:24 -05:00
Chris Wilson
ed3fccec01 [pdiff] Avoid the memleak for small surfaces.
Allocate the arrays after the guard against small surfaces to avoid
leaking them.
2007-12-20 14:13:12 +00:00
Chris Wilson
bd3dd72262 [pdiff] Reorganise the inner loops of the convolution.
Reorder the indices and introduce a couple of temporary accumulators to
improve cache access.
2007-10-16 16:03:03 +01:00
Chris Wilson
fa9201b9c9 [pdiff] Check for too small images.
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.
2007-10-16 15:57:44 +01:00
Vladimir Vukicevic
19fa097f51 [win32] Update win32 Makefiles
Happy building with msys, one location for CFLAGS/etc changes (toplevel),
new pdiff makefile.
2007-08-28 10:54:18 -07:00
Behdad Esfahbod
06382092e5 [pdiff] Ship gpl.txt 2007-04-11 19:43:01 -04:00
Behdad Esfahbod
17f5706d17 [pdiff] Make stdint.h inclusion portable (#10441)
by copying magic bits from cairo-wideint-private.h.
2007-04-03 16:04:04 -04:00
Chris Wilson
14cab8b020 Correct an off-by-one in the reflection of the convolution index.
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.
2007-03-12 14:48:11 -07:00
Mathias Hasselmann
ffa86b17ab [test/pdiff] Fix build problem with certain flavors of make 2007-03-04 16:39:00 -05:00
Carl Worth
02f2ece88d Fix leak in pdiff lpyramid
This was a leak in the test suite only, (and then only when tests failed).
2007-03-02 09:32:14 -08:00
Behdad Esfahbod
0bea2ce7f7 [pdiff] Define _GNU_SOURCE to get correct symbols out of <math.h>
math.h does not define __USE_ISOC99 otherwise.
2006-12-17 14:32:08 -05:00
Behdad Esfahbod
2ca6a767ee [pdiff] Don't use float math functions if not using gcc with C99
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.
2006-12-17 14:24:57 -05:00
Behdad Esfahbod
57589a9049 [pdiff] Use CAIRO_CFLAGS, to make sure warnings are enabled 2006-12-16 18:18:47 -05:00
Behdad Esfahbod
8f2ad0affd [pdiff] Fix compiler warnings, that were causing crashes 2006-12-16 18:16:46 -05:00
Carl Worth
305cbd8e71 pdiff: Remove casts since we're out of the land of X++ where void* is stupidly broken 2006-12-14 07:58:01 -08:00
Carl Worth
f175b23559 pdiff: Rename everything to .c and fix an last littele C++ isms.
The only things we had missed were a few new/delete pairs, and some
obvious header file fixups, (like not doing <string>).
2006-12-14 07:58:01 -08:00
Carl Worth
18a4fa448f pdiff: Replace CompareArgs class with args_t struct
This gets rid of nearly the last vestiges of C++ from the pdiff code.
2006-12-14 07:58:01 -08:00
Carl Worth
871aba6c80 pdiff: Fix return value from perceptualdiff program 2006-12-14 07:58:01 -08:00
Carl Worth
2174ee2475 pdiff: Remove all uses of std::string 2006-12-14 07:58:01 -08:00
Carl Worth
91b156b82e pdiff: Remove RGBAImage classes now that we're just using cairo image surfaces 2006-12-14 07:58:01 -08:00
Carl Worth
4c812c38e4 pdiff: Remove hideous C++ reference passing 2006-12-14 07:58:01 -08:00
Carl Worth
2457756afd pdiff: Remove intermingled statements and declarations 2006-12-14 07:58:01 -08:00
Carl Worth
e947f5a4bd pdiff: Add .gitignore for perceptualdiff binary 2006-12-14 07:58:01 -08:00
Carl Worth
bb4d4dc771 pdiff: Remove old, unused Yee_Compare interface 2006-12-14 07:58:01 -08:00
Carl Worth
53c3a2f75b pdiff: Rewrite main program to use cairo-based pdiff_compare interface 2006-12-14 07:58:01 -08:00
Carl Worth
358645d6eb pdiff: Rip out unused ImgDiff code, (dropping -output option) 2006-12-14 07:58:00 -08:00
Carl Worth
4438fb6dca pdiff: Move function that depends on command-line argument class to same file as main 2006-12-14 07:58:00 -08:00
Carl Worth
c7379fcea4 pdiff: Rewrite Laplacian pyramid code from C++ to C 2006-12-14 07:58:00 -08:00
Carl Worth
29456d3865 pdiff: Convert C++-style comments to good old-fashioned C-style comments 2006-12-14 07:58:00 -08:00
Carl Worth
34a6af3c55 pdiff: Delete all trailing whitespace. 2006-12-14 07:58:00 -08:00
Carl Worth
d421a856d0 pdiff: Re-indent all code
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.
2006-12-14 07:58:00 -08:00
Carl Worth
4f6611ef6c pdiff: Fix line endings 2006-12-14 07:58:00 -08:00
Carl Worth
ccb3a6c4de pdiff: Compile pdiff algorithm as a libtool convenience library
The convenience library provides a pdiff_compare function with a
cairo interface into the perceptual diff algorithm.
2006-12-14 07:58:00 -08:00
Carl Worth
0d7870b6bf pdiff: Teach pdiff code to accept cairo image surfaces
This is a second small step in enabling cairo's test suite and the
pdiff code to start working together.
2006-12-14 07:57:59 -08:00
Carl Worth
41e01d95ed pdiff: Factor out a comparison function that doesn't read the 'args' structure
This is one small step in "libifying" pdiff which will make it
easier to share this code inside cairo's test suite.
2006-12-12 03:13:38 -08:00