[libpng16] Corrected Android builds and corrected libpng.vers with symbol

prefixing This adds an API to set optimization options externally,
    providing an alternative and general solution for the non-portable
    run-time tests used by the ARM Neon code.  It also makes those tests
    compile and link on Android.
  The order of settings vs options in pnglibconf.h is reversed to allow
    settings to depend on options and options can now set (or override) the
    defaults for settings.
This commit is contained in:
John Bowler
2013-03-04 16:26:31 -06:00
committed by Glenn Randers-Pehrson
parent e15b537825
commit f3728100d9
14 changed files with 457 additions and 214 deletions

53
png.h
View File

@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.6.1beta06 - March 2, 2013
* libpng version 1.6.1beta06 - March 4, 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.6.1beta06 - March 2, 2013: Glenn
* libpng versions 0.97, January 1998, through 1.6.1beta06 - March 4, 2013: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@@ -201,7 +201,7 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.2.6, August 15, 2004, through 1.6.1beta06, March 2, 2013, are
* libpng versions 1.2.6, August 15, 2004, through 1.6.1beta06, March 4, 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:
@@ -313,7 +313,7 @@
* Y2K compliance in libpng:
* =========================
*
* March 2, 2013
* March 4, 2013
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
@@ -381,7 +381,7 @@
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.6.1beta06"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.6.1beta06 - March 2, 2013\n"
" libpng version 1.6.1beta06 - March 4, 2013\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@@ -3219,6 +3219,47 @@ PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr,
# endif
#endif /* CHECK_FOR_INVALID_INDEX */
/*******************************************************************************
* 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(244, int, png_set_option, (png_structrp png_ptr, int option,
int onoff));
#endif
/*******************************************************************************
* END OF HARDWARE OPTIONS
******************************************************************************/
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
* defs, scripts/pnglibconf.h, and scripts/pnglibconf.h.prebuilt
*/
@@ -3228,7 +3269,7 @@ PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr,
* scripts/symbols.def as well.
*/
#ifdef PNG_EXPORT_LAST_ORDINAL
PNG_EXPORT_LAST_ORDINAL(243);
PNG_EXPORT_LAST_ORDINAL(244);
#endif
#ifdef __cplusplus