summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ANNOUNCE29
-rw-r--r--CHANGES3
-rw-r--r--INSTALL20
-rw-r--r--KNOWNBUG2
-rw-r--r--LICENSE2
-rw-r--r--README14
-rw-r--r--Y2KINFO2
-rwxr-xr-xconfigure22
-rw-r--r--configure.ac4
-rw-r--r--libpng-1.2.19beta12.txt (renamed from libpng-1.2.19beta11.txt)4
-rw-r--r--libpng.312
-rw-r--r--libpngpf.32
-rw-r--r--png.c4
-rw-r--r--png.h18
-rw-r--r--pngconf.h2
-rw-r--r--pnggccrd.c650
-rw-r--r--pngtest.c2
-rw-r--r--scripts/CMakeLists.txt2
-rwxr-xr-xscripts/libpng-config-head.in2
-rw-r--r--scripts/libpng.pc-configure.in2
-rw-r--r--scripts/libpng.pc.in2
-rw-r--r--scripts/makefile.32sunu2
-rw-r--r--scripts/makefile.64sunu2
-rw-r--r--scripts/makefile.aix2
-rw-r--r--scripts/makefile.beos2
-rw-r--r--scripts/makefile.cygwin2
-rw-r--r--scripts/makefile.darwin2
-rw-r--r--scripts/makefile.dec2
-rw-r--r--scripts/makefile.elf2
-rw-r--r--scripts/makefile.gcmmx2
-rw-r--r--scripts/makefile.hp642
-rw-r--r--scripts/makefile.hpgcc2
-rw-r--r--scripts/makefile.hpux2
-rw-r--r--scripts/makefile.linux2
-rw-r--r--scripts/makefile.mingw2
-rw-r--r--scripts/makefile.ne12bsd2
-rw-r--r--scripts/makefile.netbsd2
-rw-r--r--scripts/makefile.nommx2
-rw-r--r--scripts/makefile.openbsd2
-rw-r--r--scripts/makefile.sco2
-rw-r--r--scripts/makefile.sggcc2
-rw-r--r--scripts/makefile.sgi2
-rw-r--r--scripts/makefile.so92
-rw-r--r--scripts/makefile.solaris2
-rw-r--r--scripts/makefile.solaris-x862
-rw-r--r--scripts/pngos2.def2
-rw-r--r--scripts/pngw32.def2
47 files changed, 453 insertions, 399 deletions
diff --git a/ANNOUNCE b/ANNOUNCE
index ad240d969..6baab1930 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
-Libpng 1.2.19beta11 - May 28, 2007
+Libpng 1.2.19beta12 - May 28, 2007
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@@ -9,32 +9,32 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
- libpng-1.2.19beta11.tar.gz
- libpng-1.2.19beta11.tar.bz2
+ libpng-1.2.19beta12.tar.gz
+ libpng-1.2.19beta12.tar.bz2
Source files with LF line endings (for Unix/Linux) without the
"configure" script
- libpng-1.2.19beta11-no-config.tar.gz
- libpng-1.2.19beta11-no-config.tar.bz2
+ libpng-1.2.19beta12-no-config.tar.gz
+ libpng-1.2.19beta12-no-config.tar.bz2
Source files with CRLF line endings (for Windows), without the
"configure" script
- lp1219b11.zip
- lp1219b11.tar.bz2
+ lp1219b12.zip
+ lp1219b12.tar.bz2
Project files
- libpng-1.2.19beta11-project-netware.zip
- libpng-1.2.19beta11-project-wince.zip
+ libpng-1.2.19beta12-project-netware.zip
+ libpng-1.2.19beta12-project-wince.zip
Other information:
- libpng-1.2.19beta11-README.txt
- libpng-1.2.19beta11-KNOWNBUGS.txt
- libpng-1.2.19beta11-LICENSE.txt
- libpng-1.2.19beta11-Y2K-compliance.txt
+ libpng-1.2.19beta12-README.txt
+ libpng-1.2.19beta12-KNOWNBUGS.txt
+ libpng-1.2.19beta12-LICENSE.txt
+ libpng-1.2.19beta12-Y2K-compliance.txt
Changes since the last public release (1.2.18):
@@ -83,6 +83,9 @@ version 1.2.19beta11 [May 28, 2007]
changed three remaining instances of png_strcpy() to png_strncpy() (David
Hill).
+version 1.2.19beta12 [May 28, 2007]
+ Revised pnggccrd.c.
+
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/CHANGES b/CHANGES
index 5f1dcb5d5..29dde248b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1776,6 +1776,9 @@ version 1.2.19beta11 [May 28, 2007]
changed three remaining instances of png_strcpy() to png_strncpy() (David
Hill).
+version 1.2.19beta12 [May 28, 2007]
+ Revised pnggccrd.c.
+
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
diff --git a/INSTALL b/INSTALL
index 23e3d2868..dd5528248 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
-Installing libpng version 1.2.19beta11 - May 28, 2007
+Installing libpng version 1.2.19beta12 - May 28, 2007
On Unix/Linux and similar systems, you can simply type
@@ -44,7 +44,7 @@ to have access to the zlib.h and zconf.h include files that
correspond to the version of zlib that's installed.
You can rename the directories that you downloaded (they
-might be called "libpng-1.2.19beta11" or "lpng109" and "zlib-1.2.1"
+might be called "libpng-1.2.19beta12" or "lpng109" and "zlib-1.2.1"
or "zlib121") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:
@@ -101,14 +101,14 @@ include
CMakeLists.txt => "cmake" script
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning,
- gcc, creates libpng12.so.0.1.2.19beta11)
+ gcc, creates libpng12.so.0.1.2.19beta12)
makefile.linux => Linux/ELF makefile
- (gcc, creates libpng12.so.0.1.2.19beta11)
+ (gcc, creates libpng12.so.0.1.2.19beta12)
makefile.gcmmx => Linux/ELF makefile
- (gcc, creates libpng12.so.0.1.2.19beta11,
+ (gcc, creates libpng12.so.0.1.2.19beta12,
uses assembler code tuned for Intel MMX platform)
makefile.nommx => Linux/ELF makefile
- (gcc, creates libpng12.so.0.1.2.19beta11
+ (gcc, creates libpng12.so.0.1.2.19beta12
does not use Intel MMX assembler code)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
@@ -131,14 +131,14 @@ include
makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.sggcc => Silicon Graphics (gcc,
- creates libpng12.so.0.1.2.19beta11)
+ creates libpng12.so.0.1.2.19beta12)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile (gcc,
- creates libpng12.so.0.1.2.19beta11)
+ creates libpng12.so.0.1.2.19beta12)
makefile.solaris-x86 => Solaris/intelMMX 2.X makefile (gcc,
- creates libpng12.so.0.1.2.19beta11)
+ creates libpng12.so.0.1.2.19beta12)
makefile.so9 => Solaris 9 makefile (gcc,
- creates libpng12.so.0.1.2.19beta11)
+ creates libpng12.so.0.1.2.19beta12)
makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
diff --git a/KNOWNBUG b/KNOWNBUG
index 43341775b..9084f448f 100644
--- a/KNOWNBUG
+++ b/KNOWNBUG
@@ -1,5 +1,5 @@
-Known bugs in libpng version 1.2.19beta11
+Known bugs in libpng version 1.2.19beta12
1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when
reading interlaced PNG files, when assembler code is enabled but running
diff --git a/LICENSE b/LICENSE
index 34cfaed17..9157d939e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -8,7 +8,7 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following
this sentence.
-libpng versions 1.2.6, August 15, 2004, through 1.2.19beta11, May 28, 2007, are
+libpng versions 1.2.6, August 15, 2004, through 1.2.19beta12, May 28, 2007, are
Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
diff --git a/README b/README
index c9fc4d4b1..da4bf9052 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng version 1.2.19beta11 - May 28, 2007 (shared library 12.0)
+README for libpng version 1.2.19beta12 - May 28, 2007 (shared library 12.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
@@ -190,11 +190,11 @@ Files in this distribution:
descrip.mms => VMS makefile for MMS or MMK
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning,
- gcc, creates libpng12.so.0.1.2.19beta11)
+ gcc, creates libpng12.so.0.1.2.19beta12)
makefile.linux => Linux/ELF makefile
- (gcc, creates libpng12.so.0.1.2.19beta11)
+ (gcc, creates libpng12.so.0.1.2.19beta12)
makefile.gcmmx => Linux/ELF makefile
- (gcc, creates libpng12.so.0.1.2.19beta11,
+ (gcc, creates libpng12.so.0.1.2.19beta12,
uses assembler code tuned for Intel MMX platform)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
@@ -216,12 +216,12 @@ Files in this distribution:
makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
makefile.sggcc => Silicon Graphics
- (gcc, creates libpng12.so.0.1.2.19beta11)
+ (gcc, creates libpng12.so.0.1.2.19beta12)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
- (gcc, creates libpng12.so.0.1.2.19beta11)
+ (gcc, creates libpng12.so.0.1.2.19beta12)
makefile.so9 => Solaris 9 makefile
- (gcc, creates libpng12.so.0.1.2.19beta11)
+ (gcc, creates libpng12.so.0.1.2.19beta12)
makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
diff --git a/Y2KINFO b/Y2KINFO
index ec081dec9..f3c06b1eb 100644
--- a/Y2KINFO
+++ b/Y2KINFO
@@ -7,7 +7,7 @@
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
- upward through 1.2.19beta11 are Y2K compliant. It is my belief that earlier
+ upward through 1.2.19beta12 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer
diff --git a/configure b/configure
index 82ff2694a..ec22e857f 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for libpng 1.2.19beta11.
+# Generated by GNU Autoconf 2.61 for libpng 1.2.19beta12.
#
# Report bugs to <png-mng-implement@lists.sourceforge.net>.
#
@@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='libpng'
PACKAGE_TARNAME='libpng'
-PACKAGE_VERSION='1.2.19beta11'
-PACKAGE_STRING='libpng 1.2.19beta11'
+PACKAGE_VERSION='1.2.19beta12'
+PACKAGE_STRING='libpng 1.2.19beta12'
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
ac_unique_file="pngget.c"
@@ -1405,7 +1405,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libpng 1.2.19beta11 to adapt to many kinds of systems.
+\`configure' configures libpng 1.2.19beta12 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1475,7 +1475,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libpng 1.2.19beta11:";;
+ short | recursive ) echo "Configuration of libpng 1.2.19beta12:";;
esac
cat <<\_ACEOF
@@ -1585,7 +1585,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libpng configure 1.2.19beta11
+libpng configure 1.2.19beta12
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1599,7 +1599,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libpng $as_me 1.2.19beta11, which was
+It was created by libpng $as_me 1.2.19beta12, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2269,7 +2269,7 @@ fi
# Define the identity of the package.
PACKAGE='libpng'
- VERSION='1.2.19beta11'
+ VERSION='1.2.19beta12'
cat >>confdefs.h <<_ACEOF
@@ -2440,7 +2440,7 @@ fi
-PNGLIB_VERSION=1.2.19beta11
+PNGLIB_VERSION=1.2.19beta12
PNGLIB_MAJOR=1
PNGLIB_MINOR=2
PNGLIB_RELEASE=19
@@ -21119,7 +21119,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libpng $as_me 1.2.19beta11, which was
+This file was extended by libpng $as_me 1.2.19beta12, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21172,7 +21172,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-libpng config.status 1.2.19beta11
+libpng config.status 1.2.19beta12
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.ac b/configure.ac
index 11bd95d45..9314a35be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,12 +18,12 @@ AC_PREREQ(2.59)
dnl Version number stuff here:
-AC_INIT([libpng], [1.2.19beta11], [png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng], [1.2.19beta12], [png-mng-implement@lists.sourceforge.net])
AM_INIT_AUTOMAKE
dnl stop configure from automagically running automake
AM_MAINTAINER_MODE
-PNGLIB_VERSION=1.2.19beta11
+PNGLIB_VERSION=1.2.19beta12
PNGLIB_MAJOR=1
PNGLIB_MINOR=2
PNGLIB_RELEASE=19
diff --git a/libpng-1.2.19beta11.txt b/libpng-1.2.19beta12.txt
index 1982cbb6c..29d510909 100644
--- a/libpng-1.2.19beta11.txt
+++ b/libpng-1.2.19beta12.txt
@@ -1,6 +1,6 @@
libpng.txt - A description on how to use and modify libpng
- libpng version 1.2.19beta11 - May 28, 2007
+ libpng version 1.2.19beta12 - May 28, 2007
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2007 Glenn Randers-Pehrson
@@ -2927,7 +2927,7 @@ Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.2.19beta11 are Y2K compliant. It is my belief that earlier
+upward through 1.2.19beta12 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that
diff --git a/libpng.3 b/libpng.3
index 53e391a4c..f042d8dee 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,6 +1,6 @@
.TH LIBPNG 3 "May 28, 2007"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.2.19beta11
+libpng \- Portable Network Graphics (PNG) Reference Library 1.2.19beta12
.SH SYNOPSIS
\fB
#include <png.h>\fP
@@ -410,7 +410,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng.txt - A description on how to use and modify libpng
- libpng version 1.2.19beta11 - May 28, 2007
+ libpng version 1.2.19beta12 - May 28, 2007
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2007 Glenn Randers-Pehrson
@@ -3337,7 +3337,7 @@ Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.2.19beta11 are Y2K compliant. It is my belief that earlier
+upward through 1.2.19beta12 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that
@@ -3526,7 +3526,7 @@ the first widely used release:
1.2.17 13 10217 12.so.0.17[.0]
1.0.26 10 10026 10.so.0.26[.0]
1.2.18 13 10218 12.so.0.18[.0]
- 1.2.19beta1-11 13 10219 12.so.0.19[.0]
+ 1.2.19beta1-12 13 10219 12.so.0.19[.0]
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@@ -3582,7 +3582,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
-Libpng version 1.2.19beta11 - May 28, 2007:
+Libpng version 1.2.19beta12 - May 28, 2007:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@@ -3603,7 +3603,7 @@ included in the libpng distribution, the latter shall prevail.)
If you modify libpng you may insert additional notices immediately following
this sentence.
-libpng versions 1.2.6, August 15, 2004, through 1.2.19beta11, May 28, 2007, are
+libpng versions 1.2.6, August 15, 2004, through 1.2.19beta12, May 28, 2007, are
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
diff --git a/libpngpf.3 b/libpngpf.3
index cf3d3910d..a8d4197a4 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,6 +1,6 @@
.TH LIBPNGPF 3 "May 28, 2007"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.2.19beta11
+libpng \- Portable Network Graphics (PNG) Reference Library 1.2.19beta12
(private functions)
.SH SYNOPSIS
\fB#include <png.h>\fP
diff --git a/png.c b/png.c
index 0c3686f24..cf477bc05 100644
--- a/png.c
+++ b/png.c
@@ -13,7 +13,7 @@
#include "png.h"
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_2_19beta11 Your_png_h_is_not_version_1_2_19beta11;
+typedef version_1_2_19beta12 Your_png_h_is_not_version_1_2_19beta12;
/* Version information for C files. This had better match the version
* string defined in png.h. */
@@ -706,7 +706,7 @@ png_charp PNGAPI
png_get_copyright(png_structp png_ptr)
{
png_ptr = png_ptr; /* silence compiler warning about unused png_ptr */
- return ((png_charp) "\n libpng version 1.2.19beta11 - May 28, 2007\n\
+ return ((png_charp) "\n libpng version 1.2.19beta12 - May 28, 2007\n\
Copyright (c) 1998-2007 Glenn Randers-Pehrson\n\
Copyright (c) 1996-1997 Andreas Dilger\n\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
diff --git a/png.h b/png.h
index 01b315c4d..2aaa3e1d0 100644
--- a/png.h
+++ b/png.h
@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
- * libpng version 1.2.19beta11 - May 28, 2007
+ * libpng version 1.2.19beta12 - May 28, 2007
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -9,7 +9,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
- * libpng versions 0.97, January 1998, through 1.2.19beta11 - May 28, 2007: Glenn
+ * libpng versions 0.97, January 1998, through 1.2.19beta12 - May 28, 2007: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@@ -150,7 +150,7 @@
* 1.2.17 13 10217 12.so.0.17[.0]
* 1.0.26 10 10026 10.so.0.26[.0]
* 1.2.18 13 10218 12.so.0.18[.0]
- * 1.2.19beta1-11 13 10219 12.so.0.19[.0]
+ * 1.2.19beta1-12 13 10219 12.so.0.19[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@@ -180,7 +180,7 @@
* If you modify libpng you may insert additional notices immediately following
* this sentence.
*
- * libpng versions 1.2.6, August 15, 2004, through 1.2.19beta11, May 28, 2007, are
+ * libpng versions 1.2.6, August 15, 2004, through 1.2.19beta12, May 28, 2007, are
* Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
@@ -298,7 +298,7 @@
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
- * upward through 1.2.19beta11 are Y2K compliant. It is my belief that earlier
+ * upward through 1.2.19beta12 are Y2K compliant. It is my belief that earlier
* versions were also Y2K compliant.
*
* Libpng only has three year fields. One is a 2-byte unsigned integer
@@ -354,9 +354,9 @@
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.2.19beta11"
+#define PNG_LIBPNG_VER_STRING "1.2.19beta12"
#define PNG_HEADER_VERSION_STRING \
- " libpng version 1.2.19beta11 - May 28, 2007 (header)\n"
+ " libpng version 1.2.19beta12 - May 28, 2007 (header)\n"
#define PNG_LIBPNG_VER_SONUM 0
#define PNG_LIBPNG_VER_DLLNUM 13
@@ -368,7 +368,7 @@
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
-#define PNG_LIBPNG_VER_BUILD 11
+#define PNG_LIBPNG_VER_BUILD 12
/* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1
@@ -1407,7 +1407,7 @@ struct png_struct_def
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
-typedef png_structp version_1_2_19beta11;
+typedef png_structp version_1_2_19beta12;
typedef png_struct FAR * FAR * png_structpp;
diff --git a/pngconf.h b/pngconf.h
index 6dc085aa8..b09bc83b2 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
- * libpng version 1.2.19beta11 - May 28, 2007
+ * libpng version 1.2.19beta12 - May 28, 2007
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pnggccrd.c b/pnggccrd.c
index 5c74a8e1e..a6b6427e0 100644
--- a/pnggccrd.c
+++ b/pnggccrd.c
@@ -10,6 +10,7 @@
* Last changed in libpng 1.2.19 May 28, 2007
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
+ * Copyright (c) 1999-2002,2007 Greg Roelofs
* Copyright (c) 1998, Intel Corporation
*
* Based on MSVC code contributed by Nirav Chhatrapati, Intel Corp., 1998.
@@ -44,8 +45,8 @@
*/
/*
- * TEMPORARY PORTING NOTES AND CHANGELOG (mostly by Greg Roelofs)
- * =====================================
+ * PORTING NOTES AND CHANGELOG (mostly by Greg Roelofs)
+ * ===========================
*
* 19991006:
* - fixed sign error in post-MMX cleanup code (16- & 32-bit cases)
@@ -240,6 +241,51 @@
* - moved png_mmx_support() back up where originally intended (as in
* pngvcrd.c), using __attribute__((noinline)) in extra prototype
*
+ * 20070527:
+ * - revised png_combine_row() to reuse mask in lieu of external _unmask
+ * - moved 32-bit (RGBA) case to top of png_combine_row(): most common
+ * - just about ready to give up on x86_64 -fPIC mode; apparently can't even
+ * access 16 _mask*_* constants without triggering link error on shared
+ * library:
+ * /usr/bin/ld: pnggccrd.pic.o: relocation R_X86_64_32S against `a local
+ * symbol' can not be used when making a shared object; recompile with
+ * -fPIC
+ * pnggccrd.pic.o: could not read symbols: Bad value
+ * [might be able to work around by doing within assembly code whatever
+ * -fPIC does, but given problems to date, seems like long shot...]
+ * [relevant ifdefs: __x86_64__ && __PIC__ => C code only]
+ * - changed #if 0 to #ifdef CLOBBER_MMX_REGS_SUPPORTED in case gcc ever
+ * supports MMX regs (%mm0, etc.) in clobber list (not supported by gcc
+ * 2.7.2.3, 2.91.66 (egcs 1.1.2), 3.x, or 4.1.2)
+
+ *
+ * STATUS OF 64-BIT SHARED-LIBRARY BUG, 20070526:
+ *
+ * 499-1600: png_combine_row()
+ * - FAILS
+ * - used to use _unmask; no longer, but still fails (new cause = _mask* vars)
+ * (objdump -x pnggccrd.pic.o | grep rodata)
+ *
+ * 1602-2873: png_do_read_interlace()
+ * - WORKS
+ * - does not use any static vars except _mmx_supported (can comment out
+ * PNG_THREAD_UNSAFE_OK vars entirely)
+ *
+ * 2877-5241: png_read_filter_row_mmx_avg(), png_read_filter_row_mmx_paeth(),
+ * png_read_filter_row_mmx_sub(), png_read_filter_row_mmx_up()
+ * - FAILS
+ * - uses _FullLength, _MMXLength, _dif, _patemp, _pbtemp, _pctemp
+ * - also uses other globals:
+ *
+ * union uAll {
+ * long long use;
+ * double align;
+ * } _LBCarryMask = {0x0101010101010101LL},
+ * _HBClearMask = {0x7f7f7f7f7f7f7f7fLL},
+ * _ActiveMask, _ActiveMask2, _ActiveMaskEnd, _ShiftBpp, _ShiftRem;
+ *
+
+ *
* STILL TO DO:
* - test png_do_read_interlace() 64-bit case (pixel_bytes == 8)
* - write MMX code for 48-bit case (pixel_bytes == 6)
@@ -300,7 +346,6 @@ static PNG_CONST int FARDATA png_pass_width[7] = {8, 4, 4, 2, 2, 1, 1};
# define _ShiftBpp ShiftBpp
# define _ShiftRem ShiftRem
#ifdef PNG_THREAD_UNSAFE_OK
-# define _unmask unmask
# define _FullLength FullLength
# define _MMXLength MMXLength
# define _dif dif
@@ -346,26 +391,19 @@ static PNG_CONST ull _const6 = 0x00000000000000FFLL;
// WARNING: Their presence probably defeats the thread safety of libpng.
#ifdef PNG_THREAD_UNSAFE_OK
-// GRR 20000706: originally _unmask was needed only when compiling with -fPIC,
-// since that case uses the %ebx register to index the Global Offset Table,
-// and there were no other registers available. But gcc 2.95 and later emit
-// "more than 10 operands in `asm'" errors when %ebx is used to preload
-// unmask in non-PIC case, so we'll just use the global unconditionally now.
-static int _unmask;
-
static png_uint_32 _FullLength;
static png_uint_32 _MMXLength __attribute__((used));
static int _dif __attribute__((used));
static int _patemp __attribute__((used)); // temp variables for
static int _pbtemp __attribute__((used)); // Paeth routine
static int _pctemp __attribute__((used));
-#endif // PNG_THREAD_UNSAFE_OK
+#endif
#endif // PNG_MMX_CODE_SUPPORTED
-static int _mmx_supported = 2; // 0: no MMX; 1: MMX supported; 2: not tested
+static int _mmx_supported = 2; // 0: no MMX; 1: MMX supported; 2: not tested
/*===========================================================================*/
/* */
@@ -533,6 +571,184 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
{
switch (png_ptr->row_info.pixel_depth)
{
+ // most common case: combining 32-bit RGBA
+ case 32: /* png_ptr->row_info.pixel_depth */
+ {
+ png_bytep srcptr;
+ png_bytep dstptr;
+
+#if defined(PNG_MMX_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
+#if !defined(PNG_1_0_X)
+ if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
+ /* && _mmx_supported */ )
+#else
+ if (_mmx_supported)
+#endif
+ {
+ png_uint_32 len;
+ int diff;
+ int dummy_value_a; // fix 'forbidden register spilled' error
+ int dummy_value_d;
+ int dummy_value_c;
+ int dummy_value_S;
+ int dummy_value_D;
+
+ srcptr = png_ptr->row_buf + 1;
+ dstptr = row;
+ len = png_ptr->width & ~7; // reduce to multiple of 8
+ diff = (int) (png_ptr->width & 7); // amount lost
+
+ __asm__ __volatile__ (
+ "not %%edx \n\t" // mask => unmask
+ "movd %%edx, %%mm7 \n\t" // load bit pattern
+ "not %%edx \n\t" // unmask => mask for later
+ "psubb %%mm6, %%mm6 \n\t" // zero mm6
+ "punpcklbw %%mm7, %%mm7 \n\t"
+ "punpcklwd %%mm7, %%mm7 \n\t"
+ "punpckldq %%mm7, %%mm7 \n\t" // fill reg with 8 masks
+
+ "movq _mask32_0, %%mm0 \n\t"
+ "movq _mask32_1, %%mm1 \n\t"
+ "movq _mask32_2, %%mm2 \n\t"
+ "movq _mask32_3, %%mm3 \n\t"
+
+ "pand %%mm7, %%mm0 \n\t"
+ "pand %%mm7, %%mm1 \n\t"
+ "pand %%mm7, %%mm2 \n\t"
+ "pand %%mm7, %%mm3 \n\t"
+
+ "pcmpeqb %%mm6, %%mm0 \n\t"
+ "pcmpeqb %%mm6, %%mm1 \n\t"
+ "pcmpeqb %%mm6, %%mm2 \n\t"
+ "pcmpeqb %%mm6, %%mm3 \n\t"
+
+// preload "movl len, %%ecx \n\t" // load length of line
+// preload "movl srcptr, %%esi \n\t" // load source
+// preload "movl dstptr, %%edi \n\t" // load dest
+
+ "cmpl $0, %%ecx \n\t" // lcr
+ "jz mainloop32end \n\t"
+
+ "mainloop32: \n\t"
+ "movq (%%esi), %%mm4 \n\t"
+ "pand %%mm0, %%mm4 \n\t"
+ "movq %%mm0, %%mm6 \n\t"
+ "movq (%%edi), %%mm7 \n\t"
+ "pandn %%mm7, %%mm6 \n\t"
+ "por %%mm6, %%mm4 \n\t"
+ "movq %%mm4, (%%edi) \n\t"
+
+ "movq 8(%%esi), %%mm5 \n\t"
+ "pand %%mm1, %%mm5 \n\t"
+ "movq %%mm1, %%mm7 \n\t"
+ "movq 8(%%edi), %%mm6 \n\t"
+ "pandn %%mm6, %%mm7 \n\t"
+ "por %%mm7, %%mm5 \n\t"
+ "movq %%mm5, 8(%%edi) \n\t"
+
+ "movq 16(%%esi), %%mm6 \n\t"
+ "pand %%mm2, %%mm6 \n\t"
+ "movq %%mm2, %%mm4 \n\t"
+ "movq 16(%%edi), %%mm7 \n\t"
+ "pandn %%mm7, %%mm4 \n\t"
+ "por %%mm4, %%mm6 \n\t"
+ "movq %%mm6, 16(%%edi) \n\t"
+
+ "movq 24(%%esi), %%mm7 \n\t"
+ "pand %%mm3, %%mm7 \n\t"
+ "movq %%mm3, %%mm5 \n\t"
+ "movq 24(%%edi), %%mm4 \n\t"
+ "pandn %%mm4, %%mm5 \n\t"
+ "por %%mm5, %%mm7 \n\t"
+ "movq %%mm7, 24(%%edi) \n\t"
+
+ "addl $32, %%esi \n\t" // inc by 32 bytes processed
+ "addl $32, %%edi \n\t"
+ "subl $8, %%ecx \n\t" // dec by 8 pixels processed
+ "ja mainloop32 \n\t"
+
+ "mainloop32end: \n\t"
+// preload "movl diff, %%ecx \n\t" // (diff is in eax)
+ "movl %%eax, %%ecx \n\t"
+ "cmpl $0, %%ecx \n\t"
+ "jz end32 \n\t"
+// preload "movl mask, %%edx \n\t"
+ "sall $24, %%edx \n\t" // low byte => high byte
+
+ "secondloop32: \n\t"
+ "sall %%edx \n\t" // move high bit to CF
+ "jnc skip32 \n\t" // if CF = 0
+ "movl (%%esi), %%eax \n\t"
+ "movl %%eax, (%%edi) \n\t"
+
+ "skip32: \n\t"
+ "addl $4, %%esi \n\t"
+ "addl $4, %%edi \n\t"
+ "decl %%ecx \n\t"
+ "jnz secondloop32 \n\t"
+
+ "end32: \n\t"
+ "EMMS \n\t" // DONE
+
+ : "=a" (dummy_value_a), // output regs (dummy)
+ "=d" (dummy_value_d),
+ "=c" (dummy_value_c),
+ "=S" (dummy_value_S),
+ "=D" (dummy_value_D)
+
+ : "3" (srcptr), // esi // input regs
+ "4" (dstptr), // edi
+ "0" (diff), // eax
+// was (unmask) "b" RESERVED // ebx // Global Offset Table idx
+ "2" (len), // ecx
+ "1" (mask) // edx
+
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
+ : "%mm0", "%mm1", "%mm2", "%mm3" // clobber list
+ , "%mm4", "%mm5", "%mm6", "%mm7"
+#endif
+ );
+ }
+ else /* mmx _not supported - Use modified C routine */
+#endif /* PNG_MMX_CODE_SUPPORTED */
+ {
+ register png_uint_32 i;
+ png_uint_32 initial_val = BPP4 * png_pass_start[png_ptr->pass];
+ /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
+ register int stride = BPP4 * png_pass_inc[png_ptr->pass];
+ /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
+ register int rep_bytes = BPP4 * png_pass_width[png_ptr->pass];
+ /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
+ png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */
+ int diff = (int) (png_ptr->width & 7); /* amount lost */
+ register png_uint_32 final_val = BPP4 * len; /* GRR bugfix */
+
+ srcptr = png_ptr->row_buf + 1 + initial_val;
+ dstptr = row + initial_val;
+
+ for (i = initial_val; i < final_val; i += stride)
+ {
+ png_memcpy(dstptr, srcptr, rep_bytes);
+ srcptr += stride;
+ dstptr += stride;
+ }
+ if (diff) /* number of leftover pixels: 3 for pngtest */
+ {
+ final_val+=diff*BPP4;
+ for (; i < final_val; i += stride)
+ {
+ if (rep_bytes > (int)(final_val-i))
+ rep_bytes = (int)(final_val-i);
+ png_memcpy(dstptr, srcptr, rep_bytes);
+ srcptr += stride;
+ dstptr += stride;
+ }
+ }
+ } /* end of else (_mmx_supported) */
+
+ break;
+ } /* end 32 bpp */
+
case 1: /* png_ptr->row_info.pixel_depth */
{
png_bytep sp;
@@ -588,7 +804,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
m >>= 1;
}
break;
- }
+ } /* end 1 bpp */
case 2: /* png_ptr->row_info.pixel_depth */
{
@@ -643,7 +859,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
m >>= 1;
}
break;
- }
+ } /* end 2 bpp */
case 4: /* png_ptr->row_info.pixel_depth */
{
@@ -697,7 +913,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
m >>= 1;
}
break;
- }
+ } /* end 4 bpp */
case 8: /* png_ptr->row_info.pixel_depth */
{
@@ -714,69 +930,72 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
{
png_uint_32 len;
int diff;
- int dummy_value_a; // fix 'forbidden register spilled' error
+ int dummy_value_a; // fix 'forbidden register spilled' error
int dummy_value_d;
int dummy_value_c;
int dummy_value_S;
int dummy_value_D;
- _unmask = ~mask; // global variable for -fPIC version
+
srcptr = png_ptr->row_buf + 1;
dstptr = row;
- len = png_ptr->width &~7; // reduce to multiple of 8
- diff = (int) (png_ptr->width & 7); // amount lost
+ len = png_ptr->width & ~7; // reduce to multiple of 8
+ diff = (int) (png_ptr->width & 7); // amount lost
__asm__ __volatile__ (
- "movd _unmask, %%mm7 \n\t" // load bit pattern
- "psubb %%mm6, %%mm6 \n\t" // zero mm6
- "punpcklbw %%mm7, %%mm7 \n\t"
- "punpcklwd %%mm7, %%mm7 \n\t"
- "punpckldq %%mm7, %%mm7 \n\t" // fill reg with 8 masks
-
- "movq _mask8_0, %%mm0 \n\t"
- "pand %%mm7, %%mm0 \n\t" // nonzero if keep byte
- "pcmpeqb %%mm6, %%mm0 \n\t" // zeros->1s, v versa
-
-// preload "movl len, %%ecx \n\t" // load length of line
-// preload "movl srcptr, %%esi \n\t" // load source
-// preload "movl dstptr, %%edi \n\t" // load dest
-
- "cmpl $0, %%ecx \n\t" // len == 0 ?
- "je mainloop8end \n\t"
-
- "mainloop8: \n\t"
- "movq (%%esi), %%mm4 \n\t" // *srcptr
- "pand %%mm0, %%mm4 \n\t"
- "movq %%mm0, %%mm6 \n\t"
- "pandn (%%edi), %%mm6 \n\t" // *dstptr
- "por %%mm6, %%mm4 \n\t"
- "movq %%mm4, (%%edi) \n\t"
- "addl $8, %%esi \n\t" // inc by 8 bytes processed
- "addl $8, %%edi \n\t"
- "subl $8, %%ecx \n\t" // dec by 8 pixels processed
- "ja mainloop8 \n\t"
-
- "mainloop8end: \n\t"
-// preload "movl diff, %%ecx \n\t" // (diff is in eax)
- "movl %%eax, %%ecx \n\t"
- "cmpl $0, %%ecx \n\t"
- "jz end8 \n\t"
-// preload "movl mask, %%edx \n\t"
- "sall $24, %%edx \n\t" // make low byte, high byte
-
- "secondloop8: \n\t"
- "sall %%edx \n\t" // move high bit to CF
- "jnc skip8 \n\t" // if CF = 0
- "movb (%%esi), %%al \n\t"
- "movb %%al, (%%edi) \n\t"
-
- "skip8: \n\t"
- "incl %%esi \n\t"
- "incl %%edi \n\t"
- "decl %%ecx \n\t"
- "jnz secondloop8 \n\t"
-
- "end8: \n\t"
- "EMMS \n\t" // DONE
+ "not %%edx \n\t" // mask => unmask
+ "movd %%edx, %%mm7 \n\t" // load bit pattern
+ "not %%edx \n\t" // unmask => mask for later
+ "psubb %%mm6, %%mm6 \n\t" // zero mm6
+ "punpcklbw %%mm7, %%mm7 \n\t"
+ "punpcklwd %%mm7, %%mm7 \n\t"
+ "punpckldq %%mm7, %%mm7 \n\t" // fill reg with 8 masks
+
+ "movq _mask8_0, %%mm0 \n\t"
+
+ "pand %%mm7, %%mm0 \n\t" // nonzero if keep byte
+ "pcmpeqb %%mm6, %%mm0 \n\t" // zeros->1s, v versa
+
+// preload "movl len, %%ecx \n\t" // load length of line
+// preload "movl srcptr, %%esi \n\t" // load source
+// preload "movl dstptr, %%edi \n\t" // load dest
+
+ "cmpl $0, %%ecx \n\t" // len == 0 ?
+ "je mainloop8end \n\t"
+
+ "mainloop8: \n\t"
+ "movq (%%esi), %%mm4 \n\t" // *srcptr
+ "pand %%mm0, %%mm4 \n\t"
+ "movq %%mm0, %%mm6 \n\t"
+ "pandn (%%edi), %%mm6 \n\t" // *dstptr
+ "por %%mm6, %%mm4 \n\t"
+ "movq %%mm4, (%%edi) \n\t"
+ "addl $8, %%esi \n\t" // inc by 8 bytes processed
+ "addl $8, %%edi \n\t"
+ "subl $8, %%ecx \n\t" // dec by 8 pixels processed
+ "ja mainloop8 \n\t"
+
+ "mainloop8end: \n\t"
+// preload "movl diff, %%ecx \n\t" // (diff is in eax)
+ "movl %%eax, %%ecx \n\t"
+ "cmpl $0, %%ecx \n\t"
+ "jz end8 \n\t"
+// preload "movl mask, %%edx \n\t"
+ "sall $24, %%edx \n\t" // make low byte, high byte
+
+ "secondloop8: \n\t"
+ "sall %%edx \n\t" // move high bit to CF
+ "jnc skip8 \n\t" // if CF = 0
+ "movb (%%esi), %%al \n\t"
+ "movb %%al, (%%edi) \n\t"
+
+ "skip8: \n\t"
+ "incl %%esi \n\t"
+ "incl %%edi \n\t"
+ "decl %%ecx \n\t"
+ "jnz secondloop8 \n\t"
+
+ "end8: \n\t"
+ "EMMS \n\t" // DONE
: "=a" (dummy_value_a), // output regs (dummy)
"=d" (dummy_value_d),
@@ -791,7 +1010,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
"2" (len), // ecx
"1" (mask) // edx
-#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0", "%mm4", "%mm6", "%mm7" // clobber list
#endif
);
@@ -852,19 +1071,21 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
{
png_uint_32 len;
int diff;
- int dummy_value_a; // fix 'forbidden register spilled' error
+ int dummy_value_a; // fix 'forbidden register spilled' error
int dummy_value_d;
int dummy_value_c;
int dummy_value_S;
int dummy_value_D;
- _unmask = ~mask; // global variable for -fPIC version
+
srcptr = png_ptr->row_buf + 1;
dstptr = row;
- len = png_ptr->width &~7; // reduce to multiple of 8
- diff = (int) (png_ptr->width & 7); // amount lost //
+ len = png_ptr->width & ~7; // reduce to multiple of 8
+ diff = (int) (png_ptr->width & 7); // amount lost
__asm__ __volatile__ (
- "movd _unmask, %%mm7 \n\t" // load bit pattern
+ "not %%edx \n\t" // mask => unmask
+ "movd %%edx, %%mm7 \n\t" // load bit pattern
+ "not %%edx \n\t" // unmask => mask for later
"psubb %%mm6, %%mm6 \n\t" // zero mm6
"punpcklbw %%mm7, %%mm7 \n\t"
"punpcklwd %%mm7, %%mm7 \n\t"
@@ -944,7 +1165,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
"3" (srcptr), // esi
"4" (dstptr) // edi
-#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0", "%mm1", "%mm4" // clobber list
, "%mm5", "%mm6", "%mm7"
#endif
@@ -1005,19 +1226,21 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
{
png_uint_32 len;
int diff;
- int dummy_value_a; // fix 'forbidden register spilled' error
+ int dummy_value_a; // fix 'forbidden register spilled' error
int dummy_value_d;
int dummy_value_c;
int dummy_value_S;
int dummy_value_D;
- _unmask = ~mask; // global variable for -fPIC version
+
srcptr = png_ptr->row_buf + 1;
dstptr = row;
- len = png_ptr->width &~7; // reduce to multiple of 8
- diff = (int) (png_ptr->width & 7); // amount lost //
+ len = png_ptr->width & ~7; // reduce to multiple of 8
+ diff = (int) (png_ptr->width & 7); // amount lost
__asm__ __volatile__ (
- "movd _unmask, %%mm7 \n\t" // load bit pattern
+ "not %%edx \n\t" // mask => unmask
+ "movd %%edx, %%mm7 \n\t" // load bit pattern
+ "not %%edx \n\t" // unmask => mask for later
"psubb %%mm6, %%mm6 \n\t" // zero mm6
"punpcklbw %%mm7, %%mm7 \n\t"
"punpcklwd %%mm7, %%mm7 \n\t"
@@ -1112,7 +1335,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
"2" (len), // ecx
"1" (mask) // edx
-#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0", "%mm1", "%mm2" // clobber list
, "%mm4", "%mm5", "%mm6", "%mm7"
#endif
@@ -1158,181 +1381,6 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
break;
} /* end 24 bpp */
- case 32: /* png_ptr->row_info.pixel_depth */
- {
- png_bytep srcptr;
- png_bytep dstptr;
-
-#if defined(PNG_MMX_CODE_SUPPORTED) && defined(PNG_THREAD_UNSAFE_OK)
-#if !defined(PNG_1_0_X)
- if ((png_ptr->asm_flags & PNG_ASM_FLAG_MMX_READ_COMBINE_ROW)
- /* && _mmx_supported */ )
-#else
- if (_mmx_supported)
-#endif
- {
- png_uint_32 len;
- int diff;
- int dummy_value_a; // fix 'forbidden register spilled' error
- int dummy_value_d;
- int dummy_value_c;
- int dummy_value_S;
- int dummy_value_D;
- _unmask = ~mask; // global variable for -fPIC version
- srcptr = png_ptr->row_buf + 1;
- dstptr = row;
- len = png_ptr->width &~7; // reduce to multiple of 8
- diff = (int) (png_ptr->width & 7); // amount lost //
-
- __asm__ __volatile__ (
- "movd _unmask, %%mm7 \n\t" // load bit pattern
- "psubb %%mm6, %%mm6 \n\t" // zero mm6
- "punpcklbw %%mm7, %%mm7 \n\t"
- "punpcklwd %%mm7, %%mm7 \n\t"
- "punpckldq %%mm7, %%mm7 \n\t" // fill reg with 8 masks
-
- "movq _mask32_0, %%mm0 \n\t"
- "movq _mask32_1, %%mm1 \n\t"
- "movq _mask32_2, %%mm2 \n\t"
- "movq _mask32_3, %%mm3 \n\t"
-
- "pand %%mm7, %%mm0 \n\t"
- "pand %%mm7, %%mm1 \n\t"
- "pand %%mm7, %%mm2 \n\t"
- "pand %%mm7, %%mm3 \n\t"
-
- "pcmpeqb %%mm6, %%mm0 \n\t"
- "pcmpeqb %%mm6, %%mm1 \n\t"
- "pcmpeqb %%mm6, %%mm2 \n\t"
- "pcmpeqb %%mm6, %%mm3 \n\t"
-
-// preload "movl len, %%ecx \n\t" // load length of line
-// preload "movl srcptr, %%esi \n\t" // load source
-// preload "movl dstptr, %%edi \n\t" // load dest
-
- "cmpl $0, %%ecx \n\t" // lcr
- "jz mainloop32end \n\t"
-
- "mainloop32: \n\t"
- "movq (%%esi), %%mm4 \n\t"
- "pand %%mm0, %%mm4 \n\t"
- "movq %%mm0, %%mm6 \n\t"
- "movq (%%edi), %%mm7 \n\t"
- "pandn %%mm7, %%mm6 \n\t"
- "por %%mm6, %%mm4 \n\t"
- "movq %%mm4, (%%edi) \n\t"
-
- "movq 8(%%esi), %%mm5 \n\t"
- "pand %%mm1, %%mm5 \n\t"
- "movq %%mm1, %%mm7 \n\t"
- "movq 8(%%edi), %%mm6 \n\t"
- "pandn %%mm6, %%mm7 \n\t"
- "por %%mm7, %%mm5 \n\t"
- "movq %%mm5, 8(%%edi) \n\t"
-
- "movq 16(%%esi), %%mm6 \n\t"
- "pand %%mm2, %%mm6 \n\t"
- "movq %%mm2, %%mm4 \n\t"
- "movq 16(%%edi), %%mm7 \n\t"
- "pandn %%mm7, %%mm4 \n\t"
- "por %%mm4, %%mm6 \n\t"
- "movq %%mm6, 16(%%edi) \n\t"
-
- "movq 24(%%esi), %%mm7 \n\t"
- "pand %%mm3, %%mm7 \n\t"
- "movq %%mm3, %%mm5 \n\t"
- "movq 24(%%edi), %%mm4 \n\t"
- "pandn %%mm4, %%mm5 \n\t"
- "por %%mm5, %%mm7 \n\t"
- "movq %%mm7, 24(%%edi) \n\t"
-
- "addl $32, %%esi \n\t" // inc by 32 bytes processed
- "addl $32, %%edi \n\t"
- "subl $8, %%ecx \n\t" // dec by 8 pixels processed
- "ja mainloop32 \n\t"
-
- "mainloop32end: \n\t"
-// preload "movl diff, %%ecx \n\t" // (diff is in eax)
- "movl %%eax, %%ecx \n\t"
- "cmpl $0, %%ecx \n\t"
- "jz end32 \n\t"
-// preload "movl mask, %%edx \n\t"
- "sall $24, %%edx \n\t" // low byte => high byte
-
- "secondloop32: \n\t"
- "sall %%edx \n\t" // move high bit to CF
- "jnc skip32 \n\t" // if CF = 0
- "movl (%%esi), %%eax \n\t"
- "movl %%eax, (%%edi) \n\t"
-
- "skip32: \n\t"
- "addl $4, %%esi \n\t"
- "addl $4, %%edi \n\t"
- "decl %%ecx \n\t"
- "jnz secondloop32 \n\t"
-
- "end32: \n\t"
- "EMMS \n\t" // DONE
-
- : "=a" (dummy_value_a), // output regs (dummy)
- "=d" (dummy_value_d),
- "=c" (dummy_value_c),
- "=S" (dummy_value_S),
- "=D" (dummy_value_D)
-
- : "3" (srcptr), // esi // input regs
- "4" (dstptr), // edi
- "0" (diff), // eax
-// was (unmask) "b" RESERVED // ebx // Global Offset Table idx
- "2" (len), // ecx
- "1" (mask) // edx
-
-#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
- : "%mm0", "%mm1", "%mm2", "%mm3" // clobber list
- , "%mm4", "%mm5", "%mm6", "%mm7"
-#endif
- );
- }
- else /* mmx _not supported - Use modified C routine */
-#endif /* PNG_MMX_CODE_SUPPORTED */
- {
- register png_uint_32 i;
- png_uint_32 initial_val = BPP4 * png_pass_start[png_ptr->pass];
- /* png.c: png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; */
- register int stride = BPP4 * png_pass_inc[png_ptr->pass];
- /* png.c: png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; */
- register int rep_bytes = BPP4 * png_pass_width[png_ptr->pass];
- /* png.c: png_pass_width[] = {8, 4, 4, 2, 2, 1, 1}; */
- png_uint_32 len = png_ptr->width &~7; /* reduce to mult. of 8 */
- int diff = (int) (png_ptr->width & 7); /* amount lost */
- register png_uint_32 final_val = BPP4 * len; /* GRR bugfix */
-
- srcptr = png_ptr->row_buf + 1 + initial_val;
- dstptr = row + initial_val;
-
- for (i = initial_val; i < final_val; i += stride)
- {
- png_memcpy(dstptr, srcptr, rep_bytes);
- srcptr += stride;
- dstptr += stride;
- }
- if (diff) /* number of leftover pixels: 3 for pngtest */
- {
- final_val+=diff*BPP4;
- for (; i < final_val; i += stride)
- {
- if (rep_bytes > (int)(final_val-i))
- rep_bytes = (int)(final_val-i);
- png_memcpy(dstptr, srcptr, rep_bytes);
- srcptr += stride;
- dstptr += stride;
- }
- }
- } /* end of else (_mmx_supported) */
-
- break;
- } /* end 32 bpp */
-
case 48: /* png_ptr->row_info.pixel_depth */
{
png_bytep srcptr;
@@ -1348,19 +1396,21 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
{
png_uint_32 len;
int diff;
- int dummy_value_a; // fix 'forbidden register spilled' error
+ int dummy_value_a; // fix 'forbidden register spilled' error
int dummy_value_d;
int dummy_value_c;
int dummy_value_S;
int dummy_value_D;
- _unmask = ~mask; // global variable for -fPIC version
+
srcptr = png_ptr->row_buf + 1;
dstptr = row;
- len = png_ptr->width &~7; // reduce to multiple of 8
- diff = (int) (png_ptr->width & 7); // amount lost //
+ len = png_ptr->width & ~7; // reduce to multiple of 8
+ diff = (int) (png_ptr->width & 7); // amount lost
__asm__ __volatile__ (
- "movd _unmask, %%mm7 \n\t" // load bit pattern
+ "not %%edx \n\t" // mask => unmask
+ "movd %%edx, %%mm7 \n\t" // load bit pattern
+ "not %%edx \n\t" // unmask => mask for later
"psubb %%mm6, %%mm6 \n\t" // zero mm6
"punpcklbw %%mm7, %%mm7 \n\t"
"punpcklwd %%mm7, %%mm7 \n\t"
@@ -1479,7 +1529,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
"2" (len), // ecx
"1" (mask) // edx
-#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0", "%mm1", "%mm2", "%mm3" // clobber list
, "%mm4", "%mm5", "%mm6", "%mm7"
#endif
@@ -1614,8 +1664,8 @@ png_do_read_interlace(png_structp png_ptr)
png_warning(png_ptr, "asm_flags may not have been initialized");
#endif
png_mmx_support();
-#endif
}
+#endif
if (row != NULL && row_info != NULL)
{
@@ -1878,7 +1928,7 @@ png_do_read_interlace(png_structp png_ptr)
"0" (width), // ecx
"3" (&_const4) // %1(?) (0x0000000000FFFFFFLL)
-#if 0 /* %mm0, ..., %mm4 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0", "%mm1", "%mm2" // clobber list
, "%mm3", "%mm4"
#endif
@@ -1897,7 +1947,7 @@ png_do_read_interlace(png_structp png_ptr)
".loop3_pass2: \n\t"
"movd (%%esi), %%mm0 \n\t" // x x x x x 2 1 0
- "pand (%3), %%mm0 \n\t" // z z z z z 2 1 0
+ "pand (%3), %%mm0 \n\t" // z z z z z 2 1 0
"movq %%mm0, %%mm1 \n\t" // z z z z z 2 1 0
"psllq $16, %%mm0 \n\t" // z z z 2 1 0 z z
"movq %%mm0, %%mm2 \n\t" // z z z 2 1 0 z z
@@ -1924,7 +1974,7 @@ png_do_read_interlace(png_structp png_ptr)
"0" (width), // ecx
"3" (&_const4) // (0x0000000000FFFFFFLL)
-#if 0 /* %mm0, ..., %mm2 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0", "%mm1", "%mm2" // clobber list
#endif
);
@@ -1956,14 +2006,14 @@ png_do_read_interlace(png_structp png_ptr)
"movq %%mm0, %%mm1 \n\t" // x x 5 4 3 2 1 0
"movq %%mm0, %%mm2 \n\t" // x x 5 4 3 2 1 0
"psllq $24, %%mm0 \n\t" // 4 3 2 1 0 z z z
- "pand (%3), %%mm1 \n\t" // z z z z z 2 1 0
+ "pand (%3), %%mm1 \n\t" // z z z z z 2 1 0
"psrlq $24, %%mm2 \n\t" // z z z x x 5 4 3
"por %%mm1, %%mm0 \n\t" // 4 3 2 1 0 2 1 0
"movq %%mm2, %%mm3 \n\t" // z z z x x 5 4 3
"psllq $8, %%mm2 \n\t" // z z x x 5 4 3 z
"movq %%mm0, (%%edi) \n\t"
"psrlq $16, %%mm3 \n\t" // z z z z z x x 5
- "pand (%4), %%mm3 \n\t" // z z z z z z z 5
+ "pand (%4), %%mm3 \n\t" // z z z z z z z 5
"por %%mm3, %%mm2 \n\t" // z z x x 5 4 3 5
"subl $6, %%esi \n\t"
"movd %%mm2, 8(%%edi) \n\t"
@@ -1984,7 +2034,7 @@ png_do_read_interlace(png_structp png_ptr)
"3" (&_const4), // 0x0000000000FFFFFFLL
"4" (&_const6) // 0x00000000000000FFLL
-#if 0 /* %mm0, ..., %mm3 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0", "%mm1" // clobber list
, "%mm2", "%mm3"
#endif
@@ -2057,7 +2107,7 @@ png_do_read_interlace(png_structp png_ptr)
"2" (dp), // edi
"0" (width_mmx) // ecx
-#if 0 /* %mm0, ..., %mm4 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0", "%mm1", "%mm2" // clobber list
, "%mm3", "%mm4"
#endif
@@ -2131,7 +2181,7 @@ png_do_read_interlace(png_structp png_ptr)
"2" (dp), // edi
"0" (width_mmx) // ecx
-#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0", "%mm1" // clobber list
#endif
);
@@ -2185,7 +2235,7 @@ png_do_read_interlace(png_structp png_ptr)
"2" (dp), // edi
"0" (width_mmx) // ecx
-#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0", "%mm1" // clobber list
#endif
);
@@ -2247,7 +2297,7 @@ png_do_read_interlace(png_structp png_ptr)
"2" (dp), // edi
"0" (width_mmx) // ecx
-#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0", "%mm1" // clobber list
#endif
);
@@ -2304,7 +2354,7 @@ png_do_read_interlace(png_structp png_ptr)
"2" (dp), // edi
"0" (width_mmx) // ecx
-#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0", "%mm1" // clobber list
#endif
);
@@ -2357,7 +2407,7 @@ png_do_read_interlace(png_structp png_ptr)
"2" (dp), // edi
"0" (width_mmx) // ecx
-#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0" // clobber list
#endif
);
@@ -2424,7 +2474,7 @@ png_do_read_interlace(png_structp png_ptr)
"2" (dp), // edi
"0" (width_mmx) // ecx
-#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0", "%mm1" // clobber list
#endif
);
@@ -2482,7 +2532,7 @@ png_do_read_interlace(png_structp png_ptr)
"2" (dp), // edi
"0" (width_mmx) // ecx
-#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0", "%mm1" // clobber list
#endif
);
@@ -2538,7 +2588,7 @@ png_do_read_interlace(png_structp png_ptr)
"2" (dp), // edi
"0" (width_mmx) // ecx
-#if 0 /* %mm0, %mm1 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0", "%mm1" // clobber list
#endif
);
@@ -2601,7 +2651,7 @@ png_do_read_interlace(png_structp png_ptr)
"2" (dp), // edi
"0" (width) // ecx
-#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0" // clobber list
#endif
);
@@ -2640,7 +2690,7 @@ png_do_read_interlace(png_structp png_ptr)
"2" (dp), // edi
"0" (width) // ecx
-#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0" // clobber list
#endif
);
@@ -2676,7 +2726,7 @@ png_do_read_interlace(png_structp png_ptr)
"2" (dp), // edi
"0" (width) // ecx
-#if 0 /* %mm0 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
: "%mm0" // clobber list
#endif
);
@@ -3084,7 +3134,7 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
"1" (row) // edi
: "%ecx" // clobber list
-#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
, "%mm0", "%mm1", "%mm2", "%mm3"
, "%mm4", "%mm5", "%mm6", "%mm7"
#endif
@@ -3183,7 +3233,7 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
"1" (row) // edi
: "%ecx" // clobber list
-#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
, "%mm0", "%mm1", "%mm2", "%mm3"
, "%mm4", "%mm5", "%mm6", "%mm7"
#endif
@@ -3319,7 +3369,7 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
"1" (row) // edi
: "%ecx" // clobber list
-#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
, "%mm0", "%mm1", "%mm2", "%mm3"
, "%mm4", "%mm5", "%mm6", "%mm7"
#endif
@@ -3431,7 +3481,7 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
"1" (row) // edi
: "%ecx" // clobber list
-#if 0 /* %mm0, ..., %mm5 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
, "%mm0", "%mm1", "%mm2"
, "%mm3", "%mm4", "%mm5"
#endif
@@ -3934,7 +3984,7 @@ png_read_filter_row_mmx_paeth(png_row_infop row_info, png_bytep row,
"1" (row) // edi
: "%ecx" // clobber list
-#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
, "%mm0", "%mm1", "%mm2", "%mm3"
, "%mm4", "%mm5", "%mm6", "%mm7"
#endif
@@ -4096,7 +4146,7 @@ png_read_filter_row_mmx_paeth(png_row_infop row_info, png_bytep row,
"1" (row) // edi
: "%ecx" // clobber list
-#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
, "%mm0", "%mm1", "%mm2", "%mm3"
, "%mm4", "%mm5", "%mm6", "%mm7"
#endif
@@ -4241,7 +4291,7 @@ png_read_filter_row_mmx_paeth(png_row_infop row_info, png_bytep row,
"1" (row) // edi
: "%ecx" // clobber list
-#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
, "%mm0", "%mm1", "%mm2", "%mm3"
, "%mm4", "%mm5", "%mm6", "%mm7"
#endif
@@ -4387,7 +4437,7 @@ png_read_filter_row_mmx_paeth(png_row_infop row_info, png_bytep row,
"1" (row) // edi
: "%ecx" // clobber list
-#if 0 /* %mm0, ..., %mm7 not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
, "%mm0", "%mm1", "%mm2", "%mm3"
, "%mm4", "%mm5", "%mm6", "%mm7"
#endif
@@ -4696,7 +4746,7 @@ png_read_filter_row_mmx_sub(png_row_infop row_info, png_bytep row)
: "%esi", "%ecx", "%edx" // clobber list
-#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
, "%mm0", "%mm1", "%mm2", "%mm3"
, "%mm4", "%mm5", "%mm6", "%mm7"
#endif
@@ -4757,7 +4807,7 @@ png_read_filter_row_mmx_sub(png_row_infop row_info, png_bytep row)
"1" (row) // edi
: "%edx", "%esi" // clobber list
-#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
, "%mm0", "%mm1", "%mm6", "%mm7"
#endif
);
@@ -4838,7 +4888,7 @@ png_read_filter_row_mmx_sub(png_row_infop row_info, png_bytep row)
"1" (row) // edi
: "%edx", "%esi" // clobber list
-#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
, "%mm0", "%mm1"
#endif
);
@@ -4905,7 +4955,7 @@ png_read_filter_row_mmx_sub(png_row_infop row_info, png_bytep row)
"1" (row) // edi
: "%edx", "%esi" // clobber list
-#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
, "%mm0", "%mm1", "%mm5", "%mm6", "%mm7"
#endif
);
@@ -4984,7 +5034,7 @@ png_read_filter_row_mmx_sub(png_row_infop row_info, png_bytep row)
"1" (row) // edi
: "%ecx", "%edx", "%esi" // clobber list
-#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
, "%mm0", "%mm1", "%mm2", "%mm3", "%mm4", "%mm5", "%mm6", "%mm7"
#endif
);
@@ -5017,7 +5067,7 @@ png_read_filter_row_mmx_sub(png_row_infop row_info, png_bytep row)
"1" (row) // edi
: "%edx", "%esi" // clobber list
-#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
, "%mm0", "%mm1"
#endif
);
@@ -5211,7 +5261,7 @@ png_read_filter_row_mmx_up(png_row_infop row_info, png_bytep row,
, "%ebx"
#endif
-#if 0 /* MMX regs (%mm0, etc.) not supported by gcc 2.7.2.3 or egcs 1.1 */
+#ifdef CLOBBER_MMX_REGS_SUPPORTED
, "%mm0", "%mm1", "%mm2", "%mm3"
, "%mm4", "%mm5", "%mm6", "%mm7"
#endif
@@ -5249,8 +5299,8 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
#define UseMMX_paeth 1 // GRR: converted 20000828
if (_mmx_supported == 2) {
- /* this should have happened in png_init_mmx_flags() already */
#if !defined(PNG_1_0_X)
+ /* this should have happened in png_init_mmx_flags() already */
png_warning(png_ptr, "asm_flags may not have been initialized");
#endif
png_mmx_support();
@@ -5483,5 +5533,3 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep
#endif /* PNG_USE_PNGGCCRD */
-
-
diff --git a/pngtest.c b/pngtest.c
index ddc9887de..f704c4f0c 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -1553,4 +1553,4 @@ main(int argc, char *argv[])
}
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_2_19beta11 your_png_h_is_not_version_1_2_19beta11;
+typedef version_1_2_19beta12 your_png_h_is_not_version_1_2_19beta12;
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 57e455ffd..5c4654f20 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -179,7 +179,7 @@ configure_file(${PNG_SOURCE_DIR}/scripts/libpng-config.in
# SET UP LINKS
set_target_properties(${PNG_LIB_NAME} PROPERTIES
-# VERSION 0.${PNGLIB_RELEASE}.1.2.19beta11
+# VERSION 0.${PNGLIB_RELEASE}.1.2.19beta12
VERSION 0.${PNGLIB_RELEASE}.0
SOVERSION 0
CLEAN_DIRECT_OUTPUT 1)
diff --git a/scripts/libpng-config-head.in b/scripts/libpng-config-head.in
index 258139c35..4967c5ca0 100755
--- a/scripts/libpng-config-head.in
+++ b/scripts/libpng-config-head.in
@@ -8,7 +8,7 @@
# Modeled after libxml-config.
-version=1.2.19beta11
+version=1.2.19beta12
prefix=""
libdir=""
libs=""
diff --git a/scripts/libpng.pc-configure.in b/scripts/libpng.pc-configure.in
index e81aab80c..af971dd64 100644
--- a/scripts/libpng.pc-configure.in
+++ b/scripts/libpng.pc-configure.in
@@ -5,6 +5,6 @@ includedir=@includedir@/libpng12
Name: libpng
Description: Loads and saves PNG files
-Version: 1.2.19beta11
+Version: 1.2.19beta12
Libs: -L${libdir} -lpng12
Cflags: -I${includedir} @LIBPNG_NO_MMX@
diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in
index 48d26dd7f..36f517f9d 100644
--- a/scripts/libpng.pc.in
+++ b/scripts/libpng.pc.in
@@ -5,6 +5,6 @@ includedir=@includedir@/libpng12
Name: libpng
Description: Loads and saves PNG files
-Version: 1.2.19beta11
+Version: 1.2.19beta12
Libs: -L${libdir} -lpng12
Cflags: -I${includedir}
diff --git a/scripts/makefile.32sunu b/scripts/makefile.32sunu
index c52808264..444203e18 100644
--- a/scripts/makefile.32sunu
+++ b/scripts/makefile.32sunu
@@ -8,7 +8,7 @@
# Library name:
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/makefile.64sunu b/scripts/makefile.64sunu
index 47d6d9d85..d36c9d215 100644
--- a/scripts/makefile.64sunu
+++ b/scripts/makefile.64sunu
@@ -8,7 +8,7 @@
# Library name:
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/makefile.aix b/scripts/makefile.aix
index d7c19cf34..a9b3cf89e 100644
--- a/scripts/makefile.aix
+++ b/scripts/makefile.aix
@@ -20,7 +20,7 @@ LN_SF = ln -f -s
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
prefix=/usr/local
diff --git a/scripts/makefile.beos b/scripts/makefile.beos
index 0eae7e863..9ce6e655e 100644
--- a/scripts/makefile.beos
+++ b/scripts/makefile.beos
@@ -8,7 +8,7 @@
# Library name:
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/makefile.cygwin b/scripts/makefile.cygwin
index c8ea90018..c898f8349 100644
--- a/scripts/makefile.cygwin
+++ b/scripts/makefile.cygwin
@@ -80,7 +80,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
LIBNAME = libpng12
PNGMAJ = 0
CYGDLL = 12
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=cygpng$(CYGDLL).dll
diff --git a/scripts/makefile.darwin b/scripts/makefile.darwin
index b028744f4..b383e90b8 100644
--- a/scripts/makefile.darwin
+++ b/scripts/makefile.darwin
@@ -19,7 +19,7 @@ ZLIBINC=../zlib
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/makefile.dec b/scripts/makefile.dec
index 7a087a9bd..dfe8be560 100644
--- a/scripts/makefile.dec
+++ b/scripts/makefile.dec
@@ -5,7 +5,7 @@
# Library name:
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
diff --git a/scripts/makefile.elf b/scripts/makefile.elf
index 161407668..f131c0c8b 100644
--- a/scripts/makefile.elf
+++ b/scripts/makefile.elf
@@ -12,7 +12,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/makefile.gcmmx b/scripts/makefile.gcmmx
index 4bf423e4a..852856898 100644
--- a/scripts/makefile.gcmmx
+++ b/scripts/makefile.gcmmx
@@ -16,7 +16,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/makefile.hp64 b/scripts/makefile.hp64
index e524b27ad..0c2139506 100644
--- a/scripts/makefile.hp64
+++ b/scripts/makefile.hp64
@@ -18,7 +18,7 @@ ZLIBINC=/opt/zlib/include
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/makefile.hpgcc b/scripts/makefile.hpgcc
index 3f82e6c3e..f8114817c 100644
--- a/scripts/makefile.hpgcc
+++ b/scripts/makefile.hpgcc
@@ -8,7 +8,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/makefile.hpux b/scripts/makefile.hpux
index a4bd122d3..37515c78f 100644
--- a/scripts/makefile.hpux
+++ b/scripts/makefile.hpux
@@ -18,7 +18,7 @@ ZLIBINC=/opt/zlib/include
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/makefile.linux b/scripts/makefile.linux
index 829d3db71..fde169f25 100644
--- a/scripts/makefile.linux
+++ b/scripts/makefile.linux
@@ -6,7 +6,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/makefile.mingw b/scripts/makefile.mingw
index 02ea4180c..1db7f3f9a 100644
--- a/scripts/makefile.mingw
+++ b/scripts/makefile.mingw
@@ -76,7 +76,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
LIBNAME = libpng12
PNGMAJ = 0
MINGDLL = 12
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=libpng$(MINGDLL).dll
diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd
index 5d495594d..3fe0cfb60 100644
--- a/scripts/makefile.ne12bsd
+++ b/scripts/makefile.ne12bsd
@@ -14,7 +14,7 @@ INCSDIR=${LOCALBASE}/include/libpng12
LIB= png12
SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.2.19beta11
+SHLIB_MINOR= 1.2.19beta12
SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/scripts/makefile.netbsd b/scripts/makefile.netbsd
index 3ba15eff0..01c5f4fef 100644
--- a/scripts/makefile.netbsd
+++ b/scripts/makefile.netbsd
@@ -14,7 +14,7 @@ INCSDIR=${LOCALBASE}/include/libpng
LIB= png
SHLIB_MAJOR= 3
-SHLIB_MINOR= 1.2.19beta11
+SHLIB_MINOR= 1.2.19beta12
SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/scripts/makefile.nommx b/scripts/makefile.nommx
index d2ecc7146..c6051c2dd 100644
--- a/scripts/makefile.nommx
+++ b/scripts/makefile.nommx
@@ -7,7 +7,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/makefile.openbsd b/scripts/makefile.openbsd
index 10f72d821..7fe5e6707 100644
--- a/scripts/makefile.openbsd
+++ b/scripts/makefile.openbsd
@@ -8,7 +8,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.2.19beta11
+SHLIB_MINOR= 1.2.19beta12
LIB= png
SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
diff --git a/scripts/makefile.sco b/scripts/makefile.sco
index 4d6fe50e3..6fe706371 100644
--- a/scripts/makefile.sco
+++ b/scripts/makefile.sco
@@ -9,7 +9,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/makefile.sggcc b/scripts/makefile.sggcc
index 26d28d974..63644692d 100644
--- a/scripts/makefile.sggcc
+++ b/scripts/makefile.sggcc
@@ -6,7 +6,7 @@
# Library name:
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/makefile.sgi b/scripts/makefile.sgi
index 6e1bee306..f369a8576 100644
--- a/scripts/makefile.sgi
+++ b/scripts/makefile.sgi
@@ -6,7 +6,7 @@
# Library name:
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/makefile.so9 b/scripts/makefile.so9
index 6d9ecd95d..1f29e7470 100644
--- a/scripts/makefile.so9
+++ b/scripts/makefile.so9
@@ -8,7 +8,7 @@
# Library name:
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris
index 2fe30c822..3999cee3f 100644
--- a/scripts/makefile.solaris
+++ b/scripts/makefile.solaris
@@ -8,7 +8,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/makefile.solaris-x86 b/scripts/makefile.solaris-x86
index 522868999..0748c3d31 100644
--- a/scripts/makefile.solaris-x86
+++ b/scripts/makefile.solaris-x86
@@ -8,7 +8,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.19beta11
+PNGMIN = 1.2.19beta12
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/scripts/pngos2.def b/scripts/pngos2.def
index 96cb27789..f70387f0e 100644
--- a/scripts/pngos2.def
+++ b/scripts/pngos2.def
@@ -2,7 +2,7 @@
; PNG.LIB module definition file for OS/2
;----------------------------------------
-; Version 1.2.19beta11
+; Version 1.2.19beta12
LIBRARY PNG
DESCRIPTION "PNG image compression library for OS/2"
diff --git a/scripts/pngw32.def b/scripts/pngw32.def
index d5146c832..eb88df9b9 100644
--- a/scripts/pngw32.def
+++ b/scripts/pngw32.def
@@ -5,7 +5,7 @@
LIBRARY
EXPORTS
-;Version 1.2.19beta11
+;Version 1.2.19beta12
png_build_grayscale_palette @1
png_check_sig @2
png_chunk_error @3