mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 886499 - Update libpng to version 1.5.17. r=joe
This commit is contained in:
parent
10760735b2
commit
834d6fd221
@ -51,7 +51,7 @@ _SUBDIR_CONFIG_ARGS="$ac_configure_args"
|
||||
dnl Set the version number of the libs included with mozilla
|
||||
dnl ========================================================
|
||||
MOZJPEG=62
|
||||
MOZPNG=10516
|
||||
MOZPNG=10517
|
||||
NSPR_VERSION=4
|
||||
NSS_VERSION=3
|
||||
|
||||
|
@ -4111,6 +4111,44 @@ Version 1.5.16rc01 [May 16, 2013]
|
||||
No changes.
|
||||
|
||||
Version 1.5.16 [May 23, 2013]
|
||||
No changes.
|
||||
|
||||
Version 1.5.17beta01 [June 8, 2013]
|
||||
Removed a redundant test from png_set_IHDR().
|
||||
Added set(CMAKE_CONFIGURATION_TYPES ...) to CMakeLists.txt (Andrew Hundt)
|
||||
Deleted set(CMAKE_BUILD_TYPE) block from CMakeLists.txt
|
||||
Make ARM NEON support work at compile time (not just configure time).
|
||||
This moves the test on __ARM_NEON__ into pngconf.h to avoid issues when
|
||||
using a compiler that compiles for multiple architectures at one time.
|
||||
Removed PNG_FILTER_OPTIMIZATIONS and PNG_ARM_NEON_SUPPORTED from
|
||||
pnglibconf.h, allowing more of the decisions to be made internally
|
||||
(pngpriv.h) during the compile. Without this, symbol prefixing is broken
|
||||
under certain circumstances on ARM platforms. Now only the API parts of
|
||||
the optimizations ('check' vs 'api') are exposed in the public header files
|
||||
except that the new setting PNG_ARM_NEON_OPT documents how libpng makes the
|
||||
decision about whether or not to use the optimizations.
|
||||
Protect symbol prefixing against CC/CPPFLAGS/CFLAGS useage.
|
||||
Previous iOS/Xcode fixes for the ARM NEON optimizations moved the test
|
||||
on __ARM_NEON__ from configure time to compile time. This breaks symbol
|
||||
prefixing because the definition of the special png_init_filter_functions
|
||||
call was hidden at configure time if the relevant compiler arguments are
|
||||
passed in CFLAGS as opposed to CC. This change attempts to avoid all
|
||||
the confusion that would result by declaring the init function even when
|
||||
it is not used, so that it will always get prefixed.
|
||||
|
||||
Version 1.5.17rc01 [June 17, 2013]
|
||||
No changes.
|
||||
|
||||
Version 1.5.17rc02 [June 18, 2013]
|
||||
Revised libpng.3 so that "doclifter" can process it.
|
||||
|
||||
Version 1.5.17rc03 [June 25, 2013]
|
||||
Revised example.c to illustrate use of PNG_DEFAULT_sRGB and PNG_GAMMA_MAC_18
|
||||
as parameters for png_set_gamma(). These have been available since
|
||||
libpng-1.5.4.
|
||||
|
||||
Version 1.5.17 [June 27, 2013]
|
||||
No changes.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
@ -10,7 +10,7 @@ this sentence.
|
||||
|
||||
This code is released under the libpng license.
|
||||
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.5.16, May 23, 2013, are
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.5.17, June 27, 2013, are
|
||||
Copyright (c) 2004, 2006-2012 Glenn Randers-Pehrson, and are
|
||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
with the following individual added to the list of Contributing Authors
|
||||
@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
glennrp at users.sourceforge.net
|
||||
May 23, 2013
|
||||
June 27, 2013
|
||||
|
@ -1,6 +1,8 @@
|
||||
|
||||
Changes made to pristine png source by mozilla.org developers.
|
||||
|
||||
2013/06/29 -- Synced with libpng-1.5.17 (bug #886499).
|
||||
|
||||
2013/06/06 -- Synced with libpng-1.5.16 (bug #873001).
|
||||
|
||||
2013/04/11 -- Synced with libpng-1.5.15 (bug #858578).
|
||||
|
@ -1,11 +1,12 @@
|
||||
README for libpng version 1.5.16 - May 23, 2013 (shared library 15.0)
|
||||
README for libpng version 1.5.17 - June 27, 2013 (shared library 15.0)
|
||||
See the note about version numbers near the top of png.h
|
||||
|
||||
See INSTALL for instructions on how to install libpng.
|
||||
|
||||
Libpng comes in several distribution formats. Get libpng-*.tar.gz,
|
||||
libpng-*.tar.xz or libpng-*.tar.bz2 if you want UNIX-style line endings
|
||||
in the text files, or lpng*.zip if you want DOS-style line endings.
|
||||
in the text files, or lpng*.7z or lpng*.zip if you want DOS-style line
|
||||
endings.
|
||||
|
||||
Version 0.89 was the first official release of libpng. Don't let the
|
||||
fact that it's the first release fool you. The libpng library has been in
|
||||
@ -77,17 +78,15 @@ compression library that is useful for more things than just PNG files.
|
||||
You can use zlib as a drop-in replacement for fread() and fwrite() if
|
||||
you are so inclined.
|
||||
|
||||
zlib should be available at the same place that libpng is, or at.
|
||||
ftp://ftp.info-zip.org/pub/infozip/zlib
|
||||
zlib should be available at the same place that libpng is, or at zlib.net.
|
||||
|
||||
You may also want a copy of the PNG specification. It is available
|
||||
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
|
||||
these at http://www.libpng.org/pub/png/documents/
|
||||
|
||||
This code is currently being archived at libpng.sf.net in the
|
||||
[DOWNLOAD] area, and on CompuServe, Lib 20 (PNG SUPPORT)
|
||||
at GO GRAPHSUP. If you can't find it in any of those places,
|
||||
e-mail me, and I'll help you find it.
|
||||
[DOWNLOAD] area, and at ftp://ftp.simplesystems.org. If you can't find it
|
||||
in any of those places, e-mail me, and I'll help you find it.
|
||||
|
||||
If you have any code changes, requests, problems, etc., please e-mail
|
||||
them to me. Also, I'd appreciate any make files or project files,
|
||||
@ -105,7 +104,7 @@ based in a large way on Guy's and Andreas' earlier work), and the PNG
|
||||
development group.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at
|
||||
lists.sourceforge.net (subscription required; visit
|
||||
lists.sourceforge.net (subscription required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||
to subscribe) or to glennrp at users.sourceforge.net
|
||||
|
||||
@ -123,7 +122,7 @@ and ...". If in doubt, send questions to me. I'll bounce them
|
||||
to others, if necessary.
|
||||
|
||||
Please do not send suggestions on how to change PNG. We have
|
||||
been discussing PNG for sixteen years now, and it is official and
|
||||
been discussing PNG for eighteen years now, and it is official and
|
||||
finished. If you have suggestions for libpng, however, I'll
|
||||
gladly listen. Even if your suggestion is not used immediately,
|
||||
it may be used later.
|
||||
@ -167,23 +166,23 @@ Files in this distribution:
|
||||
pngwrite.c => High-level write functions
|
||||
pngwtran.c => Write data transformations
|
||||
pngwutil.c => Write utility functions
|
||||
arm => Contains optimized code for the ARM platform
|
||||
contrib => Contributions
|
||||
gregbook => source code for PNG reading and writing, from
|
||||
Greg Roelofs' "PNG: The Definitive Guide",
|
||||
O'Reilly, 1999
|
||||
msvctest => Builds and runs pngtest using a MSVC workspace
|
||||
pngminus => Simple pnm2png and png2pnm programs
|
||||
pngsuite => Test images
|
||||
visupng => Contains a MSVC workspace for VisualPng
|
||||
libtests => Contains the pngvalid.c test program
|
||||
pngminim => Minimal decoder, encoder, and progressive decoder
|
||||
programs demonstrating use of pngusr.dfa
|
||||
pngminus => Simple pnm2png and png2pnm programs
|
||||
pngsuite => Test images
|
||||
visupng => Contains a MSVC workspace for VisualPng
|
||||
projects => Contains project files and workspaces for
|
||||
building a DLL
|
||||
cbuilder5 => Contains a Borland workspace for building
|
||||
libpng and zlib
|
||||
visualc6 => Contains a Microsoft Visual C++ (MSVC)
|
||||
workspace for building libpng and zlib
|
||||
owatcom => Contains a WATCOM project for building libpng
|
||||
visualc71 => Contains a Microsoft Visual C++ (MSVC)
|
||||
workspace for building libpng and zlib
|
||||
xcode => Contains an Apple xcode
|
||||
vstudio => Contains a Microsoft Visual C++ (MSVC)
|
||||
workspace for building libpng and zlib
|
||||
scripts => Directory containing scripts for building libpng:
|
||||
(see scripts/README.txt for the list of scripts)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2013 Glenn Randers-Pehrson
|
||||
* Written by Mans Rullgard, 2011.
|
||||
* Last changed in libpng 1.5.16 [May 23, 2013]
|
||||
* Last changed in libpng 1.5.17 [June 27, 2013]
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
@ -16,7 +16,7 @@
|
||||
|
||||
#include "../pngpriv.h"
|
||||
|
||||
#ifdef PNG_ARM_NEON_SUPPORTED
|
||||
#if PNG_ARM_NEON_OPT > 0
|
||||
#ifdef PNG_ARM_NEON_CHECK_SUPPORTED /* Do run-time checks */
|
||||
#include <signal.h> /* for sig_atomic_t */
|
||||
|
||||
@ -216,4 +216,4 @@ png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
|
||||
png_read_filter_row_paeth4_neon;
|
||||
}
|
||||
}
|
||||
#endif /* PNG_ARM_NEON_SUPPORTED */
|
||||
#endif /* PNG_ARM_NEON_OPT > 0 */
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2013 Glenn Randers-Pehrson
|
||||
* Written by Mans Rullgard, 2011.
|
||||
* Last changed in libpng 1.5.16 [May 23, 2013]
|
||||
* Last changed in libpng 1.5.17 [June 27, 2013]
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
/* This is required to get the symbol renames, which are #defines, and also
|
||||
* includes the definition (or not) of PNG_ARM_NEON_SUPPORTED.
|
||||
* includes the definition (or not) of PNG_ARM_NEON_OPT.
|
||||
*/
|
||||
#define PNG_VERSION_INFO_ONLY
|
||||
#include "../pngpriv.h"
|
||||
@ -20,7 +20,7 @@
|
||||
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
|
||||
#endif
|
||||
|
||||
#ifdef PNG_ARM_NEON_SUPPORTED
|
||||
#if PNG_ARM_NEON_OPT > 0
|
||||
|
||||
#ifdef __ELF__
|
||||
# define ELF
|
||||
@ -232,4 +232,4 @@ func png_read_filter_row_paeth3_neon, export=1
|
||||
|
||||
pop {r4,pc}
|
||||
endfunc
|
||||
#endif /* PNG_ARM_NEON_SUPPORTED */
|
||||
#endif /* PNG_ARM_NEON_OPT > 0 */
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "pngpriv.h"
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef png_libpng_version_1_5_16 Your_png_h_is_not_version_1_5_16;
|
||||
typedef png_libpng_version_1_5_17 Your_png_h_is_not_version_1_5_17;
|
||||
|
||||
/* 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
|
||||
@ -658,13 +658,13 @@ png_get_copyright(png_const_structp png_ptr)
|
||||
#else
|
||||
# ifdef __STDC__
|
||||
return PNG_STRING_NEWLINE \
|
||||
"libpng version 1.5.16 - May 23, 2013" PNG_STRING_NEWLINE \
|
||||
"libpng version 1.5.17 - June 27, 2013" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1998-2013 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||
PNG_STRING_NEWLINE;
|
||||
# else
|
||||
return "libpng version 1.5.16 - May 23, 2013\
|
||||
return "libpng version 1.5.17 - June 27, 2013\
|
||||
Copyright (c) 1998-2013 Glenn Randers-Pehrson\
|
||||
Copyright (c) 1996-1997 Andreas Dilger\
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.5.16 - May 23, 2013
|
||||
* libpng version 1.5.17 - June 27, 2013
|
||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
@ -11,7 +11,7 @@
|
||||
* Authors and maintainers:
|
||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
||||
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||
* libpng versions 0.97, January 1998, through 1.5.16 - May 23, 2013: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.5.17 - June 27, 2013: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@ -190,6 +190,9 @@
|
||||
* 1.5.16beta01-06 15 10516 15.so.15.16[.0]
|
||||
* 1.5.16rc01 15 10516 15.so.15.16[.0]
|
||||
* 1.5.16 15 10516 15.so.15.16[.0]
|
||||
* 1.5.17beta01 15 10517 15.so.15.17[.0]
|
||||
* 1.5.17rc01-03 15 10517 15.so.15.17[.0]
|
||||
* 1.5.17 15 10517 15.so.15.17[.0]
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major
|
||||
* and minor numbers; the shared-library major version number will be
|
||||
@ -221,7 +224,7 @@
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
*
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.5.16, May 23, 2013, are
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.5.17, June 27, 2013, are
|
||||
* Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
|
||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
* with the following individual added to the list of Contributing Authors:
|
||||
@ -333,13 +336,13 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* May 23, 2013
|
||||
* June 27, 2013
|
||||
*
|
||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||
* an official declaration.
|
||||
*
|
||||
* This is your unofficial assurance that libpng from version 0.71 and
|
||||
* upward through 1.5.16 are Y2K compliant. It is my belief that
|
||||
* upward through 1.5.17 are Y2K compliant. It is my belief that
|
||||
* earlier versions were also Y2K compliant.
|
||||
*
|
||||
* Libpng only has two year fields. One is a 2-byte unsigned integer
|
||||
@ -398,9 +401,9 @@
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.5.16"
|
||||
#define PNG_LIBPNG_VER_STRING "1.5.17"
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.5.16 - May 23, 2013\n"
|
||||
" libpng version 1.5.17 - June 27, 2013\n"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 15
|
||||
#define PNG_LIBPNG_VER_DLLNUM 15
|
||||
@ -408,7 +411,7 @@
|
||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||
#define PNG_LIBPNG_VER_MAJOR 1
|
||||
#define PNG_LIBPNG_VER_MINOR 5
|
||||
#define PNG_LIBPNG_VER_RELEASE 16
|
||||
#define PNG_LIBPNG_VER_RELEASE 17
|
||||
|
||||
/* This should match the numeric part of the final component of
|
||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
|
||||
@ -439,7 +442,7 @@
|
||||
* 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
|
||||
*/
|
||||
#define PNG_LIBPNG_VER 10516 /* 1.5.16 */
|
||||
#define PNG_LIBPNG_VER 10517 /* 1.5.17 */
|
||||
|
||||
#ifndef MOZPNGCONF_H
|
||||
# include "mozpngconf.h"
|
||||
@ -552,10 +555,21 @@ extern "C" {
|
||||
* See pngconf.h for base types that vary by machine/system
|
||||
*/
|
||||
|
||||
#ifdef PNG_APNG_SUPPORTED
|
||||
/* dispose_op flags from inside fcTL */
|
||||
#define PNG_DISPOSE_OP_NONE 0x00
|
||||
#define PNG_DISPOSE_OP_BACKGROUND 0x01
|
||||
#define PNG_DISPOSE_OP_PREVIOUS 0x02
|
||||
|
||||
/* blend_op flags from inside fcTL */
|
||||
#define PNG_BLEND_OP_SOURCE 0x00
|
||||
#define PNG_BLEND_OP_OVER 0x01
|
||||
#endif /* PNG_APNG_SUPPORTED */
|
||||
|
||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||
* do not agree upon the version number.
|
||||
*/
|
||||
typedef char* png_libpng_version_1_5_16;
|
||||
typedef char* png_libpng_version_1_5_17;
|
||||
|
||||
/* 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
|
||||
@ -2667,16 +2681,46 @@ PNG_EXPORT(235, int, png_get_palette_max, (png_const_structp png_ptr,
|
||||
# endif
|
||||
#endif /* CHECK_FOR_INVALID_INDEX */
|
||||
|
||||
#ifdef PNG_APNG_SUPPORTED
|
||||
/* dispose_op flags from inside fcTL */
|
||||
#define PNG_DISPOSE_OP_NONE 0x00
|
||||
#define PNG_DISPOSE_OP_BACKGROUND 0x01
|
||||
#define PNG_DISPOSE_OP_PREVIOUS 0x02
|
||||
/*******************************************************************************
|
||||
* IMPLEMENTATION OPTIONS
|
||||
*******************************************************************************
|
||||
*
|
||||
* Support for arbitrary implementation-specific optimizations. The API allows
|
||||
* particular options to be turned on or off. 'Option' is the number of the
|
||||
* option and 'onoff' is 0 (off) or non-0 (on). The value returned is given
|
||||
* by the PNG_OPTION_ defines below.
|
||||
*
|
||||
* HARDWARE: normally hardware capabilites, such as the Intel SSE instructions,
|
||||
* are detected at run time, however sometimes it may be impossible
|
||||
* to do this in user mode, in which case it is necessary to discover
|
||||
* the capabilities in an OS specific way. Such capabilities are
|
||||
* listed here when libpng has support for them and must be turned
|
||||
* ON by the application if present.
|
||||
*
|
||||
* SOFTWARE: sometimes software optimizations actually result in performance
|
||||
* decrease on some architectures or systems, or with some sets of
|
||||
* PNG images. 'Software' options allow such optimizations to be
|
||||
* selected at run time.
|
||||
*/
|
||||
#ifdef PNG_SET_OPTION_SUPPORTED
|
||||
#ifdef PNG_ARM_NEON_API_SUPPORTED
|
||||
# define PNG_ARM_NEON 0 /* HARDWARE: ARM Neon SIMD instructions supported */
|
||||
#endif
|
||||
#define PNG_OPTION_NEXT 2 /* Next option - numbers must be even */
|
||||
|
||||
/* blend_op flags from inside fcTL */
|
||||
#define PNG_BLEND_OP_SOURCE 0x00
|
||||
#define PNG_BLEND_OP_OVER 0x01
|
||||
#endif /* PNG_APNG_SUPPORTED */
|
||||
/* Return values: NOTE: there are four values and 'off' is *not* zero */
|
||||
#define PNG_OPTION_UNSET 0 /* Unset - defaults to off */
|
||||
#define PNG_OPTION_INVALID 1 /* Option number out of range */
|
||||
#define PNG_OPTION_OFF 2
|
||||
#define PNG_OPTION_ON 3
|
||||
|
||||
PNG_EXPORT(236, int, png_set_option, (png_structp png_ptr, int option,
|
||||
int onoff));
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
* END OF HARDWARE OPTIONS
|
||||
******************************************************************************/
|
||||
|
||||
#ifdef PNG_APNG_SUPPORTED
|
||||
PNG_EXPORT(237, png_uint_32, png_get_acTL, (png_structp png_ptr,
|
||||
@ -2747,47 +2791,6 @@ PNG_EXPORT(256, void, png_write_frame_tail, (png_structp png_ptr,
|
||||
#endif /* PNG_WRITE_APNG_SUPPORTED */
|
||||
#endif /* PNG_APNG_SUPPORTED */
|
||||
|
||||
/*******************************************************************************
|
||||
* IMPLEMENTATION OPTIONS
|
||||
*******************************************************************************
|
||||
*
|
||||
* Support for arbitrary implementation-specific optimizations. The API allows
|
||||
* particular options to be turned on or off. 'Option' is the number of the
|
||||
* option and 'onoff' is 0 (off) or non-0 (on). The value returned is given
|
||||
* by the PNG_OPTION_ defines below.
|
||||
*
|
||||
* HARDWARE: normally hardware capabilites, such as the Intel SSE instructions,
|
||||
* are detected at run time, however sometimes it may be impossible
|
||||
* to do this in user mode, in which case it is necessary to discover
|
||||
* the capabilities in an OS specific way. Such capabilities are
|
||||
* listed here when libpng has support for them and must be turned
|
||||
* ON by the application if present.
|
||||
*
|
||||
* SOFTWARE: sometimes software optimizations actually result in performance
|
||||
* decrease on some architectures or systems, or with some sets of
|
||||
* PNG images. 'Software' options allow such optimizations to be
|
||||
* selected at run time.
|
||||
*/
|
||||
#ifdef PNG_SET_OPTION_SUPPORTED
|
||||
#ifdef PNG_ARM_NEON_API_SUPPORTED
|
||||
# define PNG_ARM_NEON 0 /* HARDWARE: ARM Neon SIMD instructions supported */
|
||||
#endif
|
||||
#define PNG_OPTION_NEXT 2 /* Next option - numbers must be even */
|
||||
|
||||
/* Return values: NOTE: there are four values and 'off' is *not* zero */
|
||||
#define PNG_OPTION_UNSET 0 /* Unset - defaults to off */
|
||||
#define PNG_OPTION_INVALID 1 /* Option number out of range */
|
||||
#define PNG_OPTION_OFF 2
|
||||
#define PNG_OPTION_ON 3
|
||||
|
||||
PNG_EXPORT(236, int, png_set_option, (png_structp png_ptr, int option,
|
||||
int onoff));
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
* END OF HARDWARE OPTIONS
|
||||
******************************************************************************/
|
||||
|
||||
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
|
||||
* defs
|
||||
*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng version 1.5.16 - May 23, 2013
|
||||
* libpng version 1.5.17 - June 27, 2013
|
||||
*
|
||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
|
@ -1302,4 +1302,5 @@ png_get_first_frame_is_hidden(png_structp png_ptr, png_infop info_ptr)
|
||||
return 0;
|
||||
}
|
||||
#endif /* PNG_APNG_SUPPORTED */
|
||||
|
||||
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
|
||||
|
@ -657,7 +657,6 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_APNG_SUPPORTED
|
||||
else if (chunk_name == png_acTL)
|
||||
{
|
||||
|
@ -6,7 +6,7 @@
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
* Last changed in libpng 1.5.15 [March 28, 2013]
|
||||
* Last changed in libpng 1.5.17 [June 27, 2013]
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
@ -62,6 +62,46 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Compile time options.
|
||||
* =====================
|
||||
* In a multi-arch build the compiler may compile the code several times for the
|
||||
* same object module, producing different binaries for different architectures.
|
||||
* When this happens configure-time setting of the target host options cannot be
|
||||
* done and this interferes with the handling of the ARM NEON optimizations, and
|
||||
* possibly other similar optimizations. Put additional tests here; in general
|
||||
* this is needed when the same option can be changed at both compile time and
|
||||
* run time depending on the target OS (i.e. iOS vs Android.)
|
||||
*
|
||||
* NOTE: symbol prefixing does not pass $(CFLAGS) to the preprocessor, because
|
||||
* this is not possible with certain compilers (Oracle SUN OS CC), as a result
|
||||
* it is necessary to ensure that all extern functions that *might* be used
|
||||
* regardless of $(CFLAGS) get declared in this file. The test on __ARM_NEON__
|
||||
* below is one example of this behavior because it is controlled by the
|
||||
* presence or not of -mfpu=neon on the GCC command line, it is possible to do
|
||||
* this in $(CC), e.g. "CC=gcc -mfpu=neon", but people who build libpng rarely
|
||||
* do this.
|
||||
*/
|
||||
#ifndef PNG_ARM_NEON_OPT
|
||||
/* ARM NEON optimizations are being controlled by the compiler settings,
|
||||
* typically the target FPU. If the FPU has been set to NEON (-mfpu=neon
|
||||
* with GCC) then the compiler will define __ARM_NEON__ and we can rely
|
||||
* unconditionally on NEON instructions not crashing, otherwise we must
|
||||
* disable use of NEON instructions:
|
||||
*/
|
||||
# ifdef __ARM_NEON__
|
||||
# define PNG_ARM_NEON_OPT 2
|
||||
# else
|
||||
# define PNG_ARM_NEON_OPT 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if PNG_ARM_NEON_OPT > 0
|
||||
/* NEON optimizations are to be at least considered by libpng, so enable the
|
||||
* callbacks to do this.
|
||||
*/
|
||||
# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_neon
|
||||
#endif
|
||||
|
||||
/* Is this a build of a DLL where compilation of the object modules requires
|
||||
* different preprocessor settings to those required for a simple library? If
|
||||
* so PNG_BUILD_DLL must be set.
|
||||
@ -1781,13 +1821,21 @@ PNG_EXTERN void png_set_rgb_to_gray_fixed PNGARG((png_structp png_ptr,
|
||||
#endif
|
||||
#endif /* FIX MISSING !FIXED_POINT DECLARATIONS */
|
||||
|
||||
/* These are initialization functions for hardware specific PNG filter
|
||||
* optimizations; list these here then select the appropriate one at compile
|
||||
* time using the macro PNG_FILTER_OPTIMIZATIONS. If the macro is not defined
|
||||
* the generic code is used.
|
||||
*/
|
||||
#ifdef PNG_FILTER_OPTIMIZATIONS
|
||||
PNG_EXTERN void PNG_FILTER_OPTIMIZATIONS(png_structp png_ptr, unsigned int bpp);
|
||||
/* This is the initialization function for hardware specific optimizations,
|
||||
* one implementation (for ARM NEON machines) is contained in
|
||||
* arm/filter_neon.c. It need not be defined - the generic code will be used
|
||||
* if not.
|
||||
/* Just declare the optimization that will be used */
|
||||
#else
|
||||
/* List *all* the possible optimizations here - this branch is required if
|
||||
* the builder of libpng passes the definition of PNG_FILTER_OPTIMIZATIONS in
|
||||
* CFLAGS in place of CPPFLAGS *and* uses symbol prefixing.
|
||||
*/
|
||||
PNG_EXTERN void png_init_filter_functions_neon(png_structp png_ptr,
|
||||
unsigned int bpp);
|
||||
#endif
|
||||
|
||||
/* Maintainer: Put new private prototypes here ^ */
|
||||
|
@ -369,6 +369,7 @@ png_read_frame_head(png_structp png_ptr, png_infop info_ptr)
|
||||
png_crc_finish(png_ptr, 0); /* CRC from last IDAT or fdAT chunk */
|
||||
|
||||
png_read_reset(png_ptr);
|
||||
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
|
||||
png_ptr->mode &= ~PNG_HAVE_fcTL;
|
||||
|
||||
have_chunk_after_DAT = 0;
|
||||
|
@ -4302,7 +4302,6 @@ png_read_reset(png_structp png_ptr)
|
||||
png_ptr->mode &= ~PNG_AFTER_IDAT;
|
||||
png_ptr->row_number = 0;
|
||||
png_ptr->pass = 0;
|
||||
png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
|
||||
}
|
||||
|
||||
void /* PRIVATE */
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngset.c - storage of image information into info struct
|
||||
*
|
||||
* Last changed in libpng 1.5.14 [January 24, 2013]
|
||||
* Last changed in libpng 1.5.17 [June 27, 2013]
|
||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
@ -252,16 +252,7 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
|
||||
|
||||
info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth);
|
||||
|
||||
/* Check for potential overflow */
|
||||
if (width >
|
||||
(PNG_UINT_32_MAX >> 3) /* 8-byte RRGGBBAA pixels */
|
||||
- 48 /* bigrowbuf hack */
|
||||
- 1 /* filter byte */
|
||||
- 7*8 /* rounding of width to multiple of 8 pixels */
|
||||
- 8) /* extra max_pixel_depth pad */
|
||||
info_ptr->rowbytes = 0;
|
||||
else
|
||||
info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
|
||||
info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
|
||||
|
||||
#ifdef PNG_APNG_SUPPORTED
|
||||
/* for non-animated png. this may be overwritten from an acTL chunk later */
|
||||
@ -1158,8 +1149,8 @@ png_ensure_fcTL_is_valid(png_structp png_ptr,
|
||||
png_error(png_ptr, "invalid y_offset in fcTL (> 2^31-1)");
|
||||
if (width + x_offset > png_ptr->first_frame_width ||
|
||||
height + y_offset > png_ptr->first_frame_height)
|
||||
png_error(png_ptr, "dimensions of a frame in fcTL are greater than"
|
||||
"those in IHDR");
|
||||
png_error(png_ptr, "dimensions of a frame are greater than"
|
||||
"the ones in IHDR");
|
||||
|
||||
if (dispose_op != PNG_DISPOSE_OP_NONE &&
|
||||
dispose_op != PNG_DISPOSE_OP_BACKGROUND &&
|
||||
|
@ -314,7 +314,6 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
|
||||
png_benign_error(png_ptr, "Wrote palette index exceeding num_palette");
|
||||
#endif
|
||||
|
||||
/* See if user wants us to write information chunks */
|
||||
#ifdef PNG_WRITE_APNG_SUPPORTED
|
||||
if (png_ptr->num_frames_written != png_ptr->num_frames_to_write)
|
||||
png_error(png_ptr, "Not enough frames written");
|
||||
|
@ -1046,7 +1046,7 @@ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
{
|
||||
png_byte buf[4];
|
||||
|
||||
png_write_chunk_header(png_ptr, png_fdAT, 4 + length);
|
||||
png_write_chunk_header(png_ptr, png_fdAT, (png_uint_32)(4 + length));
|
||||
|
||||
png_save_uint_32(buf, png_ptr->next_seq_num);
|
||||
png_write_chunk_data(png_ptr, buf, 4);
|
||||
|
Loading…
Reference in New Issue
Block a user