annotate src/scale.h @ 3172:d1b367fc08bc tests-returncode

Use a return code of 1 when the tests fail.
author Thomas Kluyver <takowl@gmail.com>
date Wed, 09 Jan 2013 10:13:57 +0000
parents d5353ffa2e16
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2078
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
1 /*
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
2 pygame - Python Game Library
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
3 Copyright (C) 2000-2001 Pete Shinners
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
4 Copyright (C) 2007 Rene Dudfield, Richard Goedeken
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
5
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
6 This library is free software; you can redistribute it and/or
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
7 modify it under the terms of the GNU Library General Public
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
8 License as published by the Free Software Foundation; either
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
9 version 2 of the License, or (at your option) any later version.
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
10
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
11 This library is distributed in the hope that it will be useful,
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
14 Library General Public License for more details.
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
15
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
16 You should have received a copy of the GNU Library General Public
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
17 License along with this library; if not, write to the Free
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
19
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
20 Pete Shinners
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
21 pete@shinners.org
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
22 */
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
23
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
24 /* Pentium MMX/SSE smoothscale routines
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
25 * Available on Win32 or GCC on a Pentium.
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
26 * Sorry, no Win64 support yet for Visual C builds, but it can be added.
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
27 */
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
28
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
29 #if !defined(SCALE_HEADER)
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
30 #define SCALE_HEADER
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
31
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
32 #if (defined(__GNUC__) && ((defined(__x86_64__) && !defined(_NO_MMX_FOR_X86_64)) || defined(__i386__))) || (defined(MS_WIN32) && !(defined(_M_X64) && defined(_NO_MMX_FOR_X86_64)))
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
33 #define SCALE_MMX_SUPPORT
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
34
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
35 /* These functions implement an area-averaging shrinking filter in the X-dimension.
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
36 */
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
37 void filter_shrink_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth);
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
38
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
39 void filter_shrink_X_SSE(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth);
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
40
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
41 /* These functions implement an area-averaging shrinking filter in the Y-dimension.
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
42 */
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
43 void filter_shrink_Y_MMX(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight);
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
44
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
45 void filter_shrink_Y_SSE(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight);
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
46
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
47 /* These functions implement a bilinear filter in the X-dimension.
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
48 */
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
49 void filter_expand_X_MMX(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth);
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
50
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
51 void filter_expand_X_SSE(Uint8 *srcpix, Uint8 *dstpix, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth);
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
52
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
53 /* These functions implement a bilinear filter in the Y-dimension.
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
54 */
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
55 void filter_expand_Y_MMX(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight);
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
56
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
57 void filter_expand_Y_SSE(Uint8 *srcpix, Uint8 *dstpix, int width, int srcpitch, int dstpitch, int srcheight, int dstheight);
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
58
2311
d5353ffa2e16 apply Cristoph Gohlke's patch to allow to linking with 64 bit msvcr90.dll
Lenard Lindstrom <len-l@telus.net>
parents: 2078
diff changeset
59 #if defined(_M_X64)
d5353ffa2e16 apply Cristoph Gohlke's patch to allow to linking with 64 bit msvcr90.dll
Lenard Lindstrom <len-l@telus.net>
parents: 2078
diff changeset
60
d5353ffa2e16 apply Cristoph Gohlke's patch to allow to linking with 64 bit msvcr90.dll
Lenard Lindstrom <len-l@telus.net>
parents: 2078
diff changeset
61 void filter_shrink_Y_MMX_gcc(Uint8 *srcpix, Uint8 *dstpix, Uint16 *templine, int width, int srcpitch, int dstpitch, int srcheight, int dstheight);
d5353ffa2e16 apply Cristoph Gohlke's patch to allow to linking with 64 bit msvcr90.dll
Lenard Lindstrom <len-l@telus.net>
parents: 2078
diff changeset
62
d5353ffa2e16 apply Cristoph Gohlke's patch to allow to linking with 64 bit msvcr90.dll
Lenard Lindstrom <len-l@telus.net>
parents: 2078
diff changeset
63 void filter_shrink_Y_SSE_gcc(Uint8 *srcpix, Uint8 *dstpix, Uint16 *templine, int width, int srcpitch, int dstpitch, int srcheight, int dstheight);
d5353ffa2e16 apply Cristoph Gohlke's patch to allow to linking with 64 bit msvcr90.dll
Lenard Lindstrom <len-l@telus.net>
parents: 2078
diff changeset
64
d5353ffa2e16 apply Cristoph Gohlke's patch to allow to linking with 64 bit msvcr90.dll
Lenard Lindstrom <len-l@telus.net>
parents: 2078
diff changeset
65 void filter_expand_X_MMX_gcc(Uint8 *srcpix, Uint8 *dstpix, int *xidx0, int *xmult0, int *xmult1, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth);
d5353ffa2e16 apply Cristoph Gohlke's patch to allow to linking with 64 bit msvcr90.dll
Lenard Lindstrom <len-l@telus.net>
parents: 2078
diff changeset
66
d5353ffa2e16 apply Cristoph Gohlke's patch to allow to linking with 64 bit msvcr90.dll
Lenard Lindstrom <len-l@telus.net>
parents: 2078
diff changeset
67 void filter_expand_X_SSE_gcc(Uint8 *srcpix, Uint8 *dstpix, int *xidx0, int *xmult0, int *xmult1, int height, int srcpitch, int dstpitch, int srcwidth, int dstwidth);
d5353ffa2e16 apply Cristoph Gohlke's patch to allow to linking with 64 bit msvcr90.dll
Lenard Lindstrom <len-l@telus.net>
parents: 2078
diff changeset
68
d5353ffa2e16 apply Cristoph Gohlke's patch to allow to linking with 64 bit msvcr90.dll
Lenard Lindstrom <len-l@telus.net>
parents: 2078
diff changeset
69 #endif /* #if defined(_M_X64) */
d5353ffa2e16 apply Cristoph Gohlke's patch to allow to linking with 64 bit msvcr90.dll
Lenard Lindstrom <len-l@telus.net>
parents: 2078
diff changeset
70
2078
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
71 #endif /* #if (defined(__GNUC__) && .....) */
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
72
2d7ce556083b set svn file properties so svn branch and merge work as intended
Lenard Lindstrom <len-l@telus.net>
parents: 1973
diff changeset
73 #endif /* #if !defined(SCALE_HEADER) */