[libpng17] Port recent changes to ARM support from libpng-1.6.3beta07.

This commit is contained in:
John Bowler
2013-06-08 14:20:46 -05:00
committed by Glenn Randers-Pehrson
parent b88c94208a
commit 34081a0e2f
9 changed files with 128 additions and 65 deletions

View File

@@ -126,7 +126,7 @@ logunsupported = 1
#
# If you create a private DLL you need to define the following
# macros in the file 'pngusr.h' and set -DPNG_USER_CONFIG for
# compilation (i.e. in CFLAGS.)
# compilation (i.e. in CPPFLAGS.)
# #define PNG_USER_PRIVATEBUILD \
# <Describes by whom and why this version of the DLL was built>
# e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons."
@@ -216,35 +216,41 @@ setting ZLIB_HEADER default <zlib.h>
# include the file too, so that the defaults below are known
@# include <zlib.h>
# This setting allows a hardware or configuration specific filter optimization
# function to be specified, the argument is the name of the filter initializaion
# function to use.
setting FILTER_OPTIMIZATIONS
# Implementation specific control of the optimizations, enabled by those
# hardware or software options that need it (typically when run-time choices
# must be made by the user)
option SET_OPTION disabled
# These options are specific to the ARM NEON hardware optimizations:
# These options are specific to the ARM NEON hardware optimizations. At present
# these optimizations depend on GCC specific pre-processing of an assembler (.S)
# file so they probably won't work with other compilers.
#
# ARM_NEON: the optimization itself
# ARM_NEON_NOT: disable the optimization even on systems that apparently support
# it (where the compiler defines __ARM_NEON__).
# ARM_NEON_API: allow the optimization to be switched on with png_set_hardware
# ARM_NEON_CHECK: compile a run-time check to see if Neon extensions are
setting ZLIB_VERNUM default @ZLIB_VERNUM
# supported, this is poorly supported and deprectated - use the
# png_set_hardware API.
option ARM_NEON disabled,
sets FILTER_OPTIMIZATIONS png_init_filter_functions_neon
option ARM_NEON_NOT disabled
option ARM_NEON_API disabled enables SET_OPTION ARM_NEON
option ARM_NEON_CHECK disabled enables ARM_NEON
# ARM_NEON_OPT: unset: check at compile time (__ARM_NEON__ must be defined by
# the compiler, typically as a result of specifying
# CC="gcc -mfpu=neon".)
# 0: disable (even if the CPU has a NEON FPU.)
# 1: check at run time (via ARM_NEON_{API,CHECK})
# 2: switch on unconditionally (inadvisable - instead pass
# -mfpu=neon to GCC in CC)
# When building libpng avoid using any setting other than '0'; '1' is
# set automatically when either 'API' or 'CHECK' are configured in,
# '2' should not be necessary as -mfpu=neon will achieve the same
# effect as well as applying NEON optimizations to the rest of the
# libpng code.
# NOTE: any setting other than '0' requires ALIGNED_MEMORY
# ARM_NEON_API: (PNG_ARM_NEON == 1) allow the optimization to be switched on
# with png_set_option
# ARM_NEON_CHECK: (PNG_ARM_NEON == 1) compile a run-time check to see if Neon
# extensions are supported, this is poorly supported and
# deprectated - use the png_set_option API.
setting ARM_NEON_OPT
option ARM_NEON_API disabled requires ALIGNED_MEMORY enables SET_OPTION,
sets ARM_NEON_OPT 1
option ARM_NEON_CHECK disabled requires ALIGNED_MEMORY,
sets ARM_NEON_OPT 1
# These settings configure the default compression level (0-9) and 'strategy';
# strategy is as defined by the implementors of zlib, it describes the input
# strategy is as defined by the implementors of zlib. It describes the input
# data and modifies the zlib parameters in an attempt to optimize the balance
# between search and huffman encoding in the zlib algorithms. The defaults are
# the zlib.h defaults - the apparently recursive definition does not arise
@@ -253,6 +259,7 @@ option ARM_NEON_CHECK disabled enables ARM_NEON
# The TEXT values are the defaults when writing compressed text (all forms)
# The '@' here means to substitute the value when pnglibconf.h is built
setting ZLIB_VERNUM default @ZLIB_VERNUM
setting Z_DEFAULT_COMPRESSION default @Z_DEFAULT_COMPRESSION
# TODO: why aren't these Z_RLE; zlib.h says that Z_RLE, specifically, is
# appropriate for PNG images, maybe it doesn't exist in all versions?

View File

@@ -2,7 +2,7 @@
/* pnglibconf.h - library build configuration */
/* Libpng version 1.7.0beta14 - May 13, 2013 */
/* Libpng version 1.7.0beta14 - June 8, 2013 */
/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */
@@ -20,7 +20,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_BENIGN_READ_ERRORS_SUPPORTED
/*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/