|
fukasawa |
e60969 |
OPERATING SYSTEM SPECIFIC ARM NEON DETECTION
|
|
fukasawa |
e60969 |
--------------------------------------------
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
Detection of the ability to execute ARM NEON on an ARM processor requires
|
|
fukasawa |
e60969 |
operating system support. (The information is not available in user mode.)
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
HOW TO USE THIS
|
|
fukasawa |
e60969 |
---------------
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
This directory contains C code fragments that can be included in arm/arm_init.c
|
|
fukasawa |
e60969 |
by setting the macro PNG_ARM_NEON_FILE to the file name in "" or <> at build
|
|
fukasawa |
e60969 |
time. This setting is not recorded in pnglibconf.h and can be changed simply by
|
|
fukasawa |
e60969 |
rebuilding arm/arm_init.o with the required macro definition.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
For any of this code to be used the ARM NEON code must be enabled and run time
|
|
fukasawa |
e60969 |
checks must be supported. I.e.:
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
#if PNG_ARM_NEON_OPT > 0
|
|
fukasawa |
e60969 |
#ifdef PNG_ARM_NEON_CHECK_SUPPORTED
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
This is done in a 'configure' build by passing configure the argument:
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
--enable-arm-neon=check
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
Apart from the basic Linux implementation in contrib/arm-neon/linux.c this code
|
|
fukasawa |
e60969 |
is unsupported. That means that it is not even compiled on a regular basis and
|
|
fukasawa |
e60969 |
may be broken in any given minor release.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
FILE FORMAT
|
|
fukasawa |
e60969 |
-----------
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
Each file documents its testing status as of the last time it was tested (which
|
|
fukasawa |
e60969 |
may have been a long time ago):
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
STATUS: one of:
|
|
fukasawa |
e60969 |
SUPPORTED: This indicates that the file is included in the regularly
|
|
fukasawa |
e60969 |
performed test builds and bugs are fixed when discovered.
|
|
fukasawa |
e60969 |
COMPILED: This indicates that the code did compile at least once. See the
|
|
fukasawa |
e60969 |
more detailed description for the extent to which the result was
|
|
fukasawa |
e60969 |
successful.
|
|
fukasawa |
e60969 |
TESTED: This means the code was fully compiled into the libpng test programs
|
|
fukasawa |
e60969 |
and these were run at least once.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
BUG REPORTS: an email address to which to send reports of problems
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
The file is a fragment of C code. It should not define any 'extern' symbols;
|
|
fukasawa |
e60969 |
everything should be static. It must define the function:
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
static int png_have_neon(png_structp png_ptr);
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
That function must return 1 if ARM NEON instructions are supported, 0 if not.
|
|
fukasawa |
e60969 |
It must not execute png_error unless it detects a bug. A png_error will prevent
|
|
fukasawa |
e60969 |
the reading of the PNG and in the future, writing too.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
BUG REPORTS
|
|
fukasawa |
e60969 |
-----------
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
If you mail a bug report for any file that is not SUPPORTED there may only be
|
|
fukasawa |
e60969 |
limited response. Consider fixing it and sending a patch to fix the problem -
|
|
fukasawa |
e60969 |
this is more likely to result in action.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
CONTRIBUTIONS
|
|
fukasawa |
e60969 |
-------------
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
You may send contributions of new implementations to
|
|
fukasawa |
e60969 |
png-mng-implement@sourceforge.net. Please write code in strict C90 C where
|
|
fukasawa |
e60969 |
possible. Obviously OS dependencies are to be expected. If you submit code you
|
|
fukasawa |
e60969 |
must have the authors permission and it must have a license that is acceptable
|
|
fukasawa |
e60969 |
to the current maintainer; in particular that license must permit modification
|
|
fukasawa |
e60969 |
and redistribution.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
Please try to make the contribution a single file and give the file a clear and
|
|
fukasawa |
e60969 |
unambiguous name that identifies the target OS. If multiple files really are
|
|
fukasawa |
e60969 |
required put them all in a sub-directory.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
You must also be prepared to handle bug reports from users of the code, either
|
|
fukasawa |
e60969 |
by joining the png-mng-implement mailing list or by providing an email for the
|
|
fukasawa |
e60969 |
"BUG REPORTS" entry or both. Please make sure that the header of the file
|
|
fukasawa |
e60969 |
contains the STATUS and BUG REPORTS fields as above.
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
Please list the OS requirements as precisely as possible. Ideally you should
|
|
fukasawa |
e60969 |
also list the environment in which the code has been tested and certainly list
|
|
fukasawa |
e60969 |
any environments where you suspect it might not work.
|