diff options
-rw-r--r-- | png.c | 6 | ||||
-rw-r--r-- | png.h | 23 | ||||
-rw-r--r-- | pngconf.h | 2 | ||||
-rw-r--r-- | pngcrush.c | 16 | ||||
-rw-r--r-- | pngcrush.h | 2 | ||||
-rw-r--r-- | pnglibconf.h | 5 | ||||
-rw-r--r-- | pngpriv.h | 58 | ||||
-rw-r--r-- | pngset.c | 13 |
8 files changed, 84 insertions, 41 deletions
@@ -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 */ /* Library configuration: these options cannot be changed after * the library has been built. @@ -561,7 +564,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_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 @@ -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) diff --git a/pngcrush.c b/pngcrush.c index 9e086e39e..bbdbba0cb 100644 --- a/pngcrush.c +++ b/pngcrush.c @@ -80,7 +80,7 @@ * */ -#define PNGCRUSH_VERSION "1.7.63" +#define PNGCRUSH_VERSION "1.7.64" /* Experimental: define these if you wish, but, good luck. #define PNGCRUSH_COUNT_COLORS @@ -307,6 +307,8 @@ Change log: +Version 1.7.64 (built with libpng-1.5.17 and zlib-1.2.8) + Version 1.7.63 (built with libpng-1.5.16 and zlib-1.2.8) Add "int dowildcard=-1;" in an attempt to get wildcard arguments working in the cross-compiled MinGW executables. @@ -1509,8 +1511,8 @@ struct options_help }; #ifdef MINGW32 - /* enable commandline wildcard interpretation */ - int _dowildcard = -1; + /* enable commandline wildcard interpretation (doesn't necessarily work!) */ + int _dowildcard = 1; #endif /* Input and output filenames */ @@ -4074,7 +4076,7 @@ int main(int argc, char *argv[]) if (do_color_count) fprintf(STDERR, - " color counting (-cc option) is not supported.\n"); + " The -cc option is not supported.\n"); if (plte_len > 0 && force_output_bit_depth == 0) { @@ -7614,9 +7616,9 @@ static const char *pngcrush_legal[] = { static const char *pngcrush_usage[] = { "\nusage: %s [options] infile.png outfile.png\n", - " %s -e ext [other options] files.png ...\n", - " %s -d dir/ [other options] files.png ...\n", - " %s -n -v files.png ...\n" + " %s -e ext [other options] file.png ...\n", + " %s -d dir/ [other options] file.png ...\n", + " %s -n -v file.png ...\n" }; struct options_help pngcrush_options[] = { diff --git a/pngcrush.h b/pngcrush.h index fd952f6ae..d2fb72ec6 100644 --- a/pngcrush.h +++ b/pngcrush.h @@ -5,7 +5,7 @@ * license (see LICENSE, in pngcrush.c). */ -/* Special defines for pngcrush version 1.7.59 */ +/* Special defines for pngcrush version 1.7.64 */ #ifndef PNGCRUSH_H #define PNGCRUSH_H diff --git a/pnglibconf.h b/pnglibconf.h index d2a6eee09..b35fe5293 100644 --- a/pnglibconf.h +++ b/pnglibconf.h @@ -1,7 +1,7 @@ -/* 1.5.16 STANDARD API DEFINITION */ +/* 1.5.17 STANDARD API DEFINITION */ /* pnglibconf.h - library build configuration */ -/* libpng version 1.5.16 - May 23, 2013 */ +/* libpng version 1.5.17 - June 27, 2013 */ /* Copyright (c) 1998-2013 Glenn Randers-Pehrson */ @@ -19,7 +19,6 @@ #define PNG_ALIGNED_MEMORY_SUPPORTED /*#undef PNG_ARM_NEON_API_SUPPORTED*/ /*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/ -/*#undef PNG_ARM_NEON_SUPPORTED*/ #define PNG_BENIGN_ERRORS_SUPPORTED #define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED #define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED @@ -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. @@ -1728,13 +1768,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 ^ */ @@ -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_oFFs_SUPPORTED |