Author: tfaber Date: Sun Jun 18 12:19:52 2017 New Revision: 75089
URL: http://svn.reactos.org/svn/reactos?rev=75089&view=rev Log: [LIBPNG] - Update to version 1.6.29 CORE-13451
Modified: trunk/reactos/dll/3rdparty/libpng/docs/ANNOUNCE trunk/reactos/dll/3rdparty/libpng/docs/CHANGES trunk/reactos/dll/3rdparty/libpng/docs/LICENSE trunk/reactos/dll/3rdparty/libpng/docs/README trunk/reactos/dll/3rdparty/libpng/docs/TODO trunk/reactos/dll/3rdparty/libpng/docs/libpng-manual.txt trunk/reactos/dll/3rdparty/libpng/png.c trunk/reactos/dll/3rdparty/libpng/pngpriv.h trunk/reactos/dll/3rdparty/libpng/pngrtran.c trunk/reactos/dll/3rdparty/libpng/pngrutil.c trunk/reactos/dll/3rdparty/libpng/pngwutil.c trunk/reactos/sdk/include/reactos/libs/libpng/png.h trunk/reactos/sdk/include/reactos/libs/libpng/pngconf.h trunk/reactos/sdk/include/reactos/libs/libpng/pnglibconf.h
Modified: trunk/reactos/dll/3rdparty/libpng/docs/ANNOUNCE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/docs/AN... ============================================================================== --- trunk/reactos/dll/3rdparty/libpng/docs/ANNOUNCE [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/libpng/docs/ANNOUNCE [iso-8859-1] Sun Jun 18 12:19:52 2017 @@ -1,4 +1,4 @@ -Libpng 1.6.28 - January 5, 2017 +Libpng 1.6.29 - March 16, 2017
This is a public release of libpng, intended for use in production codes.
@@ -7,28 +7,37 @@ Source files with LF line endings (for Unix/Linux) and with a "configure" script
- libpng-1.6.28.tar.xz (LZMA-compressed, recommended) - libpng-1.6.28.tar.gz + libpng-1.6.29.tar.xz (LZMA-compressed, recommended) + libpng-1.6.29.tar.gz
Source files with CRLF line endings (for Windows), without the "configure" script
- lpng1628.7z (LZMA-compressed, recommended) - lpng1628.zip + lpng1629.7z (LZMA-compressed, recommended) + lpng1629.zip
Other information:
- libpng-1.6.28-README.txt - libpng-1.6.28-LICENSE.txt - libpng-1.6.28-*.asc (armored detached GPG signatures) + libpng-1.6.29-README.txt + libpng-1.6.29-LICENSE.txt + libpng-1.6.29-*.asc (armored detached GPG signatures)
-Changes since the last public release (1.6.27): - Fixed arm/aarch64 detection in CMakeLists.txt (Gianfranco Costamagna). - Added option to Cmake build allowing a custom location of zlib to be - specified in a scenario where libpng is being built as a subproject - alongside zlib by another project (Sam Serrels). - Changed png_ptr->options from a png_byte to png_uint_32, to accomodate - up to 16 options. +Changes since the last public release (1.6.28): + + Readded "include(GNUInstallDirs)" to CMakeLists.txt (Gianfranco Costamagna). + Moved SSE2 optimization code into the main libpng source directory. + Configure libpng with "configure --enable-intel-sse" or compile + libpng with "-DPNG_INTEL_SSE" in CPPFLAGS to enable it. + Simplified conditional compilation in pngvalid.c, for AIX (Michael Felt). + Avoid conditional directives that break statements in pngrutil.c (Romero + Malaquias) + The contrib/examples/pngtopng.c recovery code was in the wrong "if" + branches; the comments were correct. + Added code for PowerPC VSX optimisation (Vadim Barkov). + Avoid potential overflow of shift operations in png_do_expand() (Aaron Boxer). + Change test ZLIB_VERNUM >= 0x1281 to ZLIB_VERNUM >= 0x1290 in pngrutil.c + because Solaris 11 distributes zlib-1.2.8.f that is older than 1.2.8.1. + Suppress clang warnings about implicit sign changes in png.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit
Modified: trunk/reactos/dll/3rdparty/libpng/docs/CHANGES URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/docs/CH... ============================================================================== --- trunk/reactos/dll/3rdparty/libpng/docs/CHANGES [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/libpng/docs/CHANGES [iso-8859-1] Sun Jun 18 12:19:52 2017 @@ -5794,6 +5794,29 @@ Version 1.6.28 [January 5, 2017] No changes.
+Version 1.6.29beta01 [January 12, 2017] + Readded "include(GNUInstallDirs)" to CMakeLists.txt (Gianfranco Costamagna). + Moved SSE2 optimization code into the main libpng source directory. + Configure libpng with "configure --enable-intel-sse" or compile + libpng with "-DPNG_INTEL_SSE" in CPPFLAGS to enable it. + Simplified conditional compilation in pngvalid.c, for AIX (Michael Felt). + +Version 1.6.29beta02 [February 22, 2017] + Avoid conditional directives that break statements in pngrutil.c (Romero + Malaquias) + The contrib/examples/pngtopng.c recovery code was in the wrong "if" + branches; the comments were correct. + Added code for PowerPC VSX optimisation (Vadim Barkov). + +Version 1.6.29beta03 [March 1, 2017] + Avoid potential overflow of shift operations in png_do_expand() (Aaron Boxer). + Change test ZLIB_VERNUM >= 0x1281 to ZLIB_VERNUM >= 0x1290 in pngrutil.c + because Solaris 11 distributes zlib-1.2.8.f that is older than 1.2.8.1. + Suppress clang warnings about implicit sign changes in png.c + +Version 1.6.29 [March 16, 2017] + No changes. + Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement
Modified: trunk/reactos/dll/3rdparty/libpng/docs/LICENSE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/docs/LI... ============================================================================== --- trunk/reactos/dll/3rdparty/libpng/docs/LICENSE [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/libpng/docs/LICENSE [iso-8859-1] Sun Jun 18 12:19:52 2017 @@ -10,7 +10,7 @@
This code is released under the libpng license.
-libpng versions 1.0.7, July 1, 2000 through 1.6.28, January 5, 2017 are +libpng versions 1.0.7, July 1, 2000 through 1.6.29, March 16, 2017 are Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are derived from libpng-1.0.6, and are distributed according to the same disclaimer and license as libpng-1.0.6 with the following individuals @@ -23,6 +23,8 @@ Gilles Vollant James Yu Mandar Sahastrabuddhe + Google Inc. + Vadim Barkov
and with the following additions to the disclaimer:
@@ -128,4 +130,4 @@
Glenn Randers-Pehrson glennrp at users.sourceforge.net -January 5, 2017 +March 16, 2017
Modified: trunk/reactos/dll/3rdparty/libpng/docs/README URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/docs/RE... ============================================================================== --- trunk/reactos/dll/3rdparty/libpng/docs/README [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/libpng/docs/README [iso-8859-1] Sun Jun 18 12:19:52 2017 @@ -1,4 +1,4 @@ -README for libpng version 1.6.28 - January 5, 2017 (shared library 16.0) +README for libpng version 1.6.29 - March 16, 2017 (shared library 16.0) See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng. @@ -179,14 +179,16 @@ pngwtran.c => Write data transformations pngwutil.c => Write utility functions arm => Contains optimized code for the ARM platform + powerpc => Contains optimized code for the PowerPC platform contrib => Contributions arm-neon => Optimized code for ARM-NEON platform + powerpc-vsx => Optimized code for POWERPC-VSX platform examples => Example programs gregbook => source code for PNG reading and writing, from Greg Roelofs' "PNG: The Definitive Guide", O'Reilly, 1999 - intel => Optimized code for INTEL-SSE2 platform libtests => Test programs + mips-msa => Optimized code for MIPS-MSA platform pngminim => Minimal decoder, encoder, and progressive decoder programs demonstrating use of pngusr.dfa pngminus => Simple pnm2png and png2pnm programs @@ -194,6 +196,8 @@ testpngs tools => Various tools visupng => Contains a MSVC workspace for VisualPng + intel => Optimized code for INTEL-SSE2 platform + mips => Optimized code for MIPS platform projects => Contains project files and workspaces for building a DLL owatcom => Contains a WATCOM project for building libpng
Modified: trunk/reactos/dll/3rdparty/libpng/docs/TODO URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/docs/TO... ============================================================================== --- trunk/reactos/dll/3rdparty/libpng/docs/TODO [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/libpng/docs/TODO [iso-8859-1] Sun Jun 18 12:19:52 2017 @@ -25,5 +25,6 @@ Investigate pre-incremented loop counters and other loop constructions. Add interpolated method of handling interlacing. Extend pngvalid.c to validate more of the libpng transformations. +Refactor preprocessor conditionals to compile entire statements
*/
Modified: trunk/reactos/dll/3rdparty/libpng/docs/libpng-manual.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/docs/li... ============================================================================== --- trunk/reactos/dll/3rdparty/libpng/docs/libpng-manual.txt [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/libpng/docs/libpng-manual.txt [iso-8859-1] Sun Jun 18 12:19:52 2017 @@ -1,6 +1,6 @@ libpng-manual.txt - A description on how to use and modify libpng
- libpng version 1.6.28 - January 5, 2017 + libpng version 1.6.29 - March 16, 2017 Updated and distributed by Glenn Randers-Pehrson <glennrp at users.sourceforge.net> Copyright (c) 1998-2016 Glenn Randers-Pehrson @@ -11,7 +11,7 @@
Based on:
- libpng versions 0.97, January 1998, through 1.6.28 - January 5, 2017 + libpng versions 0.97, January 1998, through 1.6.29 - March 16, 2017 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2016 Glenn Randers-Pehrson
@@ -5355,7 +5355,7 @@ an official declaration.
This is your unofficial assurance that libpng from version 0.71 and -upward through 1.6.28 are Y2K compliant. It is my belief that earlier +upward through 1.6.29 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
Modified: trunk/reactos/dll/3rdparty/libpng/png.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/png.c?r... ============================================================================== --- trunk/reactos/dll/3rdparty/libpng/png.c [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/libpng/png.c [iso-8859-1] Sun Jun 18 12:19:52 2017 @@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.6.28 [January 5, 2017] + * Last changed in libpng 1.6.29 [March 16, 2017] * Copyright (c) 1998-2002,2004,2006-2017 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.) @@ -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_6_28 Your_png_h_is_not_version_1_6_28; +typedef png_libpng_version_1_6_29 Your_png_h_is_not_version_1_6_29;
/* 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 @@ -776,14 +776,14 @@ #else # ifdef __STDC__ return PNG_STRING_NEWLINE \ - "libpng version 1.6.28 - January 5, 2017" PNG_STRING_NEWLINE \ + "libpng version 1.6.29 - March 16, 2017" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2002,2004,2006-2017 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.6.28 - January 5, 2017\ + return "libpng version 1.6.29 - March 16, 2017\ Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."; @@ -4260,13 +4260,13 @@ if (png_ptr != NULL && option >= 0 && option < PNG_OPTION_NEXT && (option & 1) == 0) { - png_uint_32 mask = 3 << option; - png_uint_32 setting = (2 + (onoff != 0)) << option; + png_uint_32 mask = 3U << option; + png_uint_32 setting = (2U + (onoff != 0)) << option; png_uint_32 current = png_ptr->options;
png_ptr->options = (png_uint_32)(((current & ~mask) | setting) & 0xff);
- return (current & mask) >> option; + return (int)(current & mask) >> option; }
return PNG_OPTION_INVALID;
Modified: trunk/reactos/dll/3rdparty/libpng/pngpriv.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/pngpriv... ============================================================================== --- trunk/reactos/dll/3rdparty/libpng/pngpriv.h [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/libpng/pngpriv.h [iso-8859-1] Sun Jun 18 12:19:52 2017 @@ -1,8 +1,8 @@
/* pngpriv.h - private declarations for use inside libpng * - * Last changed in libpng 1.6.26 [October 20, 2016] - * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson + * Last changed in libpng 1.6.29 [March 16, 2017] + * Copyright (c) 1998-2002,2004,2006-2017 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.) * @@ -190,6 +190,50 @@ # endif #endif
+#ifndef PNG_POWERPC_VSX_OPT +# if defined(__PPC64__) && defined(__ALTIVEC__) && defined(__VSX__) +# define PNG_POWERPC_VSX_OPT 2 +# else +# define PNG_POWERPC_VSX_OPT 0 +# endif +#endif + +#ifndef PNG_INTEL_SSE_OPT +# ifdef PNG_INTEL_SSE + /* Only check for SSE if the build configuration has been modified to + * enable SSE optimizations. This means that these optimizations will + * be off by default. See contrib/intel for more details. + */ +# if defined(__SSE4_1__) || defined(__AVX__) || defined(__SSSE3__) || \ + defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \ + (defined(_M_IX86_FP) && _M_IX86_FP >= 2) +# define PNG_INTEL_SSE_OPT 1 +# endif +# endif +#endif + +#if PNG_INTEL_SSE_OPT > 0 +# ifndef PNG_INTEL_SSE_IMPLEMENTATION +# if defined(__SSE4_1__) || defined(__AVX__) + /* We are not actually using AVX, but checking for AVX is the best + way we can detect SSE4.1 and SSSE3 on MSVC. + */ +# define PNG_INTEL_SSE_IMPLEMENTATION 3 +# elif defined(__SSSE3__) +# define PNG_INTEL_SSE_IMPLEMENTATION 2 +# elif defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \ + (defined(_M_IX86_FP) && _M_IX86_FP >= 2) +# define PNG_INTEL_SSE_IMPLEMENTATION 1 +# else +# define PNG_INTEL_SSE_IMPLEMENTATION 0 +# endif +# endif + +# if PNG_INTEL_SSE_IMPLEMENTATION > 0 +# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_sse2 +# endif +#endif + #if PNG_MIPS_MSA_OPT > 0 # define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_msa # ifndef PNG_MIPS_MSA_IMPLEMENTATION @@ -209,6 +253,11 @@ # define PNG_MIPS_MSA_IMPLEMENTATION 1 # endif #endif /* PNG_MIPS_MSA_OPT > 0 */ + +#if PNG_POWERPC_VSX_OPT > 0 +# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_vsx +# define PNG_POWERPC_VSX_IMPLEMENTATION 1 +#endif
/* Is this a build of a DLL where compilation of the object modules requires @@ -1256,6 +1305,38 @@ row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); #endif
+#if PNG_POWERPC_VSX_OPT > 0 +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_vsx,(png_row_infop row_info, + png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_vsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_vsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_vsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_vsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_vsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_vsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +#endif + +#if PNG_INTEL_SSE_IMPLEMENTATION > 0 +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_sse2,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_sse2,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_sse2,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_sse2,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_sse2,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_sse2,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +#endif + /* Choose the best filter to use and filter the row data */ PNG_INTERNAL_FUNCTION(void,png_write_find_filter,(png_structrp png_ptr, png_row_infop row_info),PNG_EMPTY); @@ -1991,6 +2072,11 @@ PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_msa, (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); #endif + +# if PNG_INTEL_SSE_IMPLEMENTATION > 0 +PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_sse2, + (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); +# endif #endif
PNG_INTERNAL_FUNCTION(png_uint_32, png_check_keyword, (png_structrp png_ptr,
Modified: trunk/reactos/dll/3rdparty/libpng/pngrtran.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/pngrtra... ============================================================================== --- trunk/reactos/dll/3rdparty/libpng/pngrtran.c [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/libpng/pngrtran.c [iso-8859-1] Sun Jun 18 12:19:52 2017 @@ -1,8 +1,8 @@
/* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.6.24 [August 4, 2016] - * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson + * Last changed in libpng 1.6.29 [March 16, 2017] + * Copyright (c) 1998-2002,2004,2006-2017 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.) * @@ -4302,7 +4302,7 @@ if (num_trans > 0) { sp = row + (png_size_t)row_width - 1; - dp = row + (png_size_t)(row_width << 2) - 1; + dp = row + ((png_size_t)row_width << 2) - 1;
for (i = 0; i < row_width; i++) { @@ -4463,7 +4463,7 @@ { gray = gray & 0xff; sp = row + (png_size_t)row_width - 1; - dp = row + (png_size_t)(row_width << 1) - 1; + dp = row + ((png_size_t)row_width << 1) - 1;
for (i = 0; i < row_width; i++) { @@ -4519,7 +4519,7 @@ png_byte green = (png_byte)(trans_color->green & 0xff); png_byte blue = (png_byte)(trans_color->blue & 0xff); sp = row + (png_size_t)row_info->rowbytes - 1; - dp = row + (png_size_t)(row_width << 2) - 1; + dp = row + ((png_size_t)row_width << 2) - 1; for (i = 0; i < row_width; i++) { if (*(sp - 2) == red && *(sp - 1) == green && *(sp) == blue) @@ -4542,7 +4542,7 @@ png_byte green_low = (png_byte)(trans_color->green & 0xff); png_byte blue_low = (png_byte)(trans_color->blue & 0xff); sp = row + row_info->rowbytes - 1; - dp = row + (png_size_t)(row_width << 3) - 1; + dp = row + ((png_size_t)row_width << 3) - 1; for (i = 0; i < row_width; i++) { if (*(sp - 5) == red_high &&
Modified: trunk/reactos/dll/3rdparty/libpng/pngrutil.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/pngruti... ============================================================================== --- trunk/reactos/dll/3rdparty/libpng/pngrutil.c [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/libpng/pngrutil.c [iso-8859-1] Sun Jun 18 12:19:52 2017 @@ -1,8 +1,8 @@
/* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.6.27 [January 5, 2017] - * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson + * Last changed in libpng 1.6.29 [March 16, 2017] + * Copyright (c) 1998-2002,2004,2006-2017 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.) * @@ -418,7 +418,7 @@ png_ptr->flags |= PNG_FLAG_ZSTREAM_INITIALIZED; }
-#if ZLIB_VERNUM >= 0x1281 && \ +#if ZLIB_VERNUM >= 0x1290 && \ defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_IGNORE_ADLER32) if (((png_ptr->options >> PNG_IGNORE_ADLER32) & 3) == PNG_OPTION_ON) /* Turn off validation of the ADLER32 checksum in IDAT chunks */
Modified: trunk/reactos/dll/3rdparty/libpng/pngwutil.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/3rdparty/libpng/pngwuti... ============================================================================== --- trunk/reactos/dll/3rdparty/libpng/pngwutil.c [iso-8859-1] (original) +++ trunk/reactos/dll/3rdparty/libpng/pngwutil.c [iso-8859-1] Sun Jun 18 12:19:52 2017 @@ -675,6 +675,7 @@ int interlace_type) { png_byte buf[13]; /* Buffer to store the IHDR info */ + int is_invalid_depth;
png_debug(1, "in png_write_IHDR");
@@ -700,11 +701,11 @@ break;
case PNG_COLOR_TYPE_RGB: + is_invalid_depth = (bit_depth != 8); #ifdef PNG_WRITE_16BIT_SUPPORTED - if (bit_depth != 8 && bit_depth != 16) -#else - if (bit_depth != 8) -#endif + is_invalid_depth = (is_invalid_depth && bit_depth != 16); +#endif + if (is_invalid_depth) png_error(png_ptr, "Invalid bit depth for RGB image");
png_ptr->channels = 3; @@ -726,18 +727,22 @@ break;
case PNG_COLOR_TYPE_GRAY_ALPHA: - if (bit_depth != 8 && bit_depth != 16) + is_invalid_depth = (bit_depth != 8); +#ifdef PNG_WRITE_16BIT_SUPPORTED + is_invalid_depth = (is_invalid_depth && bit_depth != 16); +#endif + if (is_invalid_depth) png_error(png_ptr, "Invalid bit depth for grayscale+alpha image");
png_ptr->channels = 2; break;
case PNG_COLOR_TYPE_RGB_ALPHA: + is_invalid_depth = (bit_depth != 8); #ifdef PNG_WRITE_16BIT_SUPPORTED - if (bit_depth != 8 && bit_depth != 16) -#else - if (bit_depth != 8) -#endif + is_invalid_depth = (is_invalid_depth && bit_depth != 16); +#endif + if (is_invalid_depth) png_error(png_ptr, "Invalid bit depth for RGBA image");
png_ptr->channels = 4;
Modified: trunk/reactos/sdk/include/reactos/libs/libpng/png.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/libs/li... ============================================================================== --- trunk/reactos/sdk/include/reactos/libs/libpng/png.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/reactos/libs/libpng/png.h [iso-8859-1] Sun Jun 18 12:19:52 2017 @@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library * - * libpng version 1.6.28, January 5, 2017 + * libpng version 1.6.29, March 16, 2017 * * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -12,7 +12,7 @@ * Authors and maintainers: * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.6.28, January 5, 2017: + * libpng versions 0.97, January 1998, through 1.6.29, March 16, 2017: * Glenn Randers-Pehrson. * See also "Contributing Authors", below. */ @@ -25,7 +25,7 @@ * * This code is released under the libpng license. * - * libpng versions 1.0.7, July 1, 2000 through 1.6.28, January 5, 2017 are + * libpng versions 1.0.7, July 1, 2000 through 1.6.29, March 16, 2017 are * Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are * derived from libpng-1.0.6, and are distributed according to the same * disclaimer and license as libpng-1.0.6 with the following individuals @@ -38,6 +38,8 @@ * Gilles Vollant * James Yu * Mandar Sahastrabuddhe + * Google Inc. + * Vadim Barkov * * and with the following additions to the disclaimer: * @@ -211,7 +213,7 @@ * ... * 1.5.28 15 10527 15.so.15.28[.0] * ... - * 1.6.28 16 10628 16.so.16.28[.0] + * 1.6.29 16 10629 16.so.16.29[.0] * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be @@ -239,13 +241,13 @@ * Y2K compliance in libpng: * ========================= * - * January 5, 2017 + * March 16, 2017 * * 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.6.28 are Y2K compliant. It is my belief that + * upward through 1.6.29 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 @@ -307,8 +309,8 @@ */
/* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.6.28" -#define PNG_HEADER_VERSION_STRING " libpng version 1.6.28 - January 5, 2017\n" +#define PNG_LIBPNG_VER_STRING "1.6.29" +#define PNG_HEADER_VERSION_STRING " libpng version 1.6.29 - March 16, 2017\n"
#define PNG_LIBPNG_VER_SONUM 16 #define PNG_LIBPNG_VER_DLLNUM 16 @@ -316,7 +318,7 @@ /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ #define PNG_LIBPNG_VER_MAJOR 1 #define PNG_LIBPNG_VER_MINOR 6 -#define PNG_LIBPNG_VER_RELEASE 28 +#define PNG_LIBPNG_VER_RELEASE 29
/* This should match the numeric part of the final component of * PNG_LIBPNG_VER_STRING, omitting any leading zero: @@ -347,7 +349,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 10628 /* 1.6.28 */ +#define PNG_LIBPNG_VER 10629 /* 1.6.29 */
/* Library configuration: these options cannot be changed after * the library has been built. @@ -457,7 +459,7 @@ /* 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_6_28; +typedef char* png_libpng_version_1_6_29;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. * @@ -3224,7 +3226,10 @@ # define PNG_MIPS_MSA 6 /* HARDWARE: MIPS Msa SIMD instructions supported */ #endif #define PNG_IGNORE_ADLER32 8 -#define PNG_OPTION_NEXT 10 /* Next option - numbers must be even */ +#ifdef PNG_POWERPC_VSX_API_SUPPORTED +# define PNG_POWERPC_VSX 10 /* HARDWARE: PowerPC VSX SIMD instructions supported */ +#endif +#define PNG_OPTION_NEXT 12 /* 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 */
Modified: trunk/reactos/sdk/include/reactos/libs/libpng/pngconf.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/libs/li... ============================================================================== --- trunk/reactos/sdk/include/reactos/libs/libpng/pngconf.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/reactos/libs/libpng/pngconf.h [iso-8859-1] Sun Jun 18 12:19:52 2017 @@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng * - * libpng version 1.6.28, January 5, 2017 + * libpng version 1.6.29, March 16, 2017 * * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
Modified: trunk/reactos/sdk/include/reactos/libs/libpng/pnglibconf.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/reactos/libs/li... ============================================================================== --- trunk/reactos/sdk/include/reactos/libs/libpng/pnglibconf.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/reactos/libs/libpng/pnglibconf.h [iso-8859-1] Sun Jun 18 12:19:52 2017 @@ -1,8 +1,8 @@ -/* libpng 1.6.28 STANDARD API DEFINITION */ +/* libpng 1.6.29 STANDARD API DEFINITION */
/* pnglibconf.h - library build configuration */
-/* Libpng version 1.6.28 - January 5, 2017 */ +/* Libpng version 1.6.29 - March 16, 2017 */
/* Copyright (c) 1998-2015 Glenn Randers-Pehrson */
@@ -20,6 +20,8 @@ #define PNG_ALIGNED_MEMORY_SUPPORTED /*#undef PNG_ARM_NEON_API_SUPPORTED*/ /*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/ +/*#undef PNG_POWERPC_VSX_API_SUPPORTED*/ +/*#undef PNG_POWERPC_VSX_CHECK_SUPPORTED*/ #define PNG_BENIGN_ERRORS_SUPPORTED #define PNG_BENIGN_READ_ERRORS_SUPPORTED /*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/