mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Compare commits
37 Commits
v1.5.6beta
...
v1.5.7beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55e85c24b4 | ||
|
|
fcc0263191 | ||
|
|
1d8b75550f | ||
|
|
aff44028ba | ||
|
|
6d7705eedf | ||
|
|
d3a94802d8 | ||
|
|
2b7d730e27 | ||
|
|
bc6726bc04 | ||
|
|
1876366b17 | ||
|
|
c94b996af8 | ||
|
|
0e9f8ced1e | ||
|
|
7342fcaf92 | ||
|
|
92ef313c77 | ||
|
|
cb75699dff | ||
|
|
122a525c83 | ||
|
|
5e823c1fd5 | ||
|
|
8db19980fa | ||
|
|
ef02d563a3 | ||
|
|
b2068640d1 | ||
|
|
93254f66fc | ||
|
|
52093f1776 | ||
|
|
0654d63196 | ||
|
|
4e8aa822dc | ||
|
|
1c42276a39 | ||
|
|
c9e27d026d | ||
|
|
e7db181e5d | ||
|
|
f5c5e53bf5 | ||
|
|
ecb3ad035a | ||
|
|
fb5b3ac013 | ||
|
|
5b84901c55 | ||
|
|
57cbcf6b8f | ||
|
|
07772cba07 | ||
|
|
5c1905caae | ||
|
|
d58251b47e | ||
|
|
d3dcb463d6 | ||
|
|
3dbfd300ff | ||
|
|
ff36991ca2 |
76
ANNOUNCE
76
ANNOUNCE
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.5.6beta05 - October 12, 2011
|
Libpng 1.5.7beta01 - November 4, 2011
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
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.
|
within a few weeks by a public version or by another test version.
|
||||||
@@ -9,66 +9,40 @@ Files available for download:
|
|||||||
Source files with LF line endings (for Unix/Linux) and with a
|
Source files with LF line endings (for Unix/Linux) and with a
|
||||||
"configure" script
|
"configure" script
|
||||||
|
|
||||||
1.5.6beta05.tar.xz (LZMA-compressed, recommended)
|
1.5.7beta01.tar.xz (LZMA-compressed, recommended)
|
||||||
1.5.6beta05.tar.gz
|
1.5.7beta01.tar.gz
|
||||||
1.5.6beta05.tar.bz2
|
1.5.7beta01.tar.bz2
|
||||||
|
|
||||||
Source files with CRLF line endings (for Windows), without the
|
Source files with CRLF line endings (for Windows), without the
|
||||||
"configure" script
|
"configure" script
|
||||||
|
|
||||||
lp156b05.7z (LZMA-compressed, recommended)
|
lp157b01.7z (LZMA-compressed, recommended)
|
||||||
lp156b05.zip
|
lp157b01.zip
|
||||||
|
|
||||||
Other information:
|
Other information:
|
||||||
|
|
||||||
1.5.6beta05-README.txt
|
1.5.7beta01-README.txt
|
||||||
1.5.6beta05-LICENSE.txt
|
1.5.7beta01-LICENSE.txt
|
||||||
|
|
||||||
Changes since the last public release (1.5.5):
|
Changes since the last public release (1.5.6):
|
||||||
|
|
||||||
Version 1.5.6beta01 [September 22, 2011]
|
Version 1.5.7beta01 [November 4, 2011]
|
||||||
Fixed some 64-bit type conversion warnings in pngrtran.c
|
Added support for ARM processor (Mans Rullgard)
|
||||||
Moved row_info from png_struct to a local variable.
|
Fixed bug in pngvalid on early allocation failure; fixed type cast in
|
||||||
The various interlace mask arrays have been made into arrays of
|
pngmem.c; pngvalid would attempt to call png_error() if the allocation
|
||||||
bytes and made PNG_CONST and static (previously some arrays were
|
of a png_struct or png_info failed. This would probably have led to a
|
||||||
marked PNG_CONST and some weren't).
|
crash. The pngmem.c implementation of png_malloc() included a cast
|
||||||
Additional checks have been added to the transform code to validate the
|
to png_size_t which would fail on large allocations on 16-bit systems.
|
||||||
pixel depths after the transforms on both read and write.
|
Fix for the preprocessor of the Intel C compiler. The preprocessor
|
||||||
Removed some redundant code from pngwrite.c, in png_desgtroy_write_struct().
|
splits adjacent @ signs with a space; this changes the concatentation
|
||||||
Changed chunk reading/writing code to use png_uint_32 instead of png_byte[4].
|
token from @@@ to PNG_JOIN; that should work with all compiler
|
||||||
This removes the need to allocate temporary strings for chunk names on
|
preprocessors.
|
||||||
the stack in the read/write code. Unknown chunk handling still uses the
|
Paeth filter speed improvements from work by Siarhei Siamashka. This
|
||||||
string form because this is exposed in the API.
|
changes the 'Paeth' reconstruction function to improve the GCC code
|
||||||
|
generation on x86. The changes are only part of the suggested ones;
|
||||||
|
just the changes that definitely improve speed and remain simple.
|
||||||
|
The changes also slightly increase the clarity of the code. In a
|
||||||
|
|
||||||
Version 1.5.6beta02 [September 26, 2011]
|
|
||||||
Added a note in the manual the png_read_update_info() must be called only
|
|
||||||
once with a particular info_ptr.
|
|
||||||
Fixed a typo in the definition of the new PNG_STRING_FROM_CHUNK(s,c) macro.
|
|
||||||
|
|
||||||
Version 1.5.6beta03 [September 28, 2011]
|
|
||||||
Revised test-pngtest.sh to report FAIL when pngtest fails.
|
|
||||||
Added "--strict" option to pngtest, to report FAIL when the failure is
|
|
||||||
only because the resulting valid files are different.
|
|
||||||
Revised CMakeLists.txt to work with mingw and removed some material from
|
|
||||||
CMakeLists.txt that is no longer useful in libpng-1.5.
|
|
||||||
|
|
||||||
Version 1.5.6beta04 [October 5, 2011]
|
|
||||||
Fixed typo in Makefile.in and Makefile.am ("-M Wl" should be "-M -Wl")."
|
|
||||||
|
|
||||||
Version 1.5.6beta05 [October 12, 2011]
|
|
||||||
Speed up png_combine_row() for interlaced images. This reduces the generality
|
|
||||||
of the code, allowing it to be optimized for Adam7 interlace. The masks
|
|
||||||
passed to png_combine_row() are now generated internally, avoiding
|
|
||||||
some code duplication and localizing the interlace handling somewhat.
|
|
||||||
Align png_struct::row_buf - previously it was always unaligned, caused by
|
|
||||||
a bug in the code that attempted to align it; the code needs to subtract
|
|
||||||
one from the pointer to take account of the filter byte prepended to
|
|
||||||
each row.
|
|
||||||
Optimized png_combine_row() when rows are aligned. This gains a small
|
|
||||||
percentage for 16-bit and 32-bit pixels in the typical case where the
|
|
||||||
output row buffers are appropriately aligned. The optimization was not
|
|
||||||
previously possible because the png_struct buffer was always misaligned.
|
|
||||||
Fixed bug in png_write_chunk_header() debug print, introduced in 1.5.6bet01.
|
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
57
CHANGES
57
CHANGES
@@ -3629,7 +3629,62 @@ Version 1.5.6beta05 [October 12, 2011]
|
|||||||
percentage for 16-bit and 32-bit pixels in the typical case where the
|
percentage for 16-bit and 32-bit pixels in the typical case where the
|
||||||
output row buffers are appropriately aligned. The optimization was not
|
output row buffers are appropriately aligned. The optimization was not
|
||||||
previously possible because the png_struct buffer was always misaligned.
|
previously possible because the png_struct buffer was always misaligned.
|
||||||
Fixed bug in png_write_chunk_header() debug print, introduced in 1.5.6bet01.
|
Fixed bug in png_write_chunk_header() debug print, introduced in 1.5.6beta01.
|
||||||
|
|
||||||
|
Version 1.5.6beta06 [October 17, 2011]
|
||||||
|
Removed two redundant tests for unitialized row.
|
||||||
|
Fixed a relatively harmless memory overwrite in compressed text writing
|
||||||
|
with a 1 byte zlib buffer.
|
||||||
|
Add ability to call png_read_update_info multiple times to pngvalid.c.
|
||||||
|
Fixes for multiple calls to png_read_update_info. These fixes attend to
|
||||||
|
most of the errors revealed in pngvalid, however doing the gamma work
|
||||||
|
twice results in inaccuracies that can't be easily fixed. There is now
|
||||||
|
a warning in the code if this is going to happen.
|
||||||
|
Turned on multiple png_read_update_info in pngvalid transform tests.
|
||||||
|
Prevent libpng from overwriting unused bits at the end of the image when
|
||||||
|
it is not byte aligned, while reading. Prior to libpng-1.5.6 libpng would
|
||||||
|
overwrite the partial byte at the end of each row if the row width was not
|
||||||
|
an exact multiple of 8 bits and the image is not interlaced.
|
||||||
|
|
||||||
|
Version 1.5.6beta07 [October 21, 2011]
|
||||||
|
Made png_ptr->prev_row an aligned pointer into png_ptr->big_prev_row
|
||||||
|
(Mans Rullgard).
|
||||||
|
|
||||||
|
Version 1.5.6rc01 [October 26, 2011]
|
||||||
|
Changed misleading "Missing PLTE before cHRM" warning to "Out of place cHRM"
|
||||||
|
|
||||||
|
Version 1.5.6rc02 [October 27, 2011]
|
||||||
|
Added LSR() macro to defend against buggy compilers that evaluate non-taken
|
||||||
|
code branches and complain about out-of-range shifts.
|
||||||
|
|
||||||
|
Version 1.5.6rc03 [October 28, 2011]
|
||||||
|
Renamed the LSR() macro to PNG_LSR() and added PNG_LSL() macro.
|
||||||
|
Fixed compiler warnings with Intel and MSYS compilers. The logical shift
|
||||||
|
fix for Microsoft Visual C is required by other compilers, so this
|
||||||
|
enables that fix for all compilers when using compile-time constants.
|
||||||
|
Under MSYS 'byte' is a name declared in a system header file, so we
|
||||||
|
changed the name of a local variable to avoid the warnings that result.
|
||||||
|
Added #define PNG_ALIGN_TYPE PNG_ALIGN_NONE to contrib/pngminim/*/pngusr.h
|
||||||
|
|
||||||
|
Version 1.5.6 [November 3, 2011]
|
||||||
|
No changes.
|
||||||
|
|
||||||
|
Version 1.5.7beta01 [November 4, 2011]
|
||||||
|
Added support for ARM processor (Mans Rullgard)
|
||||||
|
Fixed bug in pngvalid on early allocation failure; fixed type cast in
|
||||||
|
pngmem.c; pngvalid would attempt to call png_error() if the allocation
|
||||||
|
of a png_struct or png_info failed. This would probably have led to a
|
||||||
|
crash. The pngmem.c implementation of png_malloc() included a cast
|
||||||
|
to png_size_t which would fail on large allocations on 16-bit systems.
|
||||||
|
Fix for the preprocessor of the Intel C compiler. The preprocessor
|
||||||
|
splits adjacent @ signs with a space; this changes the concatentation
|
||||||
|
token from @@@ to PNG_JOIN; that should work with all compiler
|
||||||
|
preprocessors.
|
||||||
|
Paeth filter speed improvements from work by Siarhei Siamashka. This
|
||||||
|
changes the 'Paeth' reconstruction function to improve the GCC code
|
||||||
|
generation on x86. The changes are only part of the suggested ones;
|
||||||
|
just the changes that definitely improve speed and remain simple.
|
||||||
|
The changes also slightly increase the clarity of the code. In a
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ enable_testing()
|
|||||||
|
|
||||||
set(PNGLIB_MAJOR 1)
|
set(PNGLIB_MAJOR 1)
|
||||||
set(PNGLIB_MINOR 5)
|
set(PNGLIB_MINOR 5)
|
||||||
set(PNGLIB_RELEASE 6)
|
set(PNGLIB_RELEASE 7)
|
||||||
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
|
||||||
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
|
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@ endif(NOT WIN32 OR CYGWIN)
|
|||||||
# SET UP LINKS
|
# SET UP LINKS
|
||||||
if(PNG_SHARED)
|
if(PNG_SHARED)
|
||||||
set_target_properties(${PNG_LIB_NAME} PROPERTIES
|
set_target_properties(${PNG_LIB_NAME} PROPERTIES
|
||||||
# VERSION 15.${PNGLIB_RELEASE}.1.5.6beta05
|
# VERSION 15.${PNGLIB_RELEASE}.1.5.7beta01
|
||||||
VERSION 15.${PNGLIB_RELEASE}.0
|
VERSION 15.${PNGLIB_RELEASE}.0
|
||||||
SOVERSION 15
|
SOVERSION 15
|
||||||
CLEAN_DIRECT_OUTPUT 1)
|
CLEAN_DIRECT_OUTPUT 1)
|
||||||
|
|||||||
4
LICENSE
4
LICENSE
@@ -10,7 +10,7 @@ this sentence.
|
|||||||
|
|
||||||
This code is released under the libpng license.
|
This code is released under the libpng license.
|
||||||
|
|
||||||
libpng versions 1.2.6, August 15, 2004, through 1.5.6beta05, October 12, 2011, are
|
libpng versions 1.2.6, August 15, 2004, through 1.5.7beta01, November 4, 2011, are
|
||||||
Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
|
Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
|
||||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
with the following individual added to the list of Contributing Authors
|
with the following individual added to the list of Contributing Authors
|
||||||
@@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
October 12, 2011
|
November 4, 2011
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\
|
|||||||
pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c\
|
pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c\
|
||||||
png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h
|
png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h
|
||||||
|
|
||||||
|
if PNG_ARM_NEON
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/filter_neon.S
|
||||||
|
endif
|
||||||
|
|
||||||
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
|
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
|
||||||
|
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@
|
||||||
@@ -138,9 +142,9 @@ SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0'\
|
|||||||
echo '#include "$<"' >dfn.c
|
echo '#include "$<"' >dfn.c
|
||||||
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\
|
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\
|
||||||
$(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c > dfn1.out
|
$(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c > dfn1.out
|
||||||
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC-\(.*\)-PNG_DEFN_END.*$$|\1|p'\
|
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC *-\(.*\)- *PNG_DEFN_END.*$$|\1|p'\
|
||||||
dfn1.out >dfn2.out
|
dfn1.out >dfn2.out
|
||||||
$(SED) -e 's| *@@@ *||g' -e 's| *$$||' dfn2.out >dfn3.out
|
$(SED) -e 's| *PNG_JOIN *||g' -e 's| *$$||' dfn2.out >dfn3.out
|
||||||
rm -f dfn.c dfn[12].out
|
rm -f dfn.c dfn[12].out
|
||||||
mv dfn3.out $@
|
mv dfn3.out $@
|
||||||
|
|
||||||
|
|||||||
74
Makefile.in
74
Makefile.in
@@ -41,12 +41,13 @@ POST_UNINSTALL = :
|
|||||||
build_triplet = @build@
|
build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
check_PROGRAMS = pngtest$(EXEEXT) pngvalid$(EXEEXT)
|
check_PROGRAMS = pngtest$(EXEEXT) pngvalid$(EXEEXT)
|
||||||
|
@PNG_ARM_NEON_TRUE@am__append_1 = arm/filter_neon.S
|
||||||
|
|
||||||
# Versioned symbols and restricted exports
|
# Versioned symbols and restricted exports
|
||||||
@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_TRUE@am__append_1 = -Wl,-M -Wl,libpng.vers
|
@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_TRUE@am__append_2 = -Wl,-M -Wl,libpng.vers
|
||||||
@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_FALSE@am__append_2 = -Wl,--version-script=libpng.vers
|
@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_FALSE@am__append_3 = -Wl,--version-script=libpng.vers
|
||||||
# Only restricted exports when possible
|
# Only restricted exports when possible
|
||||||
@HAVE_LD_VERSION_SCRIPT_FALSE@am__append_3 = -export-symbols libpng.sym
|
@HAVE_LD_VERSION_SCRIPT_FALSE@am__append_4 = -export-symbols libpng.sym
|
||||||
subdir = .
|
subdir = .
|
||||||
DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \
|
DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \
|
||||||
$(pkginclude_HEADERS) $(srcdir)/Makefile.am \
|
$(pkginclude_HEADERS) $(srcdir)/Makefile.am \
|
||||||
@@ -91,6 +92,12 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
|
|||||||
"$(DESTDIR)$(pkgincludedir)"
|
"$(DESTDIR)$(pkgincludedir)"
|
||||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD =
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD =
|
||||||
|
am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST = png.c \
|
||||||
|
pngerror.c pngget.c pngmem.c pngpread.c pngread.c pngrio.c \
|
||||||
|
pngrtran.c pngrutil.c pngset.c pngtrans.c pngwio.c pngwrite.c \
|
||||||
|
pngwtran.c pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h \
|
||||||
|
pngpriv.h pngstruct.h arm/filter_neon.S
|
||||||
|
@PNG_ARM_NEON_TRUE@am__objects_1 = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo
|
||||||
am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = \
|
am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = \
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.lo \
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.lo \
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.lo \
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.lo \
|
||||||
@@ -106,7 +113,8 @@ am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = \
|
|||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwio.lo \
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwio.lo \
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwrite.lo \
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwrite.lo \
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwtran.lo \
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwtran.lo \
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.lo
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngwutil.lo \
|
||||||
|
$(am__objects_1)
|
||||||
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS =
|
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS =
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = \
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS = \
|
||||||
$(am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) \
|
$(am_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS) \
|
||||||
@@ -127,6 +135,11 @@ DEFAULT_INCLUDES = -I.@am__isrc@
|
|||||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||||
am__depfiles_maybe = depfiles
|
am__depfiles_maybe = depfiles
|
||||||
am__mv = mv -f
|
am__mv = mv -f
|
||||||
|
CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||||
|
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
|
||||||
|
LTCPPASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||||
|
--mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||||
|
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
|
||||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||||
@@ -139,7 +152,8 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
|||||||
SOURCES = $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \
|
SOURCES = $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \
|
||||||
$(nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \
|
$(nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \
|
||||||
$(pngtest_SOURCES) $(pngvalid_SOURCES)
|
$(pngtest_SOURCES) $(pngvalid_SOURCES)
|
||||||
DIST_SOURCES = $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES) \
|
DIST_SOURCES = \
|
||||||
|
$(am__libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES_DIST) \
|
||||||
$(pngtest_SOURCES) $(pngvalid_SOURCES)
|
$(pngtest_SOURCES) $(pngvalid_SOURCES)
|
||||||
man3dir = $(mandir)/man3
|
man3dir = $(mandir)/man3
|
||||||
man5dir = $(mandir)/man5
|
man5dir = $(mandir)/man5
|
||||||
@@ -174,6 +188,9 @@ AUTOHEADER = @AUTOHEADER@
|
|||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
AWK = @AWK@
|
AWK = @AWK@
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
|
CCAS = @CCAS@
|
||||||
|
CCASDEPMODE = @CCASDEPMODE@
|
||||||
|
CCASFLAGS = @CCASFLAGS@
|
||||||
CCDEPMODE = @CCDEPMODE@
|
CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
@@ -324,17 +341,17 @@ bin_SCRIPTS = @binconfigs@
|
|||||||
# rules to build libpng, only build the old library on request
|
# rules to build libpng, only build the old library on request
|
||||||
lib_LTLIBRARIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
lib_LTLIBRARIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
||||||
# EXTRA_LTLIBRARIES= libpng.la
|
# EXTRA_LTLIBRARIES= libpng.la
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c \
|
||||||
pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c\
|
pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c \
|
||||||
pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c\
|
pngrutil.c pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c \
|
||||||
png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h
|
pngwutil.c png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h \
|
||||||
|
pngstruct.h $(am__append_1)
|
||||||
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
|
nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@
|
||||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined \
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined \
|
||||||
-export-dynamic -version-number \
|
-export-dynamic -version-number \
|
||||||
@PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0 \
|
@PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0 \
|
||||||
$(am__append_1) $(am__append_2) $(am__append_3)
|
$(am__append_2) $(am__append_3) $(am__append_4)
|
||||||
@HAVE_LD_VERSION_SCRIPT_FALSE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym
|
@HAVE_LD_VERSION_SCRIPT_FALSE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym
|
||||||
@HAVE_LD_VERSION_SCRIPT_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers
|
@HAVE_LD_VERSION_SCRIPT_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers
|
||||||
pkginclude_HEADERS = png.h pngconf.h
|
pkginclude_HEADERS = png.h pngconf.h
|
||||||
@@ -372,7 +389,7 @@ all: config.h
|
|||||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .chk .dfn .out .c .lo .o .obj
|
.SUFFIXES: .chk .dfn .out .S .c .lo .o .obj
|
||||||
am--refresh:
|
am--refresh:
|
||||||
@:
|
@:
|
||||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
@@ -517,6 +534,7 @@ mostlyclean-compile:
|
|||||||
distclean-compile:
|
distclean-compile:
|
||||||
-rm -f *.tab.c
|
-rm -f *.tab.c
|
||||||
|
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-png.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngerror.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngget.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-pngget.Plo@am__quote@
|
||||||
@@ -535,6 +553,34 @@ distclean-compile:
|
|||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngtest.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngtest.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngvalid.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngvalid.Po@am__quote@
|
||||||
|
|
||||||
|
.S.o:
|
||||||
|
@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||||
|
@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ $<
|
||||||
|
|
||||||
|
.S.obj:
|
||||||
|
@am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||||
|
@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||||
|
|
||||||
|
.S.lo:
|
||||||
|
@am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||||
|
@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||||
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCCAS_FALSE@ $(LTCPPASCOMPILE) -c -o $@ $<
|
||||||
|
|
||||||
|
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo: arm/filter_neon.S
|
||||||
|
@am__fastdepCCAS_TRUE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo -MD -MP -MF $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.Tpo -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo `test -f 'arm/filter_neon.S' || echo '$(srcdir)/'`arm/filter_neon.S
|
||||||
|
@am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.Tpo $(DEPDIR)/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.Plo
|
||||||
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='arm/filter_neon.S' object='libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo' libtool=yes @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCCAS_FALSE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la-filter_neon.lo `test -f 'arm/filter_neon.S' || echo '$(srcdir)/'`arm/filter_neon.S
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||||
@@ -1294,9 +1340,9 @@ pngvalid.o pngtest.o: pnglibconf.h
|
|||||||
echo '#include "$<"' >dfn.c
|
echo '#include "$<"' >dfn.c
|
||||||
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\
|
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) @LIBPNG_DEFINES@\
|
||||||
$(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c > dfn1.out
|
$(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c > dfn1.out
|
||||||
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC-\(.*\)-PNG_DEFN_END.*$$|\1|p'\
|
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC *-\(.*\)- *PNG_DEFN_END.*$$|\1|p'\
|
||||||
dfn1.out >dfn2.out
|
dfn1.out >dfn2.out
|
||||||
$(SED) -e 's| *@@@ *||g' -e 's| *$$||' dfn2.out >dfn3.out
|
$(SED) -e 's| *PNG_JOIN *||g' -e 's| *$$||' dfn2.out >dfn3.out
|
||||||
rm -f dfn.c dfn[12].out
|
rm -f dfn.c dfn[12].out
|
||||||
mv dfn3.out $@
|
mv dfn3.out $@
|
||||||
|
|
||||||
|
|||||||
2
README
2
README
@@ -1,4 +1,4 @@
|
|||||||
README for libpng version 1.5.6beta05 - October 12, 2011 (shared library 15.0)
|
README for libpng version 1.5.7beta01 - November 4, 2011 (shared library 15.0)
|
||||||
See the note about version numbers near the top of png.h
|
See the note about version numbers near the top of png.h
|
||||||
|
|
||||||
See INSTALL for instructions on how to install libpng.
|
See INSTALL for instructions on how to install libpng.
|
||||||
|
|||||||
37
aclocal.m4
vendored
37
aclocal.m4
vendored
@@ -2436,7 +2436,14 @@ freebsd* | dragonfly*)
|
|||||||
*) objformat=elf ;;
|
*) objformat=elf ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
version_type=freebsd-$objformat
|
# Handle Gentoo/FreeBSD as it was Linux
|
||||||
|
case $host_vendor in
|
||||||
|
gentoo)
|
||||||
|
version_type=linux ;;
|
||||||
|
*)
|
||||||
|
version_type=freebsd-$objformat ;;
|
||||||
|
esac
|
||||||
|
|
||||||
case $version_type in
|
case $version_type in
|
||||||
freebsd-elf*)
|
freebsd-elf*)
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
|
||||||
@@ -2447,6 +2454,12 @@ freebsd* | dragonfly*)
|
|||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
|
||||||
need_version=yes
|
need_version=yes
|
||||||
;;
|
;;
|
||||||
|
linux)
|
||||||
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
|
||||||
|
soname_spec='${libname}${release}${shared_ext}$major'
|
||||||
|
need_lib_prefix=no
|
||||||
|
need_version=no
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
case $host_os in
|
case $host_os in
|
||||||
@@ -8482,6 +8495,28 @@ m4_ifndef([AC_AUTOCONF_VERSION],
|
|||||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||||
|
|
||||||
|
# Figure out how to run the assembler. -*- Autoconf -*-
|
||||||
|
|
||||||
|
# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This file is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# serial 5
|
||||||
|
|
||||||
|
# AM_PROG_AS
|
||||||
|
# ----------
|
||||||
|
AC_DEFUN([AM_PROG_AS],
|
||||||
|
[# By default we simply use the C compiler to build assembly code.
|
||||||
|
AC_REQUIRE([AC_PROG_CC])
|
||||||
|
test "${CCAS+set}" = set || CCAS=$CC
|
||||||
|
test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
|
||||||
|
AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
|
||||||
|
AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
|
||||||
|
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
|
||||||
|
])
|
||||||
|
|
||||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||||
|
|||||||
220
arm/filter_neon.S
Normal file
220
arm/filter_neon.S
Normal file
@@ -0,0 +1,220 @@
|
|||||||
|
|
||||||
|
/* filter_neon.S - NEON optimised filter functions
|
||||||
|
*
|
||||||
|
* Copyright (c) 2011 Mans Rullgard
|
||||||
|
*
|
||||||
|
* This code is released under the libpng license.
|
||||||
|
* For conditions of distribution and use, see the disclaimer
|
||||||
|
* and license in png.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __ELF__
|
||||||
|
# define ELF
|
||||||
|
#else
|
||||||
|
# define ELF @
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.arch armv7-a
|
||||||
|
.fpu neon
|
||||||
|
|
||||||
|
.macro func name, export=0
|
||||||
|
.macro endfunc
|
||||||
|
ELF .size \name, . - \name
|
||||||
|
.endfunc
|
||||||
|
.purgem endfunc
|
||||||
|
.endm
|
||||||
|
.text
|
||||||
|
.if \export
|
||||||
|
.global \name
|
||||||
|
.endif
|
||||||
|
ELF .type \name, STT_FUNC
|
||||||
|
.func \name
|
||||||
|
\name:
|
||||||
|
.endm
|
||||||
|
|
||||||
|
func png_read_filter_row_sub4_neon, export=1
|
||||||
|
ldr r3, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
1:
|
||||||
|
vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
|
||||||
|
vadd.u8 d0, d3, d4
|
||||||
|
vadd.u8 d1, d0, d5
|
||||||
|
vadd.u8 d2, d1, d6
|
||||||
|
vadd.u8 d3, d2, d7
|
||||||
|
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
|
||||||
|
subs r3, r3, #16
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func png_read_filter_row_sub3_neon, export=1
|
||||||
|
ldr r3, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
mov r0, r1
|
||||||
|
mov r2, #3
|
||||||
|
mov r12, #12
|
||||||
|
vld1.8 {q11}, [r0], r12
|
||||||
|
1:
|
||||||
|
vext.8 d5, d22, d23, #3
|
||||||
|
vadd.u8 d0, d3, d22
|
||||||
|
vext.8 d6, d22, d23, #6
|
||||||
|
vadd.u8 d1, d0, d5
|
||||||
|
vext.8 d7, d23, d23, #1
|
||||||
|
vld1.8 {q11}, [r0], r12
|
||||||
|
vst1.32 {d0[0]}, [r1,:32], r2
|
||||||
|
vadd.u8 d2, d1, d6
|
||||||
|
vst1.32 {d1[0]}, [r1], r2
|
||||||
|
vadd.u8 d3, d2, d7
|
||||||
|
vst1.32 {d2[0]}, [r1], r2
|
||||||
|
vst1.32 {d3[0]}, [r1], r2
|
||||||
|
subs r3, r3, #12
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func png_read_filter_row_up_neon, export=1
|
||||||
|
ldr r3, [r0, #4] @ rowbytes
|
||||||
|
1:
|
||||||
|
vld1.8 {q0}, [r1,:128]
|
||||||
|
vld1.8 {q1}, [r2,:128]!
|
||||||
|
vadd.u8 q0, q0, q1
|
||||||
|
vst1.8 {q0}, [r1,:128]!
|
||||||
|
subs r3, r3, #16
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func png_read_filter_row_avg4_neon, export=1
|
||||||
|
ldr r12, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
1:
|
||||||
|
vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
|
||||||
|
vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]!
|
||||||
|
vhadd.u8 d0, d3, d16
|
||||||
|
vadd.u8 d0, d0, d4
|
||||||
|
vhadd.u8 d1, d0, d17
|
||||||
|
vadd.u8 d1, d1, d5
|
||||||
|
vhadd.u8 d2, d1, d18
|
||||||
|
vadd.u8 d2, d2, d6
|
||||||
|
vhadd.u8 d3, d2, d19
|
||||||
|
vadd.u8 d3, d3, d7
|
||||||
|
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
|
||||||
|
subs r12, r12, #16
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func png_read_filter_row_avg3_neon, export=1
|
||||||
|
push {r4,lr}
|
||||||
|
ldr r12, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
mov r0, r1
|
||||||
|
mov r4, #3
|
||||||
|
mov lr, #12
|
||||||
|
vld1.8 {q11}, [r0], lr
|
||||||
|
1:
|
||||||
|
vld1.8 {q10}, [r2], lr
|
||||||
|
vext.8 d5, d22, d23, #3
|
||||||
|
vhadd.u8 d0, d3, d20
|
||||||
|
vext.8 d17, d20, d21, #3
|
||||||
|
vadd.u8 d0, d0, d22
|
||||||
|
vext.8 d6, d22, d23, #6
|
||||||
|
vhadd.u8 d1, d0, d17
|
||||||
|
vext.8 d18, d20, d21, #6
|
||||||
|
vadd.u8 d1, d1, d5
|
||||||
|
vext.8 d7, d23, d23, #1
|
||||||
|
vld1.8 {q11}, [r0], lr
|
||||||
|
vst1.32 {d0[0]}, [r1,:32], r4
|
||||||
|
vhadd.u8 d2, d1, d18
|
||||||
|
vst1.32 {d1[0]}, [r1], r4
|
||||||
|
vext.8 d19, d21, d21, #1
|
||||||
|
vadd.u8 d2, d2, d6
|
||||||
|
vhadd.u8 d3, d2, d19
|
||||||
|
vst1.32 {d2[0]}, [r1], r4
|
||||||
|
vadd.u8 d3, d3, d7
|
||||||
|
vst1.32 {d3[0]}, [r1], r4
|
||||||
|
subs r12, r12, #12
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
pop {r4,pc}
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
.macro paeth rx, ra, rb, rc
|
||||||
|
vaddl.u8 q12, \ra, \rb @ a + b
|
||||||
|
vaddl.u8 q15, \rc, \rc @ 2*c
|
||||||
|
vabdl.u8 q13, \rb, \rc @ pa
|
||||||
|
vabdl.u8 q14, \ra, \rc @ pb
|
||||||
|
vabd.u16 q15, q12, q15 @ pc
|
||||||
|
vcle.u16 q12, q13, q14 @ pa <= pb
|
||||||
|
vcle.u16 q13, q13, q15 @ pa <= pc
|
||||||
|
vcle.u16 q14, q14, q15 @ pb <= pc
|
||||||
|
vand q12, q12, q13 @ pa <= pb && pa <= pc
|
||||||
|
vmovn.u16 d28, q14
|
||||||
|
vmovn.u16 \rx, q12
|
||||||
|
vbsl d28, \rb, \rc
|
||||||
|
vbsl \rx, \ra, d28
|
||||||
|
.endm
|
||||||
|
|
||||||
|
func png_read_filter_row_paeth4_neon, export=1
|
||||||
|
ldr r12, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
vmov.i8 d20, #0
|
||||||
|
1:
|
||||||
|
vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
|
||||||
|
vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]!
|
||||||
|
paeth d0, d3, d16, d20
|
||||||
|
vadd.u8 d0, d0, d4
|
||||||
|
paeth d1, d0, d17, d16
|
||||||
|
vadd.u8 d1, d1, d5
|
||||||
|
paeth d2, d1, d18, d17
|
||||||
|
vadd.u8 d2, d2, d6
|
||||||
|
paeth d3, d2, d19, d18
|
||||||
|
vmov d20, d19
|
||||||
|
vadd.u8 d3, d3, d7
|
||||||
|
vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
|
||||||
|
subs r12, r12, #16
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
bx lr
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func png_read_filter_row_paeth3_neon, export=1
|
||||||
|
push {r4,lr}
|
||||||
|
ldr r12, [r0, #4] @ rowbytes
|
||||||
|
vmov.i8 d3, #0
|
||||||
|
vmov.i8 d4, #0
|
||||||
|
mov r0, r1
|
||||||
|
mov r4, #3
|
||||||
|
mov lr, #12
|
||||||
|
vld1.8 {q11}, [r0], lr
|
||||||
|
1:
|
||||||
|
vld1.8 {q10}, [r2], lr
|
||||||
|
paeth d0, d3, d20, d4
|
||||||
|
vext.8 d5, d22, d23, #3
|
||||||
|
vadd.u8 d0, d0, d22
|
||||||
|
vext.8 d17, d20, d21, #3
|
||||||
|
paeth d1, d0, d17, d20
|
||||||
|
vst1.32 {d0[0]}, [r1,:32], r4
|
||||||
|
vext.8 d6, d22, d23, #6
|
||||||
|
vadd.u8 d1, d1, d5
|
||||||
|
vext.8 d18, d20, d21, #6
|
||||||
|
paeth d2, d1, d18, d17
|
||||||
|
vext.8 d7, d23, d23, #1
|
||||||
|
vld1.8 {q11}, [r0], lr
|
||||||
|
vst1.32 {d1[0]}, [r1], r4
|
||||||
|
vadd.u8 d2, d2, d6
|
||||||
|
vext.8 d19, d21, d21, #1
|
||||||
|
paeth d3, d2, d19, d18
|
||||||
|
vst1.32 {d2[0]}, [r1], r4
|
||||||
|
vmov d4, d19
|
||||||
|
vadd.u8 d3, d3, d7
|
||||||
|
vst1.32 {d3[0]}, [r1], r4
|
||||||
|
subs r12, r12, #12
|
||||||
|
bgt 1b
|
||||||
|
|
||||||
|
pop {r4,pc}
|
||||||
|
endfunc
|
||||||
297
config.guess
vendored
297
config.guess
vendored
@@ -1,10 +1,10 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Attempt to guess a canonical system name.
|
# Attempt to guess a canonical system name.
|
||||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||||
# Free Software Foundation, Inc.
|
# 2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2009-11-20'
|
timestamp='2011-02-02'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
@@ -56,8 +56,9 @@ version="\
|
|||||||
GNU config.guess ($timestamp)
|
GNU config.guess ($timestamp)
|
||||||
|
|
||||||
Originally written by Per Bothner.
|
Originally written by Per Bothner.
|
||||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
|
||||||
|
Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
@@ -139,6 +140,29 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
|||||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||||
|
|
||||||
|
case "${UNAME_SYSTEM}" in
|
||||||
|
Linux|GNU/*)
|
||||||
|
eval $set_cc_for_build
|
||||||
|
cat <<-EOF > $dummy.c
|
||||||
|
#include <features.h>
|
||||||
|
#ifdef __UCLIBC__
|
||||||
|
# ifdef __UCLIBC_CONFIG_VERSION__
|
||||||
|
LIBC=uclibc __UCLIBC_CONFIG_VERSION__
|
||||||
|
# else
|
||||||
|
LIBC=uclibc
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# ifdef __dietlibc__
|
||||||
|
LIBC=dietlibc
|
||||||
|
# else
|
||||||
|
LIBC=gnu
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
EOF
|
||||||
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Note: order is significant - the case branches are not exclusive.
|
# Note: order is significant - the case branches are not exclusive.
|
||||||
|
|
||||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||||
@@ -180,7 +204,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
os=netbsd
|
os=netbsd
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# The OS release
|
# The OS release
|
||||||
@@ -223,7 +247,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||||
;;
|
;;
|
||||||
*5.*)
|
*5.*)
|
||||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# According to Compaq, /usr/sbin/psrinfo has been available on
|
# According to Compaq, /usr/sbin/psrinfo has been available on
|
||||||
@@ -269,7 +293,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||||||
# A Xn.n version is an unreleased experimental baselevel.
|
# A Xn.n version is an unreleased experimental baselevel.
|
||||||
# 1.2 uses "1.2" for uname -r.
|
# 1.2 uses "1.2" for uname -r.
|
||||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||||
exit ;;
|
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
|
||||||
|
exitcode=$?
|
||||||
|
trap '' 0
|
||||||
|
exit $exitcode ;;
|
||||||
Alpha\ *:Windows_NT*:*)
|
Alpha\ *:Windows_NT*:*)
|
||||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||||
# Should we change UNAME_MACHINE based on the output of uname instead
|
# Should we change UNAME_MACHINE based on the output of uname instead
|
||||||
@@ -295,7 +322,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||||||
echo s390-ibm-zvmoe
|
echo s390-ibm-zvmoe
|
||||||
exit ;;
|
exit ;;
|
||||||
*:OS400:*:*)
|
*:OS400:*:*)
|
||||||
echo powerpc-ibm-os400
|
echo powerpc-ibm-os400
|
||||||
exit ;;
|
exit ;;
|
||||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||||
@@ -394,23 +421,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||||||
# MiNT. But MiNT is downward compatible to TOS, so this should
|
# MiNT. But MiNT is downward compatible to TOS, so this should
|
||||||
# be no problem.
|
# be no problem.
|
||||||
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
|
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
|
||||||
echo m68k-atari-mint${UNAME_RELEASE}
|
echo m68k-atari-mint${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
|
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
|
||||||
echo m68k-atari-mint${UNAME_RELEASE}
|
echo m68k-atari-mint${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
|
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
|
||||||
echo m68k-atari-mint${UNAME_RELEASE}
|
echo m68k-atari-mint${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
|
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
|
||||||
echo m68k-milan-mint${UNAME_RELEASE}
|
echo m68k-milan-mint${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
|
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
|
||||||
echo m68k-hades-mint${UNAME_RELEASE}
|
echo m68k-hades-mint${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
m68k:machten:*:*)
|
m68k:machten:*:*)
|
||||||
echo m68k-apple-machten${UNAME_RELEASE}
|
echo m68k-apple-machten${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
@@ -480,8 +507,8 @@ EOF
|
|||||||
echo m88k-motorola-sysv3
|
echo m88k-motorola-sysv3
|
||||||
exit ;;
|
exit ;;
|
||||||
AViiON:dgux:*:*)
|
AViiON:dgux:*:*)
|
||||||
# DG/UX returns AViiON for all architectures
|
# DG/UX returns AViiON for all architectures
|
||||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||||
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
|
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
|
||||||
then
|
then
|
||||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
|
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
|
||||||
@@ -494,7 +521,7 @@ EOF
|
|||||||
else
|
else
|
||||||
echo i586-dg-dgux${UNAME_RELEASE}
|
echo i586-dg-dgux${UNAME_RELEASE}
|
||||||
fi
|
fi
|
||||||
exit ;;
|
exit ;;
|
||||||
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
|
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
|
||||||
echo m88k-dolphin-sysv3
|
echo m88k-dolphin-sysv3
|
||||||
exit ;;
|
exit ;;
|
||||||
@@ -551,7 +578,7 @@ EOF
|
|||||||
echo rs6000-ibm-aix3.2
|
echo rs6000-ibm-aix3.2
|
||||||
fi
|
fi
|
||||||
exit ;;
|
exit ;;
|
||||||
*:AIX:*:[456])
|
*:AIX:*:[4567])
|
||||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
||||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||||
IBM_ARCH=rs6000
|
IBM_ARCH=rs6000
|
||||||
@@ -594,52 +621,52 @@ EOF
|
|||||||
9000/[678][0-9][0-9])
|
9000/[678][0-9][0-9])
|
||||||
if [ -x /usr/bin/getconf ]; then
|
if [ -x /usr/bin/getconf ]; then
|
||||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||||
case "${sc_cpu_version}" in
|
case "${sc_cpu_version}" in
|
||||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||||
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
|
||||||
532) # CPU_PA_RISC2_0
|
532) # CPU_PA_RISC2_0
|
||||||
case "${sc_kernel_bits}" in
|
case "${sc_kernel_bits}" in
|
||||||
32) HP_ARCH="hppa2.0n" ;;
|
32) HP_ARCH="hppa2.0n" ;;
|
||||||
64) HP_ARCH="hppa2.0w" ;;
|
64) HP_ARCH="hppa2.0w" ;;
|
||||||
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
||||||
esac ;;
|
esac ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
if [ "${HP_ARCH}" = "" ]; then
|
if [ "${HP_ARCH}" = "" ]; then
|
||||||
eval $set_cc_for_build
|
eval $set_cc_for_build
|
||||||
sed 's/^ //' << EOF >$dummy.c
|
sed 's/^ //' << EOF >$dummy.c
|
||||||
|
|
||||||
#define _HPUX_SOURCE
|
#define _HPUX_SOURCE
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int main ()
|
int main ()
|
||||||
{
|
{
|
||||||
#if defined(_SC_KERNEL_BITS)
|
#if defined(_SC_KERNEL_BITS)
|
||||||
long bits = sysconf(_SC_KERNEL_BITS);
|
long bits = sysconf(_SC_KERNEL_BITS);
|
||||||
#endif
|
#endif
|
||||||
long cpu = sysconf (_SC_CPU_VERSION);
|
long cpu = sysconf (_SC_CPU_VERSION);
|
||||||
|
|
||||||
switch (cpu)
|
switch (cpu)
|
||||||
{
|
{
|
||||||
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
|
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
|
||||||
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
|
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
|
||||||
case CPU_PA_RISC2_0:
|
case CPU_PA_RISC2_0:
|
||||||
#if defined(_SC_KERNEL_BITS)
|
#if defined(_SC_KERNEL_BITS)
|
||||||
switch (bits)
|
switch (bits)
|
||||||
{
|
{
|
||||||
case 64: puts ("hppa2.0w"); break;
|
case 64: puts ("hppa2.0w"); break;
|
||||||
case 32: puts ("hppa2.0n"); break;
|
case 32: puts ("hppa2.0n"); break;
|
||||||
default: puts ("hppa2.0"); break;
|
default: puts ("hppa2.0"); break;
|
||||||
} break;
|
} break;
|
||||||
#else /* !defined(_SC_KERNEL_BITS) */
|
#else /* !defined(_SC_KERNEL_BITS) */
|
||||||
puts ("hppa2.0"); break;
|
puts ("hppa2.0"); break;
|
||||||
#endif
|
#endif
|
||||||
default: puts ("hppa1.0"); break;
|
default: puts ("hppa1.0"); break;
|
||||||
}
|
}
|
||||||
exit (0);
|
exit (0);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||||
test -z "$HP_ARCH" && HP_ARCH=hppa
|
test -z "$HP_ARCH" && HP_ARCH=hppa
|
||||||
@@ -730,22 +757,22 @@ EOF
|
|||||||
exit ;;
|
exit ;;
|
||||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||||
echo c1-convex-bsd
|
echo c1-convex-bsd
|
||||||
exit ;;
|
exit ;;
|
||||||
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
|
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
|
||||||
if getsysinfo -f scalar_acc
|
if getsysinfo -f scalar_acc
|
||||||
then echo c32-convex-bsd
|
then echo c32-convex-bsd
|
||||||
else echo c2-convex-bsd
|
else echo c2-convex-bsd
|
||||||
fi
|
fi
|
||||||
exit ;;
|
exit ;;
|
||||||
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
|
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
|
||||||
echo c34-convex-bsd
|
echo c34-convex-bsd
|
||||||
exit ;;
|
exit ;;
|
||||||
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
|
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
|
||||||
echo c38-convex-bsd
|
echo c38-convex-bsd
|
||||||
exit ;;
|
exit ;;
|
||||||
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
||||||
echo c4-convex-bsd
|
echo c4-convex-bsd
|
||||||
exit ;;
|
exit ;;
|
||||||
CRAY*Y-MP:*:*:*)
|
CRAY*Y-MP:*:*:*)
|
||||||
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||||
exit ;;
|
exit ;;
|
||||||
@@ -769,14 +796,14 @@ EOF
|
|||||||
exit ;;
|
exit ;;
|
||||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||||
exit ;;
|
exit ;;
|
||||||
5000:UNIX_System_V:4.*:*)
|
5000:UNIX_System_V:4.*:*)
|
||||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
|
||||||
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||||
@@ -804,14 +831,14 @@ EOF
|
|||||||
echo ${UNAME_MACHINE}-pc-mingw32
|
echo ${UNAME_MACHINE}-pc-mingw32
|
||||||
exit ;;
|
exit ;;
|
||||||
i*:windows32*:*)
|
i*:windows32*:*)
|
||||||
# uname -m includes "-pc" on this system.
|
# uname -m includes "-pc" on this system.
|
||||||
echo ${UNAME_MACHINE}-mingw32
|
echo ${UNAME_MACHINE}-mingw32
|
||||||
exit ;;
|
exit ;;
|
||||||
i*:PW*:*)
|
i*:PW*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-pw32
|
echo ${UNAME_MACHINE}-pc-pw32
|
||||||
exit ;;
|
exit ;;
|
||||||
*:Interix*:*)
|
*:Interix*:*)
|
||||||
case ${UNAME_MACHINE} in
|
case ${UNAME_MACHINE} in
|
||||||
x86)
|
x86)
|
||||||
echo i586-pc-interix${UNAME_RELEASE}
|
echo i586-pc-interix${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
@@ -848,11 +875,11 @@ EOF
|
|||||||
exit ;;
|
exit ;;
|
||||||
*:GNU:*:*)
|
*:GNU:*:*)
|
||||||
# the GNU system
|
# the GNU system
|
||||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||||
exit ;;
|
exit ;;
|
||||||
*:GNU/*:*:*)
|
*:GNU/*:*:*)
|
||||||
# other systems with GNU libc and userland
|
# other systems with GNU libc and userland
|
||||||
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
|
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:Minix:*:*)
|
i*86:Minix:*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-minix
|
echo ${UNAME_MACHINE}-pc-minix
|
||||||
@@ -866,52 +893,44 @@ EOF
|
|||||||
EV6) UNAME_MACHINE=alphaev6 ;;
|
EV6) UNAME_MACHINE=alphaev6 ;;
|
||||||
EV67) UNAME_MACHINE=alphaev67 ;;
|
EV67) UNAME_MACHINE=alphaev67 ;;
|
||||||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||||
esac
|
esac
|
||||||
objdump --private-headers /bin/sh | grep -q ld.so.1
|
objdump --private-headers /bin/sh | grep -q ld.so.1
|
||||||
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
arm*:Linux:*:*)
|
arm*:Linux:*:*)
|
||||||
eval $set_cc_for_build
|
eval $set_cc_for_build
|
||||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||||
| grep -q __ARM_EABI__
|
| grep -q __ARM_EABI__
|
||||||
then
|
then
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
else
|
else
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
|
||||||
fi
|
fi
|
||||||
exit ;;
|
exit ;;
|
||||||
avr32*:Linux:*:*)
|
avr32*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
cris:Linux:*:*)
|
cris:Linux:*:*)
|
||||||
echo cris-axis-linux-gnu
|
echo cris-axis-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
crisv32:Linux:*:*)
|
crisv32:Linux:*:*)
|
||||||
echo crisv32-axis-linux-gnu
|
echo crisv32-axis-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
frv:Linux:*:*)
|
frv:Linux:*:*)
|
||||||
echo frv-unknown-linux-gnu
|
echo frv-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:Linux:*:*)
|
i*86:Linux:*:*)
|
||||||
LIBC=gnu
|
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
|
||||||
eval $set_cc_for_build
|
|
||||||
sed 's/^ //' << EOF >$dummy.c
|
|
||||||
#ifdef __dietlibc__
|
|
||||||
LIBC=dietlibc
|
|
||||||
#endif
|
|
||||||
EOF
|
|
||||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
|
||||||
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
|
||||||
exit ;;
|
exit ;;
|
||||||
ia64:Linux:*:*)
|
ia64:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
m32r*:Linux:*:*)
|
m32r*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
m68*:Linux:*:*)
|
m68*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
mips:Linux:*:* | mips64:Linux:*:*)
|
mips:Linux:*:* | mips64:Linux:*:*)
|
||||||
eval $set_cc_for_build
|
eval $set_cc_for_build
|
||||||
@@ -930,51 +949,54 @@ EOF
|
|||||||
#endif
|
#endif
|
||||||
EOF
|
EOF
|
||||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
||||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
|
||||||
;;
|
;;
|
||||||
or32:Linux:*:*)
|
or32:Linux:*:*)
|
||||||
echo or32-unknown-linux-gnu
|
echo or32-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
padre:Linux:*:*)
|
padre:Linux:*:*)
|
||||||
echo sparc-unknown-linux-gnu
|
echo sparc-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
parisc64:Linux:*:* | hppa64:Linux:*:*)
|
||||||
echo hppa64-unknown-linux-gnu
|
echo hppa64-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
parisc:Linux:*:* | hppa:Linux:*:*)
|
parisc:Linux:*:* | hppa:Linux:*:*)
|
||||||
# Look for CPU level
|
# Look for CPU level
|
||||||
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
||||||
PA7*) echo hppa1.1-unknown-linux-gnu ;;
|
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
|
||||||
PA8*) echo hppa2.0-unknown-linux-gnu ;;
|
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
|
||||||
*) echo hppa-unknown-linux-gnu ;;
|
*) echo hppa-unknown-linux-${LIBC} ;;
|
||||||
esac
|
esac
|
||||||
exit ;;
|
exit ;;
|
||||||
ppc64:Linux:*:*)
|
ppc64:Linux:*:*)
|
||||||
echo powerpc64-unknown-linux-gnu
|
echo powerpc64-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
ppc:Linux:*:*)
|
ppc:Linux:*:*)
|
||||||
echo powerpc-unknown-linux-gnu
|
echo powerpc-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
s390:Linux:*:* | s390x:Linux:*:*)
|
s390:Linux:*:* | s390x:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-ibm-linux
|
echo ${UNAME_MACHINE}-ibm-linux
|
||||||
exit ;;
|
exit ;;
|
||||||
sh64*:Linux:*:*)
|
sh64*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
sh*:Linux:*:*)
|
sh*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
|
exit ;;
|
||||||
|
tile*:Linux:*:*)
|
||||||
|
echo ${UNAME_MACHINE}-tilera-linux-gnu
|
||||||
exit ;;
|
exit ;;
|
||||||
vax:Linux:*:*)
|
vax:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-dec-linux-gnu
|
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
x86_64:Linux:*:*)
|
x86_64:Linux:*:*)
|
||||||
echo x86_64-unknown-linux-gnu
|
echo x86_64-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
xtensa*:Linux:*:*)
|
xtensa*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:DYNIX/ptx:4*:*)
|
i*86:DYNIX/ptx:4*:*)
|
||||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
|
||||||
@@ -983,11 +1005,11 @@ EOF
|
|||||||
echo i386-sequent-sysv4
|
echo i386-sequent-sysv4
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:UNIX_SV:4.2MP:2.*)
|
i*86:UNIX_SV:4.2MP:2.*)
|
||||||
# Unixware is an offshoot of SVR4, but it has its own version
|
# Unixware is an offshoot of SVR4, but it has its own version
|
||||||
# number series starting with 2...
|
# number series starting with 2...
|
||||||
# I am not positive that other SVR4 systems won't match this,
|
# I am not positive that other SVR4 systems won't match this,
|
||||||
# I just have to hope. -- rms.
|
# I just have to hope. -- rms.
|
||||||
# Use sysv4.2uw... so that sysv4* matches it.
|
# Use sysv4.2uw... so that sysv4* matches it.
|
||||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:OS/2:*:*)
|
i*86:OS/2:*:*)
|
||||||
@@ -1019,7 +1041,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:*:5:[678]*)
|
i*86:*:5:[678]*)
|
||||||
# UnixWare 7.x, OpenUNIX and OpenServer 6.
|
# UnixWare 7.x, OpenUNIX and OpenServer 6.
|
||||||
case `/bin/uname -X | grep "^Machine"` in
|
case `/bin/uname -X | grep "^Machine"` in
|
||||||
*486*) UNAME_MACHINE=i486 ;;
|
*486*) UNAME_MACHINE=i486 ;;
|
||||||
*Pentium) UNAME_MACHINE=i586 ;;
|
*Pentium) UNAME_MACHINE=i586 ;;
|
||||||
@@ -1047,13 +1069,13 @@ EOF
|
|||||||
exit ;;
|
exit ;;
|
||||||
pc:*:*:*)
|
pc:*:*:*)
|
||||||
# Left here for compatibility:
|
# Left here for compatibility:
|
||||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||||
# the processor, so we play safe by assuming i586.
|
# the processor, so we play safe by assuming i586.
|
||||||
# Note: whatever this is, it MUST be the same as what config.sub
|
# Note: whatever this is, it MUST be the same as what config.sub
|
||||||
# prints for the "djgpp" host, or else GDB configury will decide that
|
# prints for the "djgpp" host, or else GDB configury will decide that
|
||||||
# this is a cross-build.
|
# this is a cross-build.
|
||||||
echo i586-pc-msdosdjgpp
|
echo i586-pc-msdosdjgpp
|
||||||
exit ;;
|
exit ;;
|
||||||
Intel:Mach:3*:*)
|
Intel:Mach:3*:*)
|
||||||
echo i386-pc-mach3
|
echo i386-pc-mach3
|
||||||
exit ;;
|
exit ;;
|
||||||
@@ -1088,8 +1110,8 @@ EOF
|
|||||||
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
|
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
|
||||||
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
|
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
|
||||||
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
||||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||||
&& { echo i486-ncr-sysv4; exit; } ;;
|
&& { echo i486-ncr-sysv4; exit; } ;;
|
||||||
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
|
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
|
||||||
OS_REL='.3'
|
OS_REL='.3'
|
||||||
test -r /etc/.relid \
|
test -r /etc/.relid \
|
||||||
@@ -1132,10 +1154,10 @@ EOF
|
|||||||
echo ns32k-sni-sysv
|
echo ns32k-sni-sysv
|
||||||
fi
|
fi
|
||||||
exit ;;
|
exit ;;
|
||||||
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||||
echo i586-unisys-sysv4
|
echo i586-unisys-sysv4
|
||||||
exit ;;
|
exit ;;
|
||||||
*:UNIX_System_V:4*:FTX*)
|
*:UNIX_System_V:4*:FTX*)
|
||||||
# From Gerald Hewes <hewes@openmarket.com>.
|
# From Gerald Hewes <hewes@openmarket.com>.
|
||||||
# How about differentiating between stratus architectures? -djm
|
# How about differentiating between stratus architectures? -djm
|
||||||
@@ -1161,11 +1183,11 @@ EOF
|
|||||||
exit ;;
|
exit ;;
|
||||||
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
|
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
|
||||||
if [ -d /usr/nec ]; then
|
if [ -d /usr/nec ]; then
|
||||||
echo mips-nec-sysv${UNAME_RELEASE}
|
echo mips-nec-sysv${UNAME_RELEASE}
|
||||||
else
|
else
|
||||||
echo mips-unknown-sysv${UNAME_RELEASE}
|
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||||
fi
|
fi
|
||||||
exit ;;
|
exit ;;
|
||||||
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
|
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
|
||||||
echo powerpc-be-beos
|
echo powerpc-be-beos
|
||||||
exit ;;
|
exit ;;
|
||||||
@@ -1230,6 +1252,9 @@ EOF
|
|||||||
*:QNX:*:4*)
|
*:QNX:*:4*)
|
||||||
echo i386-pc-qnx
|
echo i386-pc-qnx
|
||||||
exit ;;
|
exit ;;
|
||||||
|
NEO-?:NONSTOP_KERNEL:*:*)
|
||||||
|
echo neo-tandem-nsk${UNAME_RELEASE}
|
||||||
|
exit ;;
|
||||||
NSE-?:NONSTOP_KERNEL:*:*)
|
NSE-?:NONSTOP_KERNEL:*:*)
|
||||||
echo nse-tandem-nsk${UNAME_RELEASE}
|
echo nse-tandem-nsk${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
@@ -1275,13 +1300,13 @@ EOF
|
|||||||
echo pdp10-unknown-its
|
echo pdp10-unknown-its
|
||||||
exit ;;
|
exit ;;
|
||||||
SEI:*:*:SEIUX)
|
SEI:*:*:SEIUX)
|
||||||
echo mips-sei-seiux${UNAME_RELEASE}
|
echo mips-sei-seiux${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
*:DragonFly:*:*)
|
*:DragonFly:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||||
exit ;;
|
exit ;;
|
||||||
*:*VMS:*:*)
|
*:*VMS:*:*)
|
||||||
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
||||||
case "${UNAME_MACHINE}" in
|
case "${UNAME_MACHINE}" in
|
||||||
A*) echo alpha-dec-vms ; exit ;;
|
A*) echo alpha-dec-vms ; exit ;;
|
||||||
I*) echo ia64-dec-vms ; exit ;;
|
I*) echo ia64-dec-vms ; exit ;;
|
||||||
@@ -1321,11 +1346,11 @@ main ()
|
|||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
printf ("m68k-sony-newsos%s\n",
|
printf ("m68k-sony-newsos%s\n",
|
||||||
#ifdef NEWSOS4
|
#ifdef NEWSOS4
|
||||||
"4"
|
"4"
|
||||||
#else
|
#else
|
||||||
""
|
""
|
||||||
#endif
|
#endif
|
||||||
); exit (0);
|
); exit (0);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,12 @@
|
|||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#undef PACKAGE_VERSION
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* Align row buffers */
|
||||||
|
#undef PNG_ALIGNED_MEMORY_SUPPORTED
|
||||||
|
|
||||||
|
/* Enable ARM NEON optmizations */
|
||||||
|
#undef PNG_ARM_NEON
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
|||||||
142
config.sub
vendored
142
config.sub
vendored
@@ -1,10 +1,10 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||||
# Free Software Foundation, Inc.
|
# 2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2009-11-20'
|
timestamp='2011-02-02'
|
||||||
|
|
||||||
# This file is (in principle) common to ALL GNU software.
|
# This file is (in principle) common to ALL GNU software.
|
||||||
# The presence of a machine in this file suggests that SOME GNU software
|
# The presence of a machine in this file suggests that SOME GNU software
|
||||||
@@ -75,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||||||
version="\
|
version="\
|
||||||
GNU config.sub ($timestamp)
|
GNU config.sub ($timestamp)
|
||||||
|
|
||||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
|
||||||
|
Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
@@ -123,8 +124,9 @@ esac
|
|||||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||||
case $maybe_os in
|
case $maybe_os in
|
||||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
|
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
|
||||||
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
|
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
|
||||||
|
knetbsd*-gnu* | netbsd*-gnu* | \
|
||||||
kopensolaris*-gnu* | \
|
kopensolaris*-gnu* | \
|
||||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||||
os=-$maybe_os
|
os=-$maybe_os
|
||||||
@@ -156,8 +158,8 @@ case $os in
|
|||||||
os=
|
os=
|
||||||
basic_machine=$1
|
basic_machine=$1
|
||||||
;;
|
;;
|
||||||
-bluegene*)
|
-bluegene*)
|
||||||
os=-cnk
|
os=-cnk
|
||||||
;;
|
;;
|
||||||
-sim | -cisco | -oki | -wec | -winbond)
|
-sim | -cisco | -oki | -wec | -winbond)
|
||||||
os=
|
os=
|
||||||
@@ -173,10 +175,10 @@ case $os in
|
|||||||
os=-chorusos
|
os=-chorusos
|
||||||
basic_machine=$1
|
basic_machine=$1
|
||||||
;;
|
;;
|
||||||
-chorusrdb)
|
-chorusrdb)
|
||||||
os=-chorusrdb
|
os=-chorusrdb
|
||||||
basic_machine=$1
|
basic_machine=$1
|
||||||
;;
|
;;
|
||||||
-hiux*)
|
-hiux*)
|
||||||
os=-hiuxwe2
|
os=-hiuxwe2
|
||||||
;;
|
;;
|
||||||
@@ -251,7 +253,7 @@ case $basic_machine in
|
|||||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
||||||
| bfin \
|
| bfin \
|
||||||
| c4x | clipper \
|
| c4x | clipper \
|
||||||
| d10v | d30v | dlx | dsp16xx \
|
| d10v | d30v | dlx | dsp16xx | dvp \
|
||||||
| fido | fr30 | frv \
|
| fido | fr30 | frv \
|
||||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||||
| i370 | i860 | i960 | ia64 \
|
| i370 | i860 | i960 | ia64 \
|
||||||
@@ -281,6 +283,7 @@ case $basic_machine in
|
|||||||
| moxie \
|
| moxie \
|
||||||
| mt \
|
| mt \
|
||||||
| msp430 \
|
| msp430 \
|
||||||
|
| nds32 | nds32le | nds32be \
|
||||||
| nios | nios2 \
|
| nios | nios2 \
|
||||||
| ns16k | ns32k \
|
| ns16k | ns32k \
|
||||||
| or32 \
|
| or32 \
|
||||||
@@ -294,7 +297,7 @@ case $basic_machine in
|
|||||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||||
| spu | strongarm \
|
| spu | strongarm \
|
||||||
| tahoe | thumb | tic4x | tic80 | tron \
|
| tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
|
||||||
| ubicom32 \
|
| ubicom32 \
|
||||||
| v850 | v850e \
|
| v850 | v850e \
|
||||||
| we32k \
|
| we32k \
|
||||||
@@ -302,6 +305,15 @@ case $basic_machine in
|
|||||||
| z8k | z80)
|
| z8k | z80)
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
;;
|
;;
|
||||||
|
c54x)
|
||||||
|
basic_machine=tic54x-unknown
|
||||||
|
;;
|
||||||
|
c55x)
|
||||||
|
basic_machine=tic55x-unknown
|
||||||
|
;;
|
||||||
|
c6x)
|
||||||
|
basic_machine=tic6x-unknown
|
||||||
|
;;
|
||||||
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
|
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
|
||||||
# Motorola 68HC11/12.
|
# Motorola 68HC11/12.
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
@@ -333,7 +345,7 @@ case $basic_machine in
|
|||||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||||
| avr-* | avr32-* \
|
| avr-* | avr32-* \
|
||||||
| bfin-* | bs2000-* \
|
| bfin-* | bs2000-* \
|
||||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
| c[123]* | c30-* | [cjt]90-* | c4x-* \
|
||||||
| clipper-* | craynv-* | cydra-* \
|
| clipper-* | craynv-* | cydra-* \
|
||||||
| d10v-* | d30v-* | dlx-* \
|
| d10v-* | d30v-* | dlx-* \
|
||||||
| elxsi-* \
|
| elxsi-* \
|
||||||
@@ -367,6 +379,7 @@ case $basic_machine in
|
|||||||
| mmix-* \
|
| mmix-* \
|
||||||
| mt-* \
|
| mt-* \
|
||||||
| msp430-* \
|
| msp430-* \
|
||||||
|
| nds32-* | nds32le-* | nds32be-* \
|
||||||
| nios-* | nios2-* \
|
| nios-* | nios2-* \
|
||||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||||
| orion-* \
|
| orion-* \
|
||||||
@@ -380,7 +393,8 @@ case $basic_machine in
|
|||||||
| sparclite-* \
|
| sparclite-* \
|
||||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||||
| tahoe-* | thumb-* \
|
| tahoe-* | thumb-* \
|
||||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
|
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||||
|
| tile-* | tilegx-* \
|
||||||
| tron-* \
|
| tron-* \
|
||||||
| ubicom32-* \
|
| ubicom32-* \
|
||||||
| v850-* | v850e-* | vax-* \
|
| v850-* | v850e-* | vax-* \
|
||||||
@@ -410,7 +424,7 @@ case $basic_machine in
|
|||||||
basic_machine=a29k-amd
|
basic_machine=a29k-amd
|
||||||
os=-udi
|
os=-udi
|
||||||
;;
|
;;
|
||||||
abacus)
|
abacus)
|
||||||
basic_machine=abacus-unknown
|
basic_machine=abacus-unknown
|
||||||
;;
|
;;
|
||||||
adobe68k)
|
adobe68k)
|
||||||
@@ -480,11 +494,20 @@ case $basic_machine in
|
|||||||
basic_machine=powerpc-ibm
|
basic_machine=powerpc-ibm
|
||||||
os=-cnk
|
os=-cnk
|
||||||
;;
|
;;
|
||||||
|
c54x-*)
|
||||||
|
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
|
;;
|
||||||
|
c55x-*)
|
||||||
|
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
|
;;
|
||||||
|
c6x-*)
|
||||||
|
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
|
;;
|
||||||
c90)
|
c90)
|
||||||
basic_machine=c90-cray
|
basic_machine=c90-cray
|
||||||
os=-unicos
|
os=-unicos
|
||||||
;;
|
;;
|
||||||
cegcc)
|
cegcc)
|
||||||
basic_machine=arm-unknown
|
basic_machine=arm-unknown
|
||||||
os=-cegcc
|
os=-cegcc
|
||||||
;;
|
;;
|
||||||
@@ -516,7 +539,7 @@ case $basic_machine in
|
|||||||
basic_machine=craynv-cray
|
basic_machine=craynv-cray
|
||||||
os=-unicosmp
|
os=-unicosmp
|
||||||
;;
|
;;
|
||||||
cr16)
|
cr16 | cr16-*)
|
||||||
basic_machine=cr16-unknown
|
basic_machine=cr16-unknown
|
||||||
os=-elf
|
os=-elf
|
||||||
;;
|
;;
|
||||||
@@ -732,7 +755,7 @@ case $basic_machine in
|
|||||||
basic_machine=ns32k-utek
|
basic_machine=ns32k-utek
|
||||||
os=-sysv
|
os=-sysv
|
||||||
;;
|
;;
|
||||||
microblaze)
|
microblaze)
|
||||||
basic_machine=microblaze-xilinx
|
basic_machine=microblaze-xilinx
|
||||||
;;
|
;;
|
||||||
mingw32)
|
mingw32)
|
||||||
@@ -750,6 +773,24 @@ case $basic_machine in
|
|||||||
basic_machine=m68k-atari
|
basic_machine=m68k-atari
|
||||||
os=-mint
|
os=-mint
|
||||||
;;
|
;;
|
||||||
|
mipsEE* | ee | ps2)
|
||||||
|
basic_machine=mips64r5900el-scei
|
||||||
|
case $os in
|
||||||
|
-linux*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
os=-elf
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
iop)
|
||||||
|
basic_machine=mipsel-scei
|
||||||
|
os=-irx
|
||||||
|
;;
|
||||||
|
dvp)
|
||||||
|
basic_machine=dvp-scei
|
||||||
|
os=-elf
|
||||||
|
;;
|
||||||
mips3*-*)
|
mips3*-*)
|
||||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||||
;;
|
;;
|
||||||
@@ -839,6 +880,12 @@ case $basic_machine in
|
|||||||
np1)
|
np1)
|
||||||
basic_machine=np1-gould
|
basic_machine=np1-gould
|
||||||
;;
|
;;
|
||||||
|
neo-tandem)
|
||||||
|
basic_machine=neo-tandem
|
||||||
|
;;
|
||||||
|
nse-tandem)
|
||||||
|
basic_machine=nse-tandem
|
||||||
|
;;
|
||||||
nsr-tandem)
|
nsr-tandem)
|
||||||
basic_machine=nsr-tandem
|
basic_machine=nsr-tandem
|
||||||
;;
|
;;
|
||||||
@@ -1073,17 +1120,10 @@ case $basic_machine in
|
|||||||
basic_machine=t90-cray
|
basic_machine=t90-cray
|
||||||
os=-unicos
|
os=-unicos
|
||||||
;;
|
;;
|
||||||
tic54x | c54x*)
|
# This must be matched before tile*.
|
||||||
basic_machine=tic54x-unknown
|
tilegx*)
|
||||||
os=-coff
|
basic_machine=tilegx-unknown
|
||||||
;;
|
os=-linux-gnu
|
||||||
tic55x | c55x*)
|
|
||||||
basic_machine=tic55x-unknown
|
|
||||||
os=-coff
|
|
||||||
;;
|
|
||||||
tic6x | c6x*)
|
|
||||||
basic_machine=tic6x-unknown
|
|
||||||
os=-coff
|
|
||||||
;;
|
;;
|
||||||
tile*)
|
tile*)
|
||||||
basic_machine=tile-unknown
|
basic_machine=tile-unknown
|
||||||
@@ -1253,11 +1293,11 @@ esac
|
|||||||
if [ x"$os" != x"" ]
|
if [ x"$os" != x"" ]
|
||||||
then
|
then
|
||||||
case $os in
|
case $os in
|
||||||
# First match some system type aliases
|
# First match some system type aliases
|
||||||
# that might get confused with valid system types.
|
# that might get confused with valid system types.
|
||||||
# -solaris* is a basic system type, with this one exception.
|
# -solaris* is a basic system type, with this one exception.
|
||||||
-auroraux)
|
-auroraux)
|
||||||
os=-auroraux
|
os=-auroraux
|
||||||
;;
|
;;
|
||||||
-solaris1 | -solaris1.*)
|
-solaris1 | -solaris1.*)
|
||||||
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
||||||
@@ -1294,11 +1334,12 @@ case $os in
|
|||||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||||
| -chorusos* | -chorusrdb* | -cegcc* \
|
| -chorusos* | -chorusrdb* | -cegcc* \
|
||||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||||
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
|
| -mingw32* | -linux-gnu* | -linux-android* \
|
||||||
|
| -linux-newlib* | -linux-uclibc* \
|
||||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -irx* \
|
||||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||||
@@ -1341,7 +1382,7 @@ case $os in
|
|||||||
-opened*)
|
-opened*)
|
||||||
os=-openedition
|
os=-openedition
|
||||||
;;
|
;;
|
||||||
-os400*)
|
-os400*)
|
||||||
os=-os400
|
os=-os400
|
||||||
;;
|
;;
|
||||||
-wince*)
|
-wince*)
|
||||||
@@ -1390,7 +1431,7 @@ case $os in
|
|||||||
-sinix*)
|
-sinix*)
|
||||||
os=-sysv4
|
os=-sysv4
|
||||||
;;
|
;;
|
||||||
-tpf*)
|
-tpf*)
|
||||||
os=-tpf
|
os=-tpf
|
||||||
;;
|
;;
|
||||||
-triton*)
|
-triton*)
|
||||||
@@ -1435,6 +1476,8 @@ case $os in
|
|||||||
-dicos*)
|
-dicos*)
|
||||||
os=-dicos
|
os=-dicos
|
||||||
;;
|
;;
|
||||||
|
-nacl*)
|
||||||
|
;;
|
||||||
-none)
|
-none)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -1457,10 +1500,10 @@ else
|
|||||||
# system, and we'll never get to this point.
|
# system, and we'll never get to this point.
|
||||||
|
|
||||||
case $basic_machine in
|
case $basic_machine in
|
||||||
score-*)
|
score-*)
|
||||||
os=-elf
|
os=-elf
|
||||||
;;
|
;;
|
||||||
spu-*)
|
spu-*)
|
||||||
os=-elf
|
os=-elf
|
||||||
;;
|
;;
|
||||||
*-acorn)
|
*-acorn)
|
||||||
@@ -1472,8 +1515,17 @@ case $basic_machine in
|
|||||||
arm*-semi)
|
arm*-semi)
|
||||||
os=-aout
|
os=-aout
|
||||||
;;
|
;;
|
||||||
c4x-* | tic4x-*)
|
c4x-* | tic4x-*)
|
||||||
os=-coff
|
os=-coff
|
||||||
|
;;
|
||||||
|
tic54x-*)
|
||||||
|
os=-coff
|
||||||
|
;;
|
||||||
|
tic55x-*)
|
||||||
|
os=-coff
|
||||||
|
;;
|
||||||
|
tic6x-*)
|
||||||
|
os=-coff
|
||||||
;;
|
;;
|
||||||
# This must come before the *-dec entry.
|
# This must come before the *-dec entry.
|
||||||
pdp10-*)
|
pdp10-*)
|
||||||
@@ -1500,7 +1552,7 @@ case $basic_machine in
|
|||||||
m68*-cisco)
|
m68*-cisco)
|
||||||
os=-aout
|
os=-aout
|
||||||
;;
|
;;
|
||||||
mep-*)
|
mep-*)
|
||||||
os=-elf
|
os=-elf
|
||||||
;;
|
;;
|
||||||
mips*-cisco)
|
mips*-cisco)
|
||||||
@@ -1527,7 +1579,7 @@ case $basic_machine in
|
|||||||
*-ibm)
|
*-ibm)
|
||||||
os=-aix
|
os=-aix
|
||||||
;;
|
;;
|
||||||
*-knuth)
|
*-knuth)
|
||||||
os=-mmixware
|
os=-mmixware
|
||||||
;;
|
;;
|
||||||
*-wec)
|
*-wec)
|
||||||
|
|||||||
213
configure
vendored
213
configure
vendored
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.68 for libpng 1.5.6beta05.
|
# Generated by GNU Autoconf 2.68 for libpng 1.5.7beta01.
|
||||||
#
|
#
|
||||||
# Report bugs to <png-mng-implement@lists.sourceforge.net>.
|
# Report bugs to <png-mng-implement@lists.sourceforge.net>.
|
||||||
#
|
#
|
||||||
@@ -570,8 +570,8 @@ MAKEFLAGS=
|
|||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='libpng'
|
PACKAGE_NAME='libpng'
|
||||||
PACKAGE_TARNAME='libpng'
|
PACKAGE_TARNAME='libpng'
|
||||||
PACKAGE_VERSION='1.5.6beta05'
|
PACKAGE_VERSION='1.5.7beta01'
|
||||||
PACKAGE_STRING='libpng 1.5.6beta05'
|
PACKAGE_STRING='libpng 1.5.7beta01'
|
||||||
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
|
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
|
||||||
PACKAGE_URL=''
|
PACKAGE_URL=''
|
||||||
|
|
||||||
@@ -615,6 +615,8 @@ ac_includes_default="\
|
|||||||
ac_subst_vars='am__EXEEXT_FALSE
|
ac_subst_vars='am__EXEEXT_FALSE
|
||||||
am__EXEEXT_TRUE
|
am__EXEEXT_TRUE
|
||||||
LTLIBOBJS
|
LTLIBOBJS
|
||||||
|
PNG_ARM_NEON_FALSE
|
||||||
|
PNG_ARM_NEON_TRUE
|
||||||
binconfigs
|
binconfigs
|
||||||
pkgconfigdir
|
pkgconfigdir
|
||||||
PNGLIB_RELEASE
|
PNGLIB_RELEASE
|
||||||
@@ -661,6 +663,11 @@ build_os
|
|||||||
build_vendor
|
build_vendor
|
||||||
build_cpu
|
build_cpu
|
||||||
build
|
build
|
||||||
|
am__fastdepCCAS_FALSE
|
||||||
|
am__fastdepCCAS_TRUE
|
||||||
|
CCASDEPMODE
|
||||||
|
CCASFLAGS
|
||||||
|
CCAS
|
||||||
am__fastdepCC_FALSE
|
am__fastdepCC_FALSE
|
||||||
am__fastdepCC_TRUE
|
am__fastdepCC_TRUE
|
||||||
CCDEPMODE
|
CCDEPMODE
|
||||||
@@ -756,6 +763,7 @@ enable_libtool_lock
|
|||||||
with_zlib_prefix
|
with_zlib_prefix
|
||||||
with_pkgconfigdir
|
with_pkgconfigdir
|
||||||
with_binconfigs
|
with_binconfigs
|
||||||
|
enable_arm_neon
|
||||||
'
|
'
|
||||||
ac_precious_vars='build_alias
|
ac_precious_vars='build_alias
|
||||||
host_alias
|
host_alias
|
||||||
@@ -765,6 +773,8 @@ CFLAGS
|
|||||||
LDFLAGS
|
LDFLAGS
|
||||||
LIBS
|
LIBS
|
||||||
CPPFLAGS
|
CPPFLAGS
|
||||||
|
CCAS
|
||||||
|
CCASFLAGS
|
||||||
CPP'
|
CPP'
|
||||||
|
|
||||||
|
|
||||||
@@ -1308,7 +1318,7 @@ if test "$ac_init_help" = "long"; then
|
|||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# 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.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures libpng 1.5.6beta05 to adapt to many kinds of systems.
|
\`configure' configures libpng 1.5.7beta01 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
@@ -1378,7 +1388,7 @@ fi
|
|||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of libpng 1.5.6beta05:";;
|
short | recursive ) echo "Configuration of libpng 1.5.7beta01:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
@@ -1395,6 +1405,7 @@ Optional Features:
|
|||||||
--enable-fast-install[=PKGS]
|
--enable-fast-install[=PKGS]
|
||||||
optimize for fast installation [default=yes]
|
optimize for fast installation [default=yes]
|
||||||
--disable-libtool-lock avoid locking (might break parallel builds)
|
--disable-libtool-lock avoid locking (might break parallel builds)
|
||||||
|
--enable-arm-neon Enable ARM NEON optmizations
|
||||||
|
|
||||||
Optional Packages:
|
Optional Packages:
|
||||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||||
@@ -1418,6 +1429,8 @@ Some influential environment variables:
|
|||||||
LIBS libraries to pass to the linker, e.g. -l<library>
|
LIBS libraries to pass to the linker, e.g. -l<library>
|
||||||
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
|
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
|
||||||
you have headers in a nonstandard directory <include dir>
|
you have headers in a nonstandard directory <include dir>
|
||||||
|
CCAS assembler compiler command (defaults to CC)
|
||||||
|
CCASFLAGS assembler compiler flags (defaults to CFLAGS)
|
||||||
CPP C preprocessor
|
CPP C preprocessor
|
||||||
|
|
||||||
Use these variables to override the choices made by `configure' or to help
|
Use these variables to override the choices made by `configure' or to help
|
||||||
@@ -1486,7 +1499,7 @@ fi
|
|||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
libpng configure 1.5.6beta05
|
libpng configure 1.5.7beta01
|
||||||
generated by GNU Autoconf 2.68
|
generated by GNU Autoconf 2.68
|
||||||
|
|
||||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||||
@@ -1909,7 +1922,7 @@ cat >config.log <<_ACEOF
|
|||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by libpng $as_me 1.5.6beta05, which was
|
It was created by libpng $as_me 1.5.7beta01, which was
|
||||||
generated by GNU Autoconf 2.68. Invocation command line was
|
generated by GNU Autoconf 2.68. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
@@ -2724,7 +2737,7 @@ fi
|
|||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='libpng'
|
PACKAGE='libpng'
|
||||||
VERSION='1.5.6beta05'
|
VERSION='1.5.7beta01'
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
@@ -2788,10 +2801,10 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
PNGLIB_VERSION=1.5.6beta05
|
PNGLIB_VERSION=1.5.7beta01
|
||||||
PNGLIB_MAJOR=1
|
PNGLIB_MAJOR=1
|
||||||
PNGLIB_MINOR=5
|
PNGLIB_MINOR=5
|
||||||
PNGLIB_RELEASE=6
|
PNGLIB_RELEASE=7
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -3784,6 +3797,138 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# By default we simply use the C compiler to build assembly code.
|
||||||
|
|
||||||
|
test "${CCAS+set}" = set || CCAS=$CC
|
||||||
|
test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
depcc="$CCAS" am_compiler_list=
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
|
||||||
|
$as_echo_n "checking dependency style of $depcc... " >&6; }
|
||||||
|
if ${am_cv_CCAS_dependencies_compiler_type+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||||
|
# We make a subdir and do the tests there. Otherwise we can end up
|
||||||
|
# making bogus files that we don't know about and never remove. For
|
||||||
|
# instance it was reported that on HP-UX the gcc test will end up
|
||||||
|
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||||
|
# in D'.
|
||||||
|
mkdir conftest.dir
|
||||||
|
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||||
|
# using a relative directory.
|
||||||
|
cp "$am_depcomp" conftest.dir
|
||||||
|
cd conftest.dir
|
||||||
|
# We will build objects and dependencies in a subdirectory because
|
||||||
|
# it helps to detect inapplicable dependency modes. For instance
|
||||||
|
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||||
|
# side effect of compilation, but ICC will put the dependencies in
|
||||||
|
# the current directory while Tru64 will put them in the object
|
||||||
|
# directory.
|
||||||
|
mkdir sub
|
||||||
|
|
||||||
|
am_cv_CCAS_dependencies_compiler_type=none
|
||||||
|
if test "$am_compiler_list" = ""; then
|
||||||
|
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
|
||||||
|
fi
|
||||||
|
am__universal=false
|
||||||
|
|
||||||
|
|
||||||
|
for depmode in $am_compiler_list; do
|
||||||
|
# Setup a source with many dependencies, because some compilers
|
||||||
|
# like to wrap large dependency lists on column 80 (with \), and
|
||||||
|
# we should not choose a depcomp mode which is confused by this.
|
||||||
|
#
|
||||||
|
# We need to recreate these files for each test, as the compiler may
|
||||||
|
# overwrite some of them when testing with obscure command lines.
|
||||||
|
# This happens at least with the AIX C compiler.
|
||||||
|
: > sub/conftest.c
|
||||||
|
for i in 1 2 3 4 5 6; do
|
||||||
|
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||||
|
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||||
|
# Solaris 8's {/usr,}/bin/sh.
|
||||||
|
touch sub/conftst$i.h
|
||||||
|
done
|
||||||
|
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||||
|
|
||||||
|
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||||
|
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||||
|
# handle `-M -o', and we need to detect this. Also, some Intel
|
||||||
|
# versions had trouble with output in subdirs
|
||||||
|
am__obj=sub/conftest.${OBJEXT-o}
|
||||||
|
am__minus_obj="-o $am__obj"
|
||||||
|
case $depmode in
|
||||||
|
gcc)
|
||||||
|
# This depmode causes a compiler race in universal mode.
|
||||||
|
test "$am__universal" = false || continue
|
||||||
|
;;
|
||||||
|
nosideeffect)
|
||||||
|
# after this tag, mechanisms are not by side-effect, so they'll
|
||||||
|
# only be used when explicitly requested
|
||||||
|
if test "x$enable_dependency_tracking" = xyes; then
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
msvisualcpp | msvcmsys)
|
||||||
|
# This compiler won't grok `-c -o', but also, the minuso test has
|
||||||
|
# not run yet. These depmodes are late enough in the game, and
|
||||||
|
# so weak that their functioning should not be impacted.
|
||||||
|
am__obj=conftest.${OBJEXT-o}
|
||||||
|
am__minus_obj=
|
||||||
|
;;
|
||||||
|
none) break ;;
|
||||||
|
esac
|
||||||
|
if depmode=$depmode \
|
||||||
|
source=sub/conftest.c object=$am__obj \
|
||||||
|
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||||
|
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
|
||||||
|
>/dev/null 2>conftest.err &&
|
||||||
|
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||||
|
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||||
|
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
|
||||||
|
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||||
|
# icc doesn't choke on unknown options, it will just issue warnings
|
||||||
|
# or remarks (even with -Werror). So we grep stderr for any message
|
||||||
|
# that says an option was ignored or not supported.
|
||||||
|
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||||
|
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||||
|
# The diagnosis changed in icc 8.0:
|
||||||
|
# icc: Command line remark: option '-MP' not supported
|
||||||
|
if (grep 'ignoring option' conftest.err ||
|
||||||
|
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||||
|
am_cv_CCAS_dependencies_compiler_type=$depmode
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
rm -rf conftest.dir
|
||||||
|
else
|
||||||
|
am_cv_CCAS_dependencies_compiler_type=none
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5
|
||||||
|
$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; }
|
||||||
|
CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type
|
||||||
|
|
||||||
|
if
|
||||||
|
test "x$enable_dependency_tracking" != xno \
|
||||||
|
&& test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then
|
||||||
|
am__fastdepCCAS_TRUE=
|
||||||
|
am__fastdepCCAS_FALSE='#'
|
||||||
|
else
|
||||||
|
am__fastdepCCAS_TRUE='#'
|
||||||
|
am__fastdepCCAS_FALSE=
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Make sure we can run config.sub.
|
# Make sure we can run config.sub.
|
||||||
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
|
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
|
||||||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
|
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
|
||||||
@@ -10625,7 +10770,14 @@ freebsd* | dragonfly*)
|
|||||||
*) objformat=elf ;;
|
*) objformat=elf ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
version_type=freebsd-$objformat
|
# Handle Gentoo/FreeBSD as it was Linux
|
||||||
|
case $host_vendor in
|
||||||
|
gentoo)
|
||||||
|
version_type=linux ;;
|
||||||
|
*)
|
||||||
|
version_type=freebsd-$objformat ;;
|
||||||
|
esac
|
||||||
|
|
||||||
case $version_type in
|
case $version_type in
|
||||||
freebsd-elf*)
|
freebsd-elf*)
|
||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
|
||||||
@@ -10636,6 +10788,12 @@ freebsd* | dragonfly*)
|
|||||||
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
|
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
|
||||||
need_version=yes
|
need_version=yes
|
||||||
;;
|
;;
|
||||||
|
linux)
|
||||||
|
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
|
||||||
|
soname_spec='${libname}${release}${shared_ext}$major'
|
||||||
|
need_lib_prefix=no
|
||||||
|
need_version=no
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
shlibpath_var=LD_LIBRARY_PATH
|
shlibpath_var=LD_LIBRARY_PATH
|
||||||
case $host_os in
|
case $host_os in
|
||||||
@@ -12521,6 +12679,27 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --enable-arm-neon was given.
|
||||||
|
if test "${enable_arm_neon+set}" = set; then :
|
||||||
|
enableval=$enable_arm_neon; if test "${enableval}" = yes; then
|
||||||
|
|
||||||
|
$as_echo "#define PNG_ARM_NEON 1" >>confdefs.h
|
||||||
|
|
||||||
|
|
||||||
|
$as_echo "#define PNG_ALIGNED_MEMORY_SUPPORTED 1" >>confdefs.h
|
||||||
|
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "${enable_arm_neon:-no}" = yes; then
|
||||||
|
PNG_ARM_NEON_TRUE=
|
||||||
|
PNG_ARM_NEON_FALSE='#'
|
||||||
|
else
|
||||||
|
PNG_ARM_NEON_TRUE='#'
|
||||||
|
PNG_ARM_NEON_FALSE=
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Config files, substituting as above
|
# Config files, substituting as above
|
||||||
ac_config_files="$ac_config_files Makefile libpng.pc:libpng.pc.in"
|
ac_config_files="$ac_config_files Makefile libpng.pc:libpng.pc.in"
|
||||||
|
|
||||||
@@ -12656,6 +12835,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
|
|||||||
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
|
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
|
||||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
fi
|
fi
|
||||||
|
if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
|
||||||
|
as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
|
fi
|
||||||
if test -z "${HAVE_SOLARIS_LD_TRUE}" && test -z "${HAVE_SOLARIS_LD_FALSE}"; then
|
if test -z "${HAVE_SOLARIS_LD_TRUE}" && test -z "${HAVE_SOLARIS_LD_FALSE}"; then
|
||||||
as_fn_error $? "conditional \"HAVE_SOLARIS_LD\" was never defined.
|
as_fn_error $? "conditional \"HAVE_SOLARIS_LD\" was never defined.
|
||||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
@@ -12664,6 +12847,10 @@ if test -z "${HAVE_LD_VERSION_SCRIPT_TRUE}" && test -z "${HAVE_LD_VERSION_SCRIPT
|
|||||||
as_fn_error $? "conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined.
|
as_fn_error $? "conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined.
|
||||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
fi
|
fi
|
||||||
|
if test -z "${PNG_ARM_NEON_TRUE}" && test -z "${PNG_ARM_NEON_FALSE}"; then
|
||||||
|
as_fn_error $? "conditional \"PNG_ARM_NEON\" was never defined.
|
||||||
|
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||||
|
fi
|
||||||
|
|
||||||
: "${CONFIG_STATUS=./config.status}"
|
: "${CONFIG_STATUS=./config.status}"
|
||||||
ac_write_fail=0
|
ac_write_fail=0
|
||||||
@@ -13073,7 +13260,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by libpng $as_me 1.5.6beta05, which was
|
This file was extended by libpng $as_me 1.5.7beta01, which was
|
||||||
generated by GNU Autoconf 2.68. Invocation command line was
|
generated by GNU Autoconf 2.68. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
@@ -13139,7 +13326,7 @@ _ACEOF
|
|||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
libpng config.status 1.5.6beta05
|
libpng config.status 1.5.7beta01
|
||||||
configured by $0, generated by GNU Autoconf 2.68,
|
configured by $0, generated by GNU Autoconf 2.68,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
|||||||
15
configure.ac
15
configure.ac
@@ -18,15 +18,15 @@ AC_PREREQ(2.59)
|
|||||||
|
|
||||||
dnl Version number stuff here:
|
dnl Version number stuff here:
|
||||||
|
|
||||||
AC_INIT([libpng], [1.5.6beta05], [png-mng-implement@lists.sourceforge.net])
|
AC_INIT([libpng], [1.5.7beta01], [png-mng-implement@lists.sourceforge.net])
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
dnl stop configure from automagically running automake
|
dnl stop configure from automagically running automake
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
PNGLIB_VERSION=1.5.6beta05
|
PNGLIB_VERSION=1.5.7beta01
|
||||||
PNGLIB_MAJOR=1
|
PNGLIB_MAJOR=1
|
||||||
PNGLIB_MINOR=5
|
PNGLIB_MINOR=5
|
||||||
PNGLIB_RELEASE=6
|
PNGLIB_RELEASE=7
|
||||||
|
|
||||||
dnl End of version number stuff
|
dnl End of version number stuff
|
||||||
|
|
||||||
@@ -36,6 +36,7 @@ AM_CONFIG_HEADER(config.h)
|
|||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
AC_LANG([C])
|
AC_LANG([C])
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
AM_PROG_AS
|
||||||
AC_PROG_LD
|
AC_PROG_LD
|
||||||
AC_PROG_CPP
|
AC_PROG_CPP
|
||||||
AC_CHECK_TOOL(SED, sed, :)
|
AC_CHECK_TOOL(SED, sed, :)
|
||||||
@@ -177,6 +178,14 @@ AC_ARG_WITH(binconfigs,
|
|||||||
[binconfigs='${binconfigs}'])
|
[binconfigs='${binconfigs}'])
|
||||||
AC_SUBST([binconfigs])
|
AC_SUBST([binconfigs])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([arm-neon],
|
||||||
|
AC_HELP_STRING([--enable-arm-neon], [Enable ARM NEON optmizations]),
|
||||||
|
[if test "${enableval}" = yes; then
|
||||||
|
AC_DEFINE([PNG_ARM_NEON], [1], [Enable ARM NEON optmizations])
|
||||||
|
AC_DEFINE([PNG_ALIGNED_MEMORY_SUPPORTED], [1], [Align row buffers])
|
||||||
|
fi])
|
||||||
|
AM_CONDITIONAL([PNG_ARM_NEON], [test "${enable_arm_neon:-no}" = yes])
|
||||||
|
|
||||||
# Config files, substituting as above
|
# Config files, substituting as above
|
||||||
AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in])
|
AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in])
|
||||||
AC_CONFIG_FILES([libpng-config:libpng-config.in],
|
AC_CONFIG_FILES([libpng-config:libpng-config.in],
|
||||||
|
|||||||
@@ -19,5 +19,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_NO_WARNINGS
|
#define PNG_NO_WARNINGS
|
||||||
|
#define PNG_ALIGN_TYPE PNG_ALIGN_NONE
|
||||||
|
|
||||||
#endif /* MINRDPNGCONF_H */
|
#endif /* MINRDPNGCONF_H */
|
||||||
|
|||||||
@@ -19,5 +19,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_NO_WARNINGS
|
#define PNG_NO_WARNINGS
|
||||||
|
#define PNG_ALIGN_TYPE PNG_ALIGN_NONE
|
||||||
|
|
||||||
#endif /* MINWRPNGCONF_H */
|
#endif /* MINWRPNGCONF_H */
|
||||||
|
|||||||
@@ -19,5 +19,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_NO_WARNINGS
|
#define PNG_NO_WARNINGS
|
||||||
|
#define PNG_ALIGN_TYPE PNG_ALIGN_NONE
|
||||||
|
|
||||||
#endif /* MINPRDPNGCONF_H */
|
#endif /* MINPRDPNGCONF_H */
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#if 0 /* in case someone actually tries to compile this */
|
#if 0 /* in case someone actually tries to compile this */
|
||||||
|
|
||||||
/* example.c - an example of using libpng
|
/* example.c - an example of using libpng
|
||||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.6 [November 3, 2011]
|
||||||
* This file has been placed in the public domain by the authors.
|
* This file has been placed in the public domain by the authors.
|
||||||
* Maintained 1998-2011 Glenn Randers-Pehrson
|
* Maintained 1998-2011 Glenn Randers-Pehrson
|
||||||
* Maintained 1996, 1997 Andreas Dilger)
|
* Maintained 1996, 1997 Andreas Dilger)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
libpng-manual.txt - A description on how to use and modify libpng
|
libpng-manual.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.5.6beta05 - October 12, 2011
|
libpng version 1.5.7beta01 - November 4, 2011
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
@@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng
|
|||||||
|
|
||||||
Based on:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.5.6beta05 - October 12, 2011
|
libpng versions 0.97, January 1998, through 1.5.7beta01 - November 4, 2011
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@@ -4555,6 +4555,9 @@ left parenthesis that follows it:
|
|||||||
We prefer #ifdef and #ifndef to #if defined() and if !defined()
|
We prefer #ifdef and #ifndef to #if defined() and if !defined()
|
||||||
when there is only one macro being tested.
|
when there is only one macro being tested.
|
||||||
|
|
||||||
|
We prefer to express integers that are used as bit masks in hex format,
|
||||||
|
with an even number of lower-case hex digits (e.g., 0x00, 0xff, 0x0100).
|
||||||
|
|
||||||
We do not use the TAB character for indentation in the C sources.
|
We do not use the TAB character for indentation in the C sources.
|
||||||
|
|
||||||
Lines do not exceed 80 characters.
|
Lines do not exceed 80 characters.
|
||||||
@@ -4563,13 +4566,13 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
XIV. Y2K Compliance in libpng
|
XIV. Y2K Compliance in libpng
|
||||||
|
|
||||||
October 12, 2011
|
November 4, 2011
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.5.6beta05 are Y2K compliant. It is my belief that earlier
|
upward through 1.5.7beta01 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||||
|
|||||||
26
libpng.3
26
libpng.3
@@ -1,6 +1,6 @@
|
|||||||
.TH LIBPNG 3 "October 12, 2011"
|
.TH LIBPNG 3 "November 4, 2011"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.6beta05
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7beta01
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fI\fB
|
\fI\fB
|
||||||
|
|
||||||
@@ -977,7 +977,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
|
|||||||
.SH LIBPNG.TXT
|
.SH LIBPNG.TXT
|
||||||
libpng-manual.txt - A description on how to use and modify libpng
|
libpng-manual.txt - A description on how to use and modify libpng
|
||||||
|
|
||||||
libpng version 1.5.6beta05 - October 12, 2011
|
libpng version 1.5.7beta01 - November 4, 2011
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
<glennrp at users.sourceforge.net>
|
<glennrp at users.sourceforge.net>
|
||||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
@@ -988,7 +988,7 @@ libpng-manual.txt - A description on how to use and modify libpng
|
|||||||
|
|
||||||
Based on:
|
Based on:
|
||||||
|
|
||||||
libpng versions 0.97, January 1998, through 1.5.6beta05 - October 12, 2011
|
libpng versions 0.97, January 1998, through 1.5.7beta01 - November 4, 2011
|
||||||
Updated and distributed by Glenn Randers-Pehrson
|
Updated and distributed by Glenn Randers-Pehrson
|
||||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
|
|
||||||
@@ -5533,6 +5533,9 @@ left parenthesis that follows it:
|
|||||||
We prefer #ifdef and #ifndef to #if defined() and if !defined()
|
We prefer #ifdef and #ifndef to #if defined() and if !defined()
|
||||||
when there is only one macro being tested.
|
when there is only one macro being tested.
|
||||||
|
|
||||||
|
We prefer to express integers that are used as bit masks in hex format,
|
||||||
|
with an even number of lower-case hex digits (e.g., 0x00, 0xff, 0x0100).
|
||||||
|
|
||||||
We do not use the TAB character for indentation in the C sources.
|
We do not use the TAB character for indentation in the C sources.
|
||||||
|
|
||||||
Lines do not exceed 80 characters.
|
Lines do not exceed 80 characters.
|
||||||
@@ -5541,13 +5544,13 @@ Other rules can be inferred by inspecting the libpng source.
|
|||||||
|
|
||||||
.SH XIV. Y2K Compliance in libpng
|
.SH XIV. Y2K Compliance in libpng
|
||||||
|
|
||||||
October 12, 2011
|
November 4, 2011
|
||||||
|
|
||||||
Since the PNG Development group is an ad-hoc body, we can't make
|
Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
an official declaration.
|
an official declaration.
|
||||||
|
|
||||||
This is your unofficial assurance that libpng from version 0.71 and
|
This is your unofficial assurance that libpng from version 0.71 and
|
||||||
upward through 1.5.6beta05 are Y2K compliant. It is my belief that earlier
|
upward through 1.5.7beta01 are Y2K compliant. It is my belief that earlier
|
||||||
versions were also Y2K compliant.
|
versions were also Y2K compliant.
|
||||||
|
|
||||||
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
Libpng only has three year fields. One is a 2-byte unsigned integer that
|
||||||
@@ -5746,7 +5749,10 @@ the first widely used release:
|
|||||||
1.5.5beta01-08 15 10505 15.so.15.5[.0]
|
1.5.5beta01-08 15 10505 15.so.15.5[.0]
|
||||||
1.5.5rc01 15 10505 15.so.15.5[.0]
|
1.5.5rc01 15 10505 15.so.15.5[.0]
|
||||||
1.5.5 15 10505 15.so.15.5[.0]
|
1.5.5 15 10505 15.so.15.5[.0]
|
||||||
1.5.6beta01-05 15 10506 15.so.15.6[.0]
|
1.5.6beta01-07 15 10506 15.so.15.6[.0]
|
||||||
|
1.5.6rc01-03 15 10506 15.so.15.6[.0]
|
||||||
|
1.5.6 15 10506 15.so.15.6[.0]
|
||||||
|
1.5.7beta01 15 10507 15.so.15.7[.0]
|
||||||
|
|
||||||
Henceforth the source version will match the shared-library minor
|
Henceforth the source version will match the shared-library minor
|
||||||
and patch numbers; the shared-library major version number will be
|
and patch numbers; the shared-library major version number will be
|
||||||
@@ -5803,7 +5809,7 @@ possible without all of you.
|
|||||||
|
|
||||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||||
|
|
||||||
Libpng version 1.5.6beta05 - October 12, 2011:
|
Libpng version 1.5.7beta01 - November 4, 2011:
|
||||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||||
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
||||||
|
|
||||||
@@ -5826,7 +5832,7 @@ this sentence.
|
|||||||
|
|
||||||
This code is released under the libpng license.
|
This code is released under the libpng license.
|
||||||
|
|
||||||
libpng versions 1.2.6, August 15, 2004, through 1.5.6beta05, October 12, 2011, are
|
libpng versions 1.2.6, August 15, 2004, through 1.5.7beta01, November 4, 2011, are
|
||||||
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
||||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
with the following individual added to the list of Contributing Authors
|
with the following individual added to the list of Contributing Authors
|
||||||
@@ -5925,7 +5931,7 @@ certification mark of the Open Source Initiative.
|
|||||||
|
|
||||||
Glenn Randers-Pehrson
|
Glenn Randers-Pehrson
|
||||||
glennrp at users.sourceforge.net
|
glennrp at users.sourceforge.net
|
||||||
October 12, 2011
|
November 4, 2011
|
||||||
|
|
||||||
.\" end of man page
|
.\" end of man page
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.TH LIBPNGPF 3 "October 12, 2011"
|
.TH LIBPNGPF 3 "November 4, 2011"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.6beta05
|
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.7beta01
|
||||||
(private functions)
|
(private functions)
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fB#include \fI"pngpriv.h"
|
\fB#include \fI"pngpriv.h"
|
||||||
|
|||||||
2
png.5
2
png.5
@@ -1,4 +1,4 @@
|
|||||||
.TH PNG 5 "October 12, 2011"
|
.TH PNG 5 "November 4, 2011"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
png \- Portable Network Graphics (PNG) format
|
png \- Portable Network Graphics (PNG) format
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
|||||||
74
png.c
74
png.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.c - location for general purpose libpng functions
|
/* png.c - location for general purpose libpng functions
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.6 [November 3, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
#include "pngpriv.h"
|
#include "pngpriv.h"
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef png_libpng_version_1_5_6beta05 Your_png_h_is_not_version_1_5_6beta05;
|
typedef png_libpng_version_1_5_7beta01 Your_png_h_is_not_version_1_5_7beta01;
|
||||||
|
|
||||||
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
||||||
* of the PNG file signature. If the PNG data is embedded into another
|
* of the PNG file signature. If the PNG data is embedded into another
|
||||||
@@ -645,13 +645,13 @@ png_get_copyright(png_const_structp png_ptr)
|
|||||||
#else
|
#else
|
||||||
# ifdef __STDC__
|
# ifdef __STDC__
|
||||||
return PNG_STRING_NEWLINE \
|
return PNG_STRING_NEWLINE \
|
||||||
"libpng version 1.5.6beta05 - October 12, 2011" PNG_STRING_NEWLINE \
|
"libpng version 1.5.7beta01 - November 4, 2011" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1998-2011 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
"Copyright (c) 1998-2011 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||||
PNG_STRING_NEWLINE;
|
PNG_STRING_NEWLINE;
|
||||||
# else
|
# else
|
||||||
return "libpng version 1.5.6beta05 - October 12, 2011\
|
return "libpng version 1.5.7beta01 - November 4, 2011\
|
||||||
Copyright (c) 1998-2011 Glenn Randers-Pehrson\
|
Copyright (c) 1998-2011 Glenn Randers-Pehrson\
|
||||||
Copyright (c) 1996-1997 Andreas Dilger\
|
Copyright (c) 1996-1997 Andreas Dilger\
|
||||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||||
@@ -2663,6 +2663,60 @@ png_build_8bit_table(png_structp png_ptr, png_bytepp ptable,
|
|||||||
table[i] = (png_byte)i;
|
table[i] = (png_byte)i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Used from png_read_destroy and below to release the memory used by the gamma
|
||||||
|
* tables.
|
||||||
|
*/
|
||||||
|
void /* PRIVATE */
|
||||||
|
png_destroy_gamma_table(png_structp png_ptr)
|
||||||
|
{
|
||||||
|
png_free(png_ptr, png_ptr->gamma_table);
|
||||||
|
png_ptr->gamma_table = NULL;
|
||||||
|
|
||||||
|
if (png_ptr->gamma_16_table != NULL)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int istop = (1 << (8 - png_ptr->gamma_shift));
|
||||||
|
for (i = 0; i < istop; i++)
|
||||||
|
{
|
||||||
|
png_free(png_ptr, png_ptr->gamma_16_table[i]);
|
||||||
|
}
|
||||||
|
png_free(png_ptr, png_ptr->gamma_16_table);
|
||||||
|
png_ptr->gamma_16_table = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
|
||||||
|
defined(PNG_READ_ALPHA_MODE_SUPPORTED) || \
|
||||||
|
defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
|
||||||
|
png_free(png_ptr, png_ptr->gamma_from_1);
|
||||||
|
png_ptr->gamma_from_1 = NULL;
|
||||||
|
png_free(png_ptr, png_ptr->gamma_to_1);
|
||||||
|
png_ptr->gamma_to_1 = NULL;
|
||||||
|
|
||||||
|
if (png_ptr->gamma_16_from_1 != NULL)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int istop = (1 << (8 - png_ptr->gamma_shift));
|
||||||
|
for (i = 0; i < istop; i++)
|
||||||
|
{
|
||||||
|
png_free(png_ptr, png_ptr->gamma_16_from_1[i]);
|
||||||
|
}
|
||||||
|
png_free(png_ptr, png_ptr->gamma_16_from_1);
|
||||||
|
png_ptr->gamma_16_from_1 = NULL;
|
||||||
|
}
|
||||||
|
if (png_ptr->gamma_16_to_1 != NULL)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int istop = (1 << (8 - png_ptr->gamma_shift));
|
||||||
|
for (i = 0; i < istop; i++)
|
||||||
|
{
|
||||||
|
png_free(png_ptr, png_ptr->gamma_16_to_1[i]);
|
||||||
|
}
|
||||||
|
png_free(png_ptr, png_ptr->gamma_16_to_1);
|
||||||
|
png_ptr->gamma_16_to_1 = NULL;
|
||||||
|
}
|
||||||
|
#endif /* READ_BACKGROUND || READ_ALPHA_MODE || RGB_TO_GRAY */
|
||||||
|
}
|
||||||
|
|
||||||
/* We build the 8- or 16-bit gamma tables here. Note that for 16-bit
|
/* We build the 8- or 16-bit gamma tables here. Note that for 16-bit
|
||||||
* tables, we don't make a full table if we are reducing to 8-bit in
|
* tables, we don't make a full table if we are reducing to 8-bit in
|
||||||
* the future. Note also how the gamma_16 tables are segmented so that
|
* the future. Note also how the gamma_16 tables are segmented so that
|
||||||
@@ -2673,6 +2727,18 @@ png_build_gamma_table(png_structp png_ptr, int bit_depth)
|
|||||||
{
|
{
|
||||||
png_debug(1, "in png_build_gamma_table");
|
png_debug(1, "in png_build_gamma_table");
|
||||||
|
|
||||||
|
/* Remove any existing table; this copes with multiple calls to
|
||||||
|
* png_read_update_info. The warning is because building the gamma tables
|
||||||
|
* multiple times is a performance hit - it's harmless but the ability to call
|
||||||
|
* png_read_update_info() multiple times is new in 1.5.6 so it seems sensible
|
||||||
|
* to warn if the app introduces such a hit.
|
||||||
|
*/
|
||||||
|
if (png_ptr->gamma_table != NULL || png_ptr->gamma_16_table != NULL)
|
||||||
|
{
|
||||||
|
png_warning(png_ptr, "gamma table being rebuilt");
|
||||||
|
png_destroy_gamma_table(png_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
if (bit_depth <= 8)
|
if (bit_depth <= 8)
|
||||||
{
|
{
|
||||||
png_build_8bit_table(png_ptr, &png_ptr->gamma_table,
|
png_build_8bit_table(png_ptr, &png_ptr->gamma_table,
|
||||||
|
|||||||
27
png.h
27
png.h
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* png.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* libpng version 1.5.6beta05 - October 12, 2011
|
* libpng version 1.5.7beta01 - November 4, 2011
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
* Authors and maintainers:
|
* Authors and maintainers:
|
||||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
* 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.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||||
* libpng versions 0.97, January 1998, through 1.5.6beta05 - October 12, 2011: Glenn
|
* libpng versions 0.97, January 1998, through 1.5.7beta01 - November 4, 2011: Glenn
|
||||||
* See also "Contributing Authors", below.
|
* See also "Contributing Authors", below.
|
||||||
*
|
*
|
||||||
* Note about libpng version numbers:
|
* Note about libpng version numbers:
|
||||||
@@ -160,7 +160,10 @@
|
|||||||
* 1.5.5beta01-08 15 10505 15.so.15.5[.0]
|
* 1.5.5beta01-08 15 10505 15.so.15.5[.0]
|
||||||
* 1.5.5rc01 15 10505 15.so.15.5[.0]
|
* 1.5.5rc01 15 10505 15.so.15.5[.0]
|
||||||
* 1.5.5 15 10505 15.so.15.5[.0]
|
* 1.5.5 15 10505 15.so.15.5[.0]
|
||||||
* 1.5.6beta01-05 15 10506 15.so.15.6[.0]
|
* 1.5.6beta01-07 15 10506 15.so.15.6[.0]
|
||||||
|
* 1.5.6rc01-03 15 10506 15.so.15.6[.0]
|
||||||
|
* 1.5.6 15 10506 15.so.15.6[.0]
|
||||||
|
* 1.5.7beta01 15 10507 15.so.15.7[.0]
|
||||||
*
|
*
|
||||||
* Henceforth the source version will match the shared-library major
|
* Henceforth the source version will match the shared-library major
|
||||||
* and minor numbers; the shared-library major version number will be
|
* and minor numbers; the shared-library major version number will be
|
||||||
@@ -192,7 +195,7 @@
|
|||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
*
|
*
|
||||||
* libpng versions 1.2.6, August 15, 2004, through 1.5.6beta05, October 12, 2011, are
|
* libpng versions 1.2.6, August 15, 2004, through 1.5.7beta01, November 4, 2011, are
|
||||||
* Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
|
* Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
|
||||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||||
* with the following individual added to the list of Contributing Authors:
|
* with the following individual added to the list of Contributing Authors:
|
||||||
@@ -304,13 +307,13 @@
|
|||||||
* Y2K compliance in libpng:
|
* Y2K compliance in libpng:
|
||||||
* =========================
|
* =========================
|
||||||
*
|
*
|
||||||
* October 12, 2011
|
* November 4, 2011
|
||||||
*
|
*
|
||||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
* an official declaration.
|
* an official declaration.
|
||||||
*
|
*
|
||||||
* This is your unofficial assurance that libpng from version 0.71 and
|
* This is your unofficial assurance that libpng from version 0.71 and
|
||||||
* upward through 1.5.6beta05 are Y2K compliant. It is my belief that
|
* upward through 1.5.7beta01 are Y2K compliant. It is my belief that
|
||||||
* earlier versions were also Y2K compliant.
|
* earlier versions were also Y2K compliant.
|
||||||
*
|
*
|
||||||
* Libpng only has two year fields. One is a 2-byte unsigned integer
|
* Libpng only has two year fields. One is a 2-byte unsigned integer
|
||||||
@@ -365,9 +368,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Version information for png.h - this should match the version in png.c */
|
/* Version information for png.h - this should match the version in png.c */
|
||||||
#define PNG_LIBPNG_VER_STRING "1.5.6beta05"
|
#define PNG_LIBPNG_VER_STRING "1.5.7beta01"
|
||||||
#define PNG_HEADER_VERSION_STRING \
|
#define PNG_HEADER_VERSION_STRING \
|
||||||
" libpng version 1.5.6beta05 - October 12, 2011\n"
|
" libpng version 1.5.7beta01 - November 4, 2011\n"
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_SONUM 15
|
#define PNG_LIBPNG_VER_SONUM 15
|
||||||
#define PNG_LIBPNG_VER_DLLNUM 15
|
#define PNG_LIBPNG_VER_DLLNUM 15
|
||||||
@@ -375,12 +378,12 @@
|
|||||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||||
#define PNG_LIBPNG_VER_MAJOR 1
|
#define PNG_LIBPNG_VER_MAJOR 1
|
||||||
#define PNG_LIBPNG_VER_MINOR 5
|
#define PNG_LIBPNG_VER_MINOR 5
|
||||||
#define PNG_LIBPNG_VER_RELEASE 6
|
#define PNG_LIBPNG_VER_RELEASE 7
|
||||||
/* This should match the numeric part of the final component of
|
/* This should match the numeric part of the final component of
|
||||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
|
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_BUILD 05
|
#define PNG_LIBPNG_VER_BUILD 01
|
||||||
|
|
||||||
/* Release Status */
|
/* Release Status */
|
||||||
#define PNG_LIBPNG_BUILD_ALPHA 1
|
#define PNG_LIBPNG_BUILD_ALPHA 1
|
||||||
@@ -405,7 +408,7 @@
|
|||||||
* version 1.0.0 was mis-numbered 100 instead of 10000). From
|
* version 1.0.0 was mis-numbered 100 instead of 10000). From
|
||||||
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
|
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
|
||||||
*/
|
*/
|
||||||
#define PNG_LIBPNG_VER 10506 /* 1.5.6 */
|
#define PNG_LIBPNG_VER 10507 /* 1.5.7 */
|
||||||
|
|
||||||
/* Library configuration: these options cannot be changed after
|
/* Library configuration: these options cannot be changed after
|
||||||
* the library has been built.
|
* the library has been built.
|
||||||
@@ -527,7 +530,7 @@ extern "C" {
|
|||||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||||
* do not agree upon the version number.
|
* do not agree upon the version number.
|
||||||
*/
|
*/
|
||||||
typedef char* png_libpng_version_1_5_6beta05;
|
typedef char* png_libpng_version_1_5_7beta01;
|
||||||
|
|
||||||
/* Three color definitions. The order of the red, green, and blue, (and the
|
/* Three color definitions. The order of the red, green, and blue, (and the
|
||||||
* exact size) is not important, although the size of the fields need to
|
* exact size) is not important, although the size of the fields need to
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngconf.h - machine configurable file for libpng
|
/* pngconf.h - machine configurable file for libpng
|
||||||
*
|
*
|
||||||
* libpng version 1.5.6beta05 - October 12, 2011
|
* libpng version 1.5.7beta01 - November 4, 2011
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngerror.c - stub functions for i/o and memory allocation
|
/* pngerror.c - stub functions for i/o and memory allocation
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.6 [November 3, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
|
|||||||
3
pngget.c
3
pngget.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngget.c - retrieval of values from info struct
|
/* pngget.c - retrieval of values from info struct
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.6 [November 3, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -1068,7 +1068,6 @@ png_get_compression_buffer_size(png_const_structp png_ptr)
|
|||||||
return (png_ptr ? png_ptr->zbuf_size : 0);
|
return (png_ptr ? png_ptr->zbuf_size : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
||||||
/* These functions were added to libpng 1.2.6 and were enabled
|
/* These functions were added to libpng 1.2.6 and were enabled
|
||||||
* by default in libpng-1.4.0 */
|
* by default in libpng-1.4.0 */
|
||||||
|
|||||||
16
pngmem.c
16
pngmem.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngmem.c - stub functions for memory allocation
|
/* pngmem.c - stub functions for memory allocation
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.4 [July 7, 2011]
|
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -56,9 +56,9 @@ png_create_struct_2,(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr),
|
|||||||
if (malloc_fn != NULL)
|
if (malloc_fn != NULL)
|
||||||
{
|
{
|
||||||
png_struct dummy_struct;
|
png_struct dummy_struct;
|
||||||
png_structp png_ptr = &dummy_struct;
|
memset(&dummy_struct, 0, sizeof dummy_struct);
|
||||||
png_ptr->mem_ptr=mem_ptr;
|
dummy_struct.mem_ptr=mem_ptr;
|
||||||
struct_ptr = (*(malloc_fn))(png_ptr, (png_uint_32)size);
|
struct_ptr = (*(malloc_fn))(&dummy_struct, (png_alloc_size_t)size);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -90,9 +90,9 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
|
|||||||
if (free_fn != NULL)
|
if (free_fn != NULL)
|
||||||
{
|
{
|
||||||
png_struct dummy_struct;
|
png_struct dummy_struct;
|
||||||
png_structp png_ptr = &dummy_struct;
|
memset(&dummy_struct, 0, sizeof dummy_struct);
|
||||||
png_ptr->mem_ptr=mem_ptr;
|
dummy_struct.mem_ptr=mem_ptr;
|
||||||
(*(free_fn))(png_ptr, struct_ptr);
|
(*(free_fn))(&dummy_struct, struct_ptr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ png_malloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
|
|||||||
|
|
||||||
# ifdef PNG_USER_MEM_SUPPORTED
|
# ifdef PNG_USER_MEM_SUPPORTED
|
||||||
if (png_ptr->malloc_fn != NULL)
|
if (png_ptr->malloc_fn != NULL)
|
||||||
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
|
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, size));
|
||||||
|
|
||||||
else
|
else
|
||||||
ret = (png_malloc_default(png_ptr, size));
|
ret = (png_malloc_default(png_ptr, size));
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngpread.c - read a png file in push mode
|
/* pngpread.c - read a png file in push mode
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -985,7 +985,7 @@ png_push_process_row(png_structp png_ptr)
|
|||||||
if (png_ptr->row_buf[0] > PNG_FILTER_VALUE_NONE)
|
if (png_ptr->row_buf[0] > PNG_FILTER_VALUE_NONE)
|
||||||
{
|
{
|
||||||
if (png_ptr->row_buf[0] < PNG_FILTER_VALUE_LAST)
|
if (png_ptr->row_buf[0] < PNG_FILTER_VALUE_LAST)
|
||||||
png_read_filter_row(&row_info, png_ptr->row_buf + 1,
|
png_read_filter_row(png_ptr, &row_info, png_ptr->row_buf + 1,
|
||||||
png_ptr->prev_row + 1, png_ptr->row_buf[0]);
|
png_ptr->prev_row + 1, png_ptr->row_buf[0]);
|
||||||
else
|
else
|
||||||
png_error(png_ptr, "bad adaptive filter value");
|
png_error(png_ptr, "bad adaptive filter value");
|
||||||
|
|||||||
20
pngpriv.h
20
pngpriv.h
@@ -6,7 +6,7 @@
|
|||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
* For conditions of distribution and use, see the disclaimer
|
* For conditions of distribution and use, see the disclaimer
|
||||||
@@ -922,9 +922,24 @@ PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,
|
|||||||
/* Unfilter a row: check the filter value before calling this, there is no point
|
/* Unfilter a row: check the filter value before calling this, there is no point
|
||||||
* calling it for PNG_FILTER_VALUE_NONE.
|
* calling it for PNG_FILTER_VALUE_NONE.
|
||||||
*/
|
*/
|
||||||
PNG_EXTERN void png_read_filter_row PNGARG((png_row_infop row_info,
|
PNG_EXTERN void png_read_filter_row PNGARG((png_structp pp, png_row_infop row_info,
|
||||||
png_bytep row, png_const_bytep prev_row, int filter));
|
png_bytep row, png_const_bytep prev_row, int filter));
|
||||||
|
|
||||||
|
PNG_EXTERN void png_read_filter_row_up_neon PNGARG((png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row));
|
||||||
|
PNG_EXTERN void png_read_filter_row_sub3_neon PNGARG((png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row));
|
||||||
|
PNG_EXTERN void png_read_filter_row_sub4_neon PNGARG((png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row));
|
||||||
|
PNG_EXTERN void png_read_filter_row_avg3_neon PNGARG((png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row));
|
||||||
|
PNG_EXTERN void png_read_filter_row_avg4_neon PNGARG((png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row));
|
||||||
|
PNG_EXTERN void png_read_filter_row_paeth3_neon PNGARG((png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row));
|
||||||
|
PNG_EXTERN void png_read_filter_row_paeth4_neon PNGARG((png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row));
|
||||||
|
|
||||||
/* Choose the best filter to use and filter the row data */
|
/* Choose the best filter to use and filter the row data */
|
||||||
PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,
|
PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,
|
||||||
png_row_infop row_info));
|
png_row_infop row_info));
|
||||||
@@ -1568,6 +1583,7 @@ PNG_EXTERN png_uint_16 png_gamma_16bit_correct PNGARG((unsigned int value,
|
|||||||
png_fixed_point gamma_value));
|
png_fixed_point gamma_value));
|
||||||
PNG_EXTERN png_byte png_gamma_8bit_correct PNGARG((unsigned int value,
|
PNG_EXTERN png_byte png_gamma_8bit_correct PNGARG((unsigned int value,
|
||||||
png_fixed_point gamma_value));
|
png_fixed_point gamma_value));
|
||||||
|
PNG_EXTERN void png_destroy_gamma_table(png_structp png_ptr);
|
||||||
PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr,
|
PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr,
|
||||||
int bit_depth));
|
int bit_depth));
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
74
pngread.c
74
pngread.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngread.c - read a PNG file
|
/* pngread.c - read a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -348,13 +348,7 @@ png_read_update_info(png_structp png_ptr, png_infop info_ptr)
|
|||||||
if (png_ptr == NULL)
|
if (png_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
|
png_read_start_row(png_ptr);
|
||||||
png_read_start_row(png_ptr);
|
|
||||||
|
|
||||||
else
|
|
||||||
png_warning(png_ptr,
|
|
||||||
"Ignoring extra png_read_update_info() call;"
|
|
||||||
" row buffer not reallocated");
|
|
||||||
|
|
||||||
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
|
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
|
||||||
png_read_transform_info(png_ptr, info_ptr);
|
png_read_transform_info(png_ptr, info_ptr);
|
||||||
@@ -374,15 +368,8 @@ png_start_read_image(png_structp png_ptr)
|
|||||||
{
|
{
|
||||||
png_debug(1, "in png_start_read_image");
|
png_debug(1, "in png_start_read_image");
|
||||||
|
|
||||||
if (png_ptr == NULL)
|
if (png_ptr != NULL)
|
||||||
return;
|
png_read_start_row(png_ptr);
|
||||||
|
|
||||||
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
|
|
||||||
png_read_start_row(png_ptr);
|
|
||||||
else
|
|
||||||
png_warning(png_ptr,
|
|
||||||
"Ignoring extra png_start_read_image() call;"
|
|
||||||
" row buffer not reallocated");
|
|
||||||
}
|
}
|
||||||
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
|
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
|
||||||
|
|
||||||
@@ -591,7 +578,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
|
|||||||
if (png_ptr->row_buf[0] > PNG_FILTER_VALUE_NONE)
|
if (png_ptr->row_buf[0] > PNG_FILTER_VALUE_NONE)
|
||||||
{
|
{
|
||||||
if (png_ptr->row_buf[0] < PNG_FILTER_VALUE_LAST)
|
if (png_ptr->row_buf[0] < PNG_FILTER_VALUE_LAST)
|
||||||
png_read_filter_row(&row_info, png_ptr->row_buf + 1,
|
png_read_filter_row(png_ptr, &row_info, png_ptr->row_buf + 1,
|
||||||
png_ptr->prev_row + 1, png_ptr->row_buf[0]);
|
png_ptr->prev_row + 1, png_ptr->row_buf[0]);
|
||||||
else
|
else
|
||||||
png_error(png_ptr, "bad adaptive filter value");
|
png_error(png_ptr, "bad adaptive filter value");
|
||||||
@@ -1045,9 +1032,13 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr,
|
|||||||
if (end_info_ptr != NULL)
|
if (end_info_ptr != NULL)
|
||||||
png_info_destroy(png_ptr, end_info_ptr);
|
png_info_destroy(png_ptr, end_info_ptr);
|
||||||
|
|
||||||
|
#ifdef PNG_READ_GAMMA_SUPPORTED
|
||||||
|
png_destroy_gamma_table(png_ptr);
|
||||||
|
#endif
|
||||||
|
|
||||||
png_free(png_ptr, png_ptr->zbuf);
|
png_free(png_ptr, png_ptr->zbuf);
|
||||||
png_free(png_ptr, png_ptr->big_row_buf);
|
png_free(png_ptr, png_ptr->big_row_buf);
|
||||||
png_free(png_ptr, png_ptr->prev_row);
|
png_free(png_ptr, png_ptr->big_prev_row);
|
||||||
png_free(png_ptr, png_ptr->chunkdata);
|
png_free(png_ptr, png_ptr->chunkdata);
|
||||||
|
|
||||||
#ifdef PNG_READ_QUANTIZE_SUPPORTED
|
#ifdef PNG_READ_QUANTIZE_SUPPORTED
|
||||||
@@ -1055,15 +1046,6 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr,
|
|||||||
png_free(png_ptr, png_ptr->quantize_index);
|
png_free(png_ptr, png_ptr->quantize_index);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_READ_GAMMA_SUPPORTED
|
|
||||||
png_free(png_ptr, png_ptr->gamma_table);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PNG_READ_BACKGROUND_SUPPORTED
|
|
||||||
png_free(png_ptr, png_ptr->gamma_from_1);
|
|
||||||
png_free(png_ptr, png_ptr->gamma_to_1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (png_ptr->free_me & PNG_FREE_PLTE)
|
if (png_ptr->free_me & PNG_FREE_PLTE)
|
||||||
png_zfree(png_ptr, png_ptr->palette);
|
png_zfree(png_ptr, png_ptr->palette);
|
||||||
png_ptr->free_me &= ~PNG_FREE_PLTE;
|
png_ptr->free_me &= ~PNG_FREE_PLTE;
|
||||||
@@ -1081,42 +1063,6 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr,
|
|||||||
png_ptr->free_me &= ~PNG_FREE_HIST;
|
png_ptr->free_me &= ~PNG_FREE_HIST;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PNG_READ_GAMMA_SUPPORTED
|
|
||||||
if (png_ptr->gamma_16_table != NULL)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int istop = (1 << (8 - png_ptr->gamma_shift));
|
|
||||||
for (i = 0; i < istop; i++)
|
|
||||||
{
|
|
||||||
png_free(png_ptr, png_ptr->gamma_16_table[i]);
|
|
||||||
}
|
|
||||||
png_free(png_ptr, png_ptr->gamma_16_table);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef PNG_READ_BACKGROUND_SUPPORTED
|
|
||||||
if (png_ptr->gamma_16_from_1 != NULL)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int istop = (1 << (8 - png_ptr->gamma_shift));
|
|
||||||
for (i = 0; i < istop; i++)
|
|
||||||
{
|
|
||||||
png_free(png_ptr, png_ptr->gamma_16_from_1[i]);
|
|
||||||
}
|
|
||||||
png_free(png_ptr, png_ptr->gamma_16_from_1);
|
|
||||||
}
|
|
||||||
if (png_ptr->gamma_16_to_1 != NULL)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
int istop = (1 << (8 - png_ptr->gamma_shift));
|
|
||||||
for (i = 0; i < istop; i++)
|
|
||||||
{
|
|
||||||
png_free(png_ptr, png_ptr->gamma_16_to_1[i]);
|
|
||||||
}
|
|
||||||
png_free(png_ptr, png_ptr->gamma_16_to_1);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
inflateEnd(&png_ptr->zstream);
|
inflateEnd(&png_ptr->zstream);
|
||||||
|
|
||||||
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
|
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
|
||||||
|
|||||||
70
pngrtran.c
70
pngrtran.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngrtran.c - transforms the data in a row for PNG readers
|
/* pngrtran.c - transforms the data in a row for PNG readers
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.6 [November 3, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -1641,8 +1641,9 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
/* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */
|
/* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */
|
||||||
else /* color_type != PNG_COLOR_TYPE_PALETTE */
|
else /* color_type != PNG_COLOR_TYPE_PALETTE */
|
||||||
{
|
{
|
||||||
png_fixed_point g = PNG_FP_1;
|
int gs_sig, g_sig;
|
||||||
png_fixed_point gs = PNG_FP_1;
|
png_fixed_point g = PNG_FP_1; /* Correction to linear */
|
||||||
|
png_fixed_point gs = PNG_FP_1; /* Correction to screen */
|
||||||
|
|
||||||
switch (png_ptr->background_gamma_type)
|
switch (png_ptr->background_gamma_type)
|
||||||
{
|
{
|
||||||
@@ -1666,34 +1667,45 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
png_error(png_ptr, "invalid background gamma type");
|
png_error(png_ptr, "invalid background gamma type");
|
||||||
}
|
}
|
||||||
|
|
||||||
png_ptr->background_1.gray = png_gamma_correct(png_ptr,
|
g_sig = png_gamma_significant(g);
|
||||||
png_ptr->background.gray, g);
|
gs_sig = png_gamma_significant(gs);
|
||||||
|
|
||||||
png_ptr->background.gray = png_gamma_correct(png_ptr,
|
if (g_sig)
|
||||||
png_ptr->background.gray, gs);
|
png_ptr->background_1.gray = png_gamma_correct(png_ptr,
|
||||||
|
png_ptr->background.gray, g);
|
||||||
|
|
||||||
|
if (gs_sig)
|
||||||
|
png_ptr->background.gray = png_gamma_correct(png_ptr,
|
||||||
|
png_ptr->background.gray, gs);
|
||||||
|
|
||||||
if ((png_ptr->background.red != png_ptr->background.green) ||
|
if ((png_ptr->background.red != png_ptr->background.green) ||
|
||||||
(png_ptr->background.red != png_ptr->background.blue) ||
|
(png_ptr->background.red != png_ptr->background.blue) ||
|
||||||
(png_ptr->background.red != png_ptr->background.gray))
|
(png_ptr->background.red != png_ptr->background.gray))
|
||||||
{
|
{
|
||||||
/* RGB or RGBA with color background */
|
/* RGB or RGBA with color background */
|
||||||
png_ptr->background_1.red = png_gamma_correct(png_ptr,
|
if (g_sig)
|
||||||
png_ptr->background.red, g);
|
{
|
||||||
|
png_ptr->background_1.red = png_gamma_correct(png_ptr,
|
||||||
|
png_ptr->background.red, g);
|
||||||
|
|
||||||
png_ptr->background_1.green = png_gamma_correct(png_ptr,
|
png_ptr->background_1.green = png_gamma_correct(png_ptr,
|
||||||
png_ptr->background.green, g);
|
png_ptr->background.green, g);
|
||||||
|
|
||||||
png_ptr->background_1.blue = png_gamma_correct(png_ptr,
|
png_ptr->background_1.blue = png_gamma_correct(png_ptr,
|
||||||
png_ptr->background.blue, g);
|
png_ptr->background.blue, g);
|
||||||
|
}
|
||||||
|
|
||||||
png_ptr->background.red = png_gamma_correct(png_ptr,
|
if (gs_sig)
|
||||||
png_ptr->background.red, gs);
|
{
|
||||||
|
png_ptr->background.red = png_gamma_correct(png_ptr,
|
||||||
|
png_ptr->background.red, gs);
|
||||||
|
|
||||||
png_ptr->background.green = png_gamma_correct(png_ptr,
|
png_ptr->background.green = png_gamma_correct(png_ptr,
|
||||||
png_ptr->background.green, gs);
|
png_ptr->background.green, gs);
|
||||||
|
|
||||||
png_ptr->background.blue = png_gamma_correct(png_ptr,
|
png_ptr->background.blue = png_gamma_correct(png_ptr,
|
||||||
png_ptr->background.blue, gs);
|
png_ptr->background.blue, gs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -1705,6 +1717,9 @@ png_init_read_transformations(png_structp png_ptr)
|
|||||||
png_ptr->background.red = png_ptr->background.green
|
png_ptr->background.red = png_ptr->background.green
|
||||||
= png_ptr->background.blue = png_ptr->background.gray;
|
= png_ptr->background.blue = png_ptr->background.gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The background is now in screen gamma: */
|
||||||
|
png_ptr->background_gamma_type = PNG_BACKGROUND_GAMMA_SCREEN;
|
||||||
} /* color_type != PNG_COLOR_TYPE_PALETTE */
|
} /* color_type != PNG_COLOR_TYPE_PALETTE */
|
||||||
}/* png_ptr->transformations & PNG_BACKGROUND */
|
}/* png_ptr->transformations & PNG_BACKGROUND */
|
||||||
|
|
||||||
@@ -2469,8 +2484,8 @@ png_do_unshift(png_row_infop row_info, png_bytep row,
|
|||||||
|
|
||||||
while (bp < bp_end)
|
while (bp < bp_end)
|
||||||
{
|
{
|
||||||
int byte = (*bp >> 1) & 0x55;
|
int b = (*bp >> 1) & 0x55;
|
||||||
*bp++ = (png_byte)byte;
|
*bp++ = (png_byte)b;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2488,8 +2503,8 @@ png_do_unshift(png_row_infop row_info, png_bytep row,
|
|||||||
|
|
||||||
while (bp < bp_end)
|
while (bp < bp_end)
|
||||||
{
|
{
|
||||||
int byte = (*bp >> gray_shift) & mask;
|
int b = (*bp >> gray_shift) & mask;
|
||||||
*bp++ = (png_byte)byte;
|
*bp++ = (png_byte)b;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2503,10 +2518,10 @@ png_do_unshift(png_row_infop row_info, png_bytep row,
|
|||||||
|
|
||||||
while (bp < bp_end)
|
while (bp < bp_end)
|
||||||
{
|
{
|
||||||
int byte = *bp >> shift[channel];
|
int b = *bp >> shift[channel];
|
||||||
if (++channel >= channels)
|
if (++channel >= channels)
|
||||||
channel = 0;
|
channel = 0;
|
||||||
*bp++ = (png_byte)byte;
|
*bp++ = (png_byte)b;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -3404,7 +3419,8 @@ png_build_grayscale_palette(int bit_depth, png_colorp palette)
|
|||||||
|
|
||||||
|
|
||||||
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
|
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
|
||||||
#ifdef PNG_READ_BACKGROUND_SUPPORTED
|
#if (defined PNG_READ_BACKGROUND_SUPPORTED) ||\
|
||||||
|
(defined PNG_READ_ALPHA_MODE_SUPPORTED)
|
||||||
/* Replace any alpha or transparency with the supplied background color.
|
/* Replace any alpha or transparency with the supplied background color.
|
||||||
* "background" is already in the screen gamma, while "background_1" is
|
* "background" is already in the screen gamma, while "background_1" is
|
||||||
* at a gamma of 1.0. Paletted files have already been taken care of.
|
* at a gamma of 1.0. Paletted files have already been taken care of.
|
||||||
@@ -4112,7 +4128,7 @@ png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_READ_ALPHA_MODE_SUPPORTED */
|
||||||
|
|
||||||
#ifdef PNG_READ_GAMMA_SUPPORTED
|
#ifdef PNG_READ_GAMMA_SUPPORTED
|
||||||
/* Gamma correct the image, avoiding the alpha channel. Make sure
|
/* Gamma correct the image, avoiding the alpha channel. Make sure
|
||||||
|
|||||||
449
pngrutil.c
449
pngrutil.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngrutil.c - utilities to read a PNG file
|
/* pngrutil.c - utilities to read a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -301,7 +301,7 @@ png_inflate(png_structp png_ptr, png_bytep data, png_size_t size,
|
|||||||
{
|
{
|
||||||
int ret, avail;
|
int ret, avail;
|
||||||
|
|
||||||
/* The setting of 'avail_in' used to be outside the loop, by setting it
|
/* The setting of 'avail_in' used to be outside the loop; by setting it
|
||||||
* inside it is possible to chunk the input to zlib and simply rely on
|
* inside it is possible to chunk the input to zlib and simply rely on
|
||||||
* zlib to advance the 'next_in' pointer. This allows arbitrary amounts o
|
* zlib to advance the 'next_in' pointer. This allows arbitrary amounts o
|
||||||
* data to be passed through zlib at the unavoidable cost of requiring a
|
* data to be passed through zlib at the unavoidable cost of requiring a
|
||||||
@@ -941,7 +941,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
|
|||||||
|
|
||||||
else if (png_ptr->mode & PNG_HAVE_PLTE)
|
else if (png_ptr->mode & PNG_HAVE_PLTE)
|
||||||
/* Should be an error, but we can cope with it */
|
/* Should be an error, but we can cope with it */
|
||||||
png_warning(png_ptr, "Missing PLTE before cHRM");
|
png_warning(png_ptr, "Out of place cHRM chunk");
|
||||||
|
|
||||||
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)
|
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)
|
||||||
# ifdef PNG_READ_sRGB_SUPPORTED
|
# ifdef PNG_READ_sRGB_SUPPORTED
|
||||||
@@ -2786,6 +2786,9 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
png_const_bytep sp = png_ptr->row_buf + 1;
|
png_const_bytep sp = png_ptr->row_buf + 1;
|
||||||
png_uint_32 row_width = png_ptr->width;
|
png_uint_32 row_width = png_ptr->width;
|
||||||
unsigned int pass = png_ptr->pass;
|
unsigned int pass = png_ptr->pass;
|
||||||
|
png_bytep end_ptr = 0;
|
||||||
|
png_byte end_byte = 0;
|
||||||
|
unsigned int end_mask;
|
||||||
|
|
||||||
png_debug(1, "in png_combine_row");
|
png_debug(1, "in png_combine_row");
|
||||||
|
|
||||||
@@ -2807,9 +2810,31 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
if (row_width == 0)
|
if (row_width == 0)
|
||||||
png_error(png_ptr, "internal row width error");
|
png_error(png_ptr, "internal row width error");
|
||||||
|
|
||||||
/* This reduces to a memcpy for non-interlaced images and for the case where
|
/* Preserve the last byte in cases where only part of it will be overwritten,
|
||||||
* interlacing isn't supported or isn't done (in that case the caller gets a
|
* the multiply below may overflow, we don't care because ANSI-C guarantees
|
||||||
* sequence of interlace pass rows.)
|
* we get the low bits.
|
||||||
|
*/
|
||||||
|
end_mask = (pixel_depth * row_width) & 7;
|
||||||
|
if (end_mask != 0)
|
||||||
|
{
|
||||||
|
/* end_ptr == NULL is a flag to say do nothing */
|
||||||
|
end_ptr = dp + PNG_ROWBYTES(pixel_depth, row_width) - 1;
|
||||||
|
end_byte = *end_ptr;
|
||||||
|
# ifdef PNG_READ_PACKSWAP_SUPPORTED
|
||||||
|
if (png_ptr->transformations & PNG_PACKSWAP) /* little-endian byte */
|
||||||
|
end_mask = 0xff << end_mask;
|
||||||
|
|
||||||
|
else /* big-endian byte */
|
||||||
|
# endif
|
||||||
|
end_mask = 0xff >> end_mask;
|
||||||
|
/* end_mask is now the bits to *keep* from the destination row */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For non-interlaced images this reduces to a png_memcpy(). A png_memcpy()
|
||||||
|
* will also happen if interlacing isn't supported or if the application
|
||||||
|
* does not call png_set_interlace_handling(). In the latter cases the
|
||||||
|
* caller just gets a sequence of the unexpanded rows from each interlace
|
||||||
|
* pass.
|
||||||
*/
|
*/
|
||||||
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
||||||
if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE) &&
|
if (png_ptr->interlaced && (png_ptr->transformations & PNG_INTERLACE) &&
|
||||||
@@ -2825,9 +2850,9 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
|
|
||||||
if (pixel_depth < 8)
|
if (pixel_depth < 8)
|
||||||
{
|
{
|
||||||
/* For pixel depths up to 4bpp the 8-pixel mask can be expanded to fit
|
/* For pixel depths up to 4-bpp the 8-pixel mask can be expanded to fit
|
||||||
* into 32 bits, then a single loop over the bytes using the four byte
|
* into 32 bits, then a single loop over the bytes using the four byte
|
||||||
* values in the 32 bit mask can be used. For the 'display' option the
|
* values in the 32-bit mask can be used. For the 'display' option the
|
||||||
* expanded mask may also not require any masking within a byte. To
|
* expanded mask may also not require any masking within a byte. To
|
||||||
* make this work the PACKSWAP option must be taken into account - it
|
* make this work the PACKSWAP option must be taken into account - it
|
||||||
* simply requires the pixels to be reversed in each byte.
|
* simply requires the pixels to be reversed in each byte.
|
||||||
@@ -2846,15 +2871,33 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
*
|
*
|
||||||
* The following defines allow generation of compile time constant bit
|
* The following defines allow generation of compile time constant bit
|
||||||
* masks for each pixel depth and each possibility of swapped or not
|
* masks for each pixel depth and each possibility of swapped or not
|
||||||
* swapped bytes. Pass is in the range 0..6, 'x', a pixel index, is in
|
* swapped bytes. Pass 'p' is in the range 0..6; 'x', a pixel index,
|
||||||
* the range 0..7, the result is 1 if the pixel is to be copied in the
|
* is in the range 0..7; and the result is 1 if the pixel is to be
|
||||||
* pass, 0 if not. 'S' is for the sparkle method, 'B' for the block
|
* copied in the pass, 0 if not. 'S' is for the sparkle method, 'B'
|
||||||
* method.
|
* for the block method.
|
||||||
|
*
|
||||||
|
* With some compilers a compile time expression of the general form:
|
||||||
|
*
|
||||||
|
* (shift >= 32) ? (a >> (shift-32)) : (b >> shift)
|
||||||
|
*
|
||||||
|
* Produces warnings with values of 'shift' in the range 33 to 63
|
||||||
|
* because the right hand side of the ?: expression is evaluated by
|
||||||
|
* the compiler even though it isn't used. Microsoft Visual C (various
|
||||||
|
* versions) and the Intel C compiler are known to do this. To avoid
|
||||||
|
* this the following macros are used in 1.5.6. This is a temporary
|
||||||
|
* solution to avoid destablizing the code during the release process.
|
||||||
*/
|
*/
|
||||||
# define S_COPY(p,x) (((p)<4 ? 0x80088822 >> ((3-(p))*8+(7-(x))) :\
|
# if PNG_USE_COMPILE_TIME_MASKS
|
||||||
0xaa55ff00 >> ((7-(p))*8+(7-(x)))) & 1)
|
# define PNG_LSR(x,s) ((x)>>((s) & 0x1f))
|
||||||
# define B_COPY(p,x) (((p)<4 ? 0xff0fff33 >> ((3-(p))*8+(7-(x))) :\
|
# define PNG_LSL(x,s) ((x)<<((s) & 0x1f))
|
||||||
0xff55ff00 >> ((7-(p))*8+(7-(x)))) & 1)
|
# else
|
||||||
|
# define PNG_LSR(x,s) ((x)>>(s))
|
||||||
|
# define PNG_LSL(x,s) ((x)<<(s))
|
||||||
|
# endif
|
||||||
|
# define S_COPY(p,x) (((p)<4 ? PNG_LSR(0x80088822,(3-(p))*8+(7-(x))) :\
|
||||||
|
PNG_LSR(0xaa55ff00,(7-(p))*8+(7-(x)))) & 1)
|
||||||
|
# define B_COPY(p,x) (((p)<4 ? PNG_LSR(0xff0fff33,(3-(p))*8+(7-(x))) :\
|
||||||
|
PNG_LSR(0xff55ff00,(7-(p))*8+(7-(x)))) & 1)
|
||||||
|
|
||||||
/* Return a mask for pass 'p' pixel 'x' at depth 'd'. The mask is
|
/* Return a mask for pass 'p' pixel 'x' at depth 'd'. The mask is
|
||||||
* little endian - the first pixel is at bit 0 - however the extra
|
* little endian - the first pixel is at bit 0 - however the extra
|
||||||
@@ -2862,16 +2905,17 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
* within each byte, to match the PNG format. This is done by XOR of
|
* within each byte, to match the PNG format. This is done by XOR of
|
||||||
* the shift with 7, 6 or 4 for bit depths 1, 2 and 4.
|
* the shift with 7, 6 or 4 for bit depths 1, 2 and 4.
|
||||||
*/
|
*/
|
||||||
# define PIXEL_MASK(p,x,d,s) (((1U<<(d))-1)<<(((x)*(d))^((s)?8-(d):0)))
|
# define PIXEL_MASK(p,x,d,s) \
|
||||||
|
(PNG_LSL(((PNG_LSL(1U,(d)))-1),(((x)*(d))^((s)?8-(d):0))))
|
||||||
|
|
||||||
/* Hence generate the appropriate 'block' or 'sparkle' pixel copy mask.
|
/* Hence generate the appropriate 'block' or 'sparkle' pixel copy mask.
|
||||||
*/
|
*/
|
||||||
# define S_MASKx(p,x,d,s) (S_COPY(p,x)?PIXEL_MASK(p,x,d,s):0)
|
# define S_MASKx(p,x,d,s) (S_COPY(p,x)?PIXEL_MASK(p,x,d,s):0)
|
||||||
# define B_MASKx(p,x,d,s) (B_COPY(p,x)?PIXEL_MASK(p,x,d,s):0)
|
# define B_MASKx(p,x,d,s) (B_COPY(p,x)?PIXEL_MASK(p,x,d,s):0)
|
||||||
|
|
||||||
/* Combine 8 of these to get the full mask. For the 1 and 2 bpp cases
|
/* Combine 8 of these to get the full mask. For the 1-bpp and 2-bpp
|
||||||
* the result needs replicating, for the 4bpp case the above generates
|
* cases the result needs replicating, for the 4-bpp case the above
|
||||||
* a full 32 bits.
|
* generates a full 32 bits.
|
||||||
*/
|
*/
|
||||||
# define MASK_EXPAND(m,d) ((m)*((d)==1?0x01010101:((d)==2?0x00010001:1)))
|
# define MASK_EXPAND(m,d) ((m)*((d)==1?0x01010101:((d)==2?0x00010001:1)))
|
||||||
|
|
||||||
@@ -2949,7 +2993,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
png_uint_32 m;
|
png_uint_32 m;
|
||||||
|
|
||||||
/* It doesn't matter in the following if png_uint_32 has more than
|
/* It doesn't matter in the following if png_uint_32 has more than
|
||||||
* 32 bits because the high bits always match those in m<<24, it is,
|
* 32 bits because the high bits always match those in m<<24; it is,
|
||||||
* however, essential to use OR here, not +, because of this.
|
* however, essential to use OR here, not +, because of this.
|
||||||
*/
|
*/
|
||||||
m = mask;
|
m = mask;
|
||||||
@@ -2965,11 +3009,11 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* NOTE: this may overwrite the last byte with garbage if the image
|
/* NOTE: this may overwrite the last byte with garbage if the image
|
||||||
* is not an exact number of bytes wide, libpng has always done
|
* is not an exact number of bytes wide; libpng has always done
|
||||||
* this.
|
* this.
|
||||||
*/
|
*/
|
||||||
if (row_width <= pixels_per_byte)
|
if (row_width <= pixels_per_byte)
|
||||||
return;
|
break; /* May need to restore part of the last byte */
|
||||||
|
|
||||||
row_width -= pixels_per_byte;
|
row_width -= pixels_per_byte;
|
||||||
++dp;
|
++dp;
|
||||||
@@ -3021,8 +3065,12 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
bytes_to_jump = PNG_PASS_COL_OFFSET(pass) * pixel_depth;
|
bytes_to_jump = PNG_PASS_COL_OFFSET(pass) * pixel_depth;
|
||||||
|
|
||||||
/* And simply copy these bytes. Some optimization is possible here,
|
/* And simply copy these bytes. Some optimization is possible here,
|
||||||
* depending on the value of 'bytes_to_copy'. Speical case the low
|
* depending on the value of 'bytes_to_copy'. Special case the low
|
||||||
* byte counts, which we know to be frequent.
|
* byte counts, which we know to be frequent.
|
||||||
|
*
|
||||||
|
* Notice that these cases all 'return' rather than 'break' - this
|
||||||
|
* avoids an unnecessary test on whether to restore the last byte
|
||||||
|
* below.
|
||||||
*/
|
*/
|
||||||
switch (bytes_to_copy)
|
switch (bytes_to_copy)
|
||||||
{
|
{
|
||||||
@@ -3040,7 +3088,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
/* There is a possibility of a partial copy at the end here, this
|
/* There is a possibility of a partial copy at the end here; this
|
||||||
* slows the code down somewhat.
|
* slows the code down somewhat.
|
||||||
*/
|
*/
|
||||||
do
|
do
|
||||||
@@ -3078,12 +3126,12 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
#if PNG_ALIGN_TYPE != PNG_ALIGN_NONE
|
#if PNG_ALIGN_TYPE != PNG_ALIGN_NONE
|
||||||
/* Check for double byte alignment and, if possible, use a 16
|
/* Check for double byte alignment and, if possible, use a
|
||||||
* bit copy. Don't attempt this for narrow images - ones that
|
* 16-bit copy. Don't attempt this for narrow images - ones that
|
||||||
* are less than an interlace panel wide. Don't attempt it for
|
* are less than an interlace panel wide. Don't attempt it for
|
||||||
* wide bytes-to-copy either - use the memcpy there.
|
* wide bytes-to-copy either - use the png_memcpy there.
|
||||||
*/
|
*/
|
||||||
if (bytes_to_copy < 16 /*else use memcpy*/ &&
|
if (bytes_to_copy < 16 /*else use png_memcpy*/ &&
|
||||||
png_isaligned(dp, png_uint_16) &&
|
png_isaligned(dp, png_uint_16) &&
|
||||||
png_isaligned(sp, png_uint_16) &&
|
png_isaligned(sp, png_uint_16) &&
|
||||||
bytes_to_copy % sizeof (png_uint_16) == 0 &&
|
bytes_to_copy % sizeof (png_uint_16) == 0 &&
|
||||||
@@ -3123,7 +3171,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
|
|
||||||
/* Get to here when the row_width truncates the final copy.
|
/* Get to here when the row_width truncates the final copy.
|
||||||
* There will be 1-3 bytes left to copy, so don't try the
|
* There will be 1-3 bytes left to copy, so don't try the
|
||||||
* 16bit loop below.
|
* 16-bit loop below.
|
||||||
*/
|
*/
|
||||||
dp = (png_bytep)dp32;
|
dp = (png_bytep)dp32;
|
||||||
sp = (png_const_bytep)sp32;
|
sp = (png_const_bytep)sp32;
|
||||||
@@ -3133,7 +3181,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Else do it in 16 bit quantities, but only if the size is
|
/* Else do it in 16-bit quantities, but only if the size is
|
||||||
* not too large.
|
* not too large.
|
||||||
*/
|
*/
|
||||||
else
|
else
|
||||||
@@ -3162,7 +3210,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
}
|
}
|
||||||
while (bytes_to_copy <= row_width);
|
while (bytes_to_copy <= row_width);
|
||||||
|
|
||||||
/* End of row - 1 byte left, bytes_to_copy>row_width: */
|
/* End of row - 1 byte left, bytes_to_copy > row_width: */
|
||||||
dp = (png_bytep)dp16;
|
dp = (png_bytep)dp16;
|
||||||
sp = (png_const_bytep)sp16;
|
sp = (png_const_bytep)sp16;
|
||||||
do
|
do
|
||||||
@@ -3173,7 +3221,7 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
}
|
}
|
||||||
#endif /* PNG_ALIGN_ code */
|
#endif /* PNG_ALIGN_ code */
|
||||||
|
|
||||||
/* The true default - use a memcpy: */
|
/* The true default - use a png_memcpy: */
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
png_memcpy(dp, sp, bytes_to_copy);
|
png_memcpy(dp, sp, bytes_to_copy);
|
||||||
@@ -3188,18 +3236,24 @@ png_combine_row(png_structp png_ptr, png_bytep dp, int display)
|
|||||||
bytes_to_copy = row_width;
|
bytes_to_copy = row_width;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* NOT REACHED*/
|
||||||
} /* pixel_depth >= 8 */
|
} /* pixel_depth >= 8 */
|
||||||
|
|
||||||
/* NOT REACHED*/
|
/* Here if pixel_depth < 8 to check 'end_ptr' below. */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If here then the switch above wasn't used so just memcpy the whole row
|
/* If here then the switch above wasn't used so just png_memcpy the whole row
|
||||||
* from the temporary row buffer (notice that this overwrites the end of the
|
* from the temporary row buffer (notice that this overwrites the end of the
|
||||||
* destination row if it is a partial byte.)
|
* destination row if it is a partial byte.)
|
||||||
*/
|
*/
|
||||||
png_memcpy(dp, sp, PNG_ROWBYTES(pixel_depth, row_width));
|
png_memcpy(dp, sp, PNG_ROWBYTES(pixel_depth, row_width));
|
||||||
|
|
||||||
|
/* Restore the overwritten bits from the last byte if necessary. */
|
||||||
|
if (end_ptr != NULL)
|
||||||
|
*end_ptr = (png_byte)((end_byte & end_mask) | (*end_ptr & ~end_mask));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
#ifdef PNG_READ_INTERLACING_SUPPORTED
|
||||||
@@ -3374,7 +3428,7 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
|
|||||||
|
|
||||||
for (i = 0; i < row_info->width; i++)
|
for (i = 0; i < row_info->width; i++)
|
||||||
{
|
{
|
||||||
png_byte v = (png_byte)((*sp >> sshift) & 0xf);
|
png_byte v = (png_byte)((*sp >> sshift) & 0x0f);
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
for (j = 0; j < jstop; j++)
|
for (j = 0; j < jstop; j++)
|
||||||
@@ -3444,132 +3498,212 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
|
|||||||
}
|
}
|
||||||
#endif /* PNG_READ_INTERLACING_SUPPORTED */
|
#endif /* PNG_READ_INTERLACING_SUPPORTED */
|
||||||
|
|
||||||
/* 1.5.6: Changed to just take a png_row_info (not png_ptr) and to ignore bad
|
static void
|
||||||
* adaptive filter bytes.
|
png_read_filter_row_sub(png_row_infop row_info, png_bytep row,
|
||||||
*/
|
png_const_bytep prev_row)
|
||||||
void /* PRIVATE */
|
|
||||||
png_read_filter_row(png_row_infop row_info, png_bytep row,
|
|
||||||
png_const_bytep prev_row, int filter)
|
|
||||||
{
|
{
|
||||||
switch (filter)
|
png_size_t i;
|
||||||
|
png_size_t istop = row_info->rowbytes;
|
||||||
|
unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
|
||||||
|
png_bytep rp = row + bpp;
|
||||||
|
png_bytep lp = row;
|
||||||
|
|
||||||
|
PNG_UNUSED(prev_row)
|
||||||
|
|
||||||
|
for (i = bpp; i < istop; i++)
|
||||||
{
|
{
|
||||||
case PNG_FILTER_VALUE_NONE:
|
*rp = (png_byte)(((int)(*rp) + (int)(*lp++)) & 0xff);
|
||||||
break;
|
rp++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
case PNG_FILTER_VALUE_SUB:
|
static void
|
||||||
{
|
png_read_filter_row_up(png_row_infop row_info, png_bytep row,
|
||||||
png_size_t i;
|
png_const_bytep prev_row)
|
||||||
png_size_t istop = row_info->rowbytes;
|
{
|
||||||
unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
|
png_size_t i;
|
||||||
png_bytep rp = row + bpp;
|
png_size_t istop = row_info->rowbytes;
|
||||||
png_bytep lp = row;
|
png_bytep rp = row;
|
||||||
|
png_const_bytep pp = prev_row;
|
||||||
|
|
||||||
for (i = bpp; i < istop; i++)
|
for (i = 0; i < istop; i++)
|
||||||
{
|
{
|
||||||
*rp = (png_byte)(((int)(*rp) + (int)(*lp++)) & 0xff);
|
*rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
|
||||||
rp++;
|
rp++;
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
case PNG_FILTER_VALUE_UP:
|
|
||||||
{
|
|
||||||
png_size_t i;
|
|
||||||
png_size_t istop = row_info->rowbytes;
|
|
||||||
png_bytep rp = row;
|
|
||||||
png_const_bytep pp = prev_row;
|
|
||||||
|
|
||||||
for (i = 0; i < istop; i++)
|
static void
|
||||||
{
|
png_read_filter_row_avg(png_row_infop row_info, png_bytep row,
|
||||||
*rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
|
png_const_bytep prev_row)
|
||||||
rp++;
|
{
|
||||||
}
|
png_size_t i;
|
||||||
break;
|
png_bytep rp = row;
|
||||||
}
|
png_const_bytep pp = prev_row;
|
||||||
case PNG_FILTER_VALUE_AVG:
|
png_bytep lp = row;
|
||||||
{
|
unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
|
||||||
png_size_t i;
|
png_size_t istop = row_info->rowbytes - bpp;
|
||||||
png_bytep rp = row;
|
|
||||||
png_const_bytep pp = prev_row;
|
|
||||||
png_bytep lp = row;
|
|
||||||
unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
|
|
||||||
png_size_t istop = row_info->rowbytes - bpp;
|
|
||||||
|
|
||||||
for (i = 0; i < bpp; i++)
|
for (i = 0; i < bpp; i++)
|
||||||
{
|
{
|
||||||
*rp = (png_byte)(((int)(*rp) +
|
*rp = (png_byte)(((int)(*rp) +
|
||||||
((int)(*pp++) / 2 )) & 0xff);
|
((int)(*pp++) / 2 )) & 0xff);
|
||||||
|
|
||||||
rp++;
|
rp++;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < istop; i++)
|
for (i = 0; i < istop; i++)
|
||||||
{
|
{
|
||||||
*rp = (png_byte)(((int)(*rp) +
|
*rp = (png_byte)(((int)(*rp) +
|
||||||
(int)(*pp++ + *lp++) / 2 ) & 0xff);
|
(int)(*pp++ + *lp++) / 2 ) & 0xff);
|
||||||
|
|
||||||
rp++;
|
rp++;
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
case PNG_FILTER_VALUE_PAETH:
|
|
||||||
{
|
|
||||||
png_size_t i;
|
|
||||||
png_bytep rp = row;
|
|
||||||
png_const_bytep pp = prev_row;
|
|
||||||
png_bytep lp = row;
|
|
||||||
png_const_bytep cp = prev_row;
|
|
||||||
unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
|
|
||||||
png_size_t istop=row_info->rowbytes - bpp;
|
|
||||||
|
|
||||||
for (i = 0; i < bpp; i++)
|
static void
|
||||||
{
|
png_read_filter_row_paeth_1byte_pixel(png_row_infop row_info, png_bytep row,
|
||||||
*rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
|
png_const_bytep prev_row)
|
||||||
rp++;
|
{
|
||||||
}
|
png_bytep rp_end = row + row_info->rowbytes;
|
||||||
|
int a, c;
|
||||||
|
|
||||||
for (i = 0; i < istop; i++) /* Use leftover rp,pp */
|
/* First pixel/byte */
|
||||||
{
|
c = *prev_row++;
|
||||||
int a, b, c, pa, pb, pc, p;
|
a = *row + c;
|
||||||
|
*row++ = (png_byte)a;
|
||||||
|
|
||||||
a = *lp++;
|
/* Remainder */
|
||||||
b = *pp++;
|
while (row < rp_end)
|
||||||
c = *cp++;
|
{
|
||||||
|
int b, pa, pb, pc, p;
|
||||||
|
|
||||||
p = b - c;
|
a &= 0xff; /* From previous iteration or start */
|
||||||
pc = a - c;
|
b = *prev_row++;
|
||||||
|
|
||||||
#ifdef PNG_USE_ABS
|
p = b - c;
|
||||||
pa = abs(p);
|
pc = a - c;
|
||||||
pb = abs(pc);
|
|
||||||
pc = abs(p + pc);
|
# ifdef PNG_USE_ABS
|
||||||
#else
|
pa = abs(p);
|
||||||
pa = p < 0 ? -p : p;
|
pb = abs(pc);
|
||||||
pb = pc < 0 ? -pc : pc;
|
pc = abs(p + pc);
|
||||||
pc = (p + pc) < 0 ? -(p + pc) : p + pc;
|
# else
|
||||||
|
pa = p < 0 ? -p : p;
|
||||||
|
pb = pc < 0 ? -pc : pc;
|
||||||
|
pc = (p + pc) < 0 ? -(p + pc) : p + pc;
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* Find the best predictor, the least of pa, pb, pc favoring the earlier
|
||||||
|
* ones in the case of a tie.
|
||||||
|
*/
|
||||||
|
if (pb < pa) pa = pb, a = b;
|
||||||
|
if (pc < pa) a = c;
|
||||||
|
|
||||||
|
/* Calculate the current pixel in a, and move the previous row pixel to c
|
||||||
|
* for the next time round the loop
|
||||||
|
*/
|
||||||
|
c = b;
|
||||||
|
a += *row;
|
||||||
|
*row++ = (png_byte)a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row,
|
||||||
|
png_const_bytep prev_row)
|
||||||
|
{
|
||||||
|
int bpp = (row_info->pixel_depth + 7) >> 3;
|
||||||
|
png_bytep rp_end = row + bpp;
|
||||||
|
|
||||||
|
/* Process the first pixel in the row completely (this is the same as 'up'
|
||||||
|
* because there is only one candidate predictor for the first row).
|
||||||
|
*/
|
||||||
|
while (row < rp_end)
|
||||||
|
{
|
||||||
|
int a = *row + *prev_row++;
|
||||||
|
*row++ = (png_byte)a;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remainder */
|
||||||
|
rp_end += row_info->rowbytes - bpp;
|
||||||
|
|
||||||
|
while (row < rp_end)
|
||||||
|
{
|
||||||
|
int a, b, c, pa, pb, pc, p;
|
||||||
|
|
||||||
|
c = *(prev_row - bpp);
|
||||||
|
a = *(row - bpp);
|
||||||
|
b = *prev_row++;
|
||||||
|
|
||||||
|
p = b - c;
|
||||||
|
pc = a - c;
|
||||||
|
|
||||||
|
# ifdef PNG_USE_ABS
|
||||||
|
pa = abs(p);
|
||||||
|
pb = abs(pc);
|
||||||
|
pc = abs(p + pc);
|
||||||
|
# else
|
||||||
|
pa = p < 0 ? -p : p;
|
||||||
|
pb = pc < 0 ? -pc : pc;
|
||||||
|
pc = (p + pc) < 0 ? -(p + pc) : p + pc;
|
||||||
|
# endif
|
||||||
|
|
||||||
|
if (pb < pa) pa = pb, a = b;
|
||||||
|
if (pc < pa) a = c;
|
||||||
|
|
||||||
|
c = b;
|
||||||
|
a += *row;
|
||||||
|
*row++ = (png_byte)a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef PNG_ARM_NEON
|
||||||
|
static void
|
||||||
|
png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
||||||
|
{
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_UP-1] = png_read_filter_row_up_neon;
|
||||||
|
|
||||||
|
if (bpp == 3) {
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub3_neon;
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg3_neon;
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth3_neon;
|
||||||
|
} else if (bpp == 4) {
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub4_neon;
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg4_neon;
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = png_read_filter_row_paeth4_neon;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
static void
|
||||||
if (pa <= pb && pa <= pc)
|
png_init_filter_functions(png_structp pp)
|
||||||
p = a;
|
{
|
||||||
|
unsigned int bpp = (pp->pixel_depth + 7) >> 3;
|
||||||
|
|
||||||
else if (pb <= pc)
|
pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub;
|
||||||
p = b;
|
pp->read_filter[PNG_FILTER_VALUE_UP-1] = png_read_filter_row_up;
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg;
|
||||||
|
if (bpp == 1)
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_PAETH-1] =
|
||||||
|
png_read_filter_row_paeth_1byte_pixel;
|
||||||
|
else
|
||||||
|
pp->read_filter[PNG_FILTER_VALUE_PAETH-1] =
|
||||||
|
png_read_filter_row_paeth_multibyte_pixel;
|
||||||
|
|
||||||
else
|
#ifdef PNG_ARM_NEON
|
||||||
p = c;
|
png_init_filter_functions_neon(pp, bpp);
|
||||||
*/
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
p = (pa <= pb && pa <= pc) ? a : (pb <= pc) ? b : c;
|
void /* PRIVATE */
|
||||||
|
png_read_filter_row(png_structp pp, png_row_infop row_info, png_bytep row,
|
||||||
*rp = (png_byte)(((int)(*rp) + p) & 0xff);
|
png_const_bytep prev_row, int filter)
|
||||||
rp++;
|
{
|
||||||
}
|
if (pp->read_filter[0] == NULL)
|
||||||
break;
|
png_init_filter_functions(pp);
|
||||||
}
|
if (filter > PNG_FILTER_VALUE_NONE && filter < PNG_FILTER_VALUE_LAST)
|
||||||
default:
|
pp->read_filter[filter-1](row_info, row, prev_row);
|
||||||
/* NOT REACHED */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
|
||||||
@@ -3913,35 +4047,39 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
|||||||
if (row_bytes + 48 > png_ptr->old_big_row_buf_size)
|
if (row_bytes + 48 > png_ptr->old_big_row_buf_size)
|
||||||
{
|
{
|
||||||
png_free(png_ptr, png_ptr->big_row_buf);
|
png_free(png_ptr, png_ptr->big_row_buf);
|
||||||
|
png_free(png_ptr, png_ptr->big_prev_row);
|
||||||
|
|
||||||
if (png_ptr->interlaced)
|
if (png_ptr->interlaced)
|
||||||
png_ptr->big_row_buf = (png_bytep)png_calloc(png_ptr,
|
png_ptr->big_row_buf = (png_bytep)png_calloc(png_ptr,
|
||||||
row_bytes + 48);
|
row_bytes + 48);
|
||||||
|
|
||||||
else
|
else
|
||||||
png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr,
|
png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr, row_bytes + 48);
|
||||||
row_bytes + 48);
|
|
||||||
|
|
||||||
png_ptr->old_big_row_buf_size = row_bytes + 48;
|
png_ptr->big_prev_row = (png_bytep)png_malloc(png_ptr, row_bytes + 48);
|
||||||
|
|
||||||
#ifdef PNG_ALIGNED_MEMORY_SUPPORTED
|
#ifdef PNG_ALIGNED_MEMORY_SUPPORTED
|
||||||
/* Use 16-byte aligned memory for row_buf with at least 16 bytes
|
/* Use 16-byte aligned memory for row_buf with at least 16 bytes
|
||||||
* of padding before and after row_buf.
|
* of padding before and after row_buf; treat prev_row similarly.
|
||||||
* NOTE: the alignment is to the start of the pixels, one beyond the start
|
* NOTE: the alignment is to the start of the pixels, one beyond the start
|
||||||
* of the buffer, because of the filter byte. Prior to libpng 1.5.6 this
|
* of the buffer, because of the filter byte. Prior to libpng 1.5.6 this
|
||||||
* was incorrect, the filter byte was aligned, which had the exact opposite
|
* was incorrect; the filter byte was aligned, which had the exact
|
||||||
* effect to that intended.
|
* opposite effect of that intended.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
png_bytep temp = png_ptr->big_row_buf + 32;
|
png_bytep temp = png_ptr->big_row_buf + 32;
|
||||||
int extra = (int)((temp - (png_bytep)0) & 0xf);
|
int extra = (int)((temp - (png_bytep)0) & 0x0f);
|
||||||
png_ptr->row_buf = temp - extra - 1/*filter byte*/;
|
png_ptr->row_buf = temp - extra - 1/*filter byte*/;
|
||||||
|
|
||||||
|
temp = png_ptr->big_prev_row + 32;
|
||||||
|
extra = (int)((temp - (png_bytep)0) & 0x0f);
|
||||||
|
png_ptr->prev_row = temp - extra - 1/*filter byte*/;
|
||||||
}
|
}
|
||||||
|
|
||||||
png_ptr->old_big_row_buf_size = row_bytes + 48;
|
|
||||||
#else
|
#else
|
||||||
/* Use 31 bytes of padding before and 17 bytes after row_buf. */
|
/* Use 31 bytes of padding before and 17 bytes after row_buf. */
|
||||||
png_ptr->row_buf = png_ptr->big_row_buf + 31;
|
png_ptr->row_buf = png_ptr->big_row_buf + 31;
|
||||||
|
png_ptr->prev_row = png_ptr->big_prev_row + 31;
|
||||||
#endif
|
#endif
|
||||||
png_ptr->old_big_row_buf_size = row_bytes + 48;
|
png_ptr->old_big_row_buf_size = row_bytes + 48;
|
||||||
}
|
}
|
||||||
@@ -3954,15 +4092,6 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
|
|||||||
if (png_ptr->rowbytes > (PNG_SIZE_MAX - 1))
|
if (png_ptr->rowbytes > (PNG_SIZE_MAX - 1))
|
||||||
png_error(png_ptr, "Row has too many bytes to allocate in memory");
|
png_error(png_ptr, "Row has too many bytes to allocate in memory");
|
||||||
|
|
||||||
if (png_ptr->rowbytes + 1 > png_ptr->old_prev_row_size)
|
|
||||||
{
|
|
||||||
png_free(png_ptr, png_ptr->prev_row);
|
|
||||||
|
|
||||||
png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, png_ptr->rowbytes + 1);
|
|
||||||
|
|
||||||
png_ptr->old_prev_row_size = png_ptr->rowbytes + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
|
png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
|
||||||
|
|
||||||
png_debug1(3, "width = %u,", png_ptr->width);
|
png_debug1(3, "width = %u,", png_ptr->width);
|
||||||
|
|||||||
2
pngset.c
2
pngset.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngset.c - storage of image information into info struct
|
/* pngset.c - storage of image information into info struct
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.6 [November 3, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
|
|||||||
27
pngstruct.h
27
pngstruct.h
@@ -105,8 +105,12 @@ struct png_struct_def
|
|||||||
png_uint_32 iwidth; /* width of current interlaced row in pixels */
|
png_uint_32 iwidth; /* width of current interlaced row in pixels */
|
||||||
png_uint_32 row_number; /* current row in interlace pass */
|
png_uint_32 row_number; /* current row in interlace pass */
|
||||||
png_uint_32 chunk_name; /* PNG_CHUNK() id of current chunk */
|
png_uint_32 chunk_name; /* PNG_CHUNK() id of current chunk */
|
||||||
png_bytep prev_row; /* buffer to save previous (unfiltered) row */
|
png_bytep prev_row; /* buffer to save previous (unfiltered) row.
|
||||||
png_bytep row_buf; /* buffer to save current (unfiltered) row */
|
* This is a pointer into big_prev_row
|
||||||
|
*/
|
||||||
|
png_bytep row_buf; /* buffer to save current (unfiltered) row.
|
||||||
|
* This is a pointer into big_row_buf
|
||||||
|
*/
|
||||||
png_bytep sub_row; /* buffer to save "sub" row when filtering */
|
png_bytep sub_row; /* buffer to save "sub" row when filtering */
|
||||||
png_bytep up_row; /* buffer to save "up" row when filtering */
|
png_bytep up_row; /* buffer to save "up" row when filtering */
|
||||||
png_bytep avg_row; /* buffer to save "avg" row when filtering */
|
png_bytep avg_row; /* buffer to save "avg" row when filtering */
|
||||||
@@ -157,19 +161,21 @@ struct png_struct_def
|
|||||||
png_uint_32 flush_rows; /* number of rows written since last flush */
|
png_uint_32 flush_rows; /* number of rows written since last flush */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
|
#ifdef PNG_READ_GAMMA_SUPPORTED
|
||||||
int gamma_shift; /* number of "insignificant" bits in 16-bit gamma */
|
int gamma_shift; /* number of "insignificant" bits in 16-bit gamma */
|
||||||
png_fixed_point gamma; /* file gamma value */
|
png_fixed_point gamma; /* file gamma value */
|
||||||
png_fixed_point screen_gamma; /* screen gamma value (display_exponent) */
|
png_fixed_point screen_gamma; /* screen gamma value (display_exponent) */
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
|
|
||||||
png_bytep gamma_table; /* gamma table for 8-bit depth files */
|
png_bytep gamma_table; /* gamma table for 8-bit depth files */
|
||||||
|
png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */
|
||||||
|
#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
|
||||||
|
defined(PNG_READ_ALPHA_MODE_SUPPORTED) || \
|
||||||
|
defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
|
||||||
png_bytep gamma_from_1; /* converts from 1.0 to screen */
|
png_bytep gamma_from_1; /* converts from 1.0 to screen */
|
||||||
png_bytep gamma_to_1; /* converts from file to 1.0 */
|
png_bytep gamma_to_1; /* converts from file to 1.0 */
|
||||||
png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */
|
|
||||||
png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */
|
png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */
|
||||||
png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */
|
png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */
|
||||||
|
#endif /* READ_BACKGROUND || READ_ALPHA_MODE || RGB_TO_GRAY */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED)
|
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED)
|
||||||
@@ -334,9 +340,8 @@ struct png_struct_def
|
|||||||
png_unknown_chunk unknown_chunk;
|
png_unknown_chunk unknown_chunk;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* New members added in libpng-1.2.26 */
|
/* New member added in libpng-1.2.26 */
|
||||||
png_size_t old_big_row_buf_size;
|
png_size_t old_big_row_buf_size;
|
||||||
png_size_t old_prev_row_size;
|
|
||||||
|
|
||||||
/* New member added in libpng-1.2.30 */
|
/* New member added in libpng-1.2.30 */
|
||||||
png_charp chunkdata; /* buffer for reading chunk data */
|
png_charp chunkdata; /* buffer for reading chunk data */
|
||||||
@@ -345,5 +350,11 @@ struct png_struct_def
|
|||||||
/* New member added in libpng-1.4.0 */
|
/* New member added in libpng-1.4.0 */
|
||||||
png_uint_32 io_state;
|
png_uint_32 io_state;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* New member added in libpng-1.5.6 */
|
||||||
|
png_bytep big_prev_row;
|
||||||
|
|
||||||
|
void (*read_filter[PNG_FILTER_VALUE_LAST-1])(png_row_infop row_info,
|
||||||
|
png_bytep row, png_const_bytep prev_row);
|
||||||
};
|
};
|
||||||
#endif /* PNGSTRUCT_H */
|
#endif /* PNGSTRUCT_H */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngtest.c - a simple test program to test libpng
|
/* pngtest.c - a simple test program to test libpng
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.6 [November 3, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -1813,4 +1813,4 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||||
typedef png_libpng_version_1_5_6beta05 Your_png_h_is_not_version_1_5_6beta05;
|
typedef png_libpng_version_1_5_7beta01 Your_png_h_is_not_version_1_5_7beta01;
|
||||||
|
|||||||
168
pngvalid.c
168
pngvalid.c
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngvalid.c - validate libpng by constructing then reading png files.
|
/* pngvalid.c - validate libpng by constructing then reading png files.
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.7 [(PENDING RELEASE)]
|
||||||
* Copyright (c) 2011 Glenn Randers-Pehrson
|
* Copyright (c) 2011 Glenn Randers-Pehrson
|
||||||
* Written by John Cunningham Bowler
|
* Written by John Cunningham Bowler
|
||||||
*
|
*
|
||||||
@@ -433,12 +433,35 @@ pixel_copy(png_bytep toBuffer, png_uint_32 toIndex,
|
|||||||
memmove(toBuffer+(toIndex>>3), fromBuffer+(fromIndex>>3), pixelSize>>3);
|
memmove(toBuffer+(toIndex>>3), fromBuffer+(fromIndex>>3), pixelSize>>3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Copy a complete row of pixels, taking into account potential partial
|
||||||
|
* bytes at the end.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
row_copy(png_bytep toBuffer, png_const_bytep fromBuffer, unsigned int bitWidth)
|
||||||
|
{
|
||||||
|
memcpy(toBuffer, fromBuffer, bitWidth >> 3);
|
||||||
|
|
||||||
|
if ((bitWidth & 7) != 0)
|
||||||
|
{
|
||||||
|
unsigned int mask;
|
||||||
|
|
||||||
|
toBuffer += bitWidth >> 3;
|
||||||
|
fromBuffer += bitWidth >> 3;
|
||||||
|
/* The remaining bits are in the top of the byte, the mask is the bits to
|
||||||
|
* retain.
|
||||||
|
*/
|
||||||
|
mask = 0xff >> (bitWidth & 7);
|
||||||
|
*toBuffer = (png_byte)((*toBuffer & mask) | (*fromBuffer & ~mask));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Compare pixels - they are assumed to start at the first byte in the
|
/* Compare pixels - they are assumed to start at the first byte in the
|
||||||
* given buffers.
|
* given buffers.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
pixel_cmp(png_const_bytep pa, png_const_bytep pb, png_uint_32 bit_width)
|
pixel_cmp(png_const_bytep pa, png_const_bytep pb, png_uint_32 bit_width)
|
||||||
{
|
{
|
||||||
|
#if PNG_LIBPNG_VER < 10506
|
||||||
if (memcmp(pa, pb, bit_width>>3) == 0)
|
if (memcmp(pa, pb, bit_width>>3) == 0)
|
||||||
{
|
{
|
||||||
png_uint_32 p;
|
png_uint_32 p;
|
||||||
@@ -459,6 +482,13 @@ pixel_cmp(png_const_bytep pa, png_const_bytep pb, png_uint_32 bit_width)
|
|||||||
|
|
||||||
if (p == 0) return 0;
|
if (p == 0) return 0;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
/* From libpng-1.5.6 the overwrite should be fixed, so compare the trailing
|
||||||
|
* bits too:
|
||||||
|
*/
|
||||||
|
if (memcmp(pa, pb, (bit_width+7)>>3) == 0)
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Return the index of the changed byte. */
|
/* Return the index of the changed byte. */
|
||||||
{
|
{
|
||||||
@@ -908,11 +938,13 @@ store_ensure_image(png_store *ps, png_structp pp, int nImages, png_size_t cbRow,
|
|||||||
ps->cb_row = cbRow;
|
ps->cb_row = cbRow;
|
||||||
ps->image_h = cRows;
|
ps->image_h = cRows;
|
||||||
|
|
||||||
/* For error checking, the whole buffer is set to '1' - this matches what
|
/* For error checking, the whole buffer is set to 10110010 (0xb2 - 178).
|
||||||
* happens with the 'size' test images on write and also matches the unused
|
* This deliberately doesn't match the bits in the size test image which are
|
||||||
* bits in the test rows.
|
* outside the image; these are set to 0xff (all 1). To make the row
|
||||||
|
* comparison work in the 'size' test case the size rows are pre-initialized
|
||||||
|
* to the same value prior to calling 'standard_row'.
|
||||||
*/
|
*/
|
||||||
memset(ps->image, 0xff, cb);
|
memset(ps->image, 178, cb);
|
||||||
|
|
||||||
/* Then put in the marks. */
|
/* Then put in the marks. */
|
||||||
while (--nImages >= 0)
|
while (--nImages >= 0)
|
||||||
@@ -1300,7 +1332,21 @@ store_malloc(png_structp pp, png_alloc_size_t cb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
store_pool_error(pool->store, pp, "out of memory");
|
{
|
||||||
|
/* NOTE: the PNG user malloc function cannot use the png_ptr it is passed
|
||||||
|
* other than to retrieve the allocation pointer! libpng calls the
|
||||||
|
* store_malloc callback in two basic cases:
|
||||||
|
*
|
||||||
|
* 1) From png_malloc; png_malloc will do a png_error itself if NULL is
|
||||||
|
* returned.
|
||||||
|
* 2) From png_struct or png_info structure creation; png_malloc is
|
||||||
|
* to return so cleanup can be performed.
|
||||||
|
*
|
||||||
|
* To handle this store_malloc can log a message, but can't do anything
|
||||||
|
* else.
|
||||||
|
*/
|
||||||
|
store_log(pool->store, pp, "out of memory", 1 /* is_error */);
|
||||||
|
}
|
||||||
|
|
||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
@@ -1311,6 +1357,14 @@ store_free(png_structp pp, png_voidp memory)
|
|||||||
store_pool *pool = voidcast(store_pool*, png_get_mem_ptr(pp));
|
store_pool *pool = voidcast(store_pool*, png_get_mem_ptr(pp));
|
||||||
store_memory *this = voidcast(store_memory*, memory), **test;
|
store_memory *this = voidcast(store_memory*, memory), **test;
|
||||||
|
|
||||||
|
/* Because libpng calls store_free with a dummy png_struct when deleting
|
||||||
|
* png_struct or png_info via png_destroy_struct_2 it is necessary to check
|
||||||
|
* the passed in png_structp to ensure it is valid, and not pass it to
|
||||||
|
* png_error if it is not.
|
||||||
|
*/
|
||||||
|
if (pp != pool->store->pread && pp != pool->store->pwrite)
|
||||||
|
pp = NULL;
|
||||||
|
|
||||||
/* First check that this 'memory' really is valid memory - it must be in the
|
/* First check that this 'memory' really is valid memory - it must be in the
|
||||||
* pool list. If it is, use the shared memory_free function to free it.
|
* pool list. If it is, use the shared memory_free function to free it.
|
||||||
*/
|
*/
|
||||||
@@ -1715,6 +1769,11 @@ typedef struct png_modifier
|
|||||||
double error_indexed;
|
double error_indexed;
|
||||||
|
|
||||||
/* Flags: */
|
/* Flags: */
|
||||||
|
/* Whether to call png_read_update_info, not png_read_start_image, and how
|
||||||
|
* many times to call it.
|
||||||
|
*/
|
||||||
|
int use_update_info;
|
||||||
|
|
||||||
/* Whether or not to interlace. */
|
/* Whether or not to interlace. */
|
||||||
int interlace_type :9; /* int, but must store '1' */
|
int interlace_type :9; /* int, but must store '1' */
|
||||||
|
|
||||||
@@ -1798,6 +1857,7 @@ modifier_init(png_modifier *pm)
|
|||||||
pm->error_gray_2 = pm->error_gray_4 = pm->error_gray_8 = 0;
|
pm->error_gray_2 = pm->error_gray_4 = pm->error_gray_8 = 0;
|
||||||
pm->error_gray_16 = pm->error_color_8 = pm->error_color_16 = 0;
|
pm->error_gray_16 = pm->error_color_8 = pm->error_color_16 = 0;
|
||||||
pm->error_indexed = 0;
|
pm->error_indexed = 0;
|
||||||
|
pm->use_update_info = 0;
|
||||||
pm->interlace_type = PNG_INTERLACE_NONE;
|
pm->interlace_type = PNG_INTERLACE_NONE;
|
||||||
pm->test_standard = 0;
|
pm->test_standard = 0;
|
||||||
pm->test_size = 0;
|
pm->test_size = 0;
|
||||||
@@ -3884,6 +3944,7 @@ typedef struct standard_display
|
|||||||
int do_interlace; /* Do interlacing internally */
|
int do_interlace; /* Do interlacing internally */
|
||||||
int is_transparent; /* Transparency information was present. */
|
int is_transparent; /* Transparency information was present. */
|
||||||
int speed; /* Doing a speed test */
|
int speed; /* Doing a speed test */
|
||||||
|
int use_update_info;/* Call update_info, not start_image */
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
png_uint_16 red;
|
png_uint_16 red;
|
||||||
@@ -3897,7 +3958,7 @@ typedef struct standard_display
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
standard_display_init(standard_display *dp, png_store* ps, png_uint_32 id,
|
standard_display_init(standard_display *dp, png_store* ps, png_uint_32 id,
|
||||||
int do_interlace)
|
int do_interlace, int use_update_info)
|
||||||
{
|
{
|
||||||
memset(dp, 0, sizeof *dp);
|
memset(dp, 0, sizeof *dp);
|
||||||
|
|
||||||
@@ -3921,6 +3982,7 @@ standard_display_init(standard_display *dp, png_store* ps, png_uint_32 id,
|
|||||||
dp->do_interlace = do_interlace;
|
dp->do_interlace = do_interlace;
|
||||||
dp->is_transparent = 0;
|
dp->is_transparent = 0;
|
||||||
dp->speed = ps->speed;
|
dp->speed = ps->speed;
|
||||||
|
dp->use_update_info = use_update_info;
|
||||||
dp->npalette = 0;
|
dp->npalette = 0;
|
||||||
/* Preset the transparent color to black: */
|
/* Preset the transparent color to black: */
|
||||||
memset(&dp->transparent, 0, sizeof dp->transparent);
|
memset(&dp->transparent, 0, sizeof dp->transparent);
|
||||||
@@ -4278,7 +4340,16 @@ standard_info_imp(standard_display *dp, png_structp pp, png_infop pi,
|
|||||||
/* And the info callback has to call this (or png_read_update_info - see
|
/* And the info callback has to call this (or png_read_update_info - see
|
||||||
* below in the png_modifier code for that variant.
|
* below in the png_modifier code for that variant.
|
||||||
*/
|
*/
|
||||||
png_start_read_image(pp);
|
if (dp->use_update_info)
|
||||||
|
{
|
||||||
|
/* For debugging the effect of multiple calls: */
|
||||||
|
int i = dp->use_update_info;
|
||||||
|
while (i-- > 0)
|
||||||
|
png_read_update_info(pp, pi);
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
png_start_read_image(pp);
|
||||||
|
|
||||||
/* Validate the height, width and rowbytes plus ensure that sufficient buffer
|
/* Validate the height, width and rowbytes plus ensure that sufficient buffer
|
||||||
* exists for decoding the image.
|
* exists for decoding the image.
|
||||||
@@ -4343,7 +4414,7 @@ progressive_row(png_structp pp, png_bytep new_row, png_uint_32 y, int pass)
|
|||||||
if (dp->interlace_type == PNG_INTERLACE_ADAM7)
|
if (dp->interlace_type == PNG_INTERLACE_ADAM7)
|
||||||
deinterlace_row(row, new_row, dp->pixel_size, dp->w, pass);
|
deinterlace_row(row, new_row, dp->pixel_size, dp->w, pass);
|
||||||
else
|
else
|
||||||
memcpy(row, new_row, dp->cbRow);
|
row_copy(row, new_row, dp->pixel_size * dp->w);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
png_progressive_combine_row(pp, row, new_row);
|
png_progressive_combine_row(pp, row, new_row);
|
||||||
@@ -4387,10 +4458,12 @@ sequential_row(standard_display *dp, png_structp pp, png_infop pi,
|
|||||||
|
|
||||||
/* The following aids (to some extent) error detection - we can
|
/* The following aids (to some extent) error detection - we can
|
||||||
* see where png_read_row wrote. Use opposite values in row and
|
* see where png_read_row wrote. Use opposite values in row and
|
||||||
* display to make this easier.
|
* display to make this easier. Don't use 0xff (which is used in
|
||||||
|
* the image write code to fill unused bits) or 0 (which is a
|
||||||
|
* likely value to overwrite unused bits with).
|
||||||
*/
|
*/
|
||||||
memset(row, 0xff, sizeof row);
|
memset(row, 0xc5, sizeof row);
|
||||||
memset(display, 0, sizeof display);
|
memset(display, 0x5c, sizeof display);
|
||||||
|
|
||||||
png_read_row(pp, row, display);
|
png_read_row(pp, row, display);
|
||||||
|
|
||||||
@@ -4423,39 +4496,51 @@ standard_row_validate(standard_display *dp, png_structp pp,
|
|||||||
int where;
|
int where;
|
||||||
png_byte std[STANDARD_ROWMAX];
|
png_byte std[STANDARD_ROWMAX];
|
||||||
|
|
||||||
memset(std, 0xff, sizeof std);
|
/* The row must be pre-initialized to the magic number here for the size
|
||||||
|
* tests to pass:
|
||||||
|
*/
|
||||||
|
memset(std, 178, sizeof std);
|
||||||
standard_row(pp, std, dp->id, y);
|
standard_row(pp, std, dp->id, y);
|
||||||
|
|
||||||
/* At the end both the 'row' and 'display' arrays should end up identical.
|
/* At the end both the 'row' and 'display' arrays should end up identical.
|
||||||
* In earlier passes 'row' will be partially filled in, with only the pixels
|
* In earlier passes 'row' will be partially filled in, with only the pixels
|
||||||
* that have been read so far, but 'display' will have those pixels
|
* that have been read so far, but 'display' will have those pixels
|
||||||
* replicated to fill the unread pixels while reading an interlaced image.
|
* replicated to fill the unread pixels while reading an interlaced image.
|
||||||
|
#if PNG_LIBPNG_VER < 10506
|
||||||
* The side effect inside the libpng sequential reader is that the 'row'
|
* The side effect inside the libpng sequential reader is that the 'row'
|
||||||
* array retains the correct values for unwritten pixels within the row
|
* array retains the correct values for unwritten pixels within the row
|
||||||
* bytes, while the 'display' array gets bits off the end of the image (in
|
* bytes, while the 'display' array gets bits off the end of the image (in
|
||||||
* the last byte) trashed. Unfortunately in the progressive reader the
|
* the last byte) trashed. Unfortunately in the progressive reader the
|
||||||
* row bytes are always trashed, so we always do a pixel_cmp here even though
|
* row bytes are always trashed, so we always do a pixel_cmp here even though
|
||||||
* a memcmp of all cbRow bytes will succeed for the sequential reader.
|
* a memcmp of all cbRow bytes will succeed for the sequential reader.
|
||||||
|
#endif
|
||||||
*/
|
*/
|
||||||
if (iImage >= 0 &&
|
if (iImage >= 0 &&
|
||||||
(where = pixel_cmp(std, store_image_row(dp->ps, pp, iImage, y),
|
(where = pixel_cmp(std, store_image_row(dp->ps, pp, iImage, y),
|
||||||
dp->bit_width)) != 0)
|
dp->bit_width)) != 0)
|
||||||
{
|
{
|
||||||
char msg[64];
|
char msg[64];
|
||||||
sprintf(msg, "PNG image row %d changed at byte %d", y, where-1);
|
sprintf(msg, "PNG image row[%d][%d] changed from %.2x to %.2x", y,
|
||||||
|
where-1, std[where-1],
|
||||||
|
store_image_row(dp->ps, pp, iImage, y)[where-1]);
|
||||||
png_error(pp, msg);
|
png_error(pp, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if PNG_LIBPNG_VER < 10506
|
||||||
/* In this case use pixel_cmp because we need to compare a partial
|
/* In this case use pixel_cmp because we need to compare a partial
|
||||||
* byte at the end of the row if the row is not an exact multiple
|
* byte at the end of the row if the row is not an exact multiple
|
||||||
* of 8 bits wide.
|
* of 8 bits wide. (This is fixed in libpng-1.5.6 and pixel_cmp is
|
||||||
|
* changed to match!)
|
||||||
*/
|
*/
|
||||||
|
#endif
|
||||||
if (iDisplay >= 0 &&
|
if (iDisplay >= 0 &&
|
||||||
(where = pixel_cmp(std, store_image_row(dp->ps, pp, iDisplay, y),
|
(where = pixel_cmp(std, store_image_row(dp->ps, pp, iDisplay, y),
|
||||||
dp->bit_width)) != 0)
|
dp->bit_width)) != 0)
|
||||||
{
|
{
|
||||||
char msg[64];
|
char msg[64];
|
||||||
sprintf(msg, "display row %d changed at byte %d", y, where-1);
|
sprintf(msg, "display row[%d][%d] changed from %.2x to %.2x", y,
|
||||||
|
where-1, std[where-1],
|
||||||
|
store_image_row(dp->ps, pp, iDisplay, y)[where-1]);
|
||||||
png_error(pp, msg);
|
png_error(pp, msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4496,7 +4581,7 @@ standard_end(png_structp pp, png_infop pi)
|
|||||||
/* A single test run checking the standard image to ensure it is not damaged. */
|
/* A single test run checking the standard image to ensure it is not damaged. */
|
||||||
static void
|
static void
|
||||||
standard_test(png_store* PNG_CONST psIn, png_uint_32 PNG_CONST id,
|
standard_test(png_store* PNG_CONST psIn, png_uint_32 PNG_CONST id,
|
||||||
int do_interlace)
|
int do_interlace, int use_update_info)
|
||||||
{
|
{
|
||||||
standard_display d;
|
standard_display d;
|
||||||
context(psIn, fault);
|
context(psIn, fault);
|
||||||
@@ -4504,7 +4589,7 @@ standard_test(png_store* PNG_CONST psIn, png_uint_32 PNG_CONST id,
|
|||||||
/* Set up the display (stack frame) variables from the arguments to the
|
/* Set up the display (stack frame) variables from the arguments to the
|
||||||
* function and initialize the locals that are filled in later.
|
* function and initialize the locals that are filled in later.
|
||||||
*/
|
*/
|
||||||
standard_display_init(&d, psIn, id, do_interlace);
|
standard_display_init(&d, psIn, id, do_interlace, use_update_info);
|
||||||
|
|
||||||
/* Everything is protected by a Try/Catch. The functions called also
|
/* Everything is protected by a Try/Catch. The functions called also
|
||||||
* typically have local Try/Catch blocks.
|
* typically have local Try/Catch blocks.
|
||||||
@@ -4591,7 +4676,7 @@ test_standard(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type,
|
|||||||
interlace_type < PNG_INTERLACE_LAST; ++interlace_type)
|
interlace_type < PNG_INTERLACE_LAST; ++interlace_type)
|
||||||
{
|
{
|
||||||
standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
|
standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
|
||||||
interlace_type, 0, 0, 0), 0/*do_interlace*/);
|
interlace_type, 0, 0, 0), 0/*do_interlace*/, pm->use_update_info);
|
||||||
|
|
||||||
if (fail(pm))
|
if (fail(pm))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -4650,25 +4735,29 @@ test_size(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type,
|
|||||||
* to validate.
|
* to validate.
|
||||||
*/
|
*/
|
||||||
standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
|
standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
|
||||||
PNG_INTERLACE_NONE, w, h, 0), 0/*do_interlace*/);
|
PNG_INTERLACE_NONE, w, h, 0), 0/*do_interlace*/,
|
||||||
|
pm->use_update_info);
|
||||||
|
|
||||||
if (fail(pm))
|
if (fail(pm))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
|
standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
|
||||||
PNG_INTERLACE_NONE, w, h, 1), 0/*do_interlace*/);
|
PNG_INTERLACE_NONE, w, h, 1), 0/*do_interlace*/,
|
||||||
|
pm->use_update_info);
|
||||||
|
|
||||||
if (fail(pm))
|
if (fail(pm))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
|
standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
|
||||||
PNG_INTERLACE_ADAM7, w, h, 0), 0/*do_interlace*/);
|
PNG_INTERLACE_ADAM7, w, h, 0), 0/*do_interlace*/,
|
||||||
|
pm->use_update_info);
|
||||||
|
|
||||||
if (fail(pm))
|
if (fail(pm))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
|
standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
|
||||||
PNG_INTERLACE_ADAM7, w, h, 1), 0/*do_interlace*/);
|
PNG_INTERLACE_ADAM7, w, h, 1), 0/*do_interlace*/,
|
||||||
|
pm->use_update_info);
|
||||||
|
|
||||||
if (fail(pm))
|
if (fail(pm))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -4678,13 +4767,15 @@ test_size(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type,
|
|||||||
* to the code used in the non-interlaced case too.
|
* to the code used in the non-interlaced case too.
|
||||||
*/
|
*/
|
||||||
standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
|
standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
|
||||||
PNG_INTERLACE_NONE, w, h, 0), 1/*do_interlace*/);
|
PNG_INTERLACE_NONE, w, h, 0), 1/*do_interlace*/,
|
||||||
|
pm->use_update_info);
|
||||||
|
|
||||||
if (fail(pm))
|
if (fail(pm))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
|
standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/,
|
||||||
PNG_INTERLACE_ADAM7, w, h, 0), 1/*do_interlace*/);
|
PNG_INTERLACE_ADAM7, w, h, 0), 1/*do_interlace*/,
|
||||||
|
pm->use_update_info);
|
||||||
|
|
||||||
if (fail(pm))
|
if (fail(pm))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -5159,7 +5250,8 @@ transform_display_init(transform_display *dp, png_modifier *pm, png_uint_32 id,
|
|||||||
memset(dp, 0, sizeof dp);
|
memset(dp, 0, sizeof dp);
|
||||||
|
|
||||||
/* Standard fields */
|
/* Standard fields */
|
||||||
standard_display_init(&dp->this, &pm->this, id, 0/*do_interlace*/);
|
standard_display_init(&dp->this, &pm->this, id, 0/*do_interlace*/,
|
||||||
|
pm->use_update_info);
|
||||||
|
|
||||||
/* Parameter fields */
|
/* Parameter fields */
|
||||||
dp->pm = pm;
|
dp->pm = pm;
|
||||||
@@ -5180,7 +5272,13 @@ transform_info_imp(transform_display *dp, png_structp pp, png_infop pi)
|
|||||||
dp->transform_list->set(dp->transform_list, dp, pp, pi);
|
dp->transform_list->set(dp->transform_list, dp, pp, pi);
|
||||||
|
|
||||||
/* Update the info structure for these transforms: */
|
/* Update the info structure for these transforms: */
|
||||||
png_read_update_info(pp, pi);
|
{
|
||||||
|
int i = dp->this.use_update_info;
|
||||||
|
/* Always do one call, even if use_update_info is 0. */
|
||||||
|
do
|
||||||
|
png_read_update_info(pp, pi);
|
||||||
|
while (--i > 0);
|
||||||
|
}
|
||||||
|
|
||||||
/* And get the output information into the standard_display */
|
/* And get the output information into the standard_display */
|
||||||
standard_info_part2(&dp->this, pp, pi, 1/*images*/);
|
standard_info_part2(&dp->this, pp, pi, 1/*images*/);
|
||||||
@@ -7012,7 +7110,8 @@ gamma_display_init(gamma_display *dp, png_modifier *pm, png_uint_32 id,
|
|||||||
double background_gamma)
|
double background_gamma)
|
||||||
{
|
{
|
||||||
/* Standard fields */
|
/* Standard fields */
|
||||||
standard_display_init(&dp->this, &pm->this, id, 0/*do_interlace*/);
|
standard_display_init(&dp->this, &pm->this, id, 0/*do_interlace*/,
|
||||||
|
pm->use_update_info);
|
||||||
|
|
||||||
/* Parameter fields */
|
/* Parameter fields */
|
||||||
dp->pm = pm;
|
dp->pm = pm;
|
||||||
@@ -7141,7 +7240,13 @@ gamma_info_imp(gamma_display *dp, png_structp pp, png_infop pi)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
png_read_update_info(pp, pi);
|
{
|
||||||
|
int i = dp->this.use_update_info;
|
||||||
|
/* Always do one call, even if use_update_info is 0. */
|
||||||
|
do
|
||||||
|
png_read_update_info(pp, pi);
|
||||||
|
while (--i > 0);
|
||||||
|
}
|
||||||
|
|
||||||
/* Now we may get a different cbRow: */
|
/* Now we may get a different cbRow: */
|
||||||
standard_info_part2(&dp->this, pp, pi, 1 /*images*/);
|
standard_info_part2(&dp->this, pp, pi, 1 /*images*/);
|
||||||
@@ -7748,7 +7853,7 @@ gamma_component_validate(PNG_CONST char *name, PNG_CONST validate_info *vi,
|
|||||||
case ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN:
|
case ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN:
|
||||||
case ALPHA_MODE_OFFSET + PNG_ALPHA_OPTIMIZED:
|
case ALPHA_MODE_OFFSET + PNG_ALPHA_OPTIMIZED:
|
||||||
# endif /* ALPHA_MODE_SUPPORTED */
|
# endif /* ALPHA_MODE_SUPPORTED */
|
||||||
do_compose = (alpha >= 0 && alpha < 1);
|
do_compose = (alpha > 0 && alpha < 1);
|
||||||
use_input = (alpha != 0);
|
use_input = (alpha != 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -9372,6 +9477,9 @@ int main(int argc, PNG_CONST char **argv)
|
|||||||
else if (strcmp(*argv, "--progressive-read") == 0)
|
else if (strcmp(*argv, "--progressive-read") == 0)
|
||||||
pm.this.progressive = 1;
|
pm.this.progressive = 1;
|
||||||
|
|
||||||
|
else if (strcmp(*argv, "--use-update-info") == 0)
|
||||||
|
++pm.use_update_info; /* Can call multiple times */
|
||||||
|
|
||||||
else if (strcmp(*argv, "--interlace") == 0)
|
else if (strcmp(*argv, "--interlace") == 0)
|
||||||
pm.interlace_type = PNG_INTERLACE_ADAM7;
|
pm.interlace_type = PNG_INTERLACE_ADAM7;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngwrite.c - general routines to write a PNG file
|
/* pngwrite.c - general routines to write a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.6 [November 3, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngwtran.c - transforms the data in a row for PNG writers
|
/* pngwtran.c - transforms the data in a row for PNG writers
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.6 [November 3, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngwutil.c - utilities to write a PNG file
|
/* pngwutil.c - utilities to write a PNG file
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
* Last changed in libpng 1.5.6 [November 3, 2011]
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@@ -582,7 +582,10 @@ png_write_compressed_data_out(png_structp png_ptr, compression_state *comp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED
|
#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED
|
||||||
if (comp->input_len >= 2 && comp->input_len < 16384)
|
/* The zbuf_size test is because the code below doesn't work if zbuf_size is
|
||||||
|
* '1'; simply skip it to avoid memory overwrite.
|
||||||
|
*/
|
||||||
|
if (comp->input_len >= 2 && comp->input_len < 16384 && png_ptr->zbuf_size > 1)
|
||||||
{
|
{
|
||||||
unsigned int z_cmf; /* zlib compression method and flags */
|
unsigned int z_cmf; /* zlib compression method and flags */
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
VisualStudio instructions
|
VisualStudio instructions
|
||||||
|
|
||||||
libpng version 1.5.6beta05 - October 12, 2011
|
libpng version 1.5.7beta01 - November 4, 2011
|
||||||
|
|
||||||
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* zlib.props - location of zlib source
|
* zlib.props - location of zlib source
|
||||||
*
|
*
|
||||||
* libpng version 1.5.6beta05 - October 12, 2011
|
* libpng version 1.5.7beta01 - November 4, 2011
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
Makefiles for libpng version 1.5.6beta05 - October 12, 2011
|
Makefiles for libpng version 1.5.7beta01 - November 4, 2011
|
||||||
|
|
||||||
pnglibconf.h.prebuilt => Stores configuration settings
|
pnglibconf.h.prebuilt => Stores configuration settings
|
||||||
makefile.linux => Linux/ELF makefile
|
makefile.linux => Linux/ELF makefile
|
||||||
(gcc, creates libpng15.so.15.1.5.6beta05)
|
(gcc, creates libpng15.so.15.1.5.7beta01)
|
||||||
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
|
||||||
makefile.knr => Archaic UNIX Makefile that converts files with
|
makefile.knr => Archaic UNIX Makefile that converts files with
|
||||||
ansi2knr (Requires ansi2knr.c from
|
ansi2knr (Requires ansi2knr.c from
|
||||||
@@ -20,7 +20,7 @@ pnglibconf.h.prebuilt => Stores configuration settings
|
|||||||
makefile.dec => DEC Alpha UNIX makefile
|
makefile.dec => DEC Alpha UNIX makefile
|
||||||
makefile.dj2 => DJGPP 2 makefile
|
makefile.dj2 => DJGPP 2 makefile
|
||||||
makefile.elf => Linux/ELF makefile symbol versioning,
|
makefile.elf => Linux/ELF makefile symbol versioning,
|
||||||
(gcc, creates libpng15.so.15.1.5.6beta05)
|
(gcc, creates libpng15.so.15.1.5.7beta01)
|
||||||
makefile.freebsd => FreeBSD makefile
|
makefile.freebsd => FreeBSD makefile
|
||||||
makefile.gcc => Generic gcc makefile
|
makefile.gcc => Generic gcc makefile
|
||||||
makefile.hpgcc => HPUX makefile using gcc
|
makefile.hpgcc => HPUX makefile using gcc
|
||||||
@@ -35,12 +35,12 @@ pnglibconf.h.prebuilt => Stores configuration settings
|
|||||||
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
|
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
|
||||||
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
|
||||||
makefile.sggcc => Silicon Graphics (gcc,
|
makefile.sggcc => Silicon Graphics (gcc,
|
||||||
creates libpng15.so.15.1.5.6beta05)
|
creates libpng15.so.15.1.5.7beta01)
|
||||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||||
makefile.solaris => Solaris 2.X makefile (gcc,
|
makefile.solaris => Solaris 2.X makefile (gcc,
|
||||||
creates libpng15.so.15.1.5.6beta05)
|
creates libpng15.so.15.1.5.7beta01)
|
||||||
makefile.so9 => Solaris 9 makefile (gcc,
|
makefile.so9 => Solaris 9 makefile (gcc,
|
||||||
creates libpng15.so.15.1.5.6beta05)
|
creates libpng15.so.15.1.5.7beta01)
|
||||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||||
makefile.sunos => Sun makefile
|
makefile.sunos => Sun makefile
|
||||||
makefile.32sunu => Sun Ultra 32-bit makefile
|
makefile.32sunu => Sun Ultra 32-bit makefile
|
||||||
|
|||||||
@@ -27,12 +27,12 @@ S--E
|
|||||||
S-EXPORTS-E
|
S-EXPORTS-E
|
||||||
S-;Version 1.5.0beta58-E
|
S-;Version 1.5.0beta58-E
|
||||||
|
|
||||||
/* NOTE: @@@ is interpreted by the calling script as a signal to
|
/* NOTE: PNG_JOIN is interpreted by the calling script as a signal to
|
||||||
* join the two things on either side, so we can do symbol
|
* join the two things on either side, so we can do symbol
|
||||||
* substitution within the name, regular C ## joins the pp-tokens,
|
* substitution within the name, regular C ## joins the pp-tokens,
|
||||||
* not their final values.
|
* not their final values.
|
||||||
*/
|
*/
|
||||||
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
||||||
PNG_DEFN_MAGIC- SYMBOL_PREFIX @@@ name-PNG_DEFN_END
|
PNG_DEFN_MAGIC- SYMBOL_PREFIX PNG_JOIN name-PNG_DEFN_END
|
||||||
|
|
||||||
#include "../png.h"
|
#include "../png.h"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
# Modeled after libxml-config.
|
# Modeled after libxml-config.
|
||||||
|
|
||||||
version=1.5.6beta05
|
version=1.5.7beta01
|
||||||
prefix=""
|
prefix=""
|
||||||
libdir=""
|
libdir=""
|
||||||
libs=""
|
libs=""
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ includedir=@includedir@/libpng15
|
|||||||
|
|
||||||
Name: libpng
|
Name: libpng
|
||||||
Description: Loads and saves PNG files
|
Description: Loads and saves PNG files
|
||||||
Version: 1.5.6beta05
|
Version: 1.5.7beta01
|
||||||
Libs: -L${libdir} -lpng15
|
Libs: -L${libdir} -lpng15
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
VERMAJ = 1
|
VERMAJ = 1
|
||||||
VERMIN = 5
|
VERMIN = 5
|
||||||
VERMIC = 6
|
VERMIC = 7
|
||||||
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
|
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
|
||||||
NAME = libpng
|
NAME = libpng
|
||||||
PACKAGE = $(NAME)-$(VER)
|
PACKAGE = $(NAME)-$(VER)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
# Library name:
|
# Library name:
|
||||||
LIBNAME = libpng15
|
LIBNAME = libpng15
|
||||||
PNGMAJ = 15
|
PNGMAJ = 15
|
||||||
RELEASE = 6
|
RELEASE = 7
|
||||||
|
|
||||||
# Shared library names:
|
# Shared library names:
|
||||||
LIBSO=$(LIBNAME).so
|
LIBSO=$(LIBNAME).so
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng15
|
|||||||
|
|
||||||
LIB= png15
|
LIB= png15
|
||||||
SHLIB_MAJOR= 0
|
SHLIB_MAJOR= 0
|
||||||
SHLIB_MINOR= 1.5.6beta05
|
SHLIB_MINOR= 1.5.7beta01
|
||||||
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
||||||
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
||||||
pngwtran.c pngmem.c pngerror.c pngpread.c
|
pngwtran.c pngmem.c pngerror.c pngpread.c
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
|
|||||||
|
|
||||||
LIB= png
|
LIB= png
|
||||||
SHLIB_MAJOR= 15
|
SHLIB_MAJOR= 15
|
||||||
SHLIB_MINOR= 1.5.6beta05
|
SHLIB_MINOR= 1.5.7beta01
|
||||||
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
|
||||||
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
||||||
pngwtran.c pngmem.c pngerror.c pngpread.c
|
pngwtran.c pngmem.c pngerror.c pngpread.c
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
|
|||||||
MANDIR= ${PREFIX}/man/cat
|
MANDIR= ${PREFIX}/man/cat
|
||||||
|
|
||||||
SHLIB_MAJOR= 15
|
SHLIB_MAJOR= 15
|
||||||
SHLIB_MINOR= 1.5.6beta05
|
SHLIB_MINOR= 1.5.7beta01
|
||||||
|
|
||||||
LIB= png
|
LIB= png
|
||||||
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
|
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
|
||||||
|
|||||||
@@ -35,13 +35,14 @@ BEGIN{
|
|||||||
err=0 # in-line exit sets this
|
err=0 # in-line exit sets this
|
||||||
start="PNG_DEFN_MAGIC-" # Arbitrary start
|
start="PNG_DEFN_MAGIC-" # Arbitrary start
|
||||||
end="-PNG_DEFN_END" # Arbitrary end
|
end="-PNG_DEFN_END" # Arbitrary end
|
||||||
cx= "/@@@*" # Open C comment for output file
|
ct="PNG_JOIN" # Join two tokens
|
||||||
|
cx= "/" ct "*" # Open C comment for output file
|
||||||
comment=start cx # Comment start
|
comment=start cx # Comment start
|
||||||
cend="*/" end # Comment end
|
cend="*/" end # Comment end
|
||||||
def=start "#define PNG_@@@" # Arbitrary define
|
def=start "#define PNG_" ct # Arbitrary define
|
||||||
sup="@@@_SUPPORTED" end # end supported option
|
sup=ct "_SUPPORTED" end # end supported option
|
||||||
und=comment "#undef PNG_@@@" # Unsupported option
|
und=comment "#undef PNG_" ct # Unsupported option
|
||||||
une="@@@_SUPPORTED" cend # end unsupported option
|
une=ct "_SUPPORTED" cend # end unsupported option
|
||||||
error=start "ERROR:" # error message
|
error=start "ERROR:" # error message
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
|
|||||||
@@ -10,6 +10,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
||||||
PNG_DEFN_MAGIC-SYMBOL_PREFIX @@@ name-PNG_DEFN_END
|
PNG_DEFN_MAGIC-SYMBOL_PREFIX PNG_JOIN name-PNG_DEFN_END
|
||||||
|
|
||||||
#include "../png.h"
|
#include "../png.h"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
LIBRARY
|
LIBRARY
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
;Version 1.5.6beta05
|
;Version 1.5.7beta01
|
||||||
png_access_version_number @1
|
png_access_version_number @1
|
||||||
png_set_sig_bytes @2
|
png_set_sig_bytes @2
|
||||||
png_sig_cmp @3
|
png_sig_cmp @3
|
||||||
|
|||||||
@@ -11,13 +11,13 @@
|
|||||||
|
|
||||||
#define HEADER PNG_DEFN_MAGIC-PNGLIB_LIBNAME {global:-PNG_DEFN_END
|
#define HEADER PNG_DEFN_MAGIC-PNGLIB_LIBNAME {global:-PNG_DEFN_END
|
||||||
|
|
||||||
/* NOTE: @@@ is interpreted by the calling script as a signal to
|
/* NOTE: PNG_JOIN is interpreted by the calling script as a signal to
|
||||||
* join the two things on either side, so we can do symbol
|
* join the two things on either side, so we can do symbol
|
||||||
* substitution within the name, regular C ## joins the pp-tokens,
|
* substitution within the name, regular C ## joins the pp-tokens,
|
||||||
* not their final values.
|
* not their final values.
|
||||||
*/
|
*/
|
||||||
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
||||||
PNG_DEFN_MAGIC- SYMBOL_PREFIX @@@ name;-PNG_DEFN_END
|
PNG_DEFN_MAGIC- SYMBOL_PREFIX PNG_JOIN name;-PNG_DEFN_END
|
||||||
|
|
||||||
#define TRAILER PNG_DEFN_MAGIC-local: *; };-PNG_DEFN_END
|
#define TRAILER PNG_DEFN_MAGIC-local: *; };-PNG_DEFN_END
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ echo "============ pngvalid-full.sh ==============" >> pngtest-log.txt
|
|||||||
echo "Running test-pngvalid-full.sh"
|
echo "Running test-pngvalid-full.sh"
|
||||||
for gamma in threshold transform sbit 16-to-8 background alpha-mode "transform --expand16" "background --expand16" "alpha-mode --expand16"
|
for gamma in threshold transform sbit 16-to-8 background alpha-mode "transform --expand16" "background --expand16" "alpha-mode --expand16"
|
||||||
do
|
do
|
||||||
if ./pngvalid --gamma-$gamma >> pngtest-log.txt 2>&1
|
if ./pngvalid "$@" --gamma-$gamma >> pngtest-log.txt 2>&1
|
||||||
then
|
then
|
||||||
echo " PASS:" pngvalid "--gamma-$gamma"
|
echo " PASS: pngvalid" "$@" "--gamma-$gamma"
|
||||||
else
|
else
|
||||||
echo " FAIL:" pngvalid "--gamma-$gamma"
|
echo " FAIL: pngvalid" "$@" "--gamma-$gamma"
|
||||||
err=1
|
err=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ for opts in "--standard" "--standard --progressive-read" \
|
|||||||
"--size" "--size --progressive-read" \
|
"--size" "--size --progressive-read" \
|
||||||
"--transform"
|
"--transform"
|
||||||
do
|
do
|
||||||
if ./pngvalid $opts >> pngtest-log.txt 2>&1
|
if ./pngvalid "$@" $opts >> pngtest-log.txt 2>&1
|
||||||
then
|
then
|
||||||
echo " PASS:" pngvalid $opts
|
echo " PASS: pngvalid" "$@" $opts
|
||||||
else
|
else
|
||||||
echo " FAIL:" pngvalid $opts
|
echo " FAIL: pngvalid" "$@" $opts
|
||||||
err=1
|
err=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user