[libpng16] Make ARM NEON support work at compile time (not just configure time).

This moves the test on __ARM_NEON__ into pngconf.h to avoid issues when
using a compiler that compiles for multiple architectures at one time.
This commit is contained in:
John Bowler 2013-06-06 12:49:53 -05:00 committed by Glenn Randers-Pehrson
parent 4a43182924
commit aa22442a9c
4 changed files with 12 additions and 8 deletions

View File

@ -83,6 +83,9 @@ Version 1.6.3beta07 [June 6, 2013]
Deleted set(CMAKE_BUILD_TYPE) block from CMakeLists.txt Deleted set(CMAKE_BUILD_TYPE) block from CMakeLists.txt
Enclose the prototypes for the simplified write API in Enclose the prototypes for the simplified write API in
#ifdef PNG_STDIO_SUPPORTED/#endif #ifdef PNG_STDIO_SUPPORTED/#endif
Make ARM NEON support work at compile time (not just configure time).
This moves the test on __ARM_NEON__ into pngconf.h to avoid issues when
using a compiler that compiles for multiple architectures at one time.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -4567,6 +4567,9 @@ Version 1.6.3beta07 [June 6, 2013]
Deleted set(CMAKE_BUILD_TYPE) block from CMakeLists.txt Deleted set(CMAKE_BUILD_TYPE) block from CMakeLists.txt
Enclose the prototypes for the simplified write API in Enclose the prototypes for the simplified write API in
#ifdef PNG_STDIO_SUPPORTED/#endif #ifdef PNG_STDIO_SUPPORTED/#endif
Make ARM NEON support work at compile time (not just configure time).
This moves the test on __ARM_NEON__ into pngconf.h to avoid issues when
using a compiler that compiles for multiple architectures at one time.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -239,11 +239,12 @@ AC_ARG_ENABLE([arm-neon],
[Enable ARM NEON optimizations: =no/off, check, api, yes/on:] [Enable ARM NEON optimizations: =no/off, check, api, yes/on:]
[no/off: disable the optimizations; check: use internal checking code] [no/off: disable the optimizations; check: use internal checking code]
[(deprecated and poorly supported); api: disable by default, enable by] [(deprecated and poorly supported); api: disable by default, enable by]
[a call to png_set_option; yes/on: turn on unconditionally.]), [a call to png_set_option; yes/on: turn on unconditionally.]
[If not specified: determined by the compiler.]),
[case "$enableval" in [case "$enableval" in
no|off) no|off)
# disable the default enabling on __ARM_NEON__ systems: # disable the default enabling on __ARM_NEON__ systems:
AC_DEFINE([PNG_NO_ARM_NEON], [], AC_DEFINE([PNG_ARM_NEON_NOT_SUPPORTED], [],
[Disable ARM Neon optimizations]) [Disable ARM Neon optimizations])
# Prevent inclusion of the assembler files below: # Prevent inclusion of the assembler files below:
enable_arm_neon=no;; enable_arm_neon=no;;

View File

@ -158,12 +158,6 @@ logunsupported = 1
@# endif @# endif
@#endif @#endif
# This changes the default for the ARM NEON optimizations according to
# __ARM_NEON__
@#ifdef __ARM_NEON__
@# define PNG_ARM_NEON_SUPPORTED
@#endif
# IN DEVELOPMENT # IN DEVELOPMENT
# These are currently experimental features; define them if you want (NOTE: # These are currently experimental features; define them if you want (NOTE:
# experimental options must be disabled before they are defined in this file!) # experimental options must be disabled before they are defined in this file!)
@ -213,12 +207,15 @@ option SET_OPTION disabled
# These options are specific to the ARM NEON hardware optimizations: # These options are specific to the ARM NEON hardware optimizations:
# #
# ARM_NEON: the optimization itself # 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_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 # ARM_NEON_CHECK: compile a run-time check to see if Neon extensions are
# supported, this is poorly supported and deprectated - use the # supported, this is poorly supported and deprectated - use the
# png_set_hardware API. # png_set_hardware API.
option ARM_NEON disabled, option ARM_NEON disabled,
sets FILTER_OPTIMIZATIONS png_init_filter_functions_neon 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_API disabled enables SET_OPTION ARM_NEON
option ARM_NEON_CHECK disabled enables ARM_NEON option ARM_NEON_CHECK disabled enables ARM_NEON