diff --git a/ANNOUNCE b/ANNOUNCE index 9bb1369de..5722f7907 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,4 +1,4 @@ -Libpng 1.6.28rc03 - January 4, 2017 +Libpng 1.6.29beta01 - January 6, 2017 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. @@ -8,40 +8,29 @@ Files available for download: Source files with LF line endings (for Unix/Linux) and with a "configure" script - 1.6.28rc03.tar.xz (LZMA-compressed, recommended) - 1.6.28rc03.tar.gz + 1.6.29beta01.tar.xz (LZMA-compressed, recommended) + 1.6.29beta01.tar.gz Source files with CRLF line endings (for Windows), without the "configure" script - lp1628r03.7z (LZMA-compressed, recommended) - lp1628r03.zip + lp1629b01.7z (LZMA-compressed, recommended) + lp1629b01.zip Other information: - 1.6.28rc03-README.txt - 1.6.28rc03-LICENSE.txt - libpng-1.6.28rc03-*.asc (armored detached GPG signatures) + 1.6.29beta01-README.txt + 1.6.29beta01-LICENSE.txt + libpng-1.6.29beta01-*.asc (armored detached GPG signatures) -Changes since the last public release (1.6.27): +Changes since the last public release (1.6.28): -Version 1.6.28rc01 [January 3, 2017] - 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. - -Version 1.6.28rc02 [January 4, 2017] - Added "include(GNUInstallDirs)" to CMakeLists.txt (Gianfranco Costamagna). +Version 1.6.29beta01 [January 6, 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. -Version 1.6.28rc03 [January 4, 2017] - Backed out the SSE optimization and last CMakeLists.txt to allow time for QA. - Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement diff --git a/CHANGES b/CHANGES index 5c466c0a7..789adb9e8 100644 --- a/CHANGES +++ b/CHANGES @@ -5791,6 +5791,15 @@ Version 1.6.28rc02 [January 4, 2017] Version 1.6.28rc03 [January 4, 2017] Backed out the SSE optimization and last CMakeLists.txt to allow time for QA. +Version 1.6.28 [January 5, 2017] + No changes. + +Version 1.6.29beta01 [January 6, 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. + Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement diff --git a/CMakeLists.txt b/CMakeLists.txt index a8a3a75b3..22e391865 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,10 +36,12 @@ enable_testing() set(PNGLIB_MAJOR 1) set(PNGLIB_MINOR 6) -set(PNGLIB_RELEASE 28) +set(PNGLIB_RELEASE 29) set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR}) set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE}) +include(GNUInstallDirs) + # needed packages #Allow users to specify location of Zlib, @@ -735,7 +737,7 @@ endif(NOT WIN32 OR CYGWIN OR MINGW) # SET UP LINKS if(PNG_SHARED) set_target_properties(png PROPERTIES -# VERSION 16.${PNGLIB_RELEASE}.1.6.28rc03 +# VERSION 16.${PNGLIB_RELEASE}.1.6.29beta01 VERSION 16.${PNGLIB_RELEASE}.0 SOVERSION 16 CLEAN_DIRECT_OUTPUT 1) diff --git a/LICENSE b/LICENSE index 91bb60f2b..f6cd47802 100644 --- a/LICENSE +++ b/LICENSE @@ -10,7 +10,7 @@ this sentence. This code is released under the libpng license. -libpng versions 1.0.7, July 1, 2000 through 1.6.28rc03, January 4, 2017 are +libpng versions 1.0.7, July 1, 2000 through 1.6.29beta01, January 6, 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,7 @@ added to the list of Contributing Authors: Gilles Vollant James Yu Mandar Sahastrabuddhe + Google Inc. and with the following additions to the disclaimer: @@ -128,4 +129,4 @@ any encryption software. See the EAR, paragraphs 734.3(b)(3) and Glenn Randers-Pehrson glennrp at users.sourceforge.net -January 4, 2017 +January 6, 2017 diff --git a/README b/README index 54b93c0ac..15b965b9b 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -README for libpng version 1.6.28rc03 - January 4, 2017 (shared library 16.0) +README for libpng version 1.6.29beta01 - January 5, 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. diff --git a/configure.ac b/configure.ac index adc94f7a2..c060c4603 100644 --- a/configure.ac +++ b/configure.ac @@ -25,7 +25,7 @@ AC_PREREQ([2.68]) dnl Version number stuff here: -AC_INIT([libpng],[1.6.28rc03],[png-mng-implement@lists.sourceforge.net]) +AC_INIT([libpng],[1.6.29beta01],[png-mng-implement@lists.sourceforge.net]) AC_CONFIG_MACRO_DIR([scripts]) # libpng does not follow GNU file name conventions (hence 'foreign') @@ -46,7 +46,7 @@ dnl automake, so the following is not necessary (and is not defined anyway): dnl AM_PREREQ([1.11.2]) dnl stop configure from automagically running automake -PNGLIB_VERSION=1.6.28rc03 +PNGLIB_VERSION=1.6.29beta01 PNGLIB_MAJOR=1 PNGLIB_MINOR=6 PNGLIB_RELEASE=28 diff --git a/contrib/intel/INSTALL b/contrib/intel/INSTALL deleted file mode 100644 index cd5cdd94e..000000000 --- a/contrib/intel/INSTALL +++ /dev/null @@ -1,158 +0,0 @@ -Enabling SSE support - -Copyright (c) 2016 Google, Inc. -Written by Mike Klein, Matt Sarett - -This INSTALL file written by Glenn Randers-Pehrson, 2016. - -If you have moved intel_init.c and filter_sse2_intrinsics.c to a different -directory, be sure to update the '#include "../../pngpriv.h"' line in both -files if necessary to point to the correct relative location of pngpriv.h -with respect to the new location of those files. - -To enable SSE support in libpng, follow the instructions in I, II, or III, -below: - -I. Using patched "configure" scripts: - -First, apply intel_sse.patch in your build directory. - - patch -i contrib/intel/intel_sse.patch -p1 - -Then, if you are not building in a new GIT clone, e.g., in a tar -distribution, remove any existing pre-built configure scripts: - - ./configure --enable-maintainer-mode - make maintainer-clean - ./autogen.sh --maintainer --clean - -Finally, configure libpng with -DPNG_INTEL_SSE in CPPFLAGS: - - ./autogen.sh --maintainer - CPPFLAGS="-DPNG_INTEL_SSE" ./configure [options] - make CPPFLAGS="-DPNG_INTEL_SSE" [options] - make - -II. Using a custom makefile: - -If you are using a custom makefile makefile, you will have to update it -manually to include contrib/intel/*.o in the dependencies, and to define -PNG_INTEL_SSE. - -III. Using manually updated "configure" scripts: - -If you prefer, manually edit pngpriv.h, configure.ac, and Makefile.am, -following the instructions below, then follow the instructions in -section II of INSTALL in the main libpng directory, then configure libpng -with -DPNG_INTEL_SSE in CPPFLAGS. - -1. Add the following code to configure.ac under HOST SPECIFIC OPTIONS -directly beneath the section for ARM: - ------------------cut---------------- -# INTEL -# ===== -# -# INTEL SSE (SIMD) support. - -AC_ARG_ENABLE([intel-sse], - AS_HELP_STRING([[[--enable-intel-sse]]], - [Enable Intel SSE optimizations: =no/off, yes/on:] - [no/off: disable the optimizations;] - [yes/on: enable the optimizations.] - [If not specified: determined by the compiler.]), - [case "$enableval" in - no|off) - # disable the default enabling: - AC_DEFINE([PNG_INTEL_SSE_OPT], [0], - [Disable Intel SSE optimizations]) - # Prevent inclusion of the assembler files below: - enable_intel_sse=no;; - yes|on) - AC_DEFINE([PNG_INTEL_SSE_OPT], [1], - [Enable Intel SSE optimizations]);; - *) - AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}: invalid value]) - esac]) - -# Add Intel specific files to all builds where the host_cpu is Intel ('x86*') -# or where Intel optimizations were explicitly requested (this allows a -# fallback if a future host CPU does not match 'x86*') -AM_CONDITIONAL([PNG_INTEL_SSE], - [test "$enable_intel_sse" != 'no' && - case "$host_cpu" in - i?86|x86_64) :;; - *) test "$enable_intel_sse" != '';; - esac]) ------------------cut---------------- - -2. Add the following code to Makefile.am under HOST SPECIFIC OPTIONS -directly beneath the "if PNG_ARM_NEON ... endif" statement: - ------------------cut---------------- -if PNG_INTEL_SSE -libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += contrib/intel/intel_init.c\ - contrib/intel/filter_sse2_intrinsics.c -endif ------------------cut---------------- - -3. Add the following lines to pngpriv.h, following the PNG_ARM_NEON_OPT -code: - ------------------cut---------------- -#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 - ------------------cut---------------- - -4. Add the following lines to pngpriv.h, following the prototype for -png_read_filter_row_paeth4_neon: - ------------------cut---------------- -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); - ------------------cut---------------- diff --git a/contrib/intel/intel_sse.patch b/contrib/intel/intel_sse.patch deleted file mode 100644 index 24d4883c7..000000000 --- a/contrib/intel/intel_sse.patch +++ /dev/null @@ -1,190 +0,0 @@ -diff --git a/configure.ac b/configure.ac ---- a/configure.ac 2016-08-29 11:46:27.000000000 -0400 -+++ b/configure.ac 2016-08-29 16:57:03.866355018 -0400 -@@ -386,16 +386,51 @@ AC_ARG_ENABLE([mips-msa], - # future host CPU does not match 'mips*') - - AM_CONDITIONAL([PNG_MIPS_MSA], - [test "$enable_mips_msa" != 'no' && - case "$host_cpu" in - mipsel*|mips64el*) :;; - esac]) - -+# INTEL -+# ===== -+# -+# INTEL SSE (SIMD) support. -+ -+AC_ARG_ENABLE([intel-sse], -+ AS_HELP_STRING([[[--enable-intel-sse]]], -+ [Enable Intel SSE optimizations: =no/off, yes/on:] -+ [no/off: disable the optimizations;] -+ [yes/on: enable the optimizations.] -+ [If not specified: determined by the compiler.]), -+ [case "$enableval" in -+ no|off) -+ # disable the default enabling: -+ AC_DEFINE([PNG_INTEL_SSE_OPT], [0], -+ [Disable Intel SSE optimizations]) -+ # Prevent inclusion of the assembler files below: -+ enable_intel_sse=no;; -+ yes|on) -+ AC_DEFINE([PNG_INTEL_SSE_OPT], [1], -+ [Enable Intel SSE optimizations]);; -+ *) -+ AC_MSG_ERROR([--enable-intel-sse=${enable_intel_sse}: invalid value]) -+ esac]) -+ -+# Add Intel specific files to all builds where the host_cpu is Intel ('x86*') -+# or where Intel optimizations were explicitly requested (this allows a -+# fallback if a future host CPU does not match 'x86*') -+AM_CONDITIONAL([PNG_INTEL_SSE], -+ [test "$enable_intel_sse" != 'no' && -+ case "$host_cpu" in -+ i?86|x86_64) :;; -+ *) test "$enable_intel_sse" != '';; -+ esac]) -+ - AC_MSG_NOTICE([[Extra options for compiler: $PNG_COPTS]]) - - # Config files, substituting as above - AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in]) - AC_CONFIG_FILES([libpng-config:libpng-config.in], - [chmod +x libpng-config]) - - AC_OUTPUT -diff --git a/Makefile.am b/Makefile.am ---- a/Makefile.am 2016-08-29 11:46:27.000000000 -0400 -+++ b/Makefile.am 2016-08-29 16:57:45.955528215 -0400 -@@ -97,16 +97,21 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SO - arm/filter_neon.S arm/filter_neon_intrinsics.c - endif - - if PNG_MIPS_MSA - libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/mips_init.c\ - mips/filter_msa_intrinsics.c - endif - -+if PNG_INTEL_SSE -+libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += contrib/intel/intel_init.c\ -+ contrib/intel/filter_sse2_intrinsics.c -+endif -+ - nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h - - libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \ - -version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0 - - if HAVE_LD_VERSION_SCRIPT - # Versioned symbols and restricted exports - if HAVE_SOLARIS_LD -diff --git a/pngpriv.h b/pngpriv.h ---- debug16/pngpriv.h 2016-08-30 10:46:36.000000000 -0400 -+++ libpng16/pngpriv.h 2016-08-30 11:57:25.672280202 -0400 -@@ -185,16 +185,52 @@ - #ifndef PNG_MIPS_MSA_OPT - # if defined(__mips_msa) && (__mips_isa_rev >= 5) && defined(PNG_ALIGNED_MEMORY_SUPPORTED) - # define PNG_MIPS_MSA_OPT 2 - # else - # define PNG_MIPS_MSA_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 - # if defined(__mips_msa) - # if defined(__clang__) - # elif defined(__GNUC__) - # if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) - # define PNG_MIPS_MSA_IMPLEMENTATION 2 -@@ -1251,16 +1287,31 @@ PNG_INTERNAL_FUNCTION(void,png_read_filt - PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_msa,(png_row_infop - row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); - PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_msa,(png_row_infop - row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); - PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_msa,(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); - - #ifdef PNG_SEQUENTIAL_READ_SUPPORTED - PNG_INTERNAL_FUNCTION(void,png_read_IDAT_data,(png_structrp png_ptr, - png_bytep output, png_alloc_size_t avail_out),PNG_EMPTY); - /* Read 'avail_out' bytes of data from the IDAT stream. If the output buffer -@@ -1986,16 +2037,21 @@ PNG_INTERNAL_FUNCTION(void, PNG_FILTER_O - PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_neon, - (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); - #endif - - #if PNG_MIPS_MSA_OPT > 0 - 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, - png_const_charp key, png_bytep new_key), PNG_EMPTY); - - /* Maintainer: Put new private prototypes here ^ */ - - #include "pngdebug.h" diff --git a/contrib/intel/filter_sse2_intrinsics.c b/intel/filter_sse2_intrinsics.c similarity index 98% rename from contrib/intel/filter_sse2_intrinsics.c rename to intel/filter_sse2_intrinsics.c index b02840c55..2534391c8 100644 --- a/contrib/intel/filter_sse2_intrinsics.c +++ b/intel/filter_sse2_intrinsics.c @@ -1,19 +1,18 @@ /* filter_sse2_intrinsics.c - SSE2 optimized filter functions * - * Copyright (c) 2016 Google, Inc. + * Copyright (c) 2016-2017 Glenn Randers-Pehrson * Written by Mike Klein and Matt Sarett - * Derived from arm/filter_neon_intrinsics.c, which was - * Copyright (c) 2014,2016 Glenn Randers-Pehrson + * Derived from arm/filter_neon_intrinsics.c * - * Last changed in libpng 1.6.24 [August 4, 2016] + * Last changed in libpng 1.6.29 [(PENDING RELEASE)] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h */ -#include "../../pngpriv.h" +#include "../pngpriv.h" #ifdef PNG_READ_SUPPORTED diff --git a/contrib/intel/intel_init.c b/intel/intel_init.c similarity index 86% rename from contrib/intel/intel_init.c rename to intel/intel_init.c index 328e90e9a..4472a9367 100644 --- a/contrib/intel/intel_init.c +++ b/intel/intel_init.c @@ -1,19 +1,18 @@ /* intel_init.c - SSE2 optimized filter functions * - * Copyright (c) 2016 Google, Inc. - * Written by Mike Klein and Matt Sarett - * Derived from arm/arm_init.c, which was - * Copyright (c) 2014,2016 Glenn Randers-Pehrson + * Copyright (c) 2016-2017 Glenn Randers-Pehrson + * Written by Mike Klein and Matt Sarett, Google, Inc. + * Derived from arm/arm_init.c * - * Last changed in libpng 1.6.22 [May 26, 2016] + * Last changed in libpng 1.6.29 [(PENDING RELEASE)] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h */ -#include "../../pngpriv.h" +#include "../pngpriv.h" #ifdef PNG_READ_SUPPORTED #if PNG_INTEL_SSE_IMPLEMENTATION > 0 diff --git a/libpng-manual.txt b/libpng-manual.txt index 07a124c8b..b149699e4 100644 --- a/libpng-manual.txt +++ b/libpng-manual.txt @@ -1,6 +1,6 @@ libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.6.28rc03 - January 4, 2017 + libpng version 1.6.29beta01 - January 6, 2017 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2016 Glenn Randers-Pehrson @@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.6.28rc03 - January 4, 2017 + libpng versions 0.97, January 1998, through 1.6.29beta01 - January 6, 2017 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2016 Glenn Randers-Pehrson @@ -5355,7 +5355,7 @@ Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.6.28rc03 are Y2K compliant. It is my belief that earlier +upward through 1.6.29beta01 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 diff --git a/libpng.3 b/libpng.3 index bacae4897..76bd92c90 100644 --- a/libpng.3 +++ b/libpng.3 @@ -1,6 +1,6 @@ -.TH LIBPNG 3 "January 4, 2017" +.TH LIBPNG 3 "January 6, 2017" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.6.28rc03 +libpng \- Portable Network Graphics (PNG) Reference Library 1.6.29beta01 .SH SYNOPSIS \fB #include \fP @@ -510,7 +510,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng. .SH LIBPNG.TXT libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.6.28rc03 - January 4, 2017 + libpng version 1.6.29beta01 - January 6, 2017 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2016 Glenn Randers-Pehrson @@ -521,7 +521,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.6.28rc03 - January 4, 2017 + libpng versions 0.97, January 1998, through 1.6.29beta01 - January 6, 2017 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2016 Glenn Randers-Pehrson @@ -5865,7 +5865,7 @@ Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.6.28rc03 are Y2K compliant. It is my belief that earlier +upward through 1.6.29beta01 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 @@ -5967,7 +5967,7 @@ the first widely used release: ... 1.5.28 15 10528 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 minor and patch numbers; the shared-library major version number will be @@ -6023,7 +6023,7 @@ possible without all of you. Thanks to Frank J. T. Wojcik for helping with the documentation. -Libpng version 1.6.28rc03 - January 4, 2017: +Libpng version 1.6.29beta01 - January 6, 2017: Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). @@ -6048,7 +6048,7 @@ this sentence. This code is released under the libpng license. -libpng versions 1.0.7, July 1, 2000 through 1.6.28rc03, January 4, 2017 are +libpng versions 1.0.7, July 1, 2000 through 1.6.29beta01, January 6, 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 @@ -6061,6 +6061,7 @@ added to the list of Contributing Authors: Gilles Vollant James Yu Mandar Sahastrabuddhe + Google Inc. and with the following additions to the disclaimer: @@ -6174,7 +6175,7 @@ files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). Glenn Randers-Pehrson glennrp at users.sourceforge.net -January 4, 2017 +January 6, 2017 .\" end of man page diff --git a/libpngpf.3 b/libpngpf.3 index 59f541af2..bafd815cf 100644 --- a/libpngpf.3 +++ b/libpngpf.3 @@ -1,6 +1,6 @@ -.TH LIBPNGPF 3 "January 4, 2017" +.TH LIBPNGPF 3 "January 6, 2017" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.6.28rc03 +libpng \- Portable Network Graphics (PNG) Reference Library 1.6.29beta01 (private functions) .SH SYNOPSIS \fB#include \fI"pngpriv.h" diff --git a/png.5 b/png.5 index b547e7811..5be00596f 100644 --- a/png.5 +++ b/png.5 @@ -1,4 +1,4 @@ -.TH PNG 5 "January 4, 2017" +.TH PNG 5 "January 5, 2017" .SH NAME png \- Portable Network Graphics (PNG) format .SH DESCRIPTION diff --git a/png.c b/png.c index 4a728dbee..bfdb07ae3 100644 --- a/png.c +++ b/png.c @@ -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_28rc03 Your_png_h_is_not_version_1_6_28rc03; +typedef png_libpng_version_1_6_29beta01 Your_png_h_is_not_version_1_6_29beta01; /* 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 @@ png_get_copyright(png_const_structrp png_ptr) #else # ifdef __STDC__ return PNG_STRING_NEWLINE \ - "libpng version 1.6.28rc03 - January 4, 2017" PNG_STRING_NEWLINE \ + "libpng version 1.6.29beta01 - January 5, 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.28rc03 - January 4, 2017\ + return "libpng version 1.6.29beta01 - January 5, 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."; diff --git a/png.h b/png.h index e0c4560cb..cad9a825e 100644 --- a/png.h +++ b/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.6.28rc03, January 4, 2017 + * libpng version 1.6.29beta01, January 6, 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.28rc03, January 4, 2017: + * libpng versions 0.97, January 1998, through 1.6.29beta01, January 6, 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.28rc03, January 4, 2017 are + * libpng versions 1.0.7, July 1, 2000 through 1.6.29beta01, January 6, 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,7 @@ * Gilles Vollant * James Yu * Mandar Sahastrabuddhe + * Google Inc. * * and with the following additions to the disclaimer: * @@ -211,7 +212,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 +240,13 @@ * Y2K compliance in libpng: * ========================= * - * January 4, 2017 + * January 6, 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.28rc03 are Y2K compliant. It is my belief that + * upward through 1.6.29beta01 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 +308,8 @@ */ /* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.6.28rc03" -#define PNG_HEADER_VERSION_STRING " libpng version 1.6.28rc03 - January 4, 2017\n" +#define PNG_LIBPNG_VER_STRING "1.6.29beta01" +#define PNG_HEADER_VERSION_STRING " libpng version 1.6.29beta01 - January 6, 2017\n" #define PNG_LIBPNG_VER_SONUM 16 #define PNG_LIBPNG_VER_DLLNUM 16 @@ -316,13 +317,13 @@ /* 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: */ -#define PNG_LIBPNG_VER_BUILD 03 +#define PNG_LIBPNG_VER_BUILD 01 /* Release Status */ #define PNG_LIBPNG_BUILD_ALPHA 1 @@ -339,7 +340,7 @@ #define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with PNG_LIBPNG_BUILD_PRIVATE */ -#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_RC +#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA /* Careful here. At one time, Guy wanted to use 082, but that would be octal. * We must not include leading zeros. @@ -347,7 +348,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 +458,7 @@ extern "C" { /* 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_28rc03; +typedef char* png_libpng_version_1_6_29beta01; /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. * diff --git a/pngconf.h b/pngconf.h index 2a48ba25d..14a8da104 100644 --- a/pngconf.h +++ b/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.6.28rc03, January 4, 2017 + * libpng version 1.6.29beta01, January 5, 2017 * * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) diff --git a/pngpriv.h b/pngpriv.h index ed61165b2..50ff68b1c 100644 --- a/pngpriv.h +++ b/pngpriv.h @@ -190,6 +190,42 @@ # 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 @@ -1256,6 +1292,21 @@ PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_msa,(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 +2042,11 @@ PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_neon, 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, diff --git a/pngtest.c b/pngtest.c index 7f553e6da..1e3efb8aa 100644 --- a/pngtest.c +++ b/pngtest.c @@ -2088,4 +2088,4 @@ main(void) #endif /* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_6_28rc03 Your_png_h_is_not_version_1_6_28rc03; +typedef png_libpng_version_1_6_29beta01 Your_png_h_is_not_version_1_6_29beta01; diff --git a/projects/vstudio/README.txt b/projects/vstudio/README.txt index b44e60cbd..e06d35434 100644 --- a/projects/vstudio/README.txt +++ b/projects/vstudio/README.txt @@ -1,7 +1,7 @@ VisualStudio instructions -libpng version 1.6.28rc03 - January 4, 2017 +libpng version 1.6.29beta01 - January 5, 2017 Copyright (c) 2010,2013,2015 Glenn Randers-Pehrson diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props index 7ca08540c..9982f3a87 100644 --- a/projects/vstudio/zlib.props +++ b/projects/vstudio/zlib.props @@ -2,7 +2,7 @@