liboil-0.3.17/0000777000175000017500000000000011332637374010072 500000000000000liboil-0.3.17/depcomp0000755000175000017500000004426711332627674011402 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: liboil-0.3.17/NEWS0000644000175000017500000000101610717203073010472 00000000000000 0.3.10 ====== - Lots of new classes and implementations were added for Schrödinger. - Several i386 implementations also compile on amd64, so these were copied over to a separate directory and are now enabled on amd64. - Feature detection on amd64 has been fixed. - All known startup warnings have been fixed. - The core now handles arrays that are 'N plus a constant' in length. - Wrap a bunch of functions in HAVE_UNALIGNED_ACCESS to indicate that they require an architecture that handles unaligned access. liboil-0.3.17/aclocal.m40000644000175000017500000017624511332627664011666 00000000000000# generated automatically by aclocal 1.11 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, [m4_warning([this file was generated for autoconf 2.64. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*- # # Copyright (C) 1999-2006, 2007, 2008 Free Software Foundation, Inc. # Written by Thomas Tanner, 1999 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 17 LTDL_INIT # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE]) # ------------------------------------------ # DIRECTORY contains the libltdl sources. It is okay to call this # function multiple times, as long as the same DIRECTORY is always given. AC_DEFUN([LT_CONFIG_LTDL_DIR], [AC_BEFORE([$0], [LTDL_INIT]) _$0($*) ])# LT_CONFIG_LTDL_DIR # We break this out into a separate macro, so that we can call it safely # internally without being caught accidentally by the sed scan in libtoolize. m4_defun([_LT_CONFIG_LTDL_DIR], [dnl remove trailing slashes m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$])) m4_case(_LTDL_DIR, [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.' m4_if(_ARG_DIR, [.], [], [m4_define([_LTDL_DIR], _ARG_DIR) _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])], [m4_if(_ARG_DIR, _LTDL_DIR, [], [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])]) m4_popdef([_ARG_DIR]) ])# _LT_CONFIG_LTDL_DIR # Initialise: m4_define([_LTDL_DIR], []) # _LT_BUILD_PREFIX # ---------------- # If Autoconf is new enough, expand to `${top_build_prefix}', otherwise # to `${top_builddir}/'. m4_define([_LT_BUILD_PREFIX], [m4_ifdef([AC_AUTOCONF_VERSION], [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]), [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX], [${top_build_prefix}], [${top_builddir}/])], [${top_build_prefix}])], [${top_builddir}/])[]dnl ]) # LTDL_CONVENIENCE # ---------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with # '${top_build_prefix}' if available, otherwise with '${top_builddir}/', # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single # quotes!). If your package is not flat and you're not using automake, # define top_build_prefix, top_builddir, and top_srcdir appropriately # in your Makefiles. AC_DEFUN([LTDL_CONVENIENCE], [AC_BEFORE([$0], [LTDL_INIT])dnl dnl Although the argument is deprecated and no longer documented, dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one dnl here make sure it is the same as any other declaration of libltdl's dnl location! This also ensures lt_ltdl_dir is set when configure.ac is dnl not yet using an explicit LT_CONFIG_LTDL_DIR. m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl _$0() ])# LTDL_CONVENIENCE # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools, # now we have LT_CONFIG_LTDL_DIR: AU_DEFUN([AC_LIBLTDL_CONVENIENCE], [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) _LTDL_CONVENIENCE]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], []) # _LTDL_CONVENIENCE # ----------------- # Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]). m4_defun([_LTDL_CONVENIENCE], [case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la" LTDLDEPS=$LIBLTDL LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}" AC_SUBST([LIBLTDL]) AC_SUBST([LTDLDEPS]) AC_SUBST([LTDLINCL]) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" AC_SUBST([INCLTDL]) ])# _LTDL_CONVENIENCE # LTDL_INSTALLABLE # ---------------- # sets LIBLTDL to the link flags for the libltdl installable library # and LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl # is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if # available, otherwise with '${top_builddir}/', and LTDLINCL will be # prefixed with '${top_srcdir}/' (note the single quotes!). If your # package is not flat and you're not using automake, define top_build_prefix, # top_builddir, and top_srcdir appropriately in your Makefiles. # In the future, this macro may have to be called after LT_INIT. AC_DEFUN([LTDL_INSTALLABLE], [AC_BEFORE([$0], [LTDL_INIT])dnl dnl Although the argument is deprecated and no longer documented, dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one dnl here make sure it is the same as any other declaration of libltdl's dnl location! This also ensures lt_ltdl_dir is set when configure.ac is dnl not yet using an explicit LT_CONFIG_LTDL_DIR. m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl _$0() ])# LTDL_INSTALLABLE # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools, # now we have LT_CONFIG_LTDL_DIR: AU_DEFUN([AC_LIBLTDL_INSTALLABLE], [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])]) _LTDL_INSTALLABLE]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], []) # _LTDL_INSTALLABLE # ----------------- # Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]). m4_defun([_LTDL_INSTALLABLE], [if test -f $prefix/lib/libltdl.la; then lt_save_LDFLAGS="$LDFLAGS" LDFLAGS="-L$prefix/lib $LDFLAGS" AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes]) LDFLAGS="$lt_save_LDFLAGS" if test x"${lt_lib_ltdl-no}" = xyes; then if test x"$enable_ltdl_install" != xyes; then # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install']) enable_ltdl_install=no fi elif test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) fi fi # If configure.ac declared an installable ltdl, and the user didn't override # with --disable-ltdl-install, we will install the shipped libltdl. case $enable_ltdl_install in no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLDEPS= LTDLINCL= ;; *) enable_ltdl_install=yes ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la" LTDLDEPS=$LIBLTDL LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}" ;; esac AC_SUBST([LIBLTDL]) AC_SUBST([LTDLDEPS]) AC_SUBST([LTDLINCL]) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" AC_SUBST([INCLTDL]) ])# LTDL_INSTALLABLE # _LTDL_MODE_DISPATCH # ------------------- m4_define([_LTDL_MODE_DISPATCH], [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself: m4_if(_LTDL_DIR, [], [], dnl if _LTDL_MODE was not set already, the default value is `subproject': [m4_case(m4_default(_LTDL_MODE, [subproject]), [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR) _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])], [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])], [recursive], [], [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl dnl Be careful not to expand twice: m4_define([$0], []) ])# _LTDL_MODE_DISPATCH # _LT_LIBOBJ(MODULE_NAME) # ----------------------- # Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead # of into LIBOBJS. AC_DEFUN([_LT_LIBOBJ], [ m4_pattern_allow([^_LT_LIBOBJS$]) _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext" ])# _LT_LIBOBJS # LTDL_INIT([OPTIONS]) # -------------------- # Clients of libltdl can use this macro to allow the installer to # choose between a shipped copy of the ltdl sources or a preinstalled # version of the library. If the shipped ltdl sources are not in a # subdirectory named libltdl, the directory name must be given by # LT_CONFIG_LTDL_DIR. AC_DEFUN([LTDL_INIT], [dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) dnl We need to keep our own list of libobjs separate from our parent project, dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while dnl we look for our own LIBOBJs. m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ])) m4_pushdef([AC_LIBSOURCES]) dnl If not otherwise defined, default to the 1.5.x compatible subproject mode: m4_if(_LTDL_MODE, [], [m4_define([_LTDL_MODE], m4_default([$2], [subproject])) m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])], [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])]) AC_ARG_WITH([included_ltdl], [AS_HELP_STRING([--with-included-ltdl], [use the GNU ltdl sources included here])]) if test "x$with_included_ltdl" != xyes; then # We are not being forced to use the included libltdl sources, so # decide whether there is a useful installed version we can use. AC_CHECK_HEADER([ltdl.h], [AC_CHECK_DECL([lt_dlinterface_register], [AC_CHECK_LIB([ltdl], [lt_dladvise_preload], [with_included_ltdl=no], [with_included_ltdl=yes])], [with_included_ltdl=yes], [AC_INCLUDES_DEFAULT #include ])], [with_included_ltdl=yes], [AC_INCLUDES_DEFAULT] ) fi dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE dnl was called yet, then for old times' sake, we assume libltdl is in an dnl eponymous directory: AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])]) AC_ARG_WITH([ltdl_include], [AS_HELP_STRING([--with-ltdl-include=DIR], [use the ltdl headers installed in DIR])]) if test -n "$with_ltdl_include"; then if test -f "$with_ltdl_include/ltdl.h"; then : else AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include']) fi else with_ltdl_include=no fi AC_ARG_WITH([ltdl_lib], [AS_HELP_STRING([--with-ltdl-lib=DIR], [use the libltdl.la installed in DIR])]) if test -n "$with_ltdl_lib"; then if test -f "$with_ltdl_lib/libltdl.la"; then : else AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib']) fi else with_ltdl_lib=no fi case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in ,yes,no,no,) m4_case(m4_default(_LTDL_TYPE, [convenience]), [convenience], [_LTDL_CONVENIENCE], [installable], [_LTDL_INSTALLABLE], [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)]) ;; ,no,no,no,) # If the included ltdl is not to be used, then use the # preinstalled libltdl we found. AC_DEFINE([HAVE_LTDL], [1], [Define this if a modern libltdl is already installed]) LIBLTDL=-lltdl LTDLDEPS= LTDLINCL= ;; ,no*,no,*) AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together]) ;; *) with_included_ltdl=no LIBLTDL="-L$with_ltdl_lib -lltdl" LTDLDEPS= LTDLINCL="-I$with_ltdl_include" ;; esac INCLTDL="$LTDLINCL" # Report our decision... AC_MSG_CHECKING([where to find libltdl headers]) AC_MSG_RESULT([$LTDLINCL]) AC_MSG_CHECKING([where to find libltdl library]) AC_MSG_RESULT([$LIBLTDL]) _LTDL_SETUP dnl restore autoconf definition. m4_popdef([AC_LIBOBJ]) m4_popdef([AC_LIBSOURCES]) AC_CONFIG_COMMANDS_PRE([ _ltdl_libobjs= _ltdl_ltlibobjs= if test -n "$_LT_LIBOBJS"; then # Remove the extension. _lt_sed_drop_objext='s/\.o$//;s/\.obj$//' for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext" _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo" done fi AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs]) AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs]) ]) # Only expand once: m4_define([LTDL_INIT]) ])# LTDL_INIT # Old names: AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)]) AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)]) AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIB_LTDL], []) dnl AC_DEFUN([AC_WITH_LTDL], []) dnl AC_DEFUN([LT_WITH_LTDL], []) # _LTDL_SETUP # ----------- # Perform all the checks necessary for compilation of the ltdl objects # -- including compiler checks and header checks. This is a public # interface mainly for the benefit of libltdl's own configure.ac, most # other users should call LTDL_INIT instead. AC_DEFUN([_LTDL_SETUP], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_SYS_MODULE_EXT])dnl AC_REQUIRE([LT_SYS_MODULE_PATH])dnl AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl AC_REQUIRE([LT_LIB_DLLOAD])dnl AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl AC_REQUIRE([gl_FUNC_ARGZ])dnl m4_require([_LT_CHECK_OBJDIR])dnl m4_require([_LT_HEADER_DLFCN])dnl m4_require([_LT_CHECK_DLPREOPEN])dnl m4_require([_LT_DECL_SED])dnl dnl Don't require this, or it will be expanded earlier than the code dnl that sets the variables it relies on: _LT_ENABLE_INSTALL dnl _LTDL_MODE specific code must be called at least once: _LTDL_MODE_DISPATCH # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS # the user used. This is so that ltdl.h can pick up the parent projects # config.h file, The first file in AC_CONFIG_HEADERS must contain the # definitions required by ltdl.c. # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility). AC_CONFIG_COMMANDS_PRE([dnl m4_pattern_allow([^LT_CONFIG_H$])dnl m4_ifset([AH_HEADER], [LT_CONFIG_H=AH_HEADER], [m4_ifset([AC_LIST_HEADERS], [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`], [])])]) AC_SUBST([LT_CONFIG_H]) AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h], [], [], [AC_INCLUDES_DEFAULT]) AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])]) AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension]) name=ltdl LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` AC_SUBST([LTDLOPEN]) ])# _LTDL_SETUP # _LT_ENABLE_INSTALL # ------------------ m4_define([_LT_ENABLE_INSTALL], [AC_ARG_ENABLE([ltdl-install], [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])]) case ,${enable_ltdl_install},${enable_ltdl_convenience} in *yes*) ;; *) enable_ltdl_convenience=yes ;; esac m4_ifdef([AM_CONDITIONAL], [AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)]) ])# _LT_ENABLE_INSTALL # LT_SYS_DLOPEN_DEPLIBS # --------------------- AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_CACHE_CHECK([whether deplibs are loaded by dlopen], [lt_cv_sys_dlopen_deplibs], [# PORTME does your system automatically load deplibs for dlopen? # or its logical equivalent (e.g. shl_load for HP-UX < 11) # For now, we just catch OSes we know something about -- in the # future, we'll try test this programmatically. lt_cv_sys_dlopen_deplibs=unknown case $host_os in aix3*|aix4.1.*|aix4.2.*) # Unknown whether this is true for these versions of AIX, but # we want this `case' here to explicitly catch those versions. lt_cv_sys_dlopen_deplibs=unknown ;; aix[[4-9]]*) lt_cv_sys_dlopen_deplibs=yes ;; amigaos*) case $host_cpu in powerpc) lt_cv_sys_dlopen_deplibs=no ;; esac ;; darwin*) # Assuming the user has installed a libdl from somewhere, this is true # If you are looking for one http://www.opendarwin.org/projects/dlcompat lt_cv_sys_dlopen_deplibs=yes ;; freebsd* | dragonfly*) lt_cv_sys_dlopen_deplibs=yes ;; gnu* | linux* | k*bsd*-gnu) # GNU and its variants, using gnu ld.so (Glibc) lt_cv_sys_dlopen_deplibs=yes ;; hpux10*|hpux11*) lt_cv_sys_dlopen_deplibs=yes ;; interix*) lt_cv_sys_dlopen_deplibs=yes ;; irix[[12345]]*|irix6.[[01]]*) # Catch all versions of IRIX before 6.2, and indicate that we don't # know how it worked for any of those versions. lt_cv_sys_dlopen_deplibs=unknown ;; irix*) # The case above catches anything before 6.2, and it's known that # at 6.2 and later dlopen does load deplibs. lt_cv_sys_dlopen_deplibs=yes ;; netbsd* | netbsdelf*-gnu) lt_cv_sys_dlopen_deplibs=yes ;; openbsd*) lt_cv_sys_dlopen_deplibs=yes ;; osf[[1234]]*) # dlopen did load deplibs (at least at 4.x), but until the 5.x series, # it did *not* use an RPATH in a shared library to find objects the # library depends on, so we explicitly say `no'. lt_cv_sys_dlopen_deplibs=no ;; osf5.0|osf5.0a|osf5.1) # dlopen *does* load deplibs and with the right loader patch applied # it even uses RPATH in a shared library to search for shared objects # that the library depends on, but there's no easy way to know if that # patch is installed. Since this is the case, all we can really # say is unknown -- it depends on the patch being installed. If # it is, this changes to `yes'. Without it, it would be `no'. lt_cv_sys_dlopen_deplibs=unknown ;; osf*) # the two cases above should catch all versions of osf <= 5.1. Read # the comments above for what we know about them. # At > 5.1, deplibs are loaded *and* any RPATH in a shared library # is used to find them so we can finally say `yes'. lt_cv_sys_dlopen_deplibs=yes ;; qnx*) lt_cv_sys_dlopen_deplibs=yes ;; solaris*) lt_cv_sys_dlopen_deplibs=yes ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) libltdl_cv_sys_dlopen_deplibs=yes ;; esac ]) if test "$lt_cv_sys_dlopen_deplibs" != yes; then AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], [Define if the OS needs help to load dependent libraries for dlopen().]) fi ])# LT_SYS_DLOPEN_DEPLIBS # Old name: AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], []) # LT_SYS_MODULE_EXT # ----------------- AC_DEFUN([LT_SYS_MODULE_EXT], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl AC_CACHE_CHECK([which extension is used for runtime loadable modules], [libltdl_cv_shlibext], [ module=yes eval libltdl_cv_shlibext=$shrext_cmds ]) if test -n "$libltdl_cv_shlibext"; then m4_pattern_allow([LT_MODULE_EXT])dnl AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"], [Define to the extension used for runtime loadable modules, say, ".so".]) fi ])# LT_SYS_MODULE_EXT # Old name: AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_SHLIBEXT], []) # LT_SYS_MODULE_PATH # ------------------ AC_DEFUN([LT_SYS_MODULE_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl AC_CACHE_CHECK([which variable specifies run-time module search path], [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"]) if test -n "$lt_cv_module_path_var"; then m4_pattern_allow([LT_MODULE_PATH_VAR])dnl AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"], [Define to the name of the environment variable that determines the run-time module search path.]) fi ])# LT_SYS_MODULE_PATH # Old name: AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_SHLIBPATH], []) # LT_SYS_DLSEARCH_PATH # -------------------- AC_DEFUN([LT_SYS_DLSEARCH_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl AC_CACHE_CHECK([for the default library search path], [lt_cv_sys_dlsearch_path], [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"]) if test -n "$lt_cv_sys_dlsearch_path"; then sys_dlsearch_path= for dir in $lt_cv_sys_dlsearch_path; do if test -z "$sys_dlsearch_path"; then sys_dlsearch_path="$dir" else sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir" fi done m4_pattern_allow([LT_DLSEARCH_PATH])dnl AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"], [Define to the system default library search path.]) fi ])# LT_SYS_DLSEARCH_PATH # Old name: AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], []) # _LT_CHECK_DLPREOPEN # ------------------- m4_defun([_LT_CHECK_DLPREOPEN], [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], [libltdl_cv_preloaded_symbols], [if test -n "$lt_cv_sys_global_symbol_pipe"; then libltdl_cv_preloaded_symbols=yes else libltdl_cv_preloaded_symbols=no fi ]) if test x"$libltdl_cv_preloaded_symbols" = xyes; then AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1], [Define if libtool can extract symbol lists from object files.]) fi ])# _LT_CHECK_DLPREOPEN # LT_LIB_DLLOAD # ------------- AC_DEFUN([LT_LIB_DLLOAD], [m4_pattern_allow([^LT_DLLOADERS$]) LT_DLLOADERS= AC_SUBST([LT_DLLOADERS]) AC_LANG_PUSH([C]) LIBADD_DLOPEN= AC_SEARCH_LIBS([dlopen], [dl], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) if test "$ac_cv_search_dlopen" != "none required" ; then LIBADD_DLOPEN="-ldl" fi libltdl_cv_lib_dl_dlopen="yes" LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H # include #endif ]], [[dlopen(0, 0);]])], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes" LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"], [AC_CHECK_LIB([svld], [dlopen], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes" LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])]) if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes then lt_save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DLOPEN" AC_CHECK_FUNCS([dlerror]) LIBS="$lt_save_LIBS" fi AC_SUBST([LIBADD_DLOPEN]) LIBADD_SHL_LOAD= AC_CHECK_FUNC([shl_load], [AC_DEFINE([HAVE_SHL_LOAD], [1], [Define if you have the shl_load function.]) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"], [AC_CHECK_LIB([dld], [shl_load], [AC_DEFINE([HAVE_SHL_LOAD], [1], [Define if you have the shl_load function.]) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la" LIBADD_SHL_LOAD="-ldld"])]) AC_SUBST([LIBADD_SHL_LOAD]) case $host_os in darwin[[1567]].*) # We only want this for pre-Mac OS X 10.4. AC_CHECK_FUNC([_dyld_func_lookup], [AC_DEFINE([HAVE_DYLD], [1], [Define if you have the _dyld_func_lookup function.]) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"]) ;; beos*) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la" ;; cygwin* | mingw* | os2* | pw32*) AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include ]]) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la" ;; esac AC_CHECK_LIB([dld], [dld_link], [AC_DEFINE([HAVE_DLD], [1], [Define if you have the GNU dld library.]) LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"]) AC_SUBST([LIBADD_DLD_LINK]) m4_pattern_allow([^LT_DLPREOPEN$]) LT_DLPREOPEN= if test -n "$LT_DLLOADERS" then for lt_loader in $LT_DLLOADERS; do LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader " done AC_DEFINE([HAVE_LIBDLLOADER], [1], [Define if libdlloader will be built on this platform]) fi AC_SUBST([LT_DLPREOPEN]) dnl This isn't used anymore, but set it for backwards compatibility LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD" AC_SUBST([LIBADD_DL]) AC_LANG_POP ])# LT_LIB_DLLOAD # Old name: AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_DLLIB], []) # LT_SYS_SYMBOL_USCORE # -------------------- # does the compiler prefix global symbols with an underscore? AC_DEFUN([LT_SYS_SYMBOL_USCORE], [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl AC_CACHE_CHECK([for _ prefix in compiled symbols], [lt_cv_sys_symbol_underscore], [lt_cv_sys_symbol_underscore=no cat > conftest.$ac_ext <<_LT_EOF void nm_test_func(){} int main(){nm_test_func;return 0;} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. ac_nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then lt_cv_sys_symbol_underscore=yes else if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then : else echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD fi fi else echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.c >&AS_MESSAGE_LOG_FD fi rm -rf conftest* ]) sys_symbol_underscore=$lt_cv_sys_symbol_underscore AC_SUBST([sys_symbol_underscore]) ])# LT_SYS_SYMBOL_USCORE # Old name: AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], []) # LT_FUNC_DLSYM_USCORE # -------------------- AC_DEFUN([LT_FUNC_DLSYM_USCORE], [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl if test x"$lt_cv_sys_symbol_underscore" = xyes; then if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then AC_CACHE_CHECK([whether we have to add an underscore for dlsym], [libltdl_cv_need_uscore], [libltdl_cv_need_uscore=unknown save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DLOPEN" _LT_TRY_DLOPEN_SELF( [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes], [], [libltdl_cv_need_uscore=cross]) LIBS="$save_LIBS" ]) fi fi if test x"$libltdl_cv_need_uscore" = xyes; then AC_DEFINE([NEED_USCORE], [1], [Define if dlsym() requires a leading underscore in symbol names.]) fi ])# LT_FUNC_DLSYM_USCORE # Old name: AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], []) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Figure out how to run the assembler. -*- Autoconf -*- # Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_PROG_AS # ---------- AC_DEFUN([AM_PROG_AS], [# By default we simply use the C compiler to build assembly code. AC_REQUIRE([AC_PROG_CC]) test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl ]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/ac_libtool_tags.m4]) m4_include([m4/as-compiler-flag.m4]) m4_include([m4/as-gcc-inline-assembly.m4]) m4_include([m4/as-host-defines.m4]) m4_include([m4/as-intrinsics.m4]) m4_include([m4/as-nano.m4]) m4_include([m4/as-unaligned-access.m4]) m4_include([m4/ax_create_stdint_h.m4]) m4_include([m4/gtk-doc.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/pkg.m4]) liboil-0.3.17/install-sh0000755000175000017500000003253711332627667012030 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: liboil-0.3.17/compile0000755000175000017500000000717311161565207011367 00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2005-05-14.22 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; esac ofile= cfile= eat= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we strip `-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. # Note: use `[/.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: liboil-0.3.17/ltmain.sh0000755000175000017500000073337411332627657011655 00000000000000# Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print informational messages (default) # --version print version information # -h, --help print short or long help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.2.6 Debian-2.2.6a-4 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool VERSION="2.2.6 Debian-2.2.6a-4" TIMESTAMP="" package_revision=1.3012 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # NLS nuisances: We save the old values to restore during execute mode. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # Generated shell functions inserted here. # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result case $progname in -*) progname=./$progname ;; esac # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname${mode+: }$mode: $*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` done my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "X$my_tmpdir" | $Xsed } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "X$1" | $Xsed \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_version # Echo version message to standard output and exit. func_version () { $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $SED -n '/^# Usage:/,/# -h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" $ECHO $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help # Echo long help message to standard output and exit. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" exit $? } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: # Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then # Yippee, $ECHO works! : else # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break case $1 in # Valid mode arguments: clean) ;; compile) ;; execute) ;; finish) ;; install) ;; link) ;; relink) ;; uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } ## ----------- ## ## Main. ## ## ----------- ## $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$mode' for more information." } # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case "$@ " in " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir command="$command -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$mode'" ;; esac $ECHO $ECHO "Try \`$progname --help' for more information about other modes." exit $? } # Now that we've collected a possible --mode arg, show help if necessary $opt_help && func_mode_help # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_quote_for_eval "$file" args="$args $func_quote_for_eval_result" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" $ECHO "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS $ECHO "X----------------------------------------------------------------------" | $Xsed $ECHO "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done $ECHO $ECHO "If you ever happen to want to link against installed libraries" $ECHO "in a given directory, LIBDIR, you must either use libtool, and" $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" $ECHO "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" $ECHO " during execution" fi if test -n "$runpath_var"; then $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" $ECHO " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $ECHO $ECHO "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" $ECHO "pages." ;; *) $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac $ECHO "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } test "$mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $ECHO "X$nonopt" | $GREP shtool >/dev/null; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi $ECHO >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; " case $host in *cygwin* | *mingw* | *cegcc* ) $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) symtab_cflags="$symtab_cflags $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper_part1 [arg=no] # # Emit the first part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part1 () { func_emit_wrapper_part1_arg1=no if test -n "$1" ; then func_emit_wrapper_part1_arg1=$1 fi $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then ECHO=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then # Yippee, \$ECHO works! : else # Restart under the correct shell, and then maybe \$ECHO will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $ECHO "\ # Find the directory that this script lives in. thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done " } # end: func_emit_wrapper_part1 # func_emit_wrapper_part2 [arg=no] # # Emit the second part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part2 () { func_emit_wrapper_part2_arg1=no if test -n "$1" ; then func_emit_wrapper_part2_arg1=$1 fi $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # end: func_emit_wrapper_part2 # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=no if test -n "$1" ; then func_emit_wrapper_arg1=$1 fi # split this up so that func_emit_cwrapperexe_src # can call each part independently. func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_path_tmp1=`( cmd //c echo "$1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_tmp1=`cygpath -w "$1"` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result="" fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # Path separators are also converted from $build format to # $host format. If ARG begins or ends with a path separator # character, it is preserved (but converted to $host format) # on output. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_to_host_pathlist_tmp2="$1" # Once set for this call, this variable should not be # reassigned. It is used in tha fallback case. func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e 's|^:*||' -e 's|:*$||'` case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" fi fi fi IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result" ; then func_error "Could not determine the host path(s) corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ;; esac ;; esac fi } # end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include # define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include # define HAVE_SETENV # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif # endif #endif #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif #ifdef _MSC_VER # define S_IXUSR _S_IEXEC # define stat _stat # ifndef _INTPTR_T_DEFINED # define intptr_t int # endif #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifdef __CYGWIN__ # define FOPEN_WB "wb" #endif #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #undef LTWRAPPER_DEBUGPRINTF #if defined DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_fatal (const char *message, ...); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_opt_process_env_set (const char *arg); void lt_opt_process_env_prepend (const char *arg); void lt_opt_process_env_append (const char *arg); int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); static const char *script_text_part1 = EOF func_emit_wrapper_part1 yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", tmp_pathspec)); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("Could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? value : ""))); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } int lt_split_name_value (const char *arg, char** name, char** value) { const char *p; int len; if (!arg || !*arg) return 1; p = strchr (arg, (int)'='); if (!p) return 1; *value = xstrdup (++p); len = strlen (arg) - strlen (*value); *name = XMALLOC (char, len); strncpy (*name, arg, len-1); (*name)[len - 1] = '\0'; return 0; } void lt_opt_process_env_set (const char *arg) { char *name = NULL; char *value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); } lt_setenv (name, value); XFREE (name); XFREE (value); } void lt_opt_process_env_prepend (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); } new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_opt_process_env_append (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); } new_value = lt_extend_str (getenv (name), value, 1); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF } # end: func_emit_cwrapperexe_src # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname '-L' '' "$arg" dir=$func_stripname_result if test -z "$dir"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $ECHO $ECHO "*** Warning: Trying to link with static lib archive $deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because the file extensions .$libext of this argument makes me believe" $ECHO "*** that it is just a static archive that I should not use here." else $ECHO $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) temp_rpath="$temp_rpath$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then $ECHO if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $ECHO $ECHO "*** And there doesn't seem to be a static archive available" $ECHO "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $ECHO $ECHO "*** Warning: This system can not link to static lib archive $lib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $ECHO "*** But as you try to build a module library, libtool will still create " $ECHO "*** a static module, that should work as long as the dlopening application" $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_dirname "$deplib" "" "." dir="$func_dirname_result" # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else $ECHO $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` done fi if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | $GREP . >/dev/null; then $ECHO if test "X$deplibs_check_method" = "Xnone"; then $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $ECHO $ECHO "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" $ECHO "*** a static module, that should work as long as the dlopening" $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $ECHO "*** The inter-library dependencies that have been dropped here will be" $ECHO "*** automatically added whenever a program is linked with this library" $ECHO "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $ECHO $ECHO "*** Since this library must not contain undefined symbols," $ECHO "*** because either the platform does not support them or" $ECHO "*** it was explicitly requested with -no-undefined," $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" delfiles="$delfiles $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" $ECHO 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done $ECHO ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=$obj func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$delfiles $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *cegcc) # Disable wrappers for cegcc, we are cross compiling anyway. wrappers_required=no ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $ECHO for shipping. if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$oldobjs $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else $ECHO "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$newdlfiles $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlprefiles="$newdlprefiles $libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$mode" = link || test "$mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) RM="$RM $arg"; rmforce=yes ;; -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result rmfiles="$rmfiles $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 liboil-0.3.17/liboil.pc.in0000644000175000017500000000050210717203073012175 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@/liboil-@LIBOIL_MAJORMINOR@ toolsdir=${exec_prefix}/bin Name: liboil-@LIBOIL_MAJORMINOR@ Description: Library of Optimized Inner Loops Version: @VERSION@ Libs: -L${libdir} -loil-@LIBOIL_MAJORMINOR@ @LIBM@ @LIBRT@ Cflags: -I${includedir} liboil-0.3.17/testsuite/0000777000175000017500000000000011332637377012126 500000000000000liboil-0.3.17/testsuite/test1.c0000644000175000017500000000737510717203073013246 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include void hist(OilTest *Test); int main (int argc, char *argv[]) { OilFunctionClass *klass; OilFunctionImpl *impl; OilTest *test; int i; int n; //int j; int ret; unsigned int cpu_flags; oil_init (); cpu_flags = oil_cpu_get_flags (); n = oil_class_get_n_classes (); for (i=0;iname); test = oil_test_new (klass); if (test == NULL) { printf(" bad prototype\n"); continue; } for (impl = klass->first_impl; impl; impl = impl->next) { printf(" %s\n", impl->name); if ((impl->flags & OIL_CPU_FLAG_MASK) & ~cpu_flags) { printf(" not supported\n"); } else { test->n = 1600; ret = oil_test_check_impl (test, impl); if (ret) { #if 0 printf(" %lu %g\n",test->prof.min, (double)test->prof.total/test->prof.n); for(j=0;jprof.hist_n;j++){ printf(" %lu %d\n",test->prof.hist_time[j],test->prof.hist_count[j]); } #endif printf(" ave=%g std=%g\n", impl->profile_ave, impl->profile_std); //hist(test); } else { printf(" not tested\n"); break; } } } oil_test_free (test); } return 0; } void hist(OilTest *test) { double ave; double std; int max_i; double off; double s; double s2; int i; int n; double x; do { s = s2 = 0; n = 0; max_i = -1; for(i=0;i<10;i++){ x = test->prof.hist_time[i]; s2 += x * x * test->prof.hist_count[i]; s += x * test->prof.hist_count[i]; n += test->prof.hist_count[i]; if (test->prof.hist_count[i] > 0) { if (max_i == -1 || test->prof.hist_time[i] > test->prof.hist_time[max_i]) { max_i = i; } } } ave = s / n; std = sqrt (s2 - s * s / n + n*n) / (n-1); off = (test->prof.hist_time[max_i] - ave)/std; printf(" ave=%g std=%g max=%ld off=%g %s\n", ave, std, test->prof.hist_time[max_i], off, (off>4.0)?"yes":"no"); if (off > 4.0) { test->prof.hist_count[max_i] = 0; } } while (off > 4.0); printf(" ave=%g std=%g\n", ave, std); } liboil-0.3.17/testsuite/proto4.c0000644000175000017500000000426410717203073013427 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include int main (int argc, char *argv[]) { OilFunctionClass *klass; int i; int n; oil_init (); n = oil_class_get_n_classes (); for (i=0;iprototype) { OilPrototype *proto; char *string; proto = oil_prototype_from_string (klass->prototype); if (proto == NULL) { printf ("ERROR bad prototype for %s\n", klass->name); continue; } string = oil_prototype_to_string (proto); printf("%s (%s)\n", klass->name, string); oil_prototype_free (proto); free(string); } else { printf("ERROR no prototype for %s\n", klass->name); } } return 0; } liboil-0.3.17/testsuite/stack_align.c0000644000175000017500000002043511067011142014446 00000000000000/* * Copyright (c) 2004 David A. Schleef * Copyright (c) 2005 Eric Anholt * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #ifdef HAVE_INTTYPES_H #include #endif #include #include #include int verbose = 1; /* Amount by which results of different types are allowed to deviate from the * reference. */ #define INT_EPSILON 1 #define FLOAT_EPSILON 0.0001 void dump_array (void *data, void *ref_data, OilType type, int pre_n, int stride, int post_n) { int i, j; int s2 = oil_type_sizeof (type); double x; #define DUMP(type, format, int) do { \ for(i=0;i epsilon) { \ printf("*" format "* (" format ") ", \ OIL_GET(data, i*stride + j*s2, type), \ OIL_GET(ref_data, i*stride + j*s2, type)); \ } else { \ printf(" " format " ", OIL_GET(data, i*stride + j*s2, type)); \ } \ } \ printf("\n"); \ } \ } while(0) switch(type) { case OIL_TYPE_s8p: case OIL_TYPE_u8p: DUMP(int8_t, "0x%02" PRIx8, 1); break; case OIL_TYPE_s16p: case OIL_TYPE_u16p: DUMP(uint16_t, "0x%04" PRIx16, 1); break; case OIL_TYPE_s32p: case OIL_TYPE_u32p: DUMP(uint32_t, "0x%08" PRIx32, 1); break; case OIL_TYPE_f32p: DUMP(float, "%g", 0); break; case OIL_TYPE_s64p: case OIL_TYPE_u64p: DUMP(uint64_t, "0x%016" PRIx64, 1); break; case OIL_TYPE_f64p: DUMP(double, "%g", 0); break; default: break; } } void dump_source (OilTest *test) { int i; for(i=0;iparams[i]; if (p->is_pointer) { if (p->direction == 'i' || p->direction == 's') { printf (" %s:\n", p->parameter_name); dump_array (p->src_data + p->test_header, p->src_data + p->test_header, p->type, p->pre_n, p->stride, p->post_n); } } } } void dump_dest_ref (OilTest *test) { int i; for(i=0;iparams[i]; if (p->is_pointer) { if (p->direction == 'd') { printf (" %s:\n", p->parameter_name); dump_array (p->ref_data + p->test_header, p->ref_data + p->test_header, p->type, p->pre_n, p->stride, p->post_n); } } } } int test_difference (void *data, void *ref_data, OilType type, int pre_n, int stride, int post_n) { int i, j; int s2 = oil_type_sizeof (type); double x; #define CHECK(type, is_int) do { \ float epsilon = (is_int) ? INT_EPSILON : FLOAT_EPSILON; \ for(i=0;i epsilon) { \ return 1; \ } \ } \ } \ return 0; \ } while(0) switch(type) { case OIL_TYPE_s8p: CHECK(int8_t, 1); break; case OIL_TYPE_u8p: CHECK(uint8_t, 1); break; case OIL_TYPE_s16p: CHECK(int16_t, 1); break; case OIL_TYPE_u16p: CHECK(uint16_t, 1); break; case OIL_TYPE_s32p: CHECK(int32_t, 1); break; case OIL_TYPE_u32p: CHECK(uint32_t, 1); break; case OIL_TYPE_s64p: CHECK(int64_t, 1); break; case OIL_TYPE_u64p: CHECK(uint64_t, 1); break; case OIL_TYPE_f32p: CHECK(float, 0); break; case OIL_TYPE_f64p: CHECK(double, 0); break; default: return 1; } } int check_test (OilTest *test) { int i, failed = 0; for(i=0;iparams[i]; if (p->is_pointer) { if (p->direction == 'i' || p->direction == 'd') { if (!test_difference(p->test_data + p->test_header, p->ref_data + p->test_header, p->type, p->pre_n, p->stride, p->post_n)) continue; printf (" Failure in %s (marked by *, ref in ()):\n", p->parameter_name); dump_array (p->test_data + p->test_header, p->ref_data + p->test_header, p->type, p->pre_n, p->stride, p->post_n); failed = 1; } } } return failed; } void print_align(void *ptr) { int i[4]; if (verbose)printf("stack addr %p\n", &i); } OilFunctionClass *realign_klass; int realign_align; int realign_return; void realign(int align) { #ifdef HAVE_GCC_ASM #ifdef HAVE_I386 __asm__ __volatile__ ( " sub %%edi, %%esp\n" #ifdef HAVE_SYMBOL_UNDERSCORE " call _check_class_with_alignment\n" #else " call check_class_with_alignment\n" #endif " add %%edi, %%esp\n" :: "D" (align) ); #endif #ifdef HAVE_AMD64 __asm__ __volatile__ ( " sub %%rbx, %%rsp\n" #ifdef HAVE_SYMBOL_UNDERSCORE " call _check_class_with_alignment\n" #else " call check_class_with_alignment\n" #endif " add %%rbx, %%rsp\n" :: "b" (align) ); #endif #endif } void check_class_with_alignment (void) { OilFunctionClass *klass = realign_klass; int align = realign_align; int test_failed = 0; OilTest *test; OilFunctionImpl *impl; test = oil_test_new(klass); oil_test_set_iterations(test, 1); test->n = 100; impl = klass->reference_impl; oil_test_check_impl (test, impl); for (impl = klass->first_impl; impl; impl = impl->next) { if (impl == klass->reference_impl) continue; if (oil_impl_is_runnable (impl)) { if (!oil_test_check_impl (test, impl)) { printf ("impl %s with align %d\n", impl->name, align); printf("dests for %s:\n", klass->name); dump_dest_ref(test); printf("sources for %s:\n", klass->name); dump_source(test); } } } oil_test_free(test); realign_return = test_failed; } int check_class(OilFunctionClass *klass) { OilTest *test; int failed = 0; int align; int step = 4; oil_class_optimize (klass); if(verbose) printf("checking class %s\n", klass->name); test = oil_test_new(klass); #ifdef HAVE_AMD64 step = 16; #endif for (align = 0; align <= 32; align += step) { printf(" alignment %d\n", align); realign_klass = klass; realign_align = align; realign(align); failed |= realign_return; } oil_test_free (test); return failed; } int main (int argc, char *argv[]) { int failed = 0; int i, n; oil_init (); #ifdef __APPLE__ /* the dynamic loader on MacOS/X crashes if someone unaligns the stack, so it's unlikely that any code gets away with doing it. Our test code doesn't get away with it either, so we'll just bail out. */ return 0; #endif n = oil_class_get_n_classes (); for (i = 0; i < n; i++) { OilFunctionClass *klass = oil_class_get_by_index(i); failed |= check_class(klass); } return failed; } liboil-0.3.17/testsuite/Makefile.am0000644000175000017500000000050611067011142014054 00000000000000 SUBDIRS = instruction programs = align moo introspect proto1 proto2 test1 proto3 proto4 stride \ dso_check abs md5 md5_profile trans copy zigzag mmx_engine stack_align \ double_catch check_PROGRAMS = $(programs) noinst_PROGRAMS = list_impls TESTS = $(programs) AM_LDFLAGS = $(LIBOIL_LIBS) AM_CFLAGS = $(LIBOIL_CFLAGS) liboil-0.3.17/testsuite/dso_check.c0000644000175000017500000000351210717203073014115 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include int main (int argc, char *argv[]) { OilFunctionClass *klass; int i; int n; oil_init (); printf("null is at %p\n", &oil_function_class_ptr_null); oil_null (); n = oil_class_get_n_classes (); for (i=0;iname); } return 0; } liboil-0.3.17/testsuite/stride.c0000644000175000017500000001041110717203073013461 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include void hist(OilTest *Test); int verbose = 0; int fail = 0; int main (int argc, char *argv[]) { OilFunctionClass *klass; OilFunctionImpl *impl; OilTest *test; int i; int n; int j; int ret; unsigned int cpu_flags; if (argc > 1 && strcmp(argv[1],"-v") == 0) { verbose = 1; } oil_init (); cpu_flags = oil_cpu_get_flags (); n = oil_class_get_n_classes (); for (i=0;iname); test = oil_test_new (klass); if (test == NULL) { printf("class \"%s\" has bad prototype\n", klass->name); fail = 1; continue; } oil_test_set_iterations (test, 1); test->n = 1 + oil_rand_u8(); test->m = 1 + oil_rand_u8(); oil_test_check_impl (test, klass->reference_impl); for(j=0;jparams[j].is_stride) { test->params[j].value += oil_type_sizeof(test->params[j].type) * (oil_rand_u8()&0xf); } } test->inited = 0; for (impl = klass->first_impl; impl; impl = impl->next) { printf(" %s\n", impl->name); if ((impl->flags & OIL_CPU_FLAG_MASK) & ~cpu_flags) { printf(" not supported\n"); } else { ret = oil_test_check_impl (test, impl); if (!ret) { printf(" failed stride test\n"); fail = 1; } #if 0 printf(" %lu %g\n",test->prof.min, (double)test->prof.total/test->prof.n); for(j=0;jprof.hist_n;j++){ printf(" %lu %d\n",test->prof.hist_time[j],test->prof.hist_count[j]); } printf(" ave=%g std=%g\n", impl->profile_ave, impl->profile_std); //hist(test); #endif } } oil_test_free (test); } return fail; } void hist(OilTest *test) { double ave; double std; int max_i; double off; double s; double s2; int i; int n; double x; do { s = s2 = 0; n = 0; max_i = -1; for(i=0;i<10;i++){ x = test->prof.hist_time[i]; s2 += x * x * test->prof.hist_count[i]; s += x * test->prof.hist_count[i]; n += test->prof.hist_count[i]; if (test->prof.hist_count[i] > 0) { if (max_i == -1 || test->prof.hist_time[i] > test->prof.hist_time[max_i]) { max_i = i; } } } ave = s / n; std = sqrt (s2 - s * s / n + n*n) / (n-1); off = (test->prof.hist_time[max_i] - ave)/std; printf(" ave=%g std=%g max=%ld off=%g %s\n", ave, std, test->prof.hist_time[max_i], off, (off>4.0)?"yes":"no"); if (off > 4.0) { test->prof.hist_count[max_i] = 0; } } while (off > 4.0); printf(" ave=%g std=%g\n", ave, std); } liboil-0.3.17/testsuite/list_impls.c0000644000175000017500000000362710717203073014361 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include int main (int argc, char *argv[]) { int failed = 0; int n_classes; int n_impls; int i; oil_init (); n_classes = oil_class_get_n_classes(); n_impls = 0; for(i=0;ifirst_impl; impl; impl=impl->next) { printf("%s:%s\n", klass->name, impl->name); } } return failed; } liboil-0.3.17/testsuite/moo.c0000644000175000017500000000273411066763263013004 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include int main (int argc, char *argv[]) { oil_init (); oil_init (); return 0; } liboil-0.3.17/testsuite/md5.c0000644000175000017500000000673310717203073012670 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include char *message = "liboil md5 test\n"; //char *message = ""; #ifdef WORDS_BIGENDIAN #define uint32_from_host(a) \ ((((a)&0xff)<<24)|(((a)&0xff00)<<8)|(((a)&0xff0000)>>8)|(((a)>>24)&0xff)) #else #define uint32_from_host(a) (a) #endif void test(void) { uint32_t state[4]; uint32_t src[16]; int len; state[0] = 0x67452301; state[1] = 0xefcdab89; state[2] = 0x98badcfe; state[3] = 0x10325476; memset (src, 0, 64); len = strlen (message); memcpy (src, message, len); ((uint8_t *)src)[len] = 0x80; src[14] = uint32_from_host(len << 3); src[15] = 0; oil_md5 (state, src); printf("%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", state[0]&0xff, (state[0]>>8)&0xff, (state[0]>>16)&0xff, (state[0]>>24)&0xff, state[1]&0xff, (state[1]>>8)&0xff, (state[1]>>16)&0xff, (state[1]>>24)&0xff, state[2]&0xff, (state[2]>>8)&0xff, (state[2]>>16)&0xff, (state[2]>>24)&0xff, state[3]&0xff, (state[3]>>8)&0xff, (state[3]>>16)&0xff, (state[3]>>24)&0xff); } int main (int argc, char *argv[]) { OilFunctionClass *klass; OilFunctionImpl *impl; oil_init (); klass = oil_class_get ("md5"); oil_class_optimize(klass); printf("class=%s\n", klass->name); for (impl = klass->first_impl; impl; impl=impl->next) { printf("impl=%p\n", impl); printf(" func=%p\n", impl->func); printf(" name=%s\n", impl->name); printf(" flags=%08x\n", impl->flags); } oil_class_choose_by_name (klass, "md5_c"); impl = klass->chosen_impl; printf("chosen=%p\n", impl); impl = klass->reference_impl; printf("ref=%p\n", impl); test(); oil_class_choose_by_name (klass, "md5_asm1"); impl = klass->chosen_impl; printf("chosen=%p\n", impl); impl = klass->reference_impl; printf("ref=%p\n", impl); test(); oil_class_choose_by_name (klass, "md5_asm2"); impl = klass->chosen_impl; printf("chosen=%p\n", impl); impl = klass->reference_impl; printf("ref=%p\n", impl); test(); return 0; } liboil-0.3.17/testsuite/double_catch.c0000644000175000017500000000142311067011142014577 00000000000000 #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #ifdef HAVE_I386 void unknown_insn(void *far) { asm ("ud2"); } #define HAVE_ILLEGAL_INSN #endif #ifdef HAVE_POWERPC void unknown_insn(void *far) { asm (".long 0"); } #define HAVE_ILLEGAL_INSN #endif int main(void) { oil_init(); #ifdef HAVE_ILLEGAL_INSN oil_fault_check_enable(); if (oil_fault_check_try(unknown_insn, NULL)) { printf("didn't catch failure\n"); return 1; } if (oil_fault_check_try(unknown_insn, NULL)) { printf("didn't catch failure\n"); return 1; } oil_fault_check_disable(); printf("OK\n"); #else printf("No illegal instruction for this architecture, test inconclusive\n"); #endif return 0; } liboil-0.3.17/testsuite/abs.c0000644000175000017500000000450110717203073012737 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include void test(void) { int i; float *src; float *dest; src = malloc(100*sizeof(float)); dest = malloc(100*sizeof(float)); for(i=0;i<100;i++){ src[i] = (i-50)*100; } oil_abs_f32_f32 (dest, 4, src, 4, 100); for (i=0; i<100; i++) { printf("%d %g %g\n", i, src[i], dest[i]); } } int main (int argc, char *argv[]) { OilFunctionClass *klass; OilFunctionImpl *impl; oil_init (); klass = oil_class_get ("abs_f32_f32"); oil_class_optimize(klass); printf("class=%s\n", klass->name); for (impl = klass->first_impl; impl; impl=impl->next) { printf("impl=%p\n", impl); printf(" func=%p\n", impl->func); printf(" name=%s\n", impl->name); printf(" flags=%08x\n", impl->flags); } impl = klass->chosen_impl; printf("chosen=%p\n", impl); impl = klass->reference_impl; printf("ref=%p\n", impl); test(); return 0; } liboil-0.3.17/testsuite/proto1.c0000644000175000017500000000450310717203073013420 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include int main (int argc, char *argv[]) { OilFunctionClass *klass; int i; int j; int n; oil_init (); n = oil_class_get_n_classes (); for (i=0;iprototype) { OilPrototype *proto; proto = oil_prototype_from_string (klass->prototype); if (proto == NULL) { printf ("ERROR bad prototype for %s\n", klass->name); continue; } for(j=0;jn_params;j++){ if (proto->params[j].parameter_type == OIL_ARG_UNKNOWN) { printf("ERROR bad parameter %s(%s) [%s]\n", klass->name, klass->prototype, proto->params[j].parameter_name); break; } } oil_prototype_free (proto); } else { printf("ERROR no prototype for %s\n", klass->name); } } return 0; } liboil-0.3.17/testsuite/proto2.c0000644000175000017500000000637410717203073013431 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include static OilParameter * get_param_by_type (OilPrototype *proto, OilArgType ptype); int main (int argc, char *argv[]) { OilFunctionClass *klass; int i; int j; int n; oil_init (); n = oil_class_get_n_classes (); for (i=0;iprototype) { OilPrototype *proto; OilParameter params[OIL_ARG_LAST]; OilParameter *p; memset (params, 0, sizeof(params)); proto = oil_prototype_from_string (klass->prototype); printf("%s\n", klass->name); if (proto) { for(j=0;jn_params;j++){ printf(" (%s) (%s) %d %d [%s] [%s]\n", proto->params[j].type_name, proto->params[j].parameter_name, proto->params[j].type, proto->params[j].parameter_type, oil_type_name (proto->params[j].type), oil_arg_type_name (proto->params[j].parameter_type)); if (proto->params[j].parameter_type == OIL_ARG_UNKNOWN) { printf("unknown parameter type\n"); } } for(j=0;jn_params;j++){ memcpy (¶ms[proto->params[j].parameter_type], &proto->params[j], sizeof (OilParameter)); } /* n */ p = get_param_by_type (proto, OIL_ARG_N); if (p) { printf(" n: yes\n"); } else { printf(" n: no\n"); } oil_prototype_free (proto); } else { printf(" bad prototype\n"); } } } return 0; } static OilParameter * get_param_by_type (OilPrototype *proto, OilArgType ptype) { int i; for(i=0;in_params;i++){ if (proto->params[i].parameter_type == ptype) { return &proto->params[i]; } } return NULL; } liboil-0.3.17/testsuite/Makefile.in0000644000175000017500000007350411332627674014117 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = $(am__EXEEXT_1) noinst_PROGRAMS = list_impls$(EXEEXT) TESTS = $(am__EXEEXT_1) subdir = testsuite DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = align$(EXEEXT) moo$(EXEEXT) introspect$(EXEEXT) \ proto1$(EXEEXT) proto2$(EXEEXT) test1$(EXEEXT) proto3$(EXEEXT) \ proto4$(EXEEXT) stride$(EXEEXT) dso_check$(EXEEXT) \ abs$(EXEEXT) md5$(EXEEXT) md5_profile$(EXEEXT) trans$(EXEEXT) \ copy$(EXEEXT) zigzag$(EXEEXT) mmx_engine$(EXEEXT) \ stack_align$(EXEEXT) double_catch$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) abs_SOURCES = abs.c abs_OBJECTS = abs.$(OBJEXT) abs_LDADD = $(LDADD) align_SOURCES = align.c align_OBJECTS = align.$(OBJEXT) align_LDADD = $(LDADD) copy_SOURCES = copy.c copy_OBJECTS = copy.$(OBJEXT) copy_LDADD = $(LDADD) double_catch_SOURCES = double_catch.c double_catch_OBJECTS = double_catch.$(OBJEXT) double_catch_LDADD = $(LDADD) dso_check_SOURCES = dso_check.c dso_check_OBJECTS = dso_check.$(OBJEXT) dso_check_LDADD = $(LDADD) introspect_SOURCES = introspect.c introspect_OBJECTS = introspect.$(OBJEXT) introspect_LDADD = $(LDADD) list_impls_SOURCES = list_impls.c list_impls_OBJECTS = list_impls.$(OBJEXT) list_impls_LDADD = $(LDADD) md5_SOURCES = md5.c md5_OBJECTS = md5.$(OBJEXT) md5_LDADD = $(LDADD) md5_profile_SOURCES = md5_profile.c md5_profile_OBJECTS = md5_profile.$(OBJEXT) md5_profile_LDADD = $(LDADD) mmx_engine_SOURCES = mmx_engine.c mmx_engine_OBJECTS = mmx_engine.$(OBJEXT) mmx_engine_LDADD = $(LDADD) moo_SOURCES = moo.c moo_OBJECTS = moo.$(OBJEXT) moo_LDADD = $(LDADD) proto1_SOURCES = proto1.c proto1_OBJECTS = proto1.$(OBJEXT) proto1_LDADD = $(LDADD) proto2_SOURCES = proto2.c proto2_OBJECTS = proto2.$(OBJEXT) proto2_LDADD = $(LDADD) proto3_SOURCES = proto3.c proto3_OBJECTS = proto3.$(OBJEXT) proto3_LDADD = $(LDADD) proto4_SOURCES = proto4.c proto4_OBJECTS = proto4.$(OBJEXT) proto4_LDADD = $(LDADD) stack_align_SOURCES = stack_align.c stack_align_OBJECTS = stack_align.$(OBJEXT) stack_align_LDADD = $(LDADD) stride_SOURCES = stride.c stride_OBJECTS = stride.$(OBJEXT) stride_LDADD = $(LDADD) test1_SOURCES = test1.c test1_OBJECTS = test1.$(OBJEXT) test1_LDADD = $(LDADD) trans_SOURCES = trans.c trans_OBJECTS = trans.$(OBJEXT) trans_LDADD = $(LDADD) zigzag_SOURCES = zigzag.c zigzag_OBJECTS = zigzag.$(OBJEXT) zigzag_LDADD = $(LDADD) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = abs.c align.c copy.c double_catch.c dso_check.c introspect.c \ list_impls.c md5.c md5_profile.c mmx_engine.c moo.c proto1.c \ proto2.c proto3.c proto4.c stack_align.c stride.c test1.c \ trans.c zigzag.c DIST_SOURCES = abs.c align.c copy.c double_catch.c dso_check.c \ introspect.c list_impls.c md5.c md5_profile.c mmx_engine.c \ moo.c proto1.c proto2.c proto3.c proto4.c stack_align.c \ stride.c test1.c trans.c zigzag.c RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = instruction programs = align moo introspect proto1 proto2 test1 proto3 proto4 stride \ dso_check abs md5 md5_profile trans copy zigzag mmx_engine stack_align \ double_catch AM_LDFLAGS = $(LIBOIL_LIBS) AM_CFLAGS = $(LIBOIL_CFLAGS) all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu testsuite/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list abs$(EXEEXT): $(abs_OBJECTS) $(abs_DEPENDENCIES) @rm -f abs$(EXEEXT) $(LINK) $(abs_OBJECTS) $(abs_LDADD) $(LIBS) align$(EXEEXT): $(align_OBJECTS) $(align_DEPENDENCIES) @rm -f align$(EXEEXT) $(LINK) $(align_OBJECTS) $(align_LDADD) $(LIBS) copy$(EXEEXT): $(copy_OBJECTS) $(copy_DEPENDENCIES) @rm -f copy$(EXEEXT) $(LINK) $(copy_OBJECTS) $(copy_LDADD) $(LIBS) double_catch$(EXEEXT): $(double_catch_OBJECTS) $(double_catch_DEPENDENCIES) @rm -f double_catch$(EXEEXT) $(LINK) $(double_catch_OBJECTS) $(double_catch_LDADD) $(LIBS) dso_check$(EXEEXT): $(dso_check_OBJECTS) $(dso_check_DEPENDENCIES) @rm -f dso_check$(EXEEXT) $(LINK) $(dso_check_OBJECTS) $(dso_check_LDADD) $(LIBS) introspect$(EXEEXT): $(introspect_OBJECTS) $(introspect_DEPENDENCIES) @rm -f introspect$(EXEEXT) $(LINK) $(introspect_OBJECTS) $(introspect_LDADD) $(LIBS) list_impls$(EXEEXT): $(list_impls_OBJECTS) $(list_impls_DEPENDENCIES) @rm -f list_impls$(EXEEXT) $(LINK) $(list_impls_OBJECTS) $(list_impls_LDADD) $(LIBS) md5$(EXEEXT): $(md5_OBJECTS) $(md5_DEPENDENCIES) @rm -f md5$(EXEEXT) $(LINK) $(md5_OBJECTS) $(md5_LDADD) $(LIBS) md5_profile$(EXEEXT): $(md5_profile_OBJECTS) $(md5_profile_DEPENDENCIES) @rm -f md5_profile$(EXEEXT) $(LINK) $(md5_profile_OBJECTS) $(md5_profile_LDADD) $(LIBS) mmx_engine$(EXEEXT): $(mmx_engine_OBJECTS) $(mmx_engine_DEPENDENCIES) @rm -f mmx_engine$(EXEEXT) $(LINK) $(mmx_engine_OBJECTS) $(mmx_engine_LDADD) $(LIBS) moo$(EXEEXT): $(moo_OBJECTS) $(moo_DEPENDENCIES) @rm -f moo$(EXEEXT) $(LINK) $(moo_OBJECTS) $(moo_LDADD) $(LIBS) proto1$(EXEEXT): $(proto1_OBJECTS) $(proto1_DEPENDENCIES) @rm -f proto1$(EXEEXT) $(LINK) $(proto1_OBJECTS) $(proto1_LDADD) $(LIBS) proto2$(EXEEXT): $(proto2_OBJECTS) $(proto2_DEPENDENCIES) @rm -f proto2$(EXEEXT) $(LINK) $(proto2_OBJECTS) $(proto2_LDADD) $(LIBS) proto3$(EXEEXT): $(proto3_OBJECTS) $(proto3_DEPENDENCIES) @rm -f proto3$(EXEEXT) $(LINK) $(proto3_OBJECTS) $(proto3_LDADD) $(LIBS) proto4$(EXEEXT): $(proto4_OBJECTS) $(proto4_DEPENDENCIES) @rm -f proto4$(EXEEXT) $(LINK) $(proto4_OBJECTS) $(proto4_LDADD) $(LIBS) stack_align$(EXEEXT): $(stack_align_OBJECTS) $(stack_align_DEPENDENCIES) @rm -f stack_align$(EXEEXT) $(LINK) $(stack_align_OBJECTS) $(stack_align_LDADD) $(LIBS) stride$(EXEEXT): $(stride_OBJECTS) $(stride_DEPENDENCIES) @rm -f stride$(EXEEXT) $(LINK) $(stride_OBJECTS) $(stride_LDADD) $(LIBS) test1$(EXEEXT): $(test1_OBJECTS) $(test1_DEPENDENCIES) @rm -f test1$(EXEEXT) $(LINK) $(test1_OBJECTS) $(test1_LDADD) $(LIBS) trans$(EXEEXT): $(trans_OBJECTS) $(trans_DEPENDENCIES) @rm -f trans$(EXEEXT) $(LINK) $(trans_OBJECTS) $(trans_LDADD) $(LIBS) zigzag$(EXEEXT): $(zigzag_OBJECTS) $(zigzag_DEPENDENCIES) @rm -f zigzag$(EXEEXT) $(LINK) $(zigzag_OBJECTS) $(zigzag_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/abs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/align.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/double_catch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dso_check.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/introspect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list_impls.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5_profile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmx_engine.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proto4.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stack_align.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stride.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trans.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zigzag.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-recursive all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/testsuite/md5_profile.c0000644000175000017500000001036610717203073014405 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include char *message = "liboil md5 test\n"; //char *message = ""; #ifdef WORDS_BIGENDIAN #define uint32_from_host(a) \ ((((a)&0xff)<<24)|(((a)&0xff00)<<8)|(((a)&0xff0000)>>8)|(((a)>>24)&0xff)) #else #define uint32_from_host(a) (a) #endif void test(void) { int i; uint32_t state[4]; uint32_t src[16]; int len; OilProfile prof; state[0] = 0x67452301; state[1] = 0xefcdab89; state[2] = 0x98badcfe; state[3] = 0x10325476; memset (src, 0, 64); len = strlen (message); memcpy (src, message, len); ((uint8_t *)src)[len] = 0x80; src[14] = uint32_from_host(len << 3); src[15] = 0; oil_profile_init(&prof); for(i=0;i<1000;i++){ oil_profile_start(&prof); oil_md5 (state, src); oil_md5 (state, src); oil_md5 (state, src); oil_md5 (state, src); oil_md5 (state, src); oil_md5 (state, src); oil_md5 (state, src); oil_md5 (state, src); oil_md5 (state, src); oil_md5 (state, src); oil_md5 (state, src); oil_md5 (state, src); oil_md5 (state, src); oil_md5 (state, src); oil_md5 (state, src); oil_md5 (state, src); oil_profile_stop(&prof); } //oil_profile_print(&prof); printf("%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", state[0]&0xff, (state[0]>>8)&0xff, (state[0]>>16)&0xff, (state[0]>>24)&0xff, state[1]&0xff, (state[1]>>8)&0xff, (state[1]>>16)&0xff, (state[1]>>24)&0xff, state[2]&0xff, (state[2]>>8)&0xff, (state[2]>>16)&0xff, (state[2]>>24)&0xff, state[3]&0xff, (state[3]>>8)&0xff, (state[3]>>16)&0xff, (state[3]>>24)&0xff); } int main (int argc, char *argv[]) { OilFunctionClass *klass; OilFunctionImpl *impl; oil_init (); klass = oil_class_get ("md5"); oil_class_optimize(klass); printf("class=%s\n", klass->name); for (impl = klass->first_impl; impl; impl=impl->next) { printf("impl=%p\n", impl); printf(" func=%p\n", impl->func); printf(" name=%s\n", impl->name); printf(" flags=%08x\n", impl->flags); } oil_class_choose_by_name (klass, "md5_c"); impl = klass->chosen_impl; printf("chosen=%p\n", impl); impl = klass->reference_impl; printf("ref=%p\n", impl); test(); oil_class_choose_by_name (klass, "md5_asm1"); impl = klass->chosen_impl; printf("chosen=%p\n", impl); impl = klass->reference_impl; printf("ref=%p\n", impl); test(); oil_class_choose_by_name (klass, "md5_asm2"); impl = klass->chosen_impl; printf("chosen=%p\n", impl); impl = klass->reference_impl; printf("ref=%p\n", impl); test(); oil_class_choose_by_name (klass, "md5_asm3"); impl = klass->chosen_impl; printf("chosen=%p\n", impl); impl = klass->reference_impl; printf("ref=%p\n", impl); test(); return 0; } liboil-0.3.17/testsuite/align.c0000644000175000017500000001764510717203073013301 00000000000000/* * Copyright (c) 2004 David A. Schleef * Copyright (c) 2005 Eric Anholt * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* Tests math functions against the reference, failing if they differ by more * than some epsilon, and printing the difference. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #ifdef HAVE_INTTYPES_H #include #endif #include #include #include /* Amount by which results of different types are allowed to deviate from the * reference. */ #define INT_EPSILON 1 #define FLOAT_EPSILON 0.0001 void dump_array (void *data, void *ref_data, OilType type, int pre_n, int stride, int post_n) { int i, j; int s2 = oil_type_sizeof (type); double x; #define DUMP(type, format, int) do { \ for(i=0;i epsilon) { \ printf("*" format "* (" format ") ", \ OIL_GET(data, i*stride + j*s2, type), \ OIL_GET(ref_data, i*stride + j*s2, type)); \ } else { \ printf(" " format " ", OIL_GET(data, i*stride + j*s2, type)); \ } \ } \ printf("\n"); \ } \ } while(0) switch(type) { case OIL_TYPE_s8p: case OIL_TYPE_u8p: DUMP(int8_t, "0x%02" PRIx8, 1); break; case OIL_TYPE_s16p: case OIL_TYPE_u16p: DUMP(uint16_t, "0x%04" PRIx16, 1); break; case OIL_TYPE_s32p: case OIL_TYPE_u32p: DUMP(uint32_t, "0x%08" PRIx32, 1); break; case OIL_TYPE_f32p: DUMP(float, "%g", 0); break; case OIL_TYPE_s64p: case OIL_TYPE_u64p: DUMP(uint64_t, "0x%016" PRIx64, 1); break; case OIL_TYPE_f64p: DUMP(double, "%g", 0); break; default: break; } } void dump_source (OilTest *test) { int i; for(i=0;iparams[i]; if (p->is_pointer) { if (p->direction == 'i' || p->direction == 's') { printf (" %s:\n", p->parameter_name); dump_array (p->src_data + p->test_header, p->src_data + p->test_header, p->type, p->pre_n, p->stride, p->post_n); } } } } void dump_dest_ref (OilTest *test) { int i; for(i=0;iparams[i]; if (p->is_pointer) { if (p->direction == 'd') { printf (" %s:\n", p->parameter_name); dump_array (p->ref_data + p->test_header, p->ref_data + p->test_header, p->type, p->pre_n, p->stride, p->post_n); } } } } int test_difference (void *data, void *ref_data, OilType type, int pre_n, int stride, int post_n) { int i, j; int s2 = oil_type_sizeof (type); double x; #define CHECK(type, is_int) do { \ float epsilon = (is_int) ? INT_EPSILON : FLOAT_EPSILON; \ for(i=0;i epsilon) { \ return 1; \ } \ } \ } \ return 0; \ } while(0) switch(type) { case OIL_TYPE_s8p: CHECK(int8_t, 1); break; case OIL_TYPE_u8p: CHECK(uint8_t, 1); break; case OIL_TYPE_s16p: CHECK(int16_t, 1); break; case OIL_TYPE_u16p: CHECK(uint16_t, 1); break; case OIL_TYPE_s32p: CHECK(int32_t, 1); break; case OIL_TYPE_u32p: CHECK(uint32_t, 1); break; case OIL_TYPE_s64p: CHECK(int64_t, 1); break; case OIL_TYPE_u64p: CHECK(uint64_t, 1); break; case OIL_TYPE_f32p: CHECK(float, 0); break; case OIL_TYPE_f64p: CHECK(double, 0); break; default: return 1; } } int check_test (OilTest *test) { int i, failed = 0; for(i=0;iparams[i]; if (p->is_pointer) { if (p->direction == 'i' || p->direction == 'd') { if (!test_difference(p->test_data + p->test_header, p->ref_data + p->test_header, p->type, p->pre_n, p->stride, p->post_n)) continue; printf (" Failure in %s (marked by *, ref in ()):\n", p->parameter_name); dump_array (p->test_data + p->test_header, p->ref_data + p->test_header, p->type, p->pre_n, p->stride, p->post_n); failed = 1; } } } return failed; } int check_class_with_alignment (OilFunctionClass *klass, OilArgType arg, int n, int align) { OilParameter *p; int align_offset; int test_failed = 0; OilTest *test; OilFunctionImpl *impl; test = oil_test_new(klass); p = &test->params[arg]; align_offset = align * oil_type_sizeof(p->type); oil_test_set_test_header(test, p, OIL_TEST_HEADER + align_offset); oil_test_set_iterations(test, 1); test->n = n; test->m = n; impl = klass->reference_impl; oil_test_check_impl (test, impl); for (impl = klass->first_impl; impl; impl = impl->next) { if (impl == klass->reference_impl) continue; if (oil_impl_is_runnable (impl)) { if (!oil_test_check_impl (test, impl)) { printf ("impl %s with arg %d offset %d, n=%d\n", impl->name, arg, align_offset, n); printf("dests for %s:\n", klass->name); dump_dest_ref(test); printf("sources for %s:\n", klass->name); dump_source(test); } } } oil_test_free(test); return test_failed; } /* Check a function class for all implementations matching the reference when * each parameter is varied in its offset from malloc's alignment by 0 - 3 units * times size of the type, and with the number of elements varying between 8 and * 11. */ int check_class(OilFunctionClass *klass) { OilTest *test; int failed = 0; int i, n; oil_class_optimize (klass); printf("checking class %s\n", klass->name); test = oil_test_new(klass); for (i=0; i < OIL_ARG_LAST; i++) { OilParameter *p; int align; p = &test->params[i]; if (!p->is_pointer) { continue; } for (n = 8; n <= 11; n++) { for (align = 0; align <= 3; align++) { failed |= check_class_with_alignment (klass, i, n, align); } } } oil_test_free (test); return failed; } int main (int argc, char *argv[]) { int failed = 0; int i, n; oil_init (); n = oil_class_get_n_classes (); for (i = 0; i < n; i++) { OilFunctionClass *klass = oil_class_get_by_index(i); failed |= check_class(klass); } return failed; } liboil-0.3.17/testsuite/trans.c0000644000175000017500000000500010717203073013314 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include void test(void) { int16_t src2[80]; int16_t src1[80]; int16_t dest[80]; int i; int j; for(i=0;i<8;i++){ for(j=0;j<8;j++){ dest[i*10+j] = 0; //src1[i*10+j] = i*8+j; //src1[i*10+j] = rint(100*cos((j+0.5)*i*M_PI/8)); src1[i*10+j] = 100*(i+j); src2[i*10+j] = 2; } } oil_fdct8x8s_s16 (dest, 20, src1, 20); for(i=0;i<8;i++){ for(j=0;j<8;j++){ printf("%4d ",src1[i*10+j]); } printf("\n"); } printf("\n"); for(i=0;i<8;i++){ for(j=0;j<8;j++){ printf("%4d ",dest[i*10+j]); } printf("\n"); } } int main (int argc, char *argv[]) { OilFunctionClass *klass; //OilFunctionImpl *impl; oil_init (); klass = oil_class_get ("fdct8x8s_s16"); #if 0 /* FIXME this doesn't check for CPU validity */ oil_class_choose_by_name (klass, "fdct8x8s_s16_mmx"); impl = klass->chosen_impl; printf("chosen=%p\n", impl); impl = klass->reference_impl; printf("ref=%p\n", impl); test(); #endif return 0; } liboil-0.3.17/testsuite/zigzag.c0000644000175000017500000000364410717203073013474 00000000000000/* * Copyright (c) 2005 * Eric Anholt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include int main (int argc, char *argv[]) { int16_t data[64], datatmp[64]; int i, failed = 0; oil_init(); for (i = 0; i < 64; i++) data[i] = i; oil_zigzag8x8_s16(datatmp, 8 * sizeof(int16_t), data, 8 * sizeof(int16_t)); oil_unzigzag8x8_s16(data, 8 * sizeof(int16_t), datatmp, 8 * sizeof(int16_t)); for (i = 0; i < 64; i++) { if (data[i] != i) { printf("entry %d was %d, should have been %d\n", i, data[i], i); failed = 1; } } return failed; } liboil-0.3.17/testsuite/mmx_engine.c0000644000175000017500000003270111067011142014314 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2006 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #define OFFSET 100 void mmx_engine_test(void); void sse2_engine_test(void); int main (int argc, char *argv[]) { uint32_t cpu_flags; oil_init (); cpu_flags = oil_cpu_get_flags (); #ifdef HAVE_GCC_ASM #if defined(HAVE_I386) || defined(HAVE_AMD64) if (cpu_flags & OIL_IMPL_FLAG_MMX) { mmx_engine_test(); } else { printf("No MMX.\n"); } if (cpu_flags & OIL_IMPL_FLAG_SSE2) { sse2_engine_test(); } else { printf("No SSE2.\n"); } #endif #endif return 0; } int sci_sprint_alt(char *s,double x,double y) { int errsig; int maxsig; int sigfigs; double mantissa; double error; double mindigit; errsig = floor(log10(fabs(y))); maxsig = floor(log10(fabs(x))); mindigit = pow(10,errsig); if(maxsig1){ return sprintf(s,"%0.0f(%2.0f)",x,error); } if(maxsig<=0 && maxsig>=-2){ return sprintf(s,"%0.*f(%2.0f)",sigfigs-1-maxsig, mantissa*pow(10,maxsig),error); } return sprintf(s,"%0.*f(%2.0f)e%d",sigfigs-1,mantissa,error,maxsig); } #ifdef HAVE_GCC_ASM #if defined(HAVE_I386) || defined(HAVE_AMD64) void mmx_engine_test(void) { OilProfile prof; double ave, std; char s[40]; int i; #define CHECK_LATENCY(insn) \ oil_profile_init (&prof); \ for(i=0;i<10;i++) { \ oil_profile_start(&prof); \ asm volatile ( \ " mov $1000, %%ecx\n" \ ".p2align 4,,15\n" \ "1:\n" \ " " #insn " %%mm0, %%mm1\n" \ " " #insn " %%mm1, %%mm2\n" \ " " #insn " %%mm2, %%mm3\n" \ " " #insn " %%mm3, %%mm4\n" \ " " #insn " %%mm4, %%mm5\n" \ " " #insn " %%mm5, %%mm6\n" \ " " #insn " %%mm6, %%mm7\n" \ " " #insn " %%mm7, %%mm0\n" \ " " #insn " %%mm0, %%mm1\n" \ " " #insn " %%mm1, %%mm2\n" \ " " #insn " %%mm2, %%mm3\n" \ " " #insn " %%mm3, %%mm4\n" \ " " #insn " %%mm4, %%mm5\n" \ " " #insn " %%mm5, %%mm6\n" \ " " #insn " %%mm6, %%mm7\n" \ " " #insn " %%mm7, %%mm0\n" \ " " #insn " %%mm0, %%mm1\n" \ " " #insn " %%mm1, %%mm2\n" \ " " #insn " %%mm2, %%mm3\n" \ " " #insn " %%mm3, %%mm4\n" \ " " #insn " %%mm4, %%mm5\n" \ " " #insn " %%mm5, %%mm6\n" \ " " #insn " %%mm6, %%mm7\n" \ " " #insn " %%mm7, %%mm0\n" \ " decl %%ecx\n" \ " jne 1b\n" \ " emms\n" \ :::"ecx"); \ oil_profile_stop(&prof); \ } \ oil_profile_get_ave_std(&prof, &ave, &std); \ ave -= OFFSET; \ sci_sprint_alt(s,ave/24000,std/24000); \ printf("latency of " #insn ": %s\n", s); CHECK_LATENCY(packssdw) CHECK_LATENCY(packsswb) CHECK_LATENCY(packuswb) CHECK_LATENCY(paddb) CHECK_LATENCY(paddd) CHECK_LATENCY(paddsb) CHECK_LATENCY(paddsw) CHECK_LATENCY(paddusb) CHECK_LATENCY(paddusw) CHECK_LATENCY(paddw) CHECK_LATENCY(pand) CHECK_LATENCY(pandn) CHECK_LATENCY(pcmpeqb) CHECK_LATENCY(pcmpeqd) CHECK_LATENCY(pcmpeqw) CHECK_LATENCY(pcmpgtb) CHECK_LATENCY(pcmpgtd) CHECK_LATENCY(pcmpgtw) CHECK_LATENCY(pmaddwd) CHECK_LATENCY(pmulhw) CHECK_LATENCY(pmullw) //CHECK_LATENCY(pmulhuw) CHECK_LATENCY(por) CHECK_LATENCY(pslld) CHECK_LATENCY(psllq) CHECK_LATENCY(psllw) CHECK_LATENCY(psrad) CHECK_LATENCY(psraw) CHECK_LATENCY(psrld) CHECK_LATENCY(psrlq) CHECK_LATENCY(psrlw) CHECK_LATENCY(psubb) CHECK_LATENCY(psubd) CHECK_LATENCY(psubsb) CHECK_LATENCY(psubsw) CHECK_LATENCY(psubusb) CHECK_LATENCY(psubusw) CHECK_LATENCY(psubw) CHECK_LATENCY(punpckhbw) CHECK_LATENCY(punpckhdq) CHECK_LATENCY(punpckhwd) CHECK_LATENCY(punpcklbw) CHECK_LATENCY(punpckldq) CHECK_LATENCY(punpcklwd) CHECK_LATENCY(pxor) //CHECK_LATENCY(psadbw) #define CHECK_THROUGHPUT(insn) \ oil_profile_init (&prof); \ for(i=0;i<10;i++) { \ oil_profile_start(&prof); \ asm volatile ( \ " mov $1000, %%ecx\n" \ ".p2align 4,,15\n" \ "1:\n" \ " " #insn " %%mm0, %%mm0\n" \ " " #insn " %%mm1, %%mm1\n" \ " " #insn " %%mm2, %%mm2\n" \ " " #insn " %%mm3, %%mm3\n" \ " " #insn " %%mm4, %%mm4\n" \ " " #insn " %%mm5, %%mm5\n" \ " " #insn " %%mm6, %%mm6\n" \ " " #insn " %%mm7, %%mm7\n" \ " " #insn " %%mm0, %%mm0\n" \ " " #insn " %%mm1, %%mm1\n" \ " " #insn " %%mm2, %%mm2\n" \ " " #insn " %%mm3, %%mm3\n" \ " " #insn " %%mm4, %%mm4\n" \ " " #insn " %%mm5, %%mm5\n" \ " " #insn " %%mm6, %%mm6\n" \ " " #insn " %%mm7, %%mm7\n" \ " " #insn " %%mm0, %%mm0\n" \ " " #insn " %%mm1, %%mm1\n" \ " " #insn " %%mm2, %%mm2\n" \ " " #insn " %%mm3, %%mm3\n" \ " " #insn " %%mm4, %%mm4\n" \ " " #insn " %%mm5, %%mm5\n" \ " " #insn " %%mm6, %%mm6\n" \ " " #insn " %%mm7, %%mm7\n" \ " decl %%ecx\n" \ " jne 1b\n" \ " emms\n" \ :::"ecx"); \ oil_profile_stop(&prof); \ } \ oil_profile_get_ave_std(&prof, &ave, &std); \ ave -= OFFSET; \ sci_sprint_alt(s,ave/24000,std/24000); \ printf("throughput of " #insn ": %s\n", s); CHECK_THROUGHPUT(packssdw) CHECK_THROUGHPUT(packsswb) CHECK_THROUGHPUT(packuswb) CHECK_THROUGHPUT(paddb) CHECK_THROUGHPUT(paddd) CHECK_THROUGHPUT(paddsb) CHECK_THROUGHPUT(paddsw) CHECK_THROUGHPUT(paddusb) CHECK_THROUGHPUT(paddusw) CHECK_THROUGHPUT(paddw) CHECK_THROUGHPUT(pand) CHECK_THROUGHPUT(pandn) CHECK_THROUGHPUT(pcmpeqb) CHECK_THROUGHPUT(pcmpeqd) CHECK_THROUGHPUT(pcmpeqw) CHECK_THROUGHPUT(pcmpgtb) CHECK_THROUGHPUT(pcmpgtd) CHECK_THROUGHPUT(pcmpgtw) CHECK_THROUGHPUT(pmaddwd) CHECK_THROUGHPUT(pmulhw) CHECK_THROUGHPUT(pmullw) #if 0 /* pmulhuw requires mmxext */ CHECK_THROUGHPUT(pmulhuw) #endif CHECK_THROUGHPUT(por) CHECK_THROUGHPUT(pslld) CHECK_THROUGHPUT(psllq) CHECK_THROUGHPUT(psllw) CHECK_THROUGHPUT(psrad) CHECK_THROUGHPUT(psraw) CHECK_THROUGHPUT(psrld) CHECK_THROUGHPUT(psrlq) CHECK_THROUGHPUT(psrlw) CHECK_THROUGHPUT(psubb) CHECK_THROUGHPUT(psubd) CHECK_THROUGHPUT(psubsb) CHECK_THROUGHPUT(psubsw) CHECK_THROUGHPUT(psubusb) CHECK_THROUGHPUT(psubusw) CHECK_THROUGHPUT(psubw) CHECK_THROUGHPUT(punpckhbw) CHECK_THROUGHPUT(punpckhdq) CHECK_THROUGHPUT(punpckhwd) CHECK_THROUGHPUT(punpcklbw) CHECK_THROUGHPUT(punpckldq) CHECK_THROUGHPUT(punpcklwd) CHECK_THROUGHPUT(pxor) //CHECK_THROUGHPUT(psadbw) #undef CHECK_LATENCY #undef CHECK_THROUGHPUT } void sse2_engine_test(void) { OilProfile prof; double ave, std; char s[40]; int i; #define CHECK_LATENCY(insn) \ oil_profile_init (&prof); \ for(i=0;i<10;i++) { \ oil_profile_start(&prof); \ asm volatile ( \ " mov $1000, %%ecx\n" \ ".p2align 4,,15\n" \ "1:\n" \ " " #insn " %%xmm0, %%xmm1\n" \ " " #insn " %%xmm1, %%xmm2\n" \ " " #insn " %%xmm2, %%xmm3\n" \ " " #insn " %%xmm3, %%xmm4\n" \ " " #insn " %%xmm4, %%xmm5\n" \ " " #insn " %%xmm5, %%xmm6\n" \ " " #insn " %%xmm6, %%xmm7\n" \ " " #insn " %%xmm7, %%xmm0\n" \ " " #insn " %%xmm0, %%xmm1\n" \ " " #insn " %%xmm1, %%xmm2\n" \ " " #insn " %%xmm2, %%xmm3\n" \ " " #insn " %%xmm3, %%xmm4\n" \ " " #insn " %%xmm4, %%xmm5\n" \ " " #insn " %%xmm5, %%xmm6\n" \ " " #insn " %%xmm6, %%xmm7\n" \ " " #insn " %%xmm7, %%xmm0\n" \ " " #insn " %%xmm0, %%xmm1\n" \ " " #insn " %%xmm1, %%xmm2\n" \ " " #insn " %%xmm2, %%xmm3\n" \ " " #insn " %%xmm3, %%xmm4\n" \ " " #insn " %%xmm4, %%xmm5\n" \ " " #insn " %%xmm5, %%xmm6\n" \ " " #insn " %%xmm6, %%xmm7\n" \ " " #insn " %%xmm7, %%xmm0\n" \ " decl %%ecx\n" \ " jne 1b\n" \ :::"ecx"); \ oil_profile_stop(&prof); \ } \ oil_profile_get_ave_std(&prof, &ave, &std); \ ave -= OFFSET; \ sci_sprint_alt(s,ave/24000,std/24000); \ printf("latency of " #insn ": %s\n", s); CHECK_LATENCY(packssdw) CHECK_LATENCY(packsswb) CHECK_LATENCY(packuswb) CHECK_LATENCY(paddb) CHECK_LATENCY(paddd) CHECK_LATENCY(paddsb) CHECK_LATENCY(paddsw) CHECK_LATENCY(paddusb) CHECK_LATENCY(paddusw) CHECK_LATENCY(paddw) CHECK_LATENCY(pand) CHECK_LATENCY(pandn) CHECK_LATENCY(pcmpeqb) CHECK_LATENCY(pcmpeqd) CHECK_LATENCY(pcmpeqw) CHECK_LATENCY(pcmpgtb) CHECK_LATENCY(pcmpgtd) CHECK_LATENCY(pcmpgtw) CHECK_LATENCY(pmaddwd) CHECK_LATENCY(pmulhw) CHECK_LATENCY(pmullw) #if 0 /* pmulhuw requires mmxext */ CHECK_LATENCY(pmulhuw) #endif CHECK_LATENCY(por) CHECK_LATENCY(pslld) CHECK_LATENCY(psllq) CHECK_LATENCY(psllw) CHECK_LATENCY(psrad) CHECK_LATENCY(psraw) CHECK_LATENCY(psrld) CHECK_LATENCY(psrlq) CHECK_LATENCY(psrlw) CHECK_LATENCY(psubb) CHECK_LATENCY(psubd) CHECK_LATENCY(psubsb) CHECK_LATENCY(psubsw) CHECK_LATENCY(psubusb) CHECK_LATENCY(psubusw) CHECK_LATENCY(psubw) CHECK_LATENCY(punpckhbw) CHECK_LATENCY(punpckhdq) CHECK_LATENCY(punpckhwd) CHECK_LATENCY(punpcklbw) CHECK_LATENCY(punpckldq) CHECK_LATENCY(punpcklwd) CHECK_LATENCY(pxor) #define CHECK_THROUGHPUT(insn) \ oil_profile_init (&prof); \ for(i=0;i<10;i++) { \ oil_profile_start(&prof); \ asm volatile ( \ " mov $1000, %%ecx\n" \ ".p2align 4,,15\n" \ "1:\n" \ " " #insn " %%xmm0, %%xmm0\n" \ " " #insn " %%xmm1, %%xmm1\n" \ " " #insn " %%xmm2, %%xmm2\n" \ " " #insn " %%xmm3, %%xmm3\n" \ " " #insn " %%xmm4, %%xmm4\n" \ " " #insn " %%xmm5, %%xmm5\n" \ " " #insn " %%xmm6, %%xmm6\n" \ " " #insn " %%xmm7, %%xmm7\n" \ " " #insn " %%xmm0, %%xmm0\n" \ " " #insn " %%xmm1, %%xmm1\n" \ " " #insn " %%xmm2, %%xmm2\n" \ " " #insn " %%xmm3, %%xmm3\n" \ " " #insn " %%xmm4, %%xmm4\n" \ " " #insn " %%xmm5, %%xmm5\n" \ " " #insn " %%xmm6, %%xmm6\n" \ " " #insn " %%xmm7, %%xmm7\n" \ " " #insn " %%xmm0, %%xmm0\n" \ " " #insn " %%xmm1, %%xmm1\n" \ " " #insn " %%xmm2, %%xmm2\n" \ " " #insn " %%xmm3, %%xmm3\n" \ " " #insn " %%xmm4, %%xmm4\n" \ " " #insn " %%xmm5, %%xmm5\n" \ " " #insn " %%xmm6, %%xmm6\n" \ " " #insn " %%xmm7, %%xmm7\n" \ " decl %%ecx\n" \ " jne 1b\n" \ :::"ecx"); \ oil_profile_stop(&prof); \ } \ oil_profile_get_ave_std(&prof, &ave, &std); \ ave -= OFFSET; \ sci_sprint_alt(s,ave/24000,std/24000); \ printf("throughput of " #insn ": %s\n", s); CHECK_THROUGHPUT(packssdw) CHECK_THROUGHPUT(packsswb) CHECK_THROUGHPUT(packuswb) CHECK_THROUGHPUT(paddb) CHECK_THROUGHPUT(paddd) CHECK_THROUGHPUT(paddsb) CHECK_THROUGHPUT(paddsw) CHECK_THROUGHPUT(paddusb) CHECK_THROUGHPUT(paddusw) CHECK_THROUGHPUT(paddw) CHECK_THROUGHPUT(pand) CHECK_THROUGHPUT(pandn) CHECK_THROUGHPUT(pcmpeqb) CHECK_THROUGHPUT(pcmpeqd) CHECK_THROUGHPUT(pcmpeqw) CHECK_THROUGHPUT(pcmpgtb) CHECK_THROUGHPUT(pcmpgtd) CHECK_THROUGHPUT(pcmpgtw) CHECK_THROUGHPUT(pmaddwd) CHECK_THROUGHPUT(pmulhw) CHECK_THROUGHPUT(pmullw) CHECK_THROUGHPUT(pmulhuw) CHECK_THROUGHPUT(por) CHECK_THROUGHPUT(pslld) CHECK_THROUGHPUT(psllq) CHECK_THROUGHPUT(psllw) CHECK_THROUGHPUT(psrad) CHECK_THROUGHPUT(psraw) CHECK_THROUGHPUT(psrld) CHECK_THROUGHPUT(psrlq) CHECK_THROUGHPUT(psrlw) CHECK_THROUGHPUT(psubb) CHECK_THROUGHPUT(psubd) CHECK_THROUGHPUT(psubsb) CHECK_THROUGHPUT(psubsw) CHECK_THROUGHPUT(psubusb) CHECK_THROUGHPUT(psubusw) CHECK_THROUGHPUT(psubw) CHECK_THROUGHPUT(punpckhbw) CHECK_THROUGHPUT(punpckhdq) CHECK_THROUGHPUT(punpckhwd) CHECK_THROUGHPUT(punpcklbw) CHECK_THROUGHPUT(punpckldq) CHECK_THROUGHPUT(punpcklwd) CHECK_THROUGHPUT(pxor) } #endif #endif liboil-0.3.17/testsuite/introspect.c0000644000175000017500000001035310717203073014366 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include void parse_prototype (const char *s); int main (int argc, char *argv[]) { OilFunctionClass *klass; OilFunctionImpl *impl; int i; int n; int errors = 0; oil_init (); n = oil_class_get_n_classes (); for (i=0;iname); for(impl = klass->first_impl; impl; impl=impl->next) { printf (" %s %s %s\n", impl->name, (impl->flags&OIL_IMPL_FLAG_REF)?"(ref)":"", (impl->flags&OIL_IMPL_FLAG_OPT)?"(opt)":""); if (impl->flags & OIL_IMPL_FLAG_REF) { ref++; } } if (ref < 1) { printf("ERROR: no reference function\n"); errors++; } if (ref > 1) { printf("ERROR: more than one reference function\n"); errors++; } if (klass->prototype == NULL) { printf("ERROR: prototype is NULL\n"); errors++; } #if 0 printf ("#define %s ((void (*)(%s)) \\\n\t_oil_function_%s_class.func)\n", klass->name, klass->prototype, klass->name); //printf("void %s (%s);\n", klass->name, klass->prototype); parse_prototype(klass->prototype); #endif } return (errors)?1:0; } #ifdef unused static char *typenames[] = { "type_s8", "type_u8", "type_s16", "type_u16", "type_s32", "type_u32", "type_f32", "type_f64", "int8_t", "uint8_t", "int16_t", "uint16_t", "int32_t", "uint32_t", "float", "double", "int", }; static int parse_type (char *s, char **endptr) { int i; while(isspace((int)*s))s++; for(i=0;i<8;i++){ if(strncmp(typenames[i],s,strlen(typenames[i]))==0){ *endptr = s + strlen(typenames[i]); return OIL_TYPE_s8 + i; } } return OIL_TYPE_UNKNOWN; } static int parse_size (const char *s, char **endptr) { while(isspace((int)*s))s++; if(s[0] == 'n'){ *endptr = (char *)(s + 1); return 0; } if(isdigit((int)s[0])){ return strtol(s,endptr,0); } return -1; } #endif char * xstrndup (const char *s, int n) { char *r; if (strlen(s) < n) { n = strlen(s); } r = malloc(n+1); memcpy(r,s,n); r[n] = 0; return r; } static char * parse_string (const char *s, const char **endptr) { const char *s0; s0 = s; while(isalnum((int)*s) || *s=='_') { s++; } *endptr = s; return xstrndup(s0, s - s0); } void parse_prototype (const char *s) { char *type; char *name; int ptr = 0; while (isspace((int)*s))s++; while (*s) { type = parse_string (s, &s); while (isspace((int)*s))s++; if(s[0] == '*'){ ptr = 1; s++; } while (isspace((int)*s))s++; name = parse_string (s, &s); while (isspace((int)*s))s++; if(s[0] == ','){ s++; } while (isspace((int)*s))s++; printf("%s %s\n", type, name); } } liboil-0.3.17/testsuite/proto3.c0000644000175000017500000000604010717203073013420 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include void print_param (OilParameter *param); /* format: * [s][0-9*][_[<0-9*,nm[p0-9*]>x]<0-9*,nm[p0-9*]>] */ char *good_params[] = { "d", "s", "i", "d1", "d2", "ds", "ss", "is", "ds1", "ds2", "d_1", "d_2", "d_4", "d_n", "d_1xn", "d_4xn", "d_nxm", "d_8x8", "d_np2", NULL }; char *bad_params[] = { "e", NULL }; int main (int argc, char *argv[]) { int i; int ret; int failed = 0; OilParameter param; for(i=0;good_params[i];i++){ ret = oil_param_from_string (¶m, good_params[i]); if (!ret) { printf("***ERROR***\n"); failed = 1; } print_param (¶m); } for(i=0;bad_params[i];i++){ ret = oil_param_from_string (¶m, bad_params[i]); if (ret) { printf("***ERROR***\n"); failed = 1; } } return failed; } void print_param (OilParameter *param) { if (param->is_stride) { printf (" %cs%d\n", param->direction, param->index); } else { printf (" %c%d_", param->direction, param->index); if (param->prestride_var > 0) { printf("%c", (param->prestride_var==1) ? 'n' : 'm'); if (param->prestride_length) { printf("p%d", param->prestride_length); } } else { printf("%d", param->prestride_length); } printf("x"); if (param->poststride_var > 0) { printf("%c", (param->poststride_var==1) ? 'n' : 'm'); if (param->poststride_length) { printf("p%d", param->poststride_length); } } else { printf("%d", param->poststride_length); } printf("\n"); } } liboil-0.3.17/testsuite/instruction/0000777000175000017500000000000011332637377014507 500000000000000liboil-0.3.17/testsuite/instruction/list-impls.c0000644000175000017500000000536411066763263016672 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include int main (int argc, char *argv[]) { int n; int i; oil_init(); n = oil_class_get_n_classes (); for (i = 0; i < n; i++){ OilFunctionClass *klass = oil_class_get_by_index (i); OilFunctionImpl *impl; for (impl = klass->first_impl; impl; impl = impl->next) { unsigned int flags = impl->flags; printf("%s:", impl->name); if (flags & OIL_IMPL_FLAG_SSE3) { flags |= OIL_IMPL_FLAG_SSE2; } if (flags & OIL_IMPL_FLAG_SSE2) { flags |= OIL_IMPL_FLAG_SSE | OIL_IMPL_FLAG_MMXEXT; } if (flags & OIL_IMPL_FLAG_3DNOW) printf(" 3dnow"); if (flags & OIL_IMPL_FLAG_3DNOWEXT) printf(" 3dnowext"); if (flags & OIL_IMPL_FLAG_CMOV) printf(" cmov"); if (flags & OIL_IMPL_FLAG_MMX) printf(" mmx"); if (flags & OIL_IMPL_FLAG_MMXEXT) printf(" mmxext"); if (flags & OIL_IMPL_FLAG_SSE) printf(" sse"); if (flags & OIL_IMPL_FLAG_SSE2) printf(" sse2"); if (flags & OIL_IMPL_FLAG_SSE3) printf(" sse3"); if (flags & OIL_IMPL_FLAG_SSSE3) printf(" ssse3"); if (flags & OIL_IMPL_FLAG_ALTIVEC) printf(" altivec"); printf("\n"); } } return 0; } liboil-0.3.17/testsuite/instruction/Makefile.am0000644000175000017500000000050710717203073016445 00000000000000 EXTRA_DIST = check-instructions.pl check_PROGRAMS = list-impls AM_LDFLAGS = $(LIBOIL_LIBS) AM_CFLAGS = $(LIBOIL_CFLAGS) report: list-impls $(srcdir)/check-instructions.pl $(top_builddir)/liboil/.libs/liboiltmp1.so $(srcdir)/check-instructions.pl $(top_builddir)/liboil/.libs/liboiltmp1.so >report CLEANFILES = report liboil-0.3.17/testsuite/instruction/check-instructions.pl0000755000175000017500000002061011066763263020577 00000000000000#!/usr/bin/perl -w # vi: set ts=4: # $debug = 0; $pedantic = 0; sub get_flags { my @list = @insns; my $exts = {}; my $s; $debug && print "function: $func\n"; foreach $insn (@list) { #$debug && print "checking instruction \"$insn\"\n"; $insn =~ m/^(\w+)\s+(.*)$/; $opcode = $1; $regs = $2; if (grep { /^$opcode$/ } @normal_list) { $debug && print " $opcode: normal\n"; }elsif (grep { /^$opcode$/ } @cmov_list) { #$exts->{"cmov"} = 1; $debug && print " $opcode: cmov\n"; }elsif (grep { /^$opcode$/ } @mmxsse_list) { if (grep { /\%xmm/ } $regs) { $exts->{"sse2"} = 1; $debug && print " $opcode: sse2\n"; } else { $exts->{"mmx"} = 1; $debug && print " $opcode: mmx\n"; } }elsif (grep { /^$opcode$/ } @mmx_list) { $exts->{"mmx"} = 1; $debug && print " $opcode: mmx\n"; }elsif (grep { /^$opcode$/ } @mmx_ext_list) { $exts->{"mmxext"} = 1; $debug && print " $opcode: mmxext\n"; }elsif (grep { /^$opcode$/ } @_3dnow_list) { $exts->{"3dnow"} = 1; $debug && print " $opcode: 3dnow\n"; }elsif (grep { /^$opcode$/ } @_3dnow_ext_list) { $exts->{"3dnowext"} = 1; $debug && print " $opcode: 3dnowext\n"; }elsif (grep { /^$opcode$/ } @sse_list) { $exts->{"sse"} = 1; $debug && print " $opcode: sse\n"; }elsif (grep { /^$opcode$/ } @sse2_list) { $exts->{"sse2"} = 1; $debug && print " $opcode: sse2\n"; }elsif (grep { /^$opcode$/ } @sse3_list) { $exts->{"sse3"} = 1; $debug && print " $opcode: sse3\n"; }elsif (grep { /^$opcode$/ } @ssse3_list) { $exts->{"ssse3"} = 1; $debug && print " $opcode: ssse3\n"; }else { print "FIXME:\t\"$opcode\",\n"; $error = 1; } } if (!$pedantic) { if ($exts->{"sse3"}) { $exts->{"sse2"} = 1; } if ($exts->{"sse2"}) { $exts->{"sse"} = 1; $exts->{"mmxext"} = 1; } } $s = join(" ",sort(keys(%$exts))); $funcs->{"$func"} = $s; $debug && print " FLAGS: $s\n"; } sub check { foreach $insn (@normal_list) { if (grep { /^$insn$/ } @mmx_list) { print "FIXME: $insn is in mmx_list\n"; $error = 1; } elsif (grep { /^$insn$/ } @mmx_ext_list) { print "FIXME: $insn is in mmx_ext_list\n"; $error = 1; } elsif (grep { /^$insn$/ } @_3dnow_list) { print "FIXME: $insn is in _3dnow_list\n"; $error = 1; } elsif (grep { /^$insn$/ } @_3dnow_ext_list) { print "FIXME: $insn is in _3dnow_ext_list\n"; $error = 1; } elsif (grep { /^$insn$/ } @sse_list) { print "FIXME: $insn is in sse_list\n"; $error = 1; } elsif (grep { /^$insn$/ } @sse2_list) { print "FIXME: $insn is in sse2_list\n"; $error = 1; } } } # this list is not complete @normal_list = ( "add", "addl", "and", "andl", "bswap", "call", "cld", "cltd", "cmp", "cmpb", "cmpl", "cwtl", "dec", "decl", "fabs", "fadd", "faddl", "faddp", "fadds", "fchs", "fcom", "fcomp", "fcompp", "fdiv", "fdivl", "fdivr", "fdivrl", "fdivrs", "fdivs", "fiaddl", "fimull", "fild", "fildl", "fildll", "fistp", "fistpl", "fistpll", "fld", "fld1", "fldcw", "fldl", "flds", "fldt", "fldz", "fmul", "fmull", "fmulp", "fmuls", "fnstcw", "fnstsw", "frndint", "fsqrt", "fstl", "fstp", "fstpl", "fstps", "fstpt", "fsts", "fsub", "fsubl", "fsubp", "fsubr", "fsubrl", "fsubrp", "fsubrs", "fsubs", "fucom", "fucomi", "fucomp", "fucompp", "fxch", "idiv", "imul", "imulb", "inc", "incl", "ja", "jae", "jb", "jbe", "je", "jg", "jge", "jl", "jle", "jmp", "jne", "jns", "jp", "js", "lea", "leave", "mov", "movb", "movl", "movsbl", "movsbw", "movswl", "movsww", "movw", "movzbl", "movzbw", "movzwl", "mul", "mulb", "neg", "nop", "not", "or", "pop", "push", "pushl", "rep", "repz", "ret", "rol", "ror", "sahf", "sar", "sarl", "setl", "shl", "shll", "shr", "shrl", "sub", "subl", "test", "testb", "testl", "xchg", "xor", ); @cmov_list = ( "cmova", "cmovae", "cmovb", "cmovg", "cmovge", "cmovl", "cmovle", "cmovbe", "fcmovbe", "fcmovnbe", ); # verified @mmx_list = ( "emms", ); # verified @_3dnow_list = ( "femms", "pavgusb", "pf2id", "pfacc", "pfadd", "pfcmpeq", "pfcmpge", "pfcmpgt", "pfmax", "pfmin", "pfmul", "pfrcp", "pfrcpit1", "pfrcpit2", "pfrsqit1", "pfrsqrt", "pfsub", "pfsubr", "pi2fd", "pmulhrw", "prefetch", "prefetchw" ); # verified @_3dnow_ext_list = ( "pf2iw", "pfnacc", "pfpnacc", "pi2fw", "pswapd" ); # verified @mmx_ext_list = ( "maskmovq", "movntq", "pavgb", "pavgw", "pextrw", "pinsrw", "pmaxsw", "pmaxub", "pminsw", "pminub", "pmovmskb", "pmulhuw", "prefetchnta", "prefetch0", "prefetch1", "prefetch2", "psadbw", "pshufw", "sfence" ); # verified @sse_list = ( "addps", "addss", "andnps", "andps", "cmpps", "cmpss", "comiss", "cvtpi2ps", "cvtps2pi", "cvtsi2ss", "cvtss2si", "cvttps2pi", "cvttss2si", "divps", "divss", "fxrstor", "fxsave", "ldmxcsr", "maxps", "maxss", "minps", "minss", "movaps", "movhlps", "movhps", "movlhps", "movlps", "movmskps", "movss", "movups", "mulps", "mulss", "orps", "rcpps", "rcpss", "rsqrtps", "rsqrtss", "shufps", "sqrtps", "sqrtss", "stmxcsr", "subps", "subss", "ucomiss", "unpckhps", "unpcklps", "xorps" ); @mmxsse_list = ( "movd", "movq", "packssdw", "packsswb", "packuswb", "paddb", "paddd", "paddsb", "paddsw", "paddusb", "paddusw", "paddw", "pand", "pandn", "pcmpeqb", "pcmpeqd", "pcmpeqw", "pcmpgtb", "pcmpgtd", "pcmpgtw", "pmaddwd", "pmulhw", "pmullw", "pmulhuw", "por", "pslld", "psllq", "psllw", "psrad", "psraw", "psrld", "psrlq", "psrlw", "psubb", "psubd", "psubsb", "psubsw", "psubusb", "psubusw", "psubw", "punpckhbw", "punpckhdq", "punpckhwd", "punpcklbw", "punpckldq", "punpcklwd", "pxor", ); # verified @sse2_list = ( "addpd", "addsd", "andnpd", "andpd", "cmppd", "cmpsd", "comisd", "cvtpi2pd", "cvtpd2pi", "cvtsi2sd", "cvtsd2si", "cvttpd2pi", "cvttsd2si", "cvtpd2ps", "cvtps2pd", "cvtsd2ss", "cvtss2sd", "cvtps2dq", "cvttpd2dq", "cvtdq2pd", "cvtps2dq", "cvttps2dq", "cvtdq2ps", "divpd", "divsd", "maxpd", "maxsd", "minpd", "minsd", "movapd", "movhpd", "movlpd", "movmskpd", "movsd", "movupd", "mulpd", "mulsd", "orpd", "shufpd", "sqrtpd", "sqrtsd", "subpd", "subsd", "ucomisd", "unpckhpd", "unpcklpd", "xorpd", #"movd", "movdqa", "movdqu", "movq2dq", "movdq2q", #"movq", #"packssdw", #"packsswb", #"packuswb", "paddq", "padd", "padds", "paddus", #"pand", #"pandn", "pavgb", "pavgw", "pcmpeq", "pcmpgt", "pextrw", "pinsrw", #"pmaddwd", "pmaxsw", "pmaxub", "pminsw", "pminub", "pmovmskb", "pmulhuw", #"pmulhw", #"pmullw", "pmuludq", #"por", "psadbw", "pshuflw", "pshufhw", "pshufd", "pslldq", "psll", "psra", "psrldq", "psrl", "psubq", "psub", "psubs", "psubus", "punpckh", "punpckhqdq", "punpckl", "punpcklqdq", #"pxor", "maskmovdqu", "movntpd", "movntdq", "movnti", "pause", "lfence", "mfence", ); @sse3_list = ( "addsubpd", "addsubps", "haddpd", "haddps", "hsubpd", "hsubps", "lddqu", "movddup", "movshdup", "movsldup", "fisttp" ); @ssse3_list = ( "psignb", "psignw", "psignd", "pabsb", "pabsw", "pabsd", "palignr", "pshufb", "pmulhrsw", "pmaddubsw", "phsubw", "phsubd", "phsubsw", "phaddw", "phaddd", "phaddsw" ); #@clflush_list = ( # "clflush", #); $funcs = {}; $ARGV=shift @ARGV; @output=`objdump -j .text -dr $ARGV`; check(); $error = 0; @insns = (); while($_=shift @output){ chomp; if(m/^0[0-9a-fA-F]+\s<[\.\w@]+>:$/){ $f = $_; $f =~ s/^0[0-9a-fA-F]+\s<([\.\w]+)>:$/$1/; if (@insns) { get_flags (); } $func = $f; @insns = (); $debug && print "$func:\n"; } elsif(m/^[\s0-9a-f]+:\s[\s0-9a-f]{20}\s+([\w]+\s.*)$/){ push @insns, $1; #print " $1\n"; } elsif(m/^[\s0-9a-f]+:\s[\s0-9a-f]{2,20}\s$/){ # ignore } elsif (m/^$/) { } elsif (m/^Disassembly of section/) { } elsif (m/\sfile format\s/) { } else { print "FIXME: $_\n"; $error = 1; } } @source = `./list-impls`; while ($_ = shift @source) { chomp; if (m/^([\w\.]+):\s*([\w\s*]*)/) { $func = $1; $flags = $2; $xflags = $funcs->{$func}; if (1) { if ($flags ne $xflags) { print "$func: \"$flags\" should be \"$xflags\"\n"; } } else { print "FIXME: function \"$func\" has no disassembly\n"; $error = 1; } } else { print "FIXME: bad match: $_\n"; } } exit $error; liboil-0.3.17/testsuite/instruction/Makefile.in0000644000175000017500000003635211332627674016500 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = list-impls$(EXEEXT) subdir = testsuite/instruction DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = list_impls_SOURCES = list-impls.c list_impls_OBJECTS = list-impls.$(OBJEXT) list_impls_LDADD = $(LDADD) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = list-impls.c DIST_SOURCES = list-impls.c ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = check-instructions.pl AM_LDFLAGS = $(LIBOIL_LIBS) AM_CFLAGS = $(LIBOIL_CFLAGS) CLEANFILES = report all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/instruction/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu testsuite/instruction/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list list-impls$(EXEEXT): $(list_impls_OBJECTS) $(list_impls_DEPENDENCIES) @rm -f list-impls$(EXEEXT) $(LINK) $(list_impls_OBJECTS) $(list_impls_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list-impls.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am report: list-impls $(srcdir)/check-instructions.pl $(top_builddir)/liboil/.libs/liboiltmp1.so $(srcdir)/check-instructions.pl $(top_builddir)/liboil/.libs/liboiltmp1.so >report # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/testsuite/copy.c0000644000175000017500000000143210717203073013144 00000000000000 #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include uint8_t dest[200]; uint8_t src[200]; void test(void) { int i; for(i=0;i<200;i++){ dest[i]=0; src[i]=i; } oil_copy_u8 (dest + 8, src + 0, 64); for(i=0;i<100;i++){ printf("%d\n",dest[i]); } } int main (int argc, char *argv[]) { OilFunctionClass *klass; OilFunctionImpl *impl; oil_init (); klass = oil_class_get ("copy_u8"); oil_class_optimize(klass); oil_class_choose_by_name (klass, "copy_u8_altivec"); impl = klass->chosen_impl; if (oil_impl_is_runnable (impl)) { printf("chosen=%p\n", impl); impl = klass->reference_impl; printf("ref=%p\n", impl); test(); } return 0; } liboil-0.3.17/examples/0000777000175000017500000000000011332637377011713 500000000000000liboil-0.3.17/examples/oil-suggest.c0000644000175000017500000000641710717203073014231 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include static int is_poorly_strided (OilFunctionClass *klass) { OilPrototype *proto; int i; int j; OilParameter *param; proto = oil_prototype_from_string (klass->prototype); for(i=0;in_params;i++) { if (proto->params[i].is_stride) { for(j=0;jn_params;j++) { param = proto->params + j; if (param->parameter_type == (proto->params[i].parameter_type - 1)) { if (param->prestride_length == 1 && param->poststride_length == 0) { oil_prototype_free (proto); return 1; } } } } } oil_prototype_free (proto); return 0; } static double get_speed_score (OilFunctionClass *klass) { OilFunctionImpl *impl; double max; double x; max = 1.0; for(impl = klass->first_impl; impl; impl = impl->next) { x = klass->reference_impl->profile_ave / impl->profile_ave; if (x > max) max = x; } return max; } static void oil_suggest_class (OilFunctionClass *klass, int verbose) { double x; if (is_poorly_strided (klass)) return; x = get_speed_score (klass); if (x < 20.0) { printf("%s %g\n", klass->name, x); } } static void oil_suggest_all (void) { int i; int n; n = oil_class_get_n_classes (); for (i = 0; i < n; i++){ OilFunctionClass *klass = oil_class_get_by_index (i); oil_suggest_class (klass, 0); } } static void oil_suggest (const char *s) { OilFunctionClass *klass = oil_class_get (s); if (klass) { oil_suggest_class (klass, 0); } } int main (int argc, char *argv[]) { int i; oil_init(); if (argc == 1) { oil_suggest_all (); return 0; } for(i=1;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include #if 0 int retval = EXIT_SUCCESS; static void printerr (char *format, ...) { va_list var_args; va_start (var_args, format); vfprintf (stderr, format, var_args); va_end (var_args); retval = EXIT_FAILURE; } static char * string_append (char *str, const char *append) { char *ret; if (str) { size_t size = strlen (str) + 2 + strlen (append) + 1; ret = malloc (size); snprintf (ret, size, "%s, %s", str, append); free (str); } else { ret = strdup (append); } return ret; } static char * oil_flags_to_string (unsigned int flags) { char *ret = NULL; if (flags & OIL_IMPL_FLAG_REF) ret = string_append (ret, "REF"); if (flags & OIL_IMPL_FLAG_OPT) ret = string_append (ret, "altopt"); if (flags & OIL_IMPL_FLAG_ASM) ret = string_append (ret, "asm"); #ifdef HAVE_CPU_I386 if (flags & OIL_IMPL_FLAG_CMOV) ret = string_append (ret, "cmov"); if (flags & OIL_IMPL_FLAG_MMX) ret = string_append (ret, "mmx"); if (flags & OIL_IMPL_FLAG_SSE) ret = string_append (ret, "sse"); if (flags & OIL_IMPL_FLAG_MMXEXT) ret = string_append (ret, "mmxext"); if (flags & OIL_IMPL_FLAG_SSE2) ret = string_append (ret, "sse2"); if (flags & OIL_IMPL_FLAG_3DNOW) ret = string_append (ret, "3dnow"); if (flags & OIL_IMPL_FLAG_3DNOWEXT) ret = string_append (ret, "3dnowext"); #endif #ifdef HAVE_CPU_PPC if (flags & OIL_IMPL_FLAG_ALTIVEC) ret = string_append (ret, "altivec"); #endif return ret; } #endif #if 0 static void oil_print_impl (OilFunctionImpl *impl, OilTest *test, char* prefix) { char *c; unsigned int cpu_flags = oil_cpu_get_flags(); oil_test_check_impl (test, impl); printf ("%s%s\n", prefix, impl->name); c = oil_flags_to_string (impl->flags); if (c) { printf ("%s flags: %s\n", prefix, c); free (c); } if (impl->profile_ave) { printf ("%s profile: %g ticks (std.dev. %g)\n", prefix, impl->profile_ave, impl->profile_std); } if (test && !(impl->flags & OIL_IMPL_FLAG_REF)) { printf ("%s sum abs difference: %g (n=%d)\n", prefix, test->sum_abs_diff, test->n_points); } if ((impl->flags & OIL_CPU_FLAG_MASK) & (~cpu_flags)) { printf ("%s disabled\n", prefix); } } #endif #if 0 static int impl_compare (const void *a, const void *b) { const OilFunctionImpl *ia = *(OilFunctionImpl **)a; const OilFunctionImpl *ib = *(OilFunctionImpl **)b; if (ia->profile_ave < ib->profile_ave) return -1; if (ia->profile_ave > ib->profile_ave) return 1; return 0; } #endif static int get_n_impls(OilFunctionClass *klass) { OilFunctionImpl *impl; int n; n = 0; for(impl=klass->first_impl;impl;impl=impl->next)n++; return n; } static void oil_print_class (OilFunctionClass *klass, int verbose) { int n_impls; n_impls = get_n_impls(klass); printf ("%-20s %d %-10g %-10g %-10.3g %s %s\n", klass->name, n_impls, klass->reference_impl->profile_ave, klass->chosen_impl->profile_ave, klass->reference_impl->profile_ave/klass->chosen_impl->profile_ave, (klass->chosen_impl->flags & OIL_IMPL_FLAG_OPT)?"*":" ", klass->chosen_impl->name ); } static void oil_print_all (void) { int i; int n; n = oil_class_get_n_classes (); for (i = 0; i < n; i++){ OilFunctionClass *klass = oil_class_get_by_index (i); oil_print_class (klass, 0); } } int main (int argc, char *argv[]) { oil_init(); oil_print_all (); return 0; } liboil-0.3.17/examples/jpeg/0000777000175000017500000000000011332637377012640 500000000000000liboil-0.3.17/examples/jpeg/jpeg_huffman.c0000644000175000017500000000662010717203073015341 00000000000000 #include #include #include #include #include #include #include #include #include "jpeg_huffman.h" #include "jpeg_debug.h" /* misc helper function definitions */ static char *sprintbits (char *str, unsigned int bits, int n); #define TRUE 1 #define FALSE 0 void huffman_table_dump (HuffmanTable * table) { unsigned int n_bits; unsigned int code; char str[33]; int i; HuffmanEntry *entry; OIL_DEBUG ("dumping huffman table %p", table); for (i = 0; i < table->len; i++) { entry = table->entries + i; n_bits = entry->n_bits; code = entry->symbol >> (16 - n_bits); sprintbits (str, code, n_bits); OIL_DEBUG ("%s --> %d", str, entry->value); } } void huffman_table_init (HuffmanTable *table) { memset (table, 0, sizeof(HuffmanTable)); } void huffman_table_add (HuffmanTable * table, uint32_t code, int n_bits, int value) { HuffmanEntry *entry = table->entries + table->len; entry->value = value; entry->symbol = code << (16 - n_bits); entry->mask = 0xffff ^ (0xffff >> n_bits); entry->n_bits = n_bits; table->len++; } unsigned int huffman_table_decode_jpeg (HuffmanTable * tab, JpegBits * bits) { unsigned int code; int i; char str[33]; HuffmanEntry *entry; code = peekbits (bits, 16); for (i = 0; i < tab->len; i++) { entry = tab->entries + i; if ((code & entry->mask) == entry->symbol) { code = getbits (bits, entry->n_bits); sprintbits (str, code, entry->n_bits); OIL_DEBUG ("%s --> %d", str, entry->value); return entry->value; } } printf ("huffman sync lost"); return -1; } int huffman_table_decode_macroblock (short *block, HuffmanTable * dc_tab, HuffmanTable * ac_tab, JpegBits * bits) { int r, s, x, rs; int k; char str[33]; memset (block, 0, sizeof (short) * 64); s = huffman_table_decode_jpeg (dc_tab, bits); if (s < 0) return -1; x = getbits (bits, s); if ((x >> (s - 1)) == 0) { x -= (1 << s) - 1; } OIL_DEBUG ("s=%d (block[0]=%d)", s, x); block[0] = x; for (k = 1; k < 64; k++) { rs = huffman_table_decode_jpeg (ac_tab, bits); if (rs < 0) { OIL_DEBUG ("huffman error"); return -1; } if (bits->ptr > bits->end) { OIL_DEBUG ("overrun"); return -1; } s = rs & 0xf; r = rs >> 4; if (s == 0) { if (r == 15) { OIL_DEBUG ("r=%d s=%d (skip 16)", r, s); k += 15; } else { OIL_DEBUG ("r=%d s=%d (eob)", r, s); break; } } else { k += r; if (k >= 64) { printf ("macroblock overrun"); return -1; } x = getbits (bits, s); sprintbits (str, x, s); if ((x >> (s - 1)) == 0) { x -= (1 << s) - 1; } block[k] = x; OIL_DEBUG ("r=%d s=%d (%s -> block[%d]=%d)", r, s, str, k, x); } } return 0; } int huffman_table_decode (HuffmanTable * dc_tab, HuffmanTable * ac_tab, JpegBits * bits) { int16_t zz[64]; int ret; while (bits->ptr < bits->end) { ret = huffman_table_decode_macroblock (zz, dc_tab, ac_tab, bits); if (ret < 0) return -1; } return 0; } /* misc helper functins */ static char * sprintbits (char *str, unsigned int bits, int n) { int i; int bit = 1 << (n - 1); for (i = 0; i < n; i++) { str[i] = (bits & bit) ? '1' : '0'; bit >>= 1; } str[i] = 0; return str; } liboil-0.3.17/examples/jpeg/jpeg_bits.c0000644000175000017500000000355110717203073014656 00000000000000 #include #include "jpeg_bits.h" /* FIXME */ #define TRUE 1 #define FALSE 0 int jpeg_bits_error (JpegBits *bits) { return bits->error; } int jpeg_bits_get_u8 (JpegBits *bits) { if (bits->ptr < bits->end) { return *bits->ptr++; } bits->error = TRUE; return 0; } void jpeg_bits_skip (JpegBits *bits, int n) { bits->ptr += n; if (bits->ptr > bits->end) { bits->error = TRUE; bits->ptr = bits->end; } } int jpeg_bits_get_u16_be (JpegBits *bits) { int x; x = jpeg_bits_get_u8 (bits) << 8; x |= jpeg_bits_get_u8 (bits); return x; } int jpeg_bits_available (JpegBits *bits) { return bits->end - bits->ptr; } int bits_needbits(JpegBits *b, int n_bytes) { if(b->ptr==NULL)return 1; if(b->ptr + n_bytes > b->end)return 1; return 0; } int getbit(JpegBits *b) { int r; r = ((*b->ptr)>>(7-b->idx))&1; b->idx++; if(b->idx>=8){ b->ptr++; b->idx = 0; } return r; } unsigned int getbits(JpegBits *b, int n) { unsigned long r = 0; int i; for(i=0;iptr; } unsigned int get_u8(JpegBits *b) { return *b->ptr++; } unsigned int get_u16(JpegBits *b) { unsigned int r; r = b->ptr[0] | (b->ptr[1]<<8); b->ptr+=2; return r; } unsigned int get_be_u16(JpegBits *b) { unsigned int r; r = (b->ptr[0]<<8) | b->ptr[1]; b->ptr+=2; return r; } unsigned int get_u32(JpegBits *b) { unsigned int r; r = b->ptr[0] | (b->ptr[1]<<8) | (b->ptr[2]<<16) | (b->ptr[3]<<24); b->ptr+=4; return r; } void syncbits(JpegBits *b) { if(b->idx){ b->ptr++; b->idx=0; } } liboil-0.3.17/examples/jpeg/jpeg.c0000644000175000017500000006274210717203073013644 00000000000000 #include #include #include #include #include #include #include #include #include #include #include #include #include "jpeg_internal.h" #define MAX(a,b) ((a)>(b) ? (a) : (b)) extern uint8_t jpeg_standard_tables[]; extern int jpeg_standard_tables_size; void jpeg_decoder_error(JpegDecoder *dec, char *fmt, ...); void jpeg_decoder_define_huffman_tables (JpegDecoder * dec); void jpeg_decoder_define_arithmetic_conditioning (JpegDecoder *dec); void jpeg_decoder_define_quantization_tables (JpegDecoder *dec); void jpeg_decoder_define_restart_interval (JpegDecoder *dec); void jpeg_decoder_start_of_frame (JpegDecoder * dec, int marker); void jpeg_decoder_start_of_scan (JpegDecoder * dec); /* misc helper function declarations */ static void dumpbits (JpegBits * bits); static char *sprintbits (char *str, unsigned int bits, int n); static void huffman_table_load_std_jpeg (JpegDecoder * dec); static void jpeg_decoder_verify_header (JpegDecoder *dec); static void jpeg_decoder_init_decoder (JpegDecoder *dec); static void jpeg_decoder_verify_header (JpegDecoder *dec) { int max_quant_table = 0; int i; if (dec->sof_type != JPEG_MARKER_SOF_0) { OIL_ERROR("only handle baseline DCT"); dec->error = TRUE; } if (dec->width < 1) { OIL_ERROR("height can't be 0"); dec->error = TRUE; } switch (dec->sof_type) { case JPEG_MARKER_SOF_0: /* baseline DCT */ max_quant_table = 3; if (dec->depth != 8) { OIL_ERROR("depth must be 8 (%d)", dec->depth); dec->error = TRUE; } break; case JPEG_MARKER_SOF_1: /* extended DCT */ max_quant_table = 3; if (dec->depth != 8 && dec->depth != 12) { OIL_ERROR("depth must be 8 or 12 (%d)", dec->depth); dec->error = TRUE; } break; case JPEG_MARKER_SOF_2: /* progressive DCT */ max_quant_table = 3; if (dec->depth != 8 && dec->depth != 12) { OIL_ERROR("depth must be 8 or 12 (%d)", dec->depth); dec->error = TRUE; } break; case JPEG_MARKER_SOF_3: /* lossless DCT */ max_quant_table = 0; if (dec->depth < 2 || dec->depth > 16) { OIL_ERROR("depth must be between 2 and 16 (%d)", dec->depth); dec->error = TRUE; } break; default: break; } if (dec->n_components < 0 || dec->n_components > 255) { OIL_ERROR("n_components must be in the range 0-255 (%d)", dec->n_components); dec->error = TRUE; } if (dec->sof_type == JPEG_MARKER_SOF_2 && dec->n_components > 4) { OIL_ERROR("n_components must be <= 4 for progressive DCT (%d)", dec->n_components); dec->error = TRUE; } for (i = 0; i < dec->n_components; i++) { if (dec->components[i].id < 0 || dec->components[i].id > 255) { OIL_ERROR("component ID out of range"); dec->error = TRUE; break; } if (dec->components[i].h_sample < 1 || dec->components[i].h_sample > 4 || dec->components[i].v_sample < 1 || dec->components[i].v_sample > 4) { OIL_ERROR("sample factor(s) for component %d out of range %d %d", i, dec->components[i].h_sample, dec->components[i].v_sample); dec->error = TRUE; break; } if (dec->components[i].quant_table < 0 || dec->components[i].quant_table > max_quant_table) { OIL_ERROR("quant table for component %d out of range (%d)", i, dec->components[i].quant_table); dec->error = TRUE; break; } } } static void jpeg_decoder_init_decoder (JpegDecoder *dec) { int max_h_sample = 0; int max_v_sample = 0; int i; /* decoder limitations */ if (dec->n_components != 3) { jpeg_decoder_error(dec, "wrong number of components %d", dec->n_components); return; } if (dec->sof_type != JPEG_MARKER_SOF_0) { jpeg_decoder_error(dec, "only handle baseline DCT"); return; } for (i=0; i < dec->n_components; i++) { max_h_sample = MAX (max_h_sample, dec->components[i].h_sample); max_v_sample = MAX (max_v_sample, dec->components[i].v_sample); } dec->width_blocks = (dec->width + 8 * max_h_sample - 1) / (8 * max_h_sample); dec->height_blocks = (dec->height + 8 * max_v_sample - 1) / (8 * max_v_sample); for (i = 0; i < dec->n_components; i++) { int rowstride; int image_size; dec->components[i].h_subsample = max_h_sample / dec->components[i].h_sample; dec->components[i].v_subsample = max_v_sample / dec->components[i].v_sample; rowstride = dec->width_blocks * 8 * max_h_sample / dec->components[i].h_subsample; image_size = rowstride * (dec->height_blocks * 8 * max_v_sample / dec->components[i].v_subsample); dec->components[i].rowstride = rowstride; dec->components[i].image = malloc (image_size); } } void generate_code_table (int *huffsize) { int code; int i; int j; int k; char str[33]; //int l; code = 0; k = 0; for (i = 0; i < 16; i++) { for (j = 0; j < huffsize[i]; j++) { OIL_DEBUG ("huffcode[%d] = %s", k, sprintbits (str, code >> (15 - i), i + 1)); code++; k++; } code <<= 1; } } int huffman_table_init_jpeg (HuffmanTable *table, JpegBits * bits) { int n_symbols; int huffsize[16]; int i, j, k; unsigned int symbol; int n = 0; huffman_table_init (table); /* huffsize[i] is the number of symbols that have length * (i+1) bits. Maximum bit length is 16 bits, so there are * 16 entries. */ n_symbols = 0; for (i = 0; i < 16; i++) { huffsize[i] = jpeg_bits_get_u8 (bits); n++; n_symbols += huffsize[i]; } /* Build up the symbol table. The first symbol is all 0's, with * the number of bits determined by the first non-zero entry in * huffsize[]. Subsequent symbols with the same bit length are * incremented by 1. Increasing the bit length shifts the * symbol 1 bit to the left. */ symbol = 0; k = 0; for (i = 0; i < 16; i++) { for (j = 0; j < huffsize[i]; j++) { huffman_table_add (table, symbol, i + 1, jpeg_bits_get_u8 (bits)); n++; symbol++; k++; } /* This checks that our symbol is actually less than the * number of bits we think it is. This is only triggered * for bad huffsize[] arrays. */ if (symbol >= (1 << (i + 1))) { /* FIXME jpeg_decoder_error() */ OIL_DEBUG ("bad huffsize[] array"); return -1; } symbol <<= 1; } huffman_table_dump (table); return n; } static void dumpbits (JpegBits * bits) { int i; int j; unsigned char *p; char s[40]; p = bits->ptr; for (i = 0; i < 8; i++) { sprintf (s, "%02x %02x %02x %02x %02x %02x %02x %02x ........", p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]); for (j = 0; j < 8; j++) { s[j + 24] = (isprint (p[j])) ? p[j] : '.'; } OIL_DEBUG ("%s", s); p += 8; } } int jpeg_decoder_find_component_by_id (JpegDecoder * dec, int id) { int i; for (i = 0; i < dec->n_components; i++) { if (dec->components[i].id == id) return i; } OIL_DEBUG ("undefined component id %d", id); return 0; } int jpeg_decoder_application0 (JpegDecoder * dec, JpegBits * bits) { int length; OIL_DEBUG ("app0"); length = get_be_u16 (bits); OIL_DEBUG ("length=%d", length); if (memcmp (bits->ptr, "JFIF", 4) == 0 && bits->ptr[4] == 0) { int version; int units; int x_density; int y_density; int x_thumbnail; int y_thumbnail; OIL_DEBUG ("JFIF"); bits->ptr += 5; version = get_be_u16 (bits); units = get_u8 (bits); x_density = get_be_u16 (bits); y_density = get_be_u16 (bits); x_thumbnail = get_u8 (bits); y_thumbnail = get_u8 (bits); OIL_DEBUG ("version = %04x", version); OIL_DEBUG ("units = %d", units); OIL_DEBUG ("x_density = %d", x_density); OIL_DEBUG ("y_density = %d", y_density); OIL_DEBUG ("x_thumbnail = %d", x_thumbnail); OIL_DEBUG ("y_thumbnail = %d", y_thumbnail); } if (memcmp (bits->ptr, "JFXX", 4) == 0 && bits->ptr[4] == 0) { OIL_DEBUG ("JFIF extension (not handled)"); bits->ptr += length - 2; } return length; } int jpeg_decoder_application_misc (JpegDecoder * dec, JpegBits * bits) { int length; OIL_DEBUG ("appX"); length = get_be_u16 (bits); OIL_DEBUG ("length=%d", length); OIL_DEBUG ("JPEG application tag X ignored"); dumpbits (bits); bits->ptr += length - 2; return length; } int jpeg_decoder_comment (JpegDecoder * dec, JpegBits * bits) { int length; OIL_DEBUG ("comment"); length = get_be_u16 (bits); OIL_DEBUG ("length=%d", length); dumpbits (bits); bits->ptr += length - 2; return length; } int jpeg_decoder_restart_interval (JpegDecoder * dec, JpegBits * bits) { int length; OIL_DEBUG ("comment"); length = get_be_u16 (bits); OIL_DEBUG ("length=%d", length); dec->restart_interval = get_be_u16 (bits); OIL_DEBUG ("restart_interval=%d", dec->restart_interval); return length; } int jpeg_decoder_restart (JpegDecoder * dec, JpegBits * bits) { OIL_DEBUG ("restart"); return 0; } void jpeg_decoder_decode_entropy_segment (JpegDecoder * dec) { JpegBits * bits = &dec->bits; JpegBits b2, *bits2 = &b2; short block[64]; short block2[64]; unsigned char *newptr; int len; int j; int i; int go; int x, y; int n; int ret; len = 0; j = 0; while (1) { if (bits->ptr[len] == 0xff && bits->ptr[len + 1] != 0x00) { break; } len++; } OIL_DEBUG ("entropy length = %d", len); /* we allocate extra space, since the getbits() code can * potentially read past the end of the buffer */ newptr = malloc (len + 2); for (i = 0; i < len; i++) { newptr[j] = bits->ptr[i]; j++; if (bits->ptr[i] == 0xff) i++; } bits->ptr += len; bits2->ptr = newptr; bits2->idx = 0; bits2->end = newptr + j; newptr[j] = 0; newptr[j + 1] = 0; dec->dc[0] = dec->dc[1] = dec->dc[2] = dec->dc[3] = 128 * 8; go = 1; x = dec->x; y = dec->y; n = dec->restart_interval; if (n == 0) n = INT_MAX; while (n-- > 0) { for (i = 0; i < dec->scan_list_length; i++) { int dc_table_index; int ac_table_index; int quant_index; unsigned char *ptr; int component_index; OIL_DEBUG ("%d,%d: component=%d dc_table=%d ac_table=%d", x, y, dec->scan_list[i].component_index, dec->scan_list[i].dc_table, dec->scan_list[i].ac_table); component_index = dec->scan_list[i].component_index; dc_table_index = dec->scan_list[i].dc_table; ac_table_index = dec->scan_list[i].ac_table; quant_index = dec->scan_list[i].quant_table; ret = huffman_table_decode_macroblock (block, &dec->dc_huff_table[dc_table_index], &dec->ac_huff_table[ac_table_index], bits2); if (ret < 0) { OIL_DEBUG ("%d,%d: component=%d dc_table=%d ac_table=%d", x, y, dec->scan_list[i].component_index, dec->scan_list[i].dc_table, dec->scan_list[i].ac_table); n = 0; break; } OIL_DEBUG ("using quant table %d", quant_index); oil_mult8x8_s16 (block2, block, dec->quant_tables[quant_index].quantizer, sizeof (short) * 8, sizeof(short) * 8, sizeof (short) * 8); dec->dc[component_index] += block2[0]; block2[0] = dec->dc[component_index]; oil_unzigzag8x8_s16 (block, sizeof (short) * 8, block2, sizeof (short) * 8); oil_idct8x8_s16 (block2, sizeof (short) * 8, block, sizeof (short) * 8); oil_trans8x8_s16 (block, sizeof (short) * 8, block2, sizeof (short) * 8); ptr = dec->components[component_index].image + x * dec->components[component_index].h_sample + dec->scan_list[i].offset + dec->components[component_index].rowstride * y * dec->components[component_index].v_sample; oil_clipconv8x8_u8_s16 (ptr, dec->components[component_index].rowstride, block, sizeof (short) * 8); } x += 8; if (x * dec->scan_h_subsample >= dec->width) { x = 0; y += 8; } if (y * dec->scan_v_subsample >= dec->height) { go = 0; } } dec->x = x; dec->y = y; free (newptr); } JpegDecoder * jpeg_decoder_new (void) { JpegDecoder *dec; oil_init (); dec = malloc (sizeof(JpegDecoder)); memset (dec, 0, sizeof(JpegDecoder)); huffman_table_load_std_jpeg (dec); return dec; } void jpeg_decoder_free (JpegDecoder * dec) { int i; for (i = 0; i < JPEG_MAX_COMPONENTS; i++) { if (dec->components[i].image) free (dec->components[i].image); } if (dec->data) free (dec->data); free (dec); } void jpeg_decoder_error(JpegDecoder *dec, char *fmt, ...) { va_list varargs; if (dec->error) return; va_start (varargs, fmt); #if 0 vasprintf(&dec->error_message, fmt, varargs); #else dec->error_message = malloc(100); vsnprintf(dec->error_message, 100, fmt, varargs); #endif va_end (varargs); OIL_ERROR("decoder error: %s", dec->error_message); abort(); dec->error = TRUE; } int jpeg_decoder_get_marker (JpegDecoder *dec, int *marker) { int a,b; JpegBits *bits = &dec->bits; if (jpeg_bits_available(bits) < 2) { return FALSE; } a = jpeg_bits_get_u8(bits); if (a != 0xff) { jpeg_decoder_error(dec, "expected marker, not 0x%02x", a); return FALSE; } do { b = jpeg_bits_get_u8 (bits); } while (b == 0xff && jpeg_bits_error(bits)); *marker = b; return TRUE; } void jpeg_decoder_skip (JpegDecoder *dec) { int length; length = jpeg_bits_get_u16_be (&dec->bits); jpeg_bits_skip (&dec->bits, length - 2); } int jpeg_decoder_decode (JpegDecoder *dec) { JpegBits *bits; int marker; dec->error = FALSE; bits = &dec->bits; /* Note: The spec is ambiguous as to whether fill bytes can preceed * the first marker. We'll assume yes. */ if (!jpeg_decoder_get_marker (dec, &marker)) { return FALSE; } if (marker != JPEG_MARKER_SOI) { jpeg_decoder_error(dec, "not a JPEG image"); return FALSE; } /* Interpret markers up to the start of frame */ while (!dec->error) { if (!jpeg_decoder_get_marker (dec, &marker)) { return FALSE; } if (marker == JPEG_MARKER_DEFINE_HUFFMAN_TABLES) { jpeg_decoder_define_huffman_tables (dec); } else if (marker == JPEG_MARKER_DEFINE_ARITHMETIC_CONDITIONING) { jpeg_decoder_define_arithmetic_conditioning (dec); } else if (marker == JPEG_MARKER_DEFINE_QUANTIZATION_TABLES) { jpeg_decoder_define_quantization_tables (dec); } else if (marker == JPEG_MARKER_DEFINE_RESTART_INTERVAL) { jpeg_decoder_define_restart_interval (dec); } else if (JPEG_MARKER_IS_APP(marker)) { /* FIXME decode app segment */ jpeg_decoder_skip (dec); } else if (marker == JPEG_MARKER_COMMENT) { jpeg_decoder_skip (dec); } else if (JPEG_MARKER_IS_START_OF_FRAME(marker)) { break; } else { jpeg_decoder_error(dec, "unexpected marker 0x%02x", marker); return FALSE; } } jpeg_decoder_start_of_frame(dec, marker); jpeg_decoder_verify_header (dec); if (dec->error) { return FALSE; } jpeg_decoder_init_decoder (dec); if (dec->error) { return FALSE; } /* In this section, we loop over parse units until we reach the end * of the image. */ while (!dec->error) { if (!jpeg_decoder_get_marker (dec, &marker)) { return FALSE; } if (marker == JPEG_MARKER_DEFINE_HUFFMAN_TABLES) { jpeg_decoder_define_huffman_tables (dec); } else if (marker == JPEG_MARKER_DEFINE_ARITHMETIC_CONDITIONING) { jpeg_decoder_define_arithmetic_conditioning (dec); } else if (marker == JPEG_MARKER_DEFINE_QUANTIZATION_TABLES) { jpeg_decoder_define_quantization_tables (dec); } else if (marker == JPEG_MARKER_DEFINE_RESTART_INTERVAL) { jpeg_decoder_define_restart_interval (dec); } else if (JPEG_MARKER_IS_APP(marker)) { jpeg_decoder_skip (dec); } else if (marker == JPEG_MARKER_COMMENT) { jpeg_decoder_skip (dec); } else if (marker == JPEG_MARKER_SOS) { jpeg_decoder_start_of_scan (dec); jpeg_decoder_decode_entropy_segment (dec); } else if (JPEG_MARKER_IS_RESET(marker)) { jpeg_decoder_decode_entropy_segment (dec); } else if (marker == JPEG_MARKER_EOI) { break; } else { jpeg_decoder_error(dec, "unexpected marker 0x%02x", marker); return FALSE; } } return TRUE; } /* handle markers */ void jpeg_decoder_define_huffman_tables (JpegDecoder * dec) { JpegBits *bits = &dec->bits; int length; int tc; int th; int x; HuffmanTable *hufftab; OIL_DEBUG ("define huffman tables"); length = jpeg_bits_get_u16_be (bits); if (length < 2) { jpeg_decoder_error(dec, "length too short"); return; } length -= 2; while (length > 0) { x = jpeg_bits_get_u8 (bits); length--; tc = x >> 4; th = x & 0xf; OIL_DEBUG ("huff table type %d (%s) index %d", tc, tc ? "ac" : "dc", th); if (tc > 1 || th > 3) { jpeg_decoder_error(dec, "huffman table type or index out of range"); return; } if (tc) { hufftab = &dec->ac_huff_table[th]; length -= huffman_table_init_jpeg (hufftab, bits); } else { hufftab = &dec->dc_huff_table[th]; length -= huffman_table_init_jpeg (hufftab, bits); } } if (length < 0) { jpeg_decoder_error(dec, "huffman table overran available bytes"); return; } } void jpeg_decoder_define_quantization_tables (JpegDecoder *dec) { JpegBits *bits = &dec->bits; JpegQuantTable *table; int length; int pq; int tq; int i; OIL_INFO ("define quantization table"); length = jpeg_bits_get_u16_be (bits); if (length < 2) { jpeg_decoder_error(dec, "length too short"); return; } length -= 2; while (length > 0) { int x; x = jpeg_bits_get_u8 (bits); length--; pq = x >> 4; tq = x & 0xf; if (pq > 1) { jpeg_decoder_error (dec, "bad pq value"); return; } if (tq > 3) { jpeg_decoder_error (dec, "bad tq value"); return; } table = &dec->quant_tables[tq]; if (pq) { for (i = 0; i < 64; i++) { table->quantizer[i] = jpeg_bits_get_u16_be (bits); length -= 2; } } else { for (i = 0; i < 64; i++) { table->quantizer[i] = jpeg_bits_get_u8 (bits); length -= 1; } } } if (length < 0) { jpeg_decoder_error(dec, "quantization table overran available bytes"); return; } } void jpeg_decoder_define_restart_interval (JpegDecoder *dec) { JpegBits *bits = &dec->bits; int length; length = jpeg_bits_get_u16_be (bits); if (length != 4) { jpeg_decoder_error(dec, "length supposed to be 4 (%d)", length); return; } /* FIXME this needs to be checked somewhere */ dec->restart_interval = jpeg_bits_get_u16_be (bits); } void jpeg_decoder_define_arithmetic_conditioning (JpegDecoder *dec) { /* we don't handle arithmetic coding, so skip it */ jpeg_decoder_skip (dec); } void jpeg_decoder_start_of_frame (JpegDecoder * dec, int marker) { JpegBits *bits = &dec->bits; int i; int length; OIL_INFO ("start of frame"); dec->sof_type = marker; length = jpeg_bits_get_u16_be (bits); if (jpeg_bits_available(bits) < length) { jpeg_decoder_error(dec, "not enough data for start_of_frame (%d < %d)", length, jpeg_bits_available(bits)); return; } dec->depth = jpeg_bits_get_u8 (bits); dec->height = jpeg_bits_get_u16_be (bits); dec->width = jpeg_bits_get_u16_be (bits); dec->n_components = jpeg_bits_get_u8 (bits); OIL_DEBUG ( "frame_length=%d depth=%d height=%d width=%d n_components=%d", length, dec->depth, dec->height, dec->width, dec->n_components); if (dec->n_components * 3 + 8 != length) { jpeg_decoder_error(dec, "inconsistent header"); return; } for (i = 0; i < dec->n_components; i++) { dec->components[i].id = get_u8 (bits); dec->components[i].h_sample = getbits (bits, 4); dec->components[i].v_sample = getbits (bits, 4); dec->components[i].quant_table = get_u8 (bits); OIL_DEBUG ( "[%d] id=%d h_sample=%d v_sample=%d quant_table=%d", i, dec->components[i].id, dec->components[i].h_sample, dec->components[i].v_sample, dec->components[i].quant_table); } } void jpeg_decoder_start_of_scan (JpegDecoder * dec) { JpegBits *bits = &dec->bits; int length; int i; int spectral_start; int spectral_end; int approx_high; int approx_low; int n; int tmp; int n_components; OIL_DEBUG ("start of scan"); length = jpeg_bits_get_u16_be (bits); OIL_DEBUG ("length=%d", length); n_components = jpeg_bits_get_u8 (bits); n = 0; dec->scan_h_subsample = 0; dec->scan_v_subsample = 0; for (i = 0; i < n_components; i++) { int component_id; int dc_table; int ac_table; int x; int y; int index; int h_subsample; int v_subsample; int quant_index; component_id = jpeg_bits_get_u8 (bits); tmp = jpeg_bits_get_u8 (bits); dc_table = tmp >> 4; ac_table = tmp & 0xf; index = jpeg_decoder_find_component_by_id (dec, component_id); h_subsample = dec->components[index].h_sample; v_subsample = dec->components[index].v_sample; quant_index = dec->components[index].quant_table; for (y = 0; y < v_subsample; y++) { for (x = 0; x < h_subsample; x++) { dec->scan_list[n].component_index = index; dec->scan_list[n].dc_table = dc_table; dec->scan_list[n].ac_table = ac_table; dec->scan_list[n].quant_table = quant_index; dec->scan_list[n].x = x; dec->scan_list[n].y = y; dec->scan_list[n].offset = y * 8 * dec->components[index].rowstride + x * 8; n++; } } dec->scan_h_subsample = MAX (dec->scan_h_subsample, h_subsample); dec->scan_v_subsample = MAX (dec->scan_v_subsample, v_subsample); OIL_DEBUG ("component %d: index=%d dc_table=%d ac_table=%d n=%d", component_id, index, dc_table, ac_table, n); } dec->scan_list_length = n; spectral_start = jpeg_bits_get_u8 (bits); spectral_end = jpeg_bits_get_u8 (bits); OIL_DEBUG ("spectral range [%d,%d]", spectral_start, spectral_end); tmp = jpeg_bits_get_u8 (bits); approx_high = tmp >> 4; approx_low = tmp & 0xf; OIL_DEBUG ("approx range [%d,%d]", approx_low, approx_high); dec->x = 0; dec->y = 0; dec->dc[0] = dec->dc[1] = dec->dc[2] = dec->dc[3] = 128 * 8; } int jpeg_decoder_addbits (JpegDecoder * dec, unsigned char *data, unsigned int len) { unsigned int offset; offset = dec->bits.ptr - dec->data; dec->data = realloc (dec->data, dec->data_len + len); memcpy (dec->data + dec->data_len, data, len); dec->data_len += len; dec->bits.ptr = dec->data + offset; dec->bits.end = dec->data + dec->data_len; return 0; } int jpeg_decoder_get_image_size (JpegDecoder * dec, int *width, int *height) { if (width) *width = dec->width; if (height) *height = dec->height; return 0; } int jpeg_decoder_get_component_ptr (JpegDecoder * dec, int id, unsigned char **image, int *rowstride) { int i; i = jpeg_decoder_find_component_by_id (dec, id); if (image) *image = dec->components[i].image; if (rowstride) *rowstride = dec->components[i].rowstride; return 0; } int jpeg_decoder_get_component_size (JpegDecoder * dec, int id, int *width, int *height) { int i; /* subsampling sizes are rounded up */ i = jpeg_decoder_find_component_by_id (dec, id); if (width) *width = (dec->width - 1) / dec->components[i].h_subsample + 1; if (height) *height = (dec->height - 1) / dec->components[i].v_subsample + 1; return 0; } int jpeg_decoder_get_component_subsampling (JpegDecoder * dec, int id, int *h_subsample, int *v_subsample) { int i; i = jpeg_decoder_find_component_by_id (dec, id); if (h_subsample) *h_subsample = dec->components[i].h_subsample; if (v_subsample) *v_subsample = dec->components[i].v_subsample; return 0; } #if 0 int jpeg_decoder_parse (JpegDecoder * dec) { JpegBits *bits = &dec->bits; JpegBits b2; unsigned int x; unsigned int tag; int i; while (bits->ptr < bits->end) { x = get_u8 (bits); if (x != 0xff) { int n = 0; while (x != 0xff) { x = get_u8 (bits); n++; } OIL_DEBUG ("lost sync, skipped %d bytes", n); } while (x == 0xff) { x = get_u8 (bits); } tag = x; OIL_DEBUG ("tag %02x", tag); b2 = *bits; for (i = 0; i < n_jpeg_markers - 1; i++) { if (tag == jpeg_markers[i].tag) { break; } } OIL_DEBUG ("tag: %s", jpeg_markers[i].name); if (jpeg_markers[i].func) { jpeg_markers[i].func (dec, &b2); } else { OIL_DEBUG ("unhandled or illegal JPEG marker (0x%02x)", tag); dumpbits (&b2); } if (jpeg_markers[i].flags & JPEG_ENTROPY_SEGMENT) { jpeg_decoder_decode_entropy_segment (dec, &b2); } syncbits (&b2); bits->ptr = b2.ptr; } return 0; } #endif /* misc helper functins */ static char * sprintbits (char *str, unsigned int bits, int n) { int i; int bit = 1 << (n - 1); for (i = 0; i < n; i++) { str[i] = (bits & bit) ? '1' : '0'; bit >>= 1; } str[i] = 0; return str; } static void huffman_table_load_std_jpeg (JpegDecoder * dec) { JpegBits b, *bits = &b; bits->ptr = jpeg_standard_tables; bits->idx = 0; bits->end = jpeg_standard_tables + jpeg_standard_tables_size; huffman_table_init_jpeg (&dec->dc_huff_table[0], bits); huffman_table_init_jpeg (&dec->ac_huff_table[0], bits); huffman_table_init_jpeg (&dec->dc_huff_table[1], bits); huffman_table_init_jpeg (&dec->ac_huff_table[1], bits); } liboil-0.3.17/examples/jpeg/jpeg_debug.h0000644000175000017500000000035410717203073015006 00000000000000 #ifndef _JPEG_DEBUG_H_ #define _JPEG_DEBUG_H_ #define JPEG_DEBUG(n, format...) do{ \ if((n)<=JPEG_DEBUG_LEVEL)jpeg_debug((n),format); \ }while(0) #define JPEG_DEBUG_LEVEL 4 void jpeg_debug(int n, const char *format, ... ); #endif liboil-0.3.17/examples/jpeg/test.c0000644000175000017500000000326110717203073013665 00000000000000 #include #include #include #include #include #include "jpeg.h" /* getfile */ void *getfile (char *path, int *n_bytes); static void dump_pgm (unsigned char *ptr, int rowstride, int width, int height); int main (int argc, char *argv[]) { unsigned char *data; int len; JpegDecoder *dec; char *fn = "biglebowski.jpg"; unsigned char *ptr; int rowstride; int width; int height; dec = jpeg_decoder_new (); if (argc > 1) fn = argv[1]; data = getfile (fn, &len); jpeg_decoder_addbits (dec, data, len); jpeg_decoder_decode (dec); jpeg_decoder_get_component_ptr (dec, 1, &ptr, &rowstride); jpeg_decoder_get_component_size (dec, 1, &width, &height); dump_pgm (ptr, rowstride, width, height); return 0; } /* getfile */ void * getfile (char *path, int *n_bytes) { int fd; struct stat st; void *ptr = NULL; int ret; fd = open (path, O_RDONLY); if (!fd) return NULL; ret = fstat (fd, &st); if (ret < 0) { close (fd); return NULL; } ptr = malloc (st.st_size); if (!ptr) { close (fd); return NULL; } ret = read (fd, ptr, st.st_size); if (ret != st.st_size) { free (ptr); close (fd); return NULL; } if (n_bytes) *n_bytes = st.st_size; close (fd); return ptr; } static void dump_pgm (unsigned char *ptr, int rowstride, int width, int height) { int x, y; printf ("P2\n"); printf ("%d %d\n", width, height); printf ("255\n"); for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { printf ("%d ", ptr[x]); if ((x & 15) == 15) { printf ("\n"); } } printf ("\n"); ptr += rowstride; } } liboil-0.3.17/examples/jpeg/jpeg_huffman.h0000644000175000017500000000147010717203073015344 00000000000000 #ifndef _HUFFMAN_H_ #define _HUFFMAN_H_ #include #include "jpeg_bits.h" typedef struct _HuffmanEntry HuffmanEntry; typedef struct _HuffmanTable HuffmanTable; struct _HuffmanEntry { unsigned int symbol; unsigned int mask; int n_bits; unsigned char value; }; struct _HuffmanTable { int len; HuffmanEntry entries[256]; }; void huffman_table_init(HuffmanTable *table); void huffman_table_dump(HuffmanTable *table); void huffman_table_add(HuffmanTable *table, uint32_t code, int n_bits, int value); unsigned int huffman_table_decode_jpeg(HuffmanTable *tab, JpegBits *bits); int huffman_table_decode_macroblock(short *block, HuffmanTable *dc_tab, HuffmanTable *ac_tab, JpegBits *bits); int huffman_table_decode(HuffmanTable *dc_tab, HuffmanTable *ac_tab, JpegBits *bits); #endif liboil-0.3.17/examples/jpeg/jpeg_bits.h0000644000175000017500000000141410717203073014657 00000000000000 #ifndef __BITS_H__ #define __BITS_H__ typedef struct _JpegBits JpegBits; struct _JpegBits { unsigned char *ptr; int idx; unsigned char *end; int error; }; int jpeg_bits_error (JpegBits *bits); int jpeg_bits_get_u8 (JpegBits *bits); void jpeg_bits_skip (JpegBits *bits, int n); int jpeg_bits_get_u16_be (JpegBits *bits); int jpeg_bits_available (JpegBits *bits); int bits_needbits(JpegBits *b, int n_bytes); int getbit(JpegBits *b); unsigned int getbits(JpegBits *b, int n); unsigned int peekbits(JpegBits *b, int n); int getsbits(JpegBits *b, int n); unsigned int peek_u8(JpegBits *b); unsigned int get_u8(JpegBits *b); unsigned int get_u16(JpegBits *b); unsigned int get_be_u16(JpegBits *b); unsigned int get_u32(JpegBits *b); void syncbits(JpegBits *b); #endif liboil-0.3.17/examples/jpeg/Makefile.am0000644000175000017500000000111610717203073014573 00000000000000 noinst_LTLIBRARIES = libjpeg.la noinst_PROGRAMS = jpeg_test jpeg_rgb_test libjpeg_la_SOURCES = \ jpeg.c \ jpeg_bits.c \ jpeg_bits.h \ jpeg_debug.h \ jpeg_huffman.c \ jpeg_huffman.h \ jpeg_internal.h \ jpeg_rgb_decoder.c \ jpeg_rgb_decoder.h \ jpeg_rgb_internal.h \ jpeg_tables.c libjpeg_la_CFLAGS = $(LIBOIL_CFLAGS) noinst_HEADERS = jpeg.h jpeg_test_SOURCES = test.c jpeg_test_CFLAGS = $(LIBOIL_CFLAGS) jpeg_test_LDADD = libjpeg.la $(LIBOIL_LIBS) jpeg_rgb_test_SOURCES = test_rgb.c jpeg_rgb_test_CFLAGS = $(LIBOIL_CFLAGS) jpeg_rgb_test_LDADD = libjpeg.la $(LIBOIL_LIBS) liboil-0.3.17/examples/jpeg/test_rgb.c0000644000175000017500000000350710717203073014522 00000000000000 #include #include #include #include #include #include #include #include "jpeg.h" /* getfile */ void *getfile (char *path, int *n_bytes); static void dump_pnm (uint32_t *ptr, int rowstride, int width, int height); int main (int argc, char *argv[]) { unsigned char *data; int len; char *fn; uint32_t *image = NULL; int width; int height; int ret; if (argc < 2) { printf("jpeg_rgb_test \n"); exit(1); } fn = argv[1]; data = getfile (fn, &len); if (data == NULL) { printf("cannot read file %s\n", fn); exit(1); } ret = jpeg_decode_argb (data, len, &image, &width, &height); if (ret) { dump_pnm (image, width*4, width, height); } if (image) free (image); free (data); return 0; } /* getfile */ void * getfile (char *path, int *n_bytes) { int fd; struct stat st; void *ptr = NULL; int ret; fd = open (path, O_RDONLY); if (!fd) return NULL; ret = fstat (fd, &st); if (ret < 0) { close (fd); return NULL; } ptr = malloc (st.st_size); if (!ptr) { close (fd); return NULL; } ret = read (fd, ptr, st.st_size); if (ret != st.st_size) { free (ptr); close (fd); return NULL; } if (n_bytes) *n_bytes = st.st_size; close (fd); return ptr; } static void dump_pnm (uint32_t *ptr, int rowstride, int width, int height) { int x, y; printf ("P3\n"); printf ("%d %d\n", width, height); printf ("255\n"); for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { printf ("%d ", oil_argb_R(ptr[x])); printf ("%d ", oil_argb_G(ptr[x])); printf ("%d ", oil_argb_B(ptr[x])); if ((x & 15) == 15) { printf ("\n"); } } printf ("\n"); ptr += rowstride/4; } } liboil-0.3.17/examples/jpeg/jpeg_rgb_internal.h0000644000175000017500000000077210717203073016372 00000000000000 #ifndef _JPEG_INTERNAL_H_ #define _JPEG_INTERNAL_H_ #include "jpeg.h" #include "jpeg_rgb_decoder.h" #include "bits.h" #define JPEG_DEBUG(n, format...) do{ \ if((n)<=JPEG_DEBUG_LEVEL)jpeg_debug((n),format); \ }while(0) #define JPEG_DEBUG_LEVEL 4 struct jpeg_rgb_decoder_struct { JpegDecoder *dec; unsigned char *image; int height, width; struct{ unsigned char *image; int rowstride; int h_subsample; int v_subsample; int alloc; }component[3]; }; /* jpeg_rgb_decoder.c */ #endif liboil-0.3.17/examples/jpeg/jpeg.h0000644000175000017500000000466010717203073013644 00000000000000 #ifndef _JPEG_DECODER_H_ #define _JPEG_DECODER_H_ #include #define JPEG_MARKER_STUFFED 0x00 #define JPEG_MARKER_TEM 0x01 #define JPEG_MARKER_RES 0x02 #define JPEG_MARKER_SOF_0 0xc0 #define JPEG_MARKER_SOF_1 0xc1 #define JPEG_MARKER_SOF_2 0xc2 #define JPEG_MARKER_SOF_3 0xc3 #define JPEG_MARKER_DEFINE_HUFFMAN_TABLES 0xc4 #define JPEG_MARKER_SOF_5 0xc5 #define JPEG_MARKER_SOF_6 0xc6 #define JPEG_MARKER_SOF_7 0xc7 #define JPEG_MARKER_JPG 0xc8 #define JPEG_MARKER_SOF_9 0xc9 #define JPEG_MARKER_SOF_10 0xca #define JPEG_MARKER_SOF_11 0xcb #define JPEG_MARKER_DEFINE_ARITHMETIC_CONDITIONING 0xcc #define JPEG_MARKER_SOF_13 0xcd #define JPEG_MARKER_SOF_14 0xce #define JPEG_MARKER_SOF_15 0xcf #define JPEG_MARKER_RST_0 0xd0 #define JPEG_MARKER_RST_1 0xd1 #define JPEG_MARKER_RST_2 0xd2 #define JPEG_MARKER_RST_3 0xd3 #define JPEG_MARKER_RST_4 0xd4 #define JPEG_MARKER_RST_5 0xd5 #define JPEG_MARKER_RST_6 0xd6 #define JPEG_MARKER_RST_7 0xd7 #define JPEG_MARKER_SOI 0xd8 #define JPEG_MARKER_EOI 0xd9 #define JPEG_MARKER_SOS 0xda #define JPEG_MARKER_DEFINE_QUANTIZATION_TABLES 0xdb #define JPEG_MARKER_DNL 0xdc #define JPEG_MARKER_DEFINE_RESTART_INTERVAL 0xdd #define JPEG_MARKER_DHP 0xde #define JPEG_MARKER_EXP 0xdf #define JPEG_MARKER_APP(x) (0xe0 + (x)) #define JPEG_MARKER_JPG_(x) (0xf0 + (x)) #define JPEG_MARKER_COMMENT 0xfe #define JPEG_MARKER_JFIF JPEG_MARKER_APP(0) #define JPEG_MARKER_IS_START_OF_FRAME(x) ((x)>=0xc0 && (x) <= 0xcf && (x)!=0xc4 && (x)!=0xc8 && (x)!=0xcc) #define JPEG_MARKER_IS_APP(x) ((x)>=0xe0 && (x) <= 0xef) #define JPEG_MARKER_IS_RESET(x) ((x)>=0xd0 && (x)<=0xd7) typedef struct _JpegDecoder JpegDecoder; JpegDecoder *jpeg_decoder_new(void); void jpeg_decoder_free(JpegDecoder *dec); int jpeg_decoder_addbits(JpegDecoder *dec, unsigned char *data, unsigned int len); int jpeg_decoder_decode (JpegDecoder *dec); int jpeg_decoder_get_image_size(JpegDecoder *dec, int *width, int *height); int jpeg_decoder_get_component_size(JpegDecoder *dec, int id, int *width, int *height); int jpeg_decoder_get_component_subsampling(JpegDecoder *dec, int id, int *h_subsample, int *v_subsample); int jpeg_decoder_get_component_ptr(JpegDecoder *dec, int id, unsigned char **image, int *rowstride); unsigned char *jpeg_decoder_get_argb_image (JpegDecoder *dec); int jpeg_decode_argb (uint8_t *data, int length, uint32_t **image, int *width, int *height); #endif liboil-0.3.17/examples/jpeg/jpeg_internal.h0000644000175000017500000000422710717203073015537 00000000000000 #ifndef _JPEG_INTERNAL_H_ #define _JPEG_INTERNAL_H_ #include "jpeg.h" #include "jpeg_huffman.h" #include "jpeg_bits.h" #include "jpeg_debug.h" #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #define JPEG_MAX_COMPONENTS 256 typedef struct _JpegScan JpegScan; typedef struct _JpegQuantTable JpegQuantTable; #define JPEG_ENTROPY_SEGMENT 0x0001 #define JPEG_LENGTH 0x0002 struct _JpegQuantTable { int pq; int16_t quantizer[64]; }; struct _JpegDecoder { int width; int height; int depth; int n_components; JpegBits bits; int error; char *error_message; int sof_type; int width_blocks; int height_blocks; int restart_interval; unsigned char *data; unsigned int data_len; struct{ int id; int h_sample; int v_sample; int quant_table; int h_subsample; int v_subsample; unsigned char *image; int rowstride; } components[JPEG_MAX_COMPONENTS]; JpegQuantTable quant_tables[4]; HuffmanTable dc_huff_table[4]; HuffmanTable ac_huff_table[4]; int scan_list_length; struct{ int component_index; int dc_table; int ac_table; int quant_table; int x; int y; int offset; }scan_list[10]; int scan_h_subsample; int scan_v_subsample; /* scan state */ int x,y; int dc[4]; }; struct _JpegScan { int length; int n_components; struct { int index; int dc_table; int ac_table; }block_list[10]; }; /* jpeg.c */ int jpeg_decoder_sof_baseline_dct(JpegDecoder *dec, JpegBits *bits); int jpeg_decoder_define_quant_table(JpegDecoder *dec, JpegBits *bits); int jpeg_decoder_define_huffman_table(JpegDecoder *dec, JpegBits *bits); int jpeg_decoder_sos(JpegDecoder *dec, JpegBits *bits); int jpeg_decoder_soi(JpegDecoder *dec, JpegBits *bits); int jpeg_decoder_eoi(JpegDecoder *dec, JpegBits *bits); int jpeg_decoder_application0(JpegDecoder *dec, JpegBits *bits); int jpeg_decoder_application_misc(JpegDecoder *dec, JpegBits *bits); int jpeg_decoder_comment(JpegDecoder *dec, JpegBits *bits); int jpeg_decoder_restart_interval(JpegDecoder *dec, JpegBits *bits); int jpeg_decoder_restart(JpegDecoder *dec, JpegBits *bits); void jpeg_decoder_decode_entropy_segment(JpegDecoder *dec); #endif liboil-0.3.17/examples/jpeg/jpeg_tables.c0000644000175000017500000000516210717203073015167 00000000000000 unsigned char jpeg_standard_tables[] = { 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x00, 0x02, 0x01, 0x03, 0x03, 0x02, 0x04, 0x03, 0x05, 0x05, 0x04, 0x04, 0x00, 0x00, 0x01, 0x7d, 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0x00, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x00, 0x02, 0x01, 0x02, 0x04, 0x04, 0x03, 0x04, 0x07, 0x05, 0x04, 0x04, 0x00, 0x01, 0x02, 0x77, 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, }; int jpeg_standard_tables_size = sizeof(jpeg_standard_tables); liboil-0.3.17/examples/jpeg/jpeg_rgb_decoder.h0000644000175000017500000000073610717203073016163 00000000000000 #ifndef _JPEG_RGB_DECODER_H_ #define _JPEG_RGB_DECODER_H_ typedef struct jpeg_rgb_decoder_struct JpegRGBDecoder; JpegRGBDecoder *jpeg_rgb_decoder_new(void); void jpeg_rgb_decoder_free(JpegRGBDecoder *dec); int jpeg_rgb_decoder_addbits(JpegRGBDecoder *dec, unsigned char *data, unsigned int len); int jpeg_rgb_decoder_parse(JpegRGBDecoder *dec); int jpeg_rgb_decoder_get_image(JpegRGBDecoder *dec, unsigned char **image, int *rowstride, int *width, int *height); #endif liboil-0.3.17/examples/jpeg/Makefile.in0000644000175000017500000006404311332627670014623 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = jpeg_test$(EXEEXT) jpeg_rgb_test$(EXEEXT) subdir = examples/jpeg DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libjpeg_la_LIBADD = am_libjpeg_la_OBJECTS = libjpeg_la-jpeg.lo libjpeg_la-jpeg_bits.lo \ libjpeg_la-jpeg_huffman.lo libjpeg_la-jpeg_rgb_decoder.lo \ libjpeg_la-jpeg_tables.lo libjpeg_la_OBJECTS = $(am_libjpeg_la_OBJECTS) libjpeg_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libjpeg_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ PROGRAMS = $(noinst_PROGRAMS) am_jpeg_rgb_test_OBJECTS = jpeg_rgb_test-test_rgb.$(OBJEXT) jpeg_rgb_test_OBJECTS = $(am_jpeg_rgb_test_OBJECTS) am__DEPENDENCIES_1 = jpeg_rgb_test_DEPENDENCIES = libjpeg.la $(am__DEPENDENCIES_1) jpeg_rgb_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(jpeg_rgb_test_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_jpeg_test_OBJECTS = jpeg_test-test.$(OBJEXT) jpeg_test_OBJECTS = $(am_jpeg_test_OBJECTS) jpeg_test_DEPENDENCIES = libjpeg.la $(am__DEPENDENCIES_1) jpeg_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(jpeg_test_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libjpeg_la_SOURCES) $(jpeg_rgb_test_SOURCES) \ $(jpeg_test_SOURCES) DIST_SOURCES = $(libjpeg_la_SOURCES) $(jpeg_rgb_test_SOURCES) \ $(jpeg_test_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libjpeg.la libjpeg_la_SOURCES = \ jpeg.c \ jpeg_bits.c \ jpeg_bits.h \ jpeg_debug.h \ jpeg_huffman.c \ jpeg_huffman.h \ jpeg_internal.h \ jpeg_rgb_decoder.c \ jpeg_rgb_decoder.h \ jpeg_rgb_internal.h \ jpeg_tables.c libjpeg_la_CFLAGS = $(LIBOIL_CFLAGS) noinst_HEADERS = jpeg.h jpeg_test_SOURCES = test.c jpeg_test_CFLAGS = $(LIBOIL_CFLAGS) jpeg_test_LDADD = libjpeg.la $(LIBOIL_LIBS) jpeg_rgb_test_SOURCES = test_rgb.c jpeg_rgb_test_CFLAGS = $(LIBOIL_CFLAGS) jpeg_rgb_test_LDADD = libjpeg.la $(LIBOIL_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/jpeg/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/jpeg/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libjpeg.la: $(libjpeg_la_OBJECTS) $(libjpeg_la_DEPENDENCIES) $(libjpeg_la_LINK) $(libjpeg_la_OBJECTS) $(libjpeg_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list jpeg_rgb_test$(EXEEXT): $(jpeg_rgb_test_OBJECTS) $(jpeg_rgb_test_DEPENDENCIES) @rm -f jpeg_rgb_test$(EXEEXT) $(jpeg_rgb_test_LINK) $(jpeg_rgb_test_OBJECTS) $(jpeg_rgb_test_LDADD) $(LIBS) jpeg_test$(EXEEXT): $(jpeg_test_OBJECTS) $(jpeg_test_DEPENDENCIES) @rm -f jpeg_test$(EXEEXT) $(jpeg_test_LINK) $(jpeg_test_OBJECTS) $(jpeg_test_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpeg_rgb_test-test_rgb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jpeg_test-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpeg_la-jpeg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpeg_la-jpeg_bits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpeg_la-jpeg_huffman.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpeg_la-jpeg_rgb_decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpeg_la-jpeg_tables.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libjpeg_la-jpeg.lo: jpeg.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -MT libjpeg_la-jpeg.lo -MD -MP -MF $(DEPDIR)/libjpeg_la-jpeg.Tpo -c -o libjpeg_la-jpeg.lo `test -f 'jpeg.c' || echo '$(srcdir)/'`jpeg.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpeg_la-jpeg.Tpo $(DEPDIR)/libjpeg_la-jpeg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='jpeg.c' object='libjpeg_la-jpeg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -c -o libjpeg_la-jpeg.lo `test -f 'jpeg.c' || echo '$(srcdir)/'`jpeg.c libjpeg_la-jpeg_bits.lo: jpeg_bits.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -MT libjpeg_la-jpeg_bits.lo -MD -MP -MF $(DEPDIR)/libjpeg_la-jpeg_bits.Tpo -c -o libjpeg_la-jpeg_bits.lo `test -f 'jpeg_bits.c' || echo '$(srcdir)/'`jpeg_bits.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpeg_la-jpeg_bits.Tpo $(DEPDIR)/libjpeg_la-jpeg_bits.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='jpeg_bits.c' object='libjpeg_la-jpeg_bits.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -c -o libjpeg_la-jpeg_bits.lo `test -f 'jpeg_bits.c' || echo '$(srcdir)/'`jpeg_bits.c libjpeg_la-jpeg_huffman.lo: jpeg_huffman.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -MT libjpeg_la-jpeg_huffman.lo -MD -MP -MF $(DEPDIR)/libjpeg_la-jpeg_huffman.Tpo -c -o libjpeg_la-jpeg_huffman.lo `test -f 'jpeg_huffman.c' || echo '$(srcdir)/'`jpeg_huffman.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpeg_la-jpeg_huffman.Tpo $(DEPDIR)/libjpeg_la-jpeg_huffman.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='jpeg_huffman.c' object='libjpeg_la-jpeg_huffman.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -c -o libjpeg_la-jpeg_huffman.lo `test -f 'jpeg_huffman.c' || echo '$(srcdir)/'`jpeg_huffman.c libjpeg_la-jpeg_rgb_decoder.lo: jpeg_rgb_decoder.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -MT libjpeg_la-jpeg_rgb_decoder.lo -MD -MP -MF $(DEPDIR)/libjpeg_la-jpeg_rgb_decoder.Tpo -c -o libjpeg_la-jpeg_rgb_decoder.lo `test -f 'jpeg_rgb_decoder.c' || echo '$(srcdir)/'`jpeg_rgb_decoder.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpeg_la-jpeg_rgb_decoder.Tpo $(DEPDIR)/libjpeg_la-jpeg_rgb_decoder.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='jpeg_rgb_decoder.c' object='libjpeg_la-jpeg_rgb_decoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -c -o libjpeg_la-jpeg_rgb_decoder.lo `test -f 'jpeg_rgb_decoder.c' || echo '$(srcdir)/'`jpeg_rgb_decoder.c libjpeg_la-jpeg_tables.lo: jpeg_tables.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -MT libjpeg_la-jpeg_tables.lo -MD -MP -MF $(DEPDIR)/libjpeg_la-jpeg_tables.Tpo -c -o libjpeg_la-jpeg_tables.lo `test -f 'jpeg_tables.c' || echo '$(srcdir)/'`jpeg_tables.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpeg_la-jpeg_tables.Tpo $(DEPDIR)/libjpeg_la-jpeg_tables.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='jpeg_tables.c' object='libjpeg_la-jpeg_tables.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -c -o libjpeg_la-jpeg_tables.lo `test -f 'jpeg_tables.c' || echo '$(srcdir)/'`jpeg_tables.c jpeg_rgb_test-test_rgb.o: test_rgb.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(jpeg_rgb_test_CFLAGS) $(CFLAGS) -MT jpeg_rgb_test-test_rgb.o -MD -MP -MF $(DEPDIR)/jpeg_rgb_test-test_rgb.Tpo -c -o jpeg_rgb_test-test_rgb.o `test -f 'test_rgb.c' || echo '$(srcdir)/'`test_rgb.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/jpeg_rgb_test-test_rgb.Tpo $(DEPDIR)/jpeg_rgb_test-test_rgb.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_rgb.c' object='jpeg_rgb_test-test_rgb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(jpeg_rgb_test_CFLAGS) $(CFLAGS) -c -o jpeg_rgb_test-test_rgb.o `test -f 'test_rgb.c' || echo '$(srcdir)/'`test_rgb.c jpeg_rgb_test-test_rgb.obj: test_rgb.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(jpeg_rgb_test_CFLAGS) $(CFLAGS) -MT jpeg_rgb_test-test_rgb.obj -MD -MP -MF $(DEPDIR)/jpeg_rgb_test-test_rgb.Tpo -c -o jpeg_rgb_test-test_rgb.obj `if test -f 'test_rgb.c'; then $(CYGPATH_W) 'test_rgb.c'; else $(CYGPATH_W) '$(srcdir)/test_rgb.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/jpeg_rgb_test-test_rgb.Tpo $(DEPDIR)/jpeg_rgb_test-test_rgb.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_rgb.c' object='jpeg_rgb_test-test_rgb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(jpeg_rgb_test_CFLAGS) $(CFLAGS) -c -o jpeg_rgb_test-test_rgb.obj `if test -f 'test_rgb.c'; then $(CYGPATH_W) 'test_rgb.c'; else $(CYGPATH_W) '$(srcdir)/test_rgb.c'; fi` jpeg_test-test.o: test.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(jpeg_test_CFLAGS) $(CFLAGS) -MT jpeg_test-test.o -MD -MP -MF $(DEPDIR)/jpeg_test-test.Tpo -c -o jpeg_test-test.o `test -f 'test.c' || echo '$(srcdir)/'`test.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/jpeg_test-test.Tpo $(DEPDIR)/jpeg_test-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test.c' object='jpeg_test-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(jpeg_test_CFLAGS) $(CFLAGS) -c -o jpeg_test-test.o `test -f 'test.c' || echo '$(srcdir)/'`test.c jpeg_test-test.obj: test.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(jpeg_test_CFLAGS) $(CFLAGS) -MT jpeg_test-test.obj -MD -MP -MF $(DEPDIR)/jpeg_test-test.Tpo -c -o jpeg_test-test.obj `if test -f 'test.c'; then $(CYGPATH_W) 'test.c'; else $(CYGPATH_W) '$(srcdir)/test.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/jpeg_test-test.Tpo $(DEPDIR)/jpeg_test-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test.c' object='jpeg_test-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(jpeg_test_CFLAGS) $(CFLAGS) -c -o jpeg_test-test.obj `if test -f 'test.c'; then $(CYGPATH_W) 'test.c'; else $(CYGPATH_W) '$(srcdir)/test.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/examples/jpeg/jpeg_rgb_decoder.c0000644000175000017500000002222210717203073016150 00000000000000 #include #include #include #include "jpeg_internal.h" #include "jpeg.h" #include #include #include #define CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x))) static int16_t jfif_matrix[24] = { 0, 0, -8192, -8192, 16384, 0, 0, 0, 0, 16384, 16384, 16384, 0, 0, -5638, 29032, 0, 22970, -11700, 0, 0, 0, 0, 0 }; unsigned char * get_argb_444 (JpegDecoder *dec); unsigned char * get_argb_422 (JpegDecoder *dec); unsigned char * get_argb_422v (JpegDecoder *dec); unsigned char * get_argb_420 (JpegDecoder *dec); #if 0 static void imagescale2h_u8 (unsigned char *dest, int d_rowstride, unsigned char *src, int src_rowstride, int width, int height); static void imagescale2v_u8 (unsigned char *dest, int d_rowstride, unsigned char *src, int src_rowstride, int width, int height); static void imagescale2h2v_u8 (unsigned char *dest, int d_rowstride, unsigned char *src, int src_rowstride, int width, int height); static void scanlinescale2_u8 (unsigned char *dest, unsigned char *src, int len); #endif int jpeg_decode_argb (uint8_t *data, int length, uint32_t **image, int *width, int *height) { JpegDecoder *dec; int ret; dec = jpeg_decoder_new(); jpeg_decoder_addbits (dec, data, length); ret = jpeg_decoder_decode(dec); if (!ret) return FALSE; jpeg_decoder_get_image_size (dec, width, height); *image = (uint32_t *)jpeg_decoder_get_argb_image (dec); return TRUE; } unsigned char * jpeg_decoder_get_argb_image (JpegDecoder *dec) { if (dec->n_components == 3) { if (dec->components[0].h_subsample == 1 && dec->components[0].v_subsample == 1 && dec->components[1].h_subsample == dec->components[2].h_subsample && dec->components[1].v_subsample == dec->components[2].v_subsample) { if (dec->components[1].h_subsample == 1 && dec->components[1].v_subsample == 1) { return get_argb_444 (dec); } else if (dec->components[1].h_subsample == 2 && dec->components[1].v_subsample == 1) { return get_argb_422 (dec); } else if (dec->components[1].h_subsample == 1 && dec->components[1].v_subsample == 2) { return get_argb_422v (dec); } else if (dec->components[1].h_subsample == 2 && dec->components[1].v_subsample == 2) { return get_argb_420 (dec); } } } return NULL; } static void yuv_mux (uint32_t *dest, uint8_t *src_y, uint8_t *src_u, uint8_t *src_v, int n) { int i; for (i = 0; i < n; i++) { dest[i] = oil_argb(255, src_y[i], src_u[i], src_v[i]); } } static void upsample (uint8_t *d, uint8_t *s, int n) { int i; d[0] = s[0]; for (i = 0; i < n-3; i+=2) { d[i + 1] = (3*s[i/2] + s[i/2+1] + 2)>>2; d[i + 2] = (s[i/2] + 3*s[i/2+1] + 2)>>2; } if (n&1) { i = n-3; d[n-2] = s[n/2]; d[n-1] = s[n/2]; } else { d[n-1] = s[n/2-1]; } } unsigned char * get_argb_444 (JpegDecoder *dec) { uint32_t *tmp; uint32_t *argb_image; uint8_t *yp, *up, *vp; uint32_t *argbp; int j; tmp = malloc (4 * dec->width * dec->height); argb_image = malloc (4 * dec->width * dec->height); yp = dec->components[0].image; up = dec->components[1].image; vp = dec->components[2].image; argbp = argb_image; for(j=0;jheight;j++){ yuv_mux (tmp, yp, up, vp, dec->width); oil_colorspace_argb(argbp, tmp, jfif_matrix, dec->width); yp += dec->components[0].rowstride; up += dec->components[1].rowstride; vp += dec->components[2].rowstride; argbp += dec->width; } free(tmp); return (unsigned char *)argb_image; } unsigned char * get_argb_422 (JpegDecoder *dec) { uint32_t *tmp; uint8_t *tmp_u; uint8_t *tmp_v; uint32_t *argb_image; uint8_t *yp, *up, *vp; uint32_t *argbp; int j; tmp = malloc (4 * dec->width * dec->height); tmp_u = malloc (dec->width); tmp_v = malloc (dec->width); argb_image = malloc (4 * dec->width * dec->height); yp = dec->components[0].image; up = dec->components[1].image; vp = dec->components[2].image; argbp = argb_image; for(j=0;jheight;j++){ upsample (tmp_u, up, dec->width); upsample (tmp_v, vp, dec->width); yuv_mux (tmp, yp, tmp_u, tmp_v, dec->width); oil_colorspace_argb(argbp, tmp, jfif_matrix, dec->width); yp += dec->components[0].rowstride; up += dec->components[1].rowstride; vp += dec->components[2].rowstride; argbp += dec->width; } free(tmp); free(tmp_u); free(tmp_v); return (unsigned char *)argb_image; } unsigned char * get_argb_422v (JpegDecoder *dec) { uint32_t *tmp; uint8_t *tmp_u; uint8_t *tmp_v; uint32_t *argb_image; uint8_t *yp, *up, *vp; uint32_t *argbp; int halfheight; int j; OIL_ERROR("got here"); tmp = malloc (4 * dec->width * dec->height); tmp_u = malloc (dec->width); tmp_v = malloc (dec->width); argb_image = malloc (4 * dec->width * dec->height); yp = dec->components[0].image; up = dec->components[1].image; vp = dec->components[2].image; argbp = argb_image; halfheight = (dec->height+1)>>1; for(j=0;jheight;j++){ uint32_t weight = 192 - 128*(j&1); oil_merge_linear_u8(tmp_u, up + dec->components[1].rowstride * CLAMP((j-1)/2,0,halfheight-1), up + dec->components[1].rowstride * CLAMP((j+1)/2,0,halfheight-1), &weight, dec->width); oil_merge_linear_u8(tmp_v, vp + dec->components[2].rowstride * CLAMP((j-1)/2,0,halfheight-1), vp + dec->components[2].rowstride * CLAMP((j+1)/2,0,halfheight-1), &weight, dec->width); yuv_mux (tmp, yp, tmp_u, tmp_v, dec->width); oil_colorspace_argb(argbp, tmp, jfif_matrix, dec->width); yp += dec->components[0].rowstride; argbp += dec->width; } free(tmp); free(tmp_u); free(tmp_v); return (unsigned char *)argb_image; } unsigned char * get_argb_420 (JpegDecoder *dec) { uint32_t *tmp; uint8_t *tmp_u; uint8_t *tmp_v; uint8_t *tmp1; uint32_t *argb_image; uint8_t *yp, *up, *vp; uint32_t *argbp; int j; int halfwidth; int halfheight; halfwidth = (dec->width + 1)>>1; tmp = malloc (4 * dec->width * dec->height); tmp_u = malloc (dec->width); tmp_v = malloc (dec->width); tmp1 = malloc (halfwidth); argb_image = malloc (4 * dec->width * dec->height); yp = dec->components[0].image; up = dec->components[1].image; vp = dec->components[2].image; argbp = argb_image; halfheight = (dec->height+1)>>1; for(j=0;jheight;j++){ uint32_t weight = 192 - 128*(j&1); oil_merge_linear_u8(tmp1, up + dec->components[1].rowstride * CLAMP((j-1)/2,0,halfheight-1), up + dec->components[1].rowstride * CLAMP((j+1)/2,0,halfheight-1), &weight, halfwidth); upsample (tmp_u, tmp1, dec->width); oil_merge_linear_u8(tmp1, vp + dec->components[2].rowstride * CLAMP((j-1)/2,0,halfheight-1), vp + dec->components[2].rowstride * CLAMP((j+1)/2,0,halfheight-1), &weight, halfwidth); upsample (tmp_v, tmp1, dec->width); yuv_mux (tmp, yp, tmp_u, tmp_v, dec->width); oil_colorspace_argb(argbp, tmp, jfif_matrix, dec->width); yp += dec->components[0].rowstride; argbp += dec->width; } free(tmp); free(tmp_u); free(tmp_v); free(tmp1); return (unsigned char *)argb_image; } #if 0 int jpeg_rgb_decoder_get_image (JpegRGBDecoder * rgbdec, unsigned char **image, int *rowstride, int *width, int *height) { int i; jpeg_decoder_get_image_size (rgbdec->dec, &rgbdec->width, &rgbdec->height); for (i = 0; i < 3; i++) { jpeg_decoder_get_component_ptr (rgbdec->dec, i + 1, &rgbdec->component[i].image, &rgbdec->component[i].rowstride); jpeg_decoder_get_component_subsampling (rgbdec->dec, i + 1, &rgbdec->component[i].h_subsample, &rgbdec->component[i].v_subsample); rgbdec->component[i].alloc = 0; if (rgbdec->component[i].h_subsample > 1 || rgbdec->component[i].v_subsample > 1) { unsigned char *dest; dest = malloc (rgbdec->width * rgbdec->height); if (rgbdec->component[i].v_subsample > 1) { if (rgbdec->component[i].h_subsample > 1) { imagescale2h2v_u8 (dest, rgbdec->width, rgbdec->component[i].image, rgbdec->component[i].rowstride, rgbdec->width, rgbdec->height); } else { imagescale2v_u8 (dest, rgbdec->width, rgbdec->component[i].image, rgbdec->component[i].rowstride, rgbdec->width, rgbdec->height); } } else { imagescale2h_u8 (dest, rgbdec->width, rgbdec->component[i].image, rgbdec->component[i].rowstride, rgbdec->width, rgbdec->height); } rgbdec->component[i].alloc = 1; rgbdec->component[i].image = dest; rgbdec->component[i].rowstride = rgbdec->width; rgbdec->component[i].h_subsample = 1; rgbdec->component[i].v_subsample = 1; } } rgbdec->image = malloc (rgbdec->width * rgbdec->height * 4); convert (rgbdec); if (image) *image = rgbdec->image; if (rowstride) *rowstride = rgbdec->width * 4; if (width) *width = rgbdec->width; if (height) *height = rgbdec->height; return 0; } #endif liboil-0.3.17/examples/oil-inspect.c0000644000175000017500000001321410717203073014206 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include int retval = EXIT_SUCCESS; static void printerr (char *format, ...) { va_list var_args; va_start (var_args, format); vfprintf (stderr, format, var_args); va_end (var_args); retval = EXIT_FAILURE; } static char * string_append (char *str, const char *append) { char *ret; if (str) { size_t size = strlen (str) + 2 + strlen (append) + 1; ret = malloc (size); snprintf (ret, size, "%s, %s", str, append); free (str); } else { ret = strdup (append); } return ret; } static char * oil_flags_to_string (unsigned int flags) { char *ret = NULL; if (flags & OIL_IMPL_FLAG_REF) ret = string_append (ret, "REF"); if (flags & OIL_IMPL_FLAG_OPT) ret = string_append (ret, "altopt"); if (flags & OIL_IMPL_FLAG_ASM) ret = string_append (ret, "asm"); if (flags & OIL_IMPL_FLAG_CMOV) ret = string_append (ret, "cmov"); if (flags & OIL_IMPL_FLAG_MMX) ret = string_append (ret, "mmx"); if (flags & OIL_IMPL_FLAG_SSE) ret = string_append (ret, "sse"); if (flags & OIL_IMPL_FLAG_MMXEXT) ret = string_append (ret, "mmxext"); if (flags & OIL_IMPL_FLAG_SSE2) ret = string_append (ret, "sse2"); if (flags & OIL_IMPL_FLAG_3DNOW) ret = string_append (ret, "3dnow"); if (flags & OIL_IMPL_FLAG_3DNOWEXT) ret = string_append (ret, "3dnowext"); if (flags & OIL_IMPL_FLAG_ALTIVEC) ret = string_append (ret, "altivec"); return ret; } static void oil_print_impl (OilFunctionImpl *impl, OilTest *test, char* prefix) { char *c; unsigned int cpu_flags = oil_cpu_get_flags(); if (oil_impl_is_runnable (impl)) { oil_test_check_impl (test, impl); } printf ("%s%s\n", prefix, impl->name); c = oil_flags_to_string (impl->flags); if (c) { printf ("%s flags: %s\n", prefix, c); free (c); } if (impl->profile_ave) { printf ("%s profile: %g ticks (std.dev. %g)\n", prefix, impl->profile_ave, impl->profile_std); } if (test && !(impl->flags & OIL_IMPL_FLAG_REF)) { printf ("%s sum abs difference: %g (n=%d)\n", prefix, test->sum_abs_diff, test->n_points); } if ((impl->flags & OIL_CPU_FLAG_MASK) & (~cpu_flags)) { printf ("%s disabled\n", prefix); } } static int impl_compare (const void *a, const void *b) { const OilFunctionImpl *ia = *(OilFunctionImpl **)a; const OilFunctionImpl *ib = *(OilFunctionImpl **)b; if (ia->profile_ave < ib->profile_ave) return -1; if (ia->profile_ave > ib->profile_ave) return 1; return 0; } static void oil_print_class (OilFunctionClass *klass, int verbose) { OilFunctionImpl *impl; OilFunctionImpl **list; int n; int i; OilTest *test; if (!verbose) { printf ("%s\n", klass->name); return; } printf ("%s (%s)\n", klass->name, klass->prototype); printf (" all implementations: \n"); n = 0; for (impl = klass->first_impl; impl; impl = impl->next) { n++; } list = malloc(n * sizeof(OilFunctionImpl *)); i = 0; for (impl = klass->first_impl; impl; impl = impl->next) { list[i] = impl; i++; } qsort (list, n, sizeof(OilFunctionImpl *), impl_compare); test = oil_test_new (klass); for (i=0;iflags & OIL_IMPL_FLAG_REF) && klass->reference_impl != impl) { printerr ("warning: function %s is not reference implementation for class %s\n", impl->name, klass->name); } oil_print_impl (impl, test, " "); if (klass->chosen_impl == impl) { printf (" currently chosen\n"); } } oil_test_free (test); free(list); } static void oil_print_all (void) { int i; int n; n = oil_class_get_n_classes (); for (i = 0; i < n; i++){ OilFunctionClass *klass = oil_class_get_by_index (i); oil_print_class (klass, 0); } } int main (int argc, char *argv[]) { oil_init(); if (argc > 1) { int i; for (i = 1; i < argc; i++) { OilFunctionClass *klass = oil_class_get (argv[i]); if (!klass) { printerr ("error: no class \"%s\" found\n", argv[i]); } else { oil_print_class (klass, 1); } } } else { oil_print_all (); } return retval; } liboil-0.3.17/examples/md5/0000777000175000017500000000000011332637377012400 500000000000000liboil-0.3.17/examples/md5/md5sum.c0000644000175000017500000001206210717203073013657 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #ifdef HAVE_MMAP #include #endif #include #include #include #ifndef MAP_POPULATE #define MAP_POPULATE 0 #endif #ifdef WORDS_BIGENDIAN #define uint32_from_host(a) \ ((((a)&0xff)<<24)|(((a)&0xff00)<<8)|(((a)&0xff0000)>>8)|(((a)>>24)&0xff)) #else #define uint32_from_host(a) (a) #endif #if 0 int main(int argc, char *argv[]) { int n; uint64_t n_bytes = 0; char buffer[64]; uint32_t state[4]; oil_init(); if (argc > 1) { OilFunctionClass *klass; klass = oil_class_get ("md5"); oil_class_choose_by_name (klass, argv[1]); } state[0] = 0x67452301; state[1] = 0xefcdab89; state[2] = 0x98badcfe; state[3] = 0x10325476; while (1) { n = fread (buffer, 1, 64, stdin); if (n == 64) { oil_md5 (state, (uint32_t *)buffer); n_bytes += 64; } else { break; } } n_bytes += n; buffer[n] = 0x80; n++; if (n >= 56) { for(;n<64;n++) buffer[n] = 0; oil_md5 (state, (uint32_t *)buffer); n=0; } for(;n<56;n++) buffer[n] = 0; *(uint64_t *)(buffer + 56) = n_bytes << 3; oil_md5 (state, (uint32_t *)buffer); printf("%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", state[0]&0xff, (state[0]>>8)&0xff, (state[0]>>16)&0xff, (state[0]>>24)&0xff, state[1]&0xff, (state[1]>>8)&0xff, (state[1]>>16)&0xff, (state[1]>>24)&0xff, state[2]&0xff, (state[2]>>8)&0xff, (state[2]>>16)&0xff, (state[2]>>24)&0xff, state[3]&0xff, (state[3]>>8)&0xff, (state[3]>>16)&0xff, (state[3]>>24)&0xff); return 0; } #endif int main(int argc, char *argv[]) { int n; uint64_t n_bytes; char buffer[64]; uint32_t state[4]; char *ptr; int ret; int fd; struct stat st; int offset; oil_init(); if (argc < 1) { printf("md5sum [implementation]\n"); exit(0); } if (argc > 2) { OilFunctionClass *klass; klass = oil_class_get ("md5"); oil_class_choose_by_name (klass, argv[2]); } fd = open (argv[1], O_RDONLY); if (fd < 0) { printf("could not open file\n"); exit(0); } ret = fstat (fd, &st); n_bytes = st.st_size; #ifdef HAVE_MMAP while (1) { ptr = mmap (NULL, n_bytes, PROT_READ, MAP_SHARED | MAP_POPULATE, fd, 0); getpid(); if (ptr == MAP_FAILED) { if (errno == EAGAIN) { printf("egain\n"); } else { perror ("mmap failed"); exit(1); } } else { break; } } #else printf ("no mmap\n"); exit(1); #endif state[0] = 0x67452301; state[1] = 0xefcdab89; state[2] = 0x98badcfe; state[3] = 0x10325476; for (offset = 0; offset + 64 <= n_bytes; offset += 64) { oil_md5 (state, (uint32_t *)(ptr + offset)); } n = n_bytes - offset; memcpy (buffer, ptr + offset, n); buffer[n] = 0x80; n++; if (n >= 56) { for(;n<64;n++) buffer[n] = 0; oil_md5 (state, (uint32_t *)buffer); n=0; } for(;n<56;n++) buffer[n] = 0; *(uint32_t *)(buffer + 56) = uint32_from_host (n_bytes << 3); *(uint32_t *)(buffer + 60) = uint32_from_host (n_bytes >>29); oil_md5 (state, (uint32_t *)buffer); printf("%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", state[0]&0xff, (state[0]>>8)&0xff, (state[0]>>16)&0xff, (state[0]>>24)&0xff, state[1]&0xff, (state[1]>>8)&0xff, (state[1]>>16)&0xff, (state[1]>>24)&0xff, state[2]&0xff, (state[2]>>8)&0xff, (state[2]>>16)&0xff, (state[2]>>24)&0xff, state[3]&0xff, (state[3]>>8)&0xff, (state[3]>>16)&0xff, (state[3]>>24)&0xff); return 0; } liboil-0.3.17/examples/md5/Makefile.am0000644000175000017500000000016610717203073014337 00000000000000 noinst_PROGRAMS = md5sum md5sum_SOURCES = md5sum.c md5sum_CFLAGS = $(LIBOIL_CFLAGS) md5sum_LDADD = $(LIBOIL_LIBS) liboil-0.3.17/examples/md5/Makefile.in0000644000175000017500000004133511332627670014362 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = md5sum$(EXEEXT) subdir = examples/md5 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_md5sum_OBJECTS = md5sum-md5sum.$(OBJEXT) md5sum_OBJECTS = $(am_md5sum_OBJECTS) am__DEPENDENCIES_1 = md5sum_DEPENDENCIES = $(am__DEPENDENCIES_1) md5sum_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(md5sum_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(md5sum_SOURCES) DIST_SOURCES = $(md5sum_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ md5sum_SOURCES = md5sum.c md5sum_CFLAGS = $(LIBOIL_CFLAGS) md5sum_LDADD = $(LIBOIL_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/md5/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/md5/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list md5sum$(EXEEXT): $(md5sum_OBJECTS) $(md5sum_DEPENDENCIES) @rm -f md5sum$(EXEEXT) $(md5sum_LINK) $(md5sum_OBJECTS) $(md5sum_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5sum-md5sum.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< md5sum-md5sum.o: md5sum.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(md5sum_CFLAGS) $(CFLAGS) -MT md5sum-md5sum.o -MD -MP -MF $(DEPDIR)/md5sum-md5sum.Tpo -c -o md5sum-md5sum.o `test -f 'md5sum.c' || echo '$(srcdir)/'`md5sum.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/md5sum-md5sum.Tpo $(DEPDIR)/md5sum-md5sum.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='md5sum.c' object='md5sum-md5sum.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(md5sum_CFLAGS) $(CFLAGS) -c -o md5sum-md5sum.o `test -f 'md5sum.c' || echo '$(srcdir)/'`md5sum.c md5sum-md5sum.obj: md5sum.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(md5sum_CFLAGS) $(CFLAGS) -MT md5sum-md5sum.obj -MD -MP -MF $(DEPDIR)/md5sum-md5sum.Tpo -c -o md5sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/md5sum-md5sum.Tpo $(DEPDIR)/md5sum-md5sum.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='md5sum.c' object='md5sum-md5sum.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(md5sum_CFLAGS) $(CFLAGS) -c -o md5sum-md5sum.obj `if test -f 'md5sum.c'; then $(CYGPATH_W) 'md5sum.c'; else $(CYGPATH_W) '$(srcdir)/md5sum.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/examples/printcpu.c0000644000175000017500000000640010727316724013634 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include char * string_append (char *str, const char *append) { char *ret; if (str) { size_t size = strlen (str) + 2 + strlen (append) + 1; ret = malloc (size); snprintf (ret, size, "%s %s", str, append); free (str); } else { ret = strdup (append); } return ret; } static char * oil_cpu_flags_to_string (unsigned int flags) { char *ret = NULL; #if defined(__i386__) || defined(__amd64__) if (flags & OIL_IMPL_FLAG_CMOV) ret = string_append (ret, "cmov"); if (flags & OIL_IMPL_FLAG_MMX) ret = string_append (ret, "mmx"); if (flags & OIL_IMPL_FLAG_SSE) ret = string_append (ret, "sse"); if (flags & OIL_IMPL_FLAG_MMXEXT) ret = string_append (ret, "mmxext"); if (flags & OIL_IMPL_FLAG_SSE2) ret = string_append (ret, "sse2"); if (flags & OIL_IMPL_FLAG_3DNOW) ret = string_append (ret, "3dnow"); if (flags & OIL_IMPL_FLAG_3DNOWEXT) ret = string_append (ret, "3dnowext"); if (flags & OIL_IMPL_FLAG_SSE3) ret = string_append (ret, "sse3"); #endif #if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) if (flags & OIL_IMPL_FLAG_ALTIVEC) ret = string_append (ret, "altivec"); #endif #if defined(__arm__) if (flags & OIL_IMPL_FLAG_EDSP) ret = string_append (ret, "edsp"); if (flags & OIL_IMPL_FLAG_ARM6) ret = string_append (ret, "arm6"); if (flags & OIL_IMPL_FLAG_VFP) ret = string_append (ret, "vfp"); #endif if (ret == NULL) { ret = strdup (""); } return ret; } int main (int argc, char *argv[]) { char *flagstr; oil_init(); flagstr = oil_cpu_flags_to_string(oil_cpu_get_flags()); printf("CPU flags: %s\n", flagstr); free(flagstr); return 0; } liboil-0.3.17/examples/oil-graph.c0000644000175000017500000000557510735043142013654 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include void register_impls(void); void test(void) { int32_t dest[1]; uint8_t src[100]; int i; for(i=0;i<100;i++){ src[i] = oil_rand_u8() & 0x7f; } dest[0] = 0; oil_utf8_validate (dest, src, 100); #if 0 for(i=0;i<100;i++){ printf("%d %d\n",dest[i],src[i]); } #endif printf("%d\n", dest[0]); } int main (int argc, char *argv[]) { OilFunctionClass *klass; OilFunctionImpl *impl; OilTest *test; double ave, std; int n; oil_init (); if (argc < 2) { printf("oil-test \n"); exit(0); } klass = oil_class_get (argv[1]); if (klass == NULL) { printf("class not found: %s\n", argv[1]); exit(0); } oil_class_optimize (klass); for (n = 0; n < 200; n+=1) { printf("%d", n); test = oil_test_new(klass); oil_test_set_iterations(test, 10); test->n = n; test->m = 10; impl = klass->reference_impl; ave = impl->profile_ave; std = impl->profile_std; oil_test_check_impl (test, impl); for (impl = klass->first_impl; impl; impl = impl->next) { if (oil_impl_is_usable (impl)) { oil_test_check_impl (test, impl); //printf(" %g %g", test->profile_ave, test->profile_std); printf(" %g", test->profile_ave); } } printf("\n"); } return 0; } liboil-0.3.17/examples/Makefile.am0000644000175000017500000000255111067011142013643 00000000000000 SUBDIRS = jpeg md5 uberopt work huffman taylor videoscale audioresample bin_PROGRAMS = oil-bugreport noinst_PROGRAMS = example1 oil-graph oil-inspect oil-test memcpy-speed \ oil-suggest printcpu oil-mt19937 report oil-random example1_SOURCES = example1.c example1_CFLAGS = $(LIBOIL_CFLAGS) example1_LDADD = $(LIBOIL_LIBS) oil_graph_SOURCES = oil-graph.c oil_graph_CFLAGS = $(LIBOIL_CFLAGS) oil_graph_LDADD = $(LIBOIL_LIBS) oil_inspect_SOURCES = oil-inspect.c oil_inspect_CFLAGS = $(LIBOIL_CFLAGS) oil_inspect_LDADD = $(LIBOIL_LIBS) oil_suggest_SOURCES = oil-suggest.c oil_suggest_CFLAGS = $(LIBOIL_CFLAGS) oil_suggest_LDADD = $(LIBOIL_LIBS) oil_test_SOURCES = oil-test.c oil_test_CFLAGS = $(LIBOIL_CFLAGS) oil_test_LDADD = $(LIBOIL_LIBS) oil_bugreport_SOURCES = oil-bugreport.c oil_bugreport_CFLAGS = $(LIBOIL_CFLAGS) oil_bugreport_LDADD = $(LIBOIL_LIBS) report_SOURCES = report.c report_CFLAGS = $(LIBOIL_CFLAGS) report_LDADD = $(LIBOIL_LIBS) memcpy_speed_SOURCES = memcpy-speed.c memcpy_speed_CFLAGS = $(LIBOIL_CFLAGS) memcpy_speed_LDADD = $(LIBOIL_LIBS) printcpu_SOURCES = printcpu.c printcpu_CFLAGS = $(LIBOIL_CFLAGS) printcpu_LDADD = $(LIBOIL_LIBS) oil_mt19937_SOURCES = oil-mt19937.c oil_mt19937_CFLAGS = $(LIBOIL_CFLAGS) oil_mt19937_LDADD = $(LIBOIL_LIBS) oil_random_SOURCES = oil-random.c oil_random_CFLAGS = $(LIBOIL_CFLAGS) oil_random_LDADD = $(LIBOIL_LIBS) liboil-0.3.17/examples/huffman/0000777000175000017500000000000011332637377013337 500000000000000liboil-0.3.17/examples/huffman/Makefile.am0000644000175000017500000000026510717203073015276 00000000000000 noinst_PROGRAMS = huffman_test huffman_test_SOURCES = \ huffman.c \ huffman.h \ huffman_test.c huffman_test_CFLAGS = $(LIBOIL_CFLAGS) huffman_test_LDFLAGS = $(LIBOIL_LDFLAGS) liboil-0.3.17/examples/huffman/huffman_test.c0000644000175000017500000000014010717203073016061 00000000000000 #include "huffman.h" #include int main (int argc, char *argv[]) { return 0; } liboil-0.3.17/examples/huffman/huffman.c0000644000175000017500000000327410717203073015035 00000000000000 #include #include #include #include "huffman.h" Huffman * huffman_new (void) { Huffman *huff; huff = malloc (sizeof (Huffman)); memset (huff, 0, sizeof(Huffman)); return huff; } void huffman_add_code (Huffman *huff, unsigned int code, int n_bits, int value) { huff->codes = realloc(huff->codes, sizeof(HuffmanCode) * (huff->n_codes + 1)); huff->codes[huff->n_codes].value = value; huff->codes[huff->n_codes].code = code << (32 - n_bits); huff->codes[huff->n_codes].mask = 0xffffffff << (32 - n_bits); huff->codes[huff->n_codes].n_bits = n_bits; huff->n_codes++; } void huffman_decode_iterate (Huffman *huff) { unsigned int bits; int i; if (huff->state == HUFF_NEED_BYTE) { huff->state_bits = (huff->state_bits << 8) | huff->next_byte; huff->state_n_bits += 8; } bits = huff->state_bits << (32 - huff->state_n_bits); for(i=0;in_codes;i++){ if (huff->codes[i].n_bits <= huff->state_n_bits && huff->codes[i].code == (bits & huff->codes[i].mask)) { huff->out_value = huff->codes[i].value; break; } } if (i == huff->n_codes) { huff->state = HUFF_NEED_BYTE; } else { huff->state = HUFF_OK; } } void huffman_decode_ref (Huffman *huff, int *dest, unsigned char *src, int n) { int i; i = 0; while(n>0 || huff->state == HUFF_OK){ printf("STATE %d\n", huff->state); if (huff->state == HUFF_NEED_BYTE) { printf("pushing byte %02x\n", *src); huff->next_byte = *src; src++; n--; } huffman_decode_iterate (huff); if (huff->state == HUFF_OK) { printf("got value %d\n", huff->out_value); dest[i] = huff->out_value; } } } liboil-0.3.17/examples/huffman/huffman.h0000644000175000017500000000166010717203073015037 00000000000000 #ifndef _HUFFMAN_H_ #define _HUFFMAN_H_ enum { HUFF_OK = 0, HUFF_NEED_BYTE }; typedef struct _Huffman Huffman; typedef struct _HuffmanCode HuffmanCode; typedef struct _HuffmanTable HuffmanTable; typedef struct _HuffmanTableEntry HuffmanTableEntry; struct _Huffman { int n_codes; HuffmanCode *codes; HuffmanTable *tables; int state; unsigned int state_bits; int state_n_bits; unsigned char next_byte; int out_value; }; struct _HuffmanCode { unsigned int code; unsigned int mask; int n_bits; int value; }; struct _HuffmanTableEntry { unsigned int codes[8]; int n_codes; struct _HuffmanTable *next_table; }; struct _HuffmanTable { int n_bits; unsigned int bits; HuffmanTableEntry entries[256]; }; Huffman * huffman_new (void); void huffman_add_code (Huffman *huff, unsigned int code, int n_bits, int value); void huffman_decode_ref (Huffman *huff, int *dest, unsigned char *src, int n); #endif liboil-0.3.17/examples/huffman/Makefile.in0000644000175000017500000004601111332627670015315 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = huffman_test$(EXEEXT) subdir = examples/huffman DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_huffman_test_OBJECTS = huffman_test-huffman.$(OBJEXT) \ huffman_test-huffman_test.$(OBJEXT) huffman_test_OBJECTS = $(am_huffman_test_OBJECTS) huffman_test_LDADD = $(LDADD) huffman_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(huffman_test_CFLAGS) \ $(CFLAGS) $(huffman_test_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(huffman_test_SOURCES) DIST_SOURCES = $(huffman_test_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ huffman_test_SOURCES = \ huffman.c \ huffman.h \ huffman_test.c huffman_test_CFLAGS = $(LIBOIL_CFLAGS) huffman_test_LDFLAGS = $(LIBOIL_LDFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/huffman/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/huffman/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list huffman_test$(EXEEXT): $(huffman_test_OBJECTS) $(huffman_test_DEPENDENCIES) @rm -f huffman_test$(EXEEXT) $(huffman_test_LINK) $(huffman_test_OBJECTS) $(huffman_test_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/huffman_test-huffman.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/huffman_test-huffman_test.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< huffman_test-huffman.o: huffman.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(huffman_test_CFLAGS) $(CFLAGS) -MT huffman_test-huffman.o -MD -MP -MF $(DEPDIR)/huffman_test-huffman.Tpo -c -o huffman_test-huffman.o `test -f 'huffman.c' || echo '$(srcdir)/'`huffman.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/huffman_test-huffman.Tpo $(DEPDIR)/huffman_test-huffman.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='huffman.c' object='huffman_test-huffman.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(huffman_test_CFLAGS) $(CFLAGS) -c -o huffman_test-huffman.o `test -f 'huffman.c' || echo '$(srcdir)/'`huffman.c huffman_test-huffman.obj: huffman.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(huffman_test_CFLAGS) $(CFLAGS) -MT huffman_test-huffman.obj -MD -MP -MF $(DEPDIR)/huffman_test-huffman.Tpo -c -o huffman_test-huffman.obj `if test -f 'huffman.c'; then $(CYGPATH_W) 'huffman.c'; else $(CYGPATH_W) '$(srcdir)/huffman.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/huffman_test-huffman.Tpo $(DEPDIR)/huffman_test-huffman.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='huffman.c' object='huffman_test-huffman.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(huffman_test_CFLAGS) $(CFLAGS) -c -o huffman_test-huffman.obj `if test -f 'huffman.c'; then $(CYGPATH_W) 'huffman.c'; else $(CYGPATH_W) '$(srcdir)/huffman.c'; fi` huffman_test-huffman_test.o: huffman_test.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(huffman_test_CFLAGS) $(CFLAGS) -MT huffman_test-huffman_test.o -MD -MP -MF $(DEPDIR)/huffman_test-huffman_test.Tpo -c -o huffman_test-huffman_test.o `test -f 'huffman_test.c' || echo '$(srcdir)/'`huffman_test.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/huffman_test-huffman_test.Tpo $(DEPDIR)/huffman_test-huffman_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='huffman_test.c' object='huffman_test-huffman_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(huffman_test_CFLAGS) $(CFLAGS) -c -o huffman_test-huffman_test.o `test -f 'huffman_test.c' || echo '$(srcdir)/'`huffman_test.c huffman_test-huffman_test.obj: huffman_test.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(huffman_test_CFLAGS) $(CFLAGS) -MT huffman_test-huffman_test.obj -MD -MP -MF $(DEPDIR)/huffman_test-huffman_test.Tpo -c -o huffman_test-huffman_test.obj `if test -f 'huffman_test.c'; then $(CYGPATH_W) 'huffman_test.c'; else $(CYGPATH_W) '$(srcdir)/huffman_test.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/huffman_test-huffman_test.Tpo $(DEPDIR)/huffman_test-huffman_test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='huffman_test.c' object='huffman_test-huffman_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(huffman_test_CFLAGS) $(CFLAGS) -c -o huffman_test-huffman_test.obj `if test -f 'huffman_test.c'; then $(CYGPATH_W) 'huffman_test.c'; else $(CYGPATH_W) '$(srcdir)/huffman_test.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/examples/uberopt/0000777000175000017500000000000011332637377013373 500000000000000liboil-0.3.17/examples/uberopt/Makefile.am0000644000175000017500000000033210717203073015325 00000000000000 EXTRA_DIST = example.c if HAVE_GLIB noinst_PROGRAMS = uberopt else noinst_PROGRAMS = endif uberopt_SOURCES = uberopt.c uberopt_CFLAGS = $(LIBOIL_CFLAGS) $(GLIB_CFLAGS) uberopt_LDADD = $(LIBOIL_LIBS) $(GLIB_LIBS) liboil-0.3.17/examples/uberopt/uberopt.c0000644000175000017500000001343610717203073015126 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include typedef struct _Insn Insn; struct _Insn { char *line; int index; int n_deps; int deps[10]; int x; }; Insn insns[100]; int state[100]; int max_depth = 1000; int outputting = 1; int n_lines; int start_line = -1; int end_line = -1; int uber_start_line = -1; int uber_end_line = -1; int n_insns = 0; int depth; int n_impls = 0; char **lines; void output_sequence (void); void read_file(void); int main (int argc, char *argv[]) { int i; int j; int n; read_file(); if (outputting) { for(i=0;i= 0) { int insn; insn = state[depth]; /* check if we've exhausted instructions */ if (insn >= max_depth) { depth--; if (depth >= 0) state[depth]++; continue; } /* check if this instruction has been used */ for(i=0;i insn + 1) { state[depth]++; } #endif if (depth < max_depth - 1) { depth++; state[depth]=0; } else { output_sequence (); n_impls++; state[depth]++; } loop: ; } #endif if (outputting) { for(i=end_line+1;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include UBER_START static void abs_u16_s16_i386asm_UBER_INDEX (uint16_t * dest, int dstr, int16_t * src, int sstr, int n) { __asm__ __volatile__ ("\n" " .p2align 4,,15 \n" "1: \n" " movswl (%0), %%eax \n" /* UBER 0: */ " addl $2, %0 \n" /* UBER 1: 0 */ " movl %%eax, %%edx \n" /* UBER 2: 0 */ " negl %%edx \n" /* UBER 3: 2 */ " cmpl $-1, %%eax ; cmovle %%edx, %%eax \n" /* UBER 4: 3 */ " movw %%ax, (%1) \n" /* UBER 5: 4 */ " addl $2, %1 \n" /* UBER 6: 5 */ " decl %2 \n" /* UBER 7: */ " testl %2, %2 \n" " jg 1b \n" :"+r" (src), "+r" (dest), "+r" (n) ::"eax", "edx"); } OIL_DEFINE_IMPL_ASM (abs_u16_s16_i386asm_UBER_INDEX, abs_u16_s16); UBER_END liboil-0.3.17/examples/uberopt/Makefile.in0000644000175000017500000004161411332627670015355 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @HAVE_GLIB_TRUE@noinst_PROGRAMS = uberopt$(EXEEXT) subdir = examples/uberopt DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_uberopt_OBJECTS = uberopt-uberopt.$(OBJEXT) uberopt_OBJECTS = $(am_uberopt_OBJECTS) am__DEPENDENCIES_1 = uberopt_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) uberopt_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(uberopt_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(uberopt_SOURCES) DIST_SOURCES = $(uberopt_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = example.c uberopt_SOURCES = uberopt.c uberopt_CFLAGS = $(LIBOIL_CFLAGS) $(GLIB_CFLAGS) uberopt_LDADD = $(LIBOIL_LIBS) $(GLIB_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/uberopt/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/uberopt/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list uberopt$(EXEEXT): $(uberopt_OBJECTS) $(uberopt_DEPENDENCIES) @rm -f uberopt$(EXEEXT) $(uberopt_LINK) $(uberopt_OBJECTS) $(uberopt_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uberopt-uberopt.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< uberopt-uberopt.o: uberopt.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(uberopt_CFLAGS) $(CFLAGS) -MT uberopt-uberopt.o -MD -MP -MF $(DEPDIR)/uberopt-uberopt.Tpo -c -o uberopt-uberopt.o `test -f 'uberopt.c' || echo '$(srcdir)/'`uberopt.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/uberopt-uberopt.Tpo $(DEPDIR)/uberopt-uberopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='uberopt.c' object='uberopt-uberopt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(uberopt_CFLAGS) $(CFLAGS) -c -o uberopt-uberopt.o `test -f 'uberopt.c' || echo '$(srcdir)/'`uberopt.c uberopt-uberopt.obj: uberopt.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(uberopt_CFLAGS) $(CFLAGS) -MT uberopt-uberopt.obj -MD -MP -MF $(DEPDIR)/uberopt-uberopt.Tpo -c -o uberopt-uberopt.obj `if test -f 'uberopt.c'; then $(CYGPATH_W) 'uberopt.c'; else $(CYGPATH_W) '$(srcdir)/uberopt.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/uberopt-uberopt.Tpo $(DEPDIR)/uberopt-uberopt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='uberopt.c' object='uberopt-uberopt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(uberopt_CFLAGS) $(CFLAGS) -c -o uberopt-uberopt.obj `if test -f 'uberopt.c'; then $(CYGPATH_W) 'uberopt.c'; else $(CYGPATH_W) '$(srcdir)/uberopt.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/examples/videoscale/0000777000175000017500000000000011332637400014014 500000000000000liboil-0.3.17/examples/videoscale/vs_4tap.h0000644000175000017500000000344310717203073015466 00000000000000/* * Image Scaling Functions (4 tap) * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _VS_4TAP_H_ #define _VS_4TAP_H_ #include "vs_image.h" #include void vs_4tap_init (void); void vs_scanline_resample_4tap_Y (uint8_t *dest, uint8_t *src, int n, int *xacc, int increment); void vs_scanline_merge_4tap_Y (uint8_t *dest, uint8_t *src1, uint8_t *src2, uint8_t *src3, uint8_t *src4, int n, int acc); void vs_image_scale_4tap_Y (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf); #endif liboil-0.3.17/examples/videoscale/vs_scanline.c0000644000175000017500000003444010717203073016406 00000000000000/* * Image Scaling Functions * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "vs_scanline.h" #include /* greyscale, i.e., single componenet */ void vs_scanline_downsample_Y (uint8_t * dest, uint8_t * src, int n) { int i; for (i = 0; i < n; i++) { dest[i] = (src[i * 2] + src[i * 2 + 1]) / 2; } } void vs_scanline_resample_nearest_Y (uint8_t * dest, uint8_t * src, int n, int *accumulator, int increment) { int acc = *accumulator; int i; int j; int x; for (i = 0; i < n; i++) { j = acc >> 16; x = acc & 0xffff; dest[i] = (x < 32768) ? src[j] : src[j + 1]; acc += increment; } *accumulator = acc; } void vs_scanline_resample_linear_Y (uint8_t * dest, uint8_t * src, int n, int *accumulator, int increment) { uint32_t vals[2]; vals[0] = *accumulator; vals[1] = increment; oil_resample_linear_u8 (dest, src, n, vals); *accumulator = vals[0]; } void vs_scanline_merge_linear_Y (uint8_t * dest, uint8_t * src1, uint8_t * src2, int n, int x) { uint32_t value = x >> 8; oil_merge_linear_u8 (dest, src1, src2, &value, n); } /* RGBA */ void vs_scanline_downsample_RGBA (uint8_t * dest, uint8_t * src, int n) { int i; for (i = 0; i < n; i++) { dest[i * 4 + 0] = (src[i * 8 + 0] + src[i * 8 + 4]) / 2; dest[i * 4 + 1] = (src[i * 8 + 1] + src[i * 8 + 5]) / 2; dest[i * 4 + 2] = (src[i * 8 + 2] + src[i * 8 + 6]) / 2; dest[i * 4 + 3] = (src[i * 8 + 3] + src[i * 8 + 7]) / 2; } } void vs_scanline_resample_nearest_RGBA (uint8_t * dest, uint8_t * src, int n, int *accumulator, int increment) { int acc = *accumulator; int i; int j; int x; for (i = 0; i < n; i++) { j = acc >> 16; x = acc & 0xffff; dest[i * 4 + 0] = (x < 32768) ? src[j * 4 + 0] : src[j * 4 + 4]; dest[i * 4 + 1] = (x < 32768) ? src[j * 4 + 1] : src[j * 4 + 5]; dest[i * 4 + 2] = (x < 32768) ? src[j * 4 + 2] : src[j * 4 + 6]; dest[i * 4 + 3] = (x < 32768) ? src[j * 4 + 3] : src[j * 4 + 7]; acc += increment; } *accumulator = acc; } void vs_scanline_resample_linear_RGBA (uint8_t * dest, uint8_t * src, int n, int *accumulator, int increment) { uint32_t vals[2]; vals[0] = *accumulator; vals[1] = increment; oil_resample_linear_argb ((uint32_t *) dest, (uint32_t *) src, n, vals); *accumulator = vals[0]; } void vs_scanline_merge_linear_RGBA (uint8_t * dest, uint8_t * src1, uint8_t * src2, int n, int x) { uint32_t value = x >> 8; oil_merge_linear_argb ((uint32_t *) dest, (uint32_t *) src1, (uint32_t *) src2, &value, n); } /* RGB */ void vs_scanline_downsample_RGB (uint8_t * dest, uint8_t * src, int n) { int i; for (i = 0; i < n; i++) { dest[i * 3 + 0] = (src[i * 6 + 0] + src[i * 6 + 3]) / 2; dest[i * 3 + 1] = (src[i * 6 + 1] + src[i * 6 + 4]) / 2; dest[i * 3 + 2] = (src[i * 6 + 2] + src[i * 6 + 5]) / 2; } } void vs_scanline_resample_nearest_RGB (uint8_t * dest, uint8_t * src, int n, int *accumulator, int increment) { int acc = *accumulator; int i; int j; int x; for (i = 0; i < n; i++) { j = acc >> 16; x = acc & 0xffff; dest[i * 3 + 0] = (x < 32768) ? src[j * 3 + 0] : src[j * 3 + 3]; dest[i * 3 + 1] = (x < 32768) ? src[j * 3 + 1] : src[j * 3 + 4]; dest[i * 3 + 2] = (x < 32768) ? src[j * 3 + 2] : src[j * 3 + 5]; acc += increment; } *accumulator = acc; } void vs_scanline_resample_linear_RGB (uint8_t * dest, uint8_t * src, int n, int *accumulator, int increment) { int acc = *accumulator; int i; int j; int x; for (i = 0; i < n; i++) { j = acc >> 16; x = acc & 0xffff; dest[i * 3 + 0] = (src[j * 3 + 0] * (65536 - x) + src[j * 3 + 3] * x) >> 16; dest[i * 3 + 1] = (src[j * 3 + 1] * (65536 - x) + src[j * 3 + 4] * x) >> 16; dest[i * 3 + 2] = (src[j * 3 + 2] * (65536 - x) + src[j * 3 + 5] * x) >> 16; acc += increment; } *accumulator = acc; } void vs_scanline_merge_linear_RGB (uint8_t * dest, uint8_t * src1, uint8_t * src2, int n, int x) { uint32_t value = x >> 8; oil_merge_linear_u8 (dest, src1, src2, &value, n * 3); } /* YUYV */ /* n is the number of bi-pixels */ /* increment is per Y pixel */ void vs_scanline_downsample_YUYV (uint8_t * dest, uint8_t * src, int n) { int i; for (i = 0; i < n; i++) { dest[i * 4 + 0] = (src[i * 8 + 0] + src[i * 8 + 2]) / 2; dest[i * 4 + 1] = (src[i * 8 + 1] + src[i * 8 + 5]) / 2; dest[i * 4 + 2] = (src[i * 8 + 4] + src[i * 8 + 6]) / 2; dest[i * 4 + 3] = (src[i * 8 + 3] + src[i * 8 + 7]) / 2; } } void vs_scanline_resample_nearest_YUYV (uint8_t * dest, uint8_t * src, int n, int *accumulator, int increment) { int acc = *accumulator; int i; int j; int x; for (i = 0; i < n; i++) { j = acc >> 16; x = acc & 0xffff; dest[i * 4 + 0] = (x < 32768) ? src[j * 2 + 0] : src[j * 2 + 2]; j = acc >> 17; x = acc & 0x1ffff; dest[i * 4 + 1] = (x < 65536) ? src[j * 4 + 1] : src[j * 4 + 5]; dest[i * 4 + 3] = (x < 65536) ? src[j * 4 + 3] : src[j * 4 + 7]; acc += increment; j = acc >> 16; x = acc & 0xffff; dest[i * 4 + 2] = (x < 32768) ? src[j * 2 + 0] : src[j * 2 + 2]; acc += increment; } *accumulator = acc; } void vs_scanline_resample_linear_YUYV (uint8_t * dest, uint8_t * src, int n, int *accumulator, int increment) { int acc = *accumulator; int i; int j; int x; for (i = 0; i < n; i++) { j = acc >> 16; x = acc & 0xffff; dest[i * 4 + 0] = (src[j * 2 + 0] * (65536 - x) + src[j * 2 + 2] * x) >> 16; j = acc >> 17; x = acc & 0x1ffff; dest[i * 4 + 1] = (src[j * 4 + 1] * (131072 - x) + src[j * 4 + 5] * x) >> 17; dest[i * 4 + 3] = (src[j * 4 + 3] * (131072 - x) + src[j * 4 + 7] * x) >> 17; acc += increment; j = acc >> 16; x = acc & 0xffff; dest[i * 4 + 2] = (src[j * 2 + 0] * (65536 - x) + src[j * 2 + 2] * x) >> 16; acc += increment; } *accumulator = acc; } void vs_scanline_merge_linear_YUYV (uint8_t * dest, uint8_t * src1, uint8_t * src2, int n, int x) { int i; for (i = 0; i < n; i++) { dest[i * 4 + 0] = (src1[i * 4 + 0] * (65536 - x) + src2[i * 4 + 0] * x) >> 16; dest[i * 4 + 1] = (src1[i * 4 + 1] * (65536 - x) + src2[i * 4 + 1] * x) >> 16; dest[i * 4 + 2] = (src1[i * 4 + 2] * (65536 - x) + src2[i * 4 + 2] * x) >> 16; dest[i * 4 + 3] = (src1[i * 4 + 3] * (65536 - x) + src2[i * 4 + 3] * x) >> 16; } } /* UYVY */ /* n is the number of bi-pixels */ /* increment is per Y pixel */ void vs_scanline_downsample_UYVY (uint8_t * dest, uint8_t * src, int n) { int i; for (i = 0; i < n; i++) { dest[i * 4 + 0] = (src[i * 8 + 0] + src[i * 8 + 4]) / 2; dest[i * 4 + 1] = (src[i * 8 + 1] + src[i * 8 + 3]) / 2; dest[i * 4 + 2] = (src[i * 8 + 2] + src[i * 8 + 6]) / 2; dest[i * 4 + 3] = (src[i * 8 + 5] + src[i * 8 + 7]) / 2; } } void vs_scanline_resample_nearest_UYVY (uint8_t * dest, uint8_t * src, int n, int *accumulator, int increment) { int acc = *accumulator; int i; int j; int x; for (i = 0; i < n; i++) { j = acc >> 16; x = acc & 0xffff; dest[i * 4 + 1] = (x < 32768) ? src[j * 2 + 1] : src[j * 2 + 3]; j = acc >> 17; x = acc & 0x1ffff; dest[i * 4 + 0] = (x < 65536) ? src[j * 4 + 0] : src[j * 4 + 4]; dest[i * 4 + 2] = (x < 65536) ? src[j * 4 + 2] : src[j * 4 + 6]; acc += increment; j = acc >> 16; x = acc & 0xffff; dest[i * 4 + 3] = (x < 32768) ? src[j * 2 + 1] : src[j * 2 + 3]; acc += increment; } *accumulator = acc; } void vs_scanline_resample_linear_UYVY (uint8_t * dest, uint8_t * src, int n, int *accumulator, int increment) { int acc = *accumulator; int i; int j; int x; for (i = 0; i < n; i++) { j = acc >> 16; x = acc & 0xffff; dest[i * 4 + 1] = (src[j * 2 + 1] * (65536 - x) + src[j * 2 + 3] * x) >> 16; j = acc >> 17; x = acc & 0x1ffff; dest[i * 4 + 0] = (src[j * 4 + 0] * (131072 - x) + src[j * 4 + 4] * x) >> 17; dest[i * 4 + 2] = (src[j * 4 + 2] * (131072 - x) + src[j * 4 + 6] * x) >> 17; acc += increment; j = acc >> 16; x = acc & 0xffff; dest[i * 4 + 3] = (src[j * 2 + 1] * (65536 - x) + src[j * 2 + 3] * x) >> 16; acc += increment; } *accumulator = acc; } void vs_scanline_merge_linear_UYVY (uint8_t * dest, uint8_t * src1, uint8_t * src2, int n, int x) { uint32_t value = x >> 8; oil_merge_linear_argb ((uint32_t *) dest, (uint32_t *) src1, (uint32_t *) src2, &value, n); } /* RGB565 */ /* note that src and dest are uint16_t, and thus endian dependent */ #define RGB565_R(x) (((x)&0xf800)>>8 | ((x)&0xf800)>>13) #define RGB565_G(x) (((x)&0x07e0)>>3 | ((x)&0x07e0)>>9) #define RGB565_B(x) (((x)&0x001f)<<3 | ((x)&0x001f)>>2) #define RGB565(r,g,b) \ ((((r)<<8)&0xf800) | (((g)<<3)&0x07e0) | (((b)>>3)&0x001f)) void vs_scanline_downsample_RGB565 (uint8_t * dest_u8, uint8_t * src_u8, int n) { uint16_t *dest = (uint16_t *) dest_u8; uint16_t *src = (uint16_t *) src_u8; int i; for (i = 0; i < n; i++) { dest[i] = RGB565 ( (RGB565_R (src[i * 2]) + RGB565_R (src[i * 2 + 1])) / 2, (RGB565_G (src[i * 2]) + RGB565_G (src[i * 2 + 1])) / 2, (RGB565_B (src[i * 2]) + RGB565_B (src[i * 2 + 1])) / 2); } } void vs_scanline_resample_nearest_RGB565 (uint8_t * dest_u8, uint8_t * src_u8, int n, int *accumulator, int increment) { uint16_t *dest = (uint16_t *) dest_u8; uint16_t *src = (uint16_t *) src_u8; int acc = *accumulator; int i; int j; int x; for (i = 0; i < n; i++) { j = acc >> 16; x = acc & 0xffff; dest[i] = (x < 32768) ? src[j] : src[j + 1]; acc += increment; } *accumulator = acc; } void vs_scanline_resample_linear_RGB565 (uint8_t * dest_u8, uint8_t * src_u8, int n, int *accumulator, int increment) { uint16_t *dest = (uint16_t *) dest_u8; uint16_t *src = (uint16_t *) src_u8; int acc = *accumulator; int i; int j; int x; for (i = 0; i < n; i++) { j = acc >> 16; x = acc & 0xffff; dest[i] = RGB565 ( (RGB565_R (src[j]) * (65536 - x) + RGB565_R (src[j + 1]) * x) >> 16, (RGB565_G (src[j]) * (65536 - x) + RGB565_G (src[j + 1]) * x) >> 16, (RGB565_B (src[j]) * (65536 - x) + RGB565_B (src[j + 1]) * x) >> 16); acc += increment; } *accumulator = acc; } void vs_scanline_merge_linear_RGB565 (uint8_t * dest_u8, uint8_t * src1_u8, uint8_t * src2_u8, int n, int x) { uint16_t *dest = (uint16_t *) dest_u8; uint16_t *src1 = (uint16_t *) src1_u8; uint16_t *src2 = (uint16_t *) src2_u8; int i; for (i = 0; i < n; i++) { dest[i] = RGB565 ( (RGB565_R (src1[i]) * (65536 - x) + RGB565_R (src2[i]) * x) >> 16, (RGB565_G (src1[i]) * (65536 - x) + RGB565_G (src2[i]) * x) >> 16, (RGB565_B (src1[i]) * (65536 - x) + RGB565_B (src2[i]) * x) >> 16); } } /* RGB555 */ /* note that src and dest are uint16_t, and thus endian dependent */ #define RGB555_R(x) (((x)&0x7c00)>>8 | ((x)&0x7c00)>>13) #define RGB555_G(x) (((x)&0x03e0)>>3 | ((x)&0x03e0)>>9) #define RGB555_B(x) (((x)&0x001f)<<3 | ((x)&0x001f)>>2) #define RGB555(r,g,b) \ ((((r)<<7)&0x7c00) | (((g)<<3)&0x03e0) | (((b)>>3)&0x001f)) void vs_scanline_downsample_RGB555 (uint8_t * dest_u8, uint8_t * src_u8, int n) { uint16_t *dest = (uint16_t *) dest_u8; uint16_t *src = (uint16_t *) src_u8; int i; for (i = 0; i < n; i++) { dest[i] = RGB555 ( (RGB555_R (src[i * 2]) + RGB555_R (src[i * 2 + 1])) / 2, (RGB555_G (src[i * 2]) + RGB555_G (src[i * 2 + 1])) / 2, (RGB555_B (src[i * 2]) + RGB555_B (src[i * 2 + 1])) / 2); } } void vs_scanline_resample_nearest_RGB555 (uint8_t * dest_u8, uint8_t * src_u8, int n, int *accumulator, int increment) { uint16_t *dest = (uint16_t *) dest_u8; uint16_t *src = (uint16_t *) src_u8; int acc = *accumulator; int i; int j; int x; for (i = 0; i < n; i++) { j = acc >> 16; x = acc & 0xffff; dest[i] = (x < 32768) ? src[j] : src[j + 1]; acc += increment; } *accumulator = acc; } void vs_scanline_resample_linear_RGB555 (uint8_t * dest_u8, uint8_t * src_u8, int n, int *accumulator, int increment) { uint16_t *dest = (uint16_t *) dest_u8; uint16_t *src = (uint16_t *) src_u8; int acc = *accumulator; int i; int j; int x; for (i = 0; i < n; i++) { j = acc >> 16; x = acc & 0xffff; dest[i] = RGB555 ( (RGB555_R (src[j]) * (65536 - x) + RGB555_R (src[j + 1]) * x) >> 16, (RGB555_G (src[j]) * (65536 - x) + RGB555_G (src[j + 1]) * x) >> 16, (RGB555_B (src[j]) * (65536 - x) + RGB555_B (src[j + 1]) * x) >> 16); acc += increment; } *accumulator = acc; } void vs_scanline_merge_linear_RGB555 (uint8_t * dest_u8, uint8_t * src1_u8, uint8_t * src2_u8, int n, int x) { uint16_t *dest = (uint16_t *) dest_u8; uint16_t *src1 = (uint16_t *) src1_u8; uint16_t *src2 = (uint16_t *) src2_u8; int i; for (i = 0; i < n; i++) { dest[i] = RGB555 ( (RGB555_R (src1[i]) * (65536 - x) + RGB555_R (src2[i]) * x) >> 16, (RGB555_G (src1[i]) * (65536 - x) + RGB555_G (src2[i]) * x) >> 16, (RGB555_B (src1[i]) * (65536 - x) + RGB555_B (src2[i]) * x) >> 16); } } liboil-0.3.17/examples/videoscale/Makefile.am0000644000175000017500000000056310717203073015771 00000000000000 noinst_LTLIBRARIES = libvideoscale.la #noinst_PROGRAMS = videoscale_test libvideoscale_la_SOURCES = vs_4tap.c vs_image.c vs_scanline.c libvideoscale_la_CFLAGS = $(LIBOIL_CFLAGS) noinst_HEADERS = vs_4tap.h vs_image.h vs_scanline.h #videoscale_test_SOURCES = test.c #videoscale_test_CFLAGS = $(LIBOIL_CFLAGS) #videoscale_test_LDADD = libvideoscale.la $(LIBOIL_LIBS) liboil-0.3.17/examples/videoscale/vs_image.c0000644000175000017500000005422010717203073015672 00000000000000/* * Image Scaling Functions * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include "vs_scanline.h" #include "vs_image.h" #define ROUND_UP_2(x) (((x)+1)&~1) #define ROUND_UP_4(x) (((x)+3)&~3) #define ROUND_UP_8(x) (((x)+7)&~7) void vs_image_scale_nearest_RGBA (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf) { int acc; int y_increment; int x_increment; int i; int j; int x; int xacc; y_increment = ((src->height - 1) << 16) / (dest->height - 1); x_increment = ((src->width - 1) << 16) / (dest->width - 1); acc = 0; for (i = 0; i < dest->height; i++) { j = acc >> 16; x = acc & 0xffff; xacc = 0; vs_scanline_resample_nearest_RGBA (dest->pixels + i * dest->stride, src->pixels + j * src->stride, dest->width, &xacc, x_increment); acc += y_increment; } } void vs_image_scale_linear_RGBA (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf) { int acc; int y_increment; int x_increment; uint8_t *tmp1; uint8_t *tmp2; int y1; int y2; int i; int j; int x; int dest_size; int xacc; y_increment = ((src->height - 1) << 16) / (dest->height - 1); x_increment = ((src->width - 1) << 16) / (dest->width - 1); dest_size = dest->width * 4; tmp1 = tmpbuf; tmp2 = tmpbuf + dest_size; acc = 0; xacc = 0; y2 = -1; vs_scanline_resample_linear_RGBA (tmp1, src->pixels, dest->width, &xacc, x_increment); y1 = 0; for (i = 0; i < dest->height; i++) { j = acc >> 16; x = acc & 0xffff; if (x == 0) { if (j == y1) { memcpy (dest->pixels + i * dest->stride, tmp1, dest_size); } else if (j == y2) { memcpy (dest->pixels + i * dest->stride, tmp2, dest_size); } else { xacc = 0; vs_scanline_resample_linear_RGBA (tmp1, src->pixels + j * src->stride, dest->width, &xacc, x_increment); y1 = j; memcpy (dest->pixels + i * dest->stride, tmp1, dest_size); } } else { if (j == y1) { if (j + 1 != y2) { xacc = 0; vs_scanline_resample_linear_RGBA (tmp2, src->pixels + (j + 1) * src->stride, dest->width, &xacc, x_increment); y2 = j + 1; } vs_scanline_merge_linear_RGBA (dest->pixels + i * dest->stride, tmp1, tmp2, dest->width, x); } else if (j == y2) { if (j + 1 != y1) { xacc = 0; vs_scanline_resample_linear_RGBA (tmp1, src->pixels + (j + 1) * src->stride, dest->width, &xacc, x_increment); y1 = j + 1; } vs_scanline_merge_linear_RGBA (dest->pixels + i * dest->stride, tmp2, tmp1, dest->width, x); } else { xacc = 0; vs_scanline_resample_linear_RGBA (tmp1, src->pixels + j * src->stride, dest->width, &xacc, x_increment); y1 = j; xacc = 0; vs_scanline_resample_linear_RGBA (tmp2, src->pixels + (j + 1) * src->stride, dest->width, &xacc, x_increment); y2 = (j + 1); vs_scanline_merge_linear_RGBA (dest->pixels + i * dest->stride, tmp1, tmp2, dest->width, x); } } acc += y_increment; } } void vs_image_scale_nearest_RGB (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf) { int acc; int y_increment; int x_increment; int i; int j; int x; int xacc; y_increment = ((src->height - 1) << 16) / (dest->height - 1); x_increment = ((src->width - 1) << 16) / (dest->width - 1); acc = 0; for (i = 0; i < dest->height; i++) { j = acc >> 16; x = acc & 0xffff; xacc = 0; vs_scanline_resample_nearest_RGB (dest->pixels + i * dest->stride, src->pixels + j * src->stride, dest->width, &xacc, x_increment); acc += y_increment; } } void vs_image_scale_linear_RGB (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf) { int acc; int y_increment; int x_increment; uint8_t *tmp1; uint8_t *tmp2; int y1; int y2; int i; int j; int x; int dest_size; int xacc; y_increment = ((src->height - 1) << 16) / (dest->height - 1); x_increment = ((src->width - 1) << 16) / (dest->width - 1); dest_size = dest->width * 3; tmp1 = tmpbuf; tmp2 = tmpbuf + dest_size; acc = 0; xacc = 0; y2 = -1; vs_scanline_resample_linear_RGB (tmp1, src->pixels, dest->width, &xacc, x_increment); y1 = 0; for (i = 0; i < dest->height; i++) { j = acc >> 16; x = acc & 0xffff; if (x == 0) { if (j == y1) { memcpy (dest->pixels + i * dest->stride, tmp1, dest_size); } else if (j == y2) { memcpy (dest->pixels + i * dest->stride, tmp2, dest_size); } else { xacc = 0; vs_scanline_resample_linear_RGB (tmp1, src->pixels + j * src->stride, dest->width, &xacc, x_increment); y1 = j; memcpy (dest->pixels + i * dest->stride, tmp1, dest_size); } } else { if (j == y1) { if (j + 1 != y2) { xacc = 0; vs_scanline_resample_linear_RGB (tmp2, src->pixels + (j + 1) * src->stride, dest->width, &xacc, x_increment); y2 = j + 1; } vs_scanline_merge_linear_RGB (dest->pixels + i * dest->stride, tmp1, tmp2, dest->width, x); } else if (j == y2) { if (j + 1 != y1) { xacc = 0; vs_scanline_resample_linear_RGB (tmp1, src->pixels + (j + 1) * src->stride, dest->width, &xacc, x_increment); y1 = j + 1; } vs_scanline_merge_linear_RGB (dest->pixels + i * dest->stride, tmp2, tmp1, dest->width, x); } else { xacc = 0; vs_scanline_resample_linear_RGB (tmp1, src->pixels + j * src->stride, dest->width, &xacc, x_increment); y1 = j; xacc = 0; vs_scanline_resample_linear_RGB (tmp2, src->pixels + (j + 1) * src->stride, dest->width, &xacc, x_increment); y2 = (j + 1); vs_scanline_merge_linear_RGB (dest->pixels + i * dest->stride, tmp1, tmp2, dest->width, x); } } acc += y_increment; } } /* YUYV */ void vs_image_scale_nearest_YUYV (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf) { int acc; int y_increment; int x_increment; int i; int j; int x; int xacc; int n_quads; y_increment = ((src->height - 1) << 16) / (dest->height - 1); x_increment = ((src->width - 1) << 16) / (dest->width - 1); n_quads = ROUND_UP_2 (dest->width) / 2; acc = 0; for (i = 0; i < dest->height; i++) { j = acc >> 16; x = acc & 0xffff; xacc = 0; vs_scanline_resample_nearest_YUYV (dest->pixels + i * dest->stride, src->pixels + j * src->stride, n_quads, &xacc, x_increment); acc += y_increment; } } void vs_image_scale_linear_YUYV (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf) { int acc; int y_increment; int x_increment; uint8_t *tmp1; uint8_t *tmp2; int y1; int y2; int i; int j; int x; int dest_size; int n_quads; int xacc; y_increment = ((src->height - 1) << 16) / (dest->height - 1); x_increment = ((src->width - 1) << 16) / (dest->width - 1); dest_size = ROUND_UP_4 (dest->width * 2); n_quads = ROUND_UP_2 (dest->width) / 2; tmp1 = tmpbuf; tmp2 = tmpbuf + dest_size; acc = 0; xacc = 0; y2 = -1; vs_scanline_resample_linear_YUYV (tmp1, src->pixels, n_quads, &xacc, x_increment); y1 = 0; for (i = 0; i < dest->height; i++) { j = acc >> 16; x = acc & 0xffff; if (x == 0) { if (j == y1) { memcpy (dest->pixels + i * dest->stride, tmp1, dest_size); } else if (j == y2) { memcpy (dest->pixels + i * dest->stride, tmp2, dest_size); } else { xacc = 0; vs_scanline_resample_linear_YUYV (tmp1, src->pixels + j * src->stride, n_quads, &xacc, x_increment); y1 = j; memcpy (dest->pixels + i * dest->stride, tmp1, dest_size); } } else { if (j == y1) { if (j + 1 != y2) { xacc = 0; vs_scanline_resample_linear_YUYV (tmp2, src->pixels + (j + 1) * src->stride, n_quads, &xacc, x_increment); y2 = j + 1; } vs_scanline_merge_linear_YUYV (dest->pixels + i * dest->stride, tmp1, tmp2, n_quads, x); } else if (j == y2) { if (j + 1 != y1) { xacc = 0; vs_scanline_resample_linear_YUYV (tmp1, src->pixels + (j + 1) * src->stride, n_quads, &xacc, x_increment); y1 = j + 1; } vs_scanline_merge_linear_YUYV (dest->pixels + i * dest->stride, tmp2, tmp1, n_quads, x); } else { xacc = 0; vs_scanline_resample_linear_YUYV (tmp1, src->pixels + j * src->stride, n_quads, &xacc, x_increment); y1 = j; xacc = 0; vs_scanline_resample_linear_YUYV (tmp2, src->pixels + (j + 1) * src->stride, n_quads, &xacc, x_increment); y2 = (j + 1); vs_scanline_merge_linear_YUYV (dest->pixels + i * dest->stride, tmp1, tmp2, n_quads, x); } } acc += y_increment; } } /* UYVY */ void vs_image_scale_nearest_UYVY (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf) { int acc; int y_increment; int x_increment; int i; int j; int x; int xacc; int n_quads; y_increment = ((src->height - 1) << 16) / (dest->height - 1); x_increment = ((src->width - 1) << 16) / (dest->width - 1); n_quads = (dest->width + 1) / 2; acc = 0; for (i = 0; i < dest->height; i++) { j = acc >> 16; x = acc & 0xffff; xacc = 0; vs_scanline_resample_nearest_UYVY (dest->pixels + i * dest->stride, src->pixels + j * src->stride, n_quads, &xacc, x_increment); acc += y_increment; } } void vs_image_scale_linear_UYVY (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf) { int acc; int y_increment; int x_increment; uint8_t *tmp1; uint8_t *tmp2; int y1; int y2; int i; int j; int x; int dest_size; int n_quads; int xacc; y_increment = ((src->height - 1) << 16) / (dest->height - 1); x_increment = ((src->width - 1) << 16) / (dest->width - 1); dest_size = ROUND_UP_4 (dest->width * 2); n_quads = ROUND_UP_2 (dest->width) / 2; tmp1 = tmpbuf; tmp2 = tmpbuf + dest_size; acc = 0; xacc = 0; y2 = -1; vs_scanline_resample_linear_UYVY (tmp1, src->pixels, n_quads, &xacc, x_increment); y1 = 0; for (i = 0; i < dest->height; i++) { j = acc >> 16; x = acc & 0xffff; if (x == 0) { if (j == y1) { memcpy (dest->pixels + i * dest->stride, tmp1, dest_size); } else if (j == y2) { memcpy (dest->pixels + i * dest->stride, tmp2, dest_size); } else { xacc = 0; vs_scanline_resample_linear_UYVY (tmp1, src->pixels + j * src->stride, n_quads, &xacc, x_increment); y1 = j; memcpy (dest->pixels + i * dest->stride, tmp1, dest_size); } } else { if (j == y1) { if (j + 1 != y2) { xacc = 0; vs_scanline_resample_linear_UYVY (tmp2, src->pixels + (j + 1) * src->stride, n_quads, &xacc, x_increment); y2 = j + 1; } vs_scanline_merge_linear_UYVY (dest->pixels + i * dest->stride, tmp1, tmp2, n_quads, x); } else if (j == y2) { if (j + 1 != y1) { xacc = 0; vs_scanline_resample_linear_UYVY (tmp1, src->pixels + (j + 1) * src->stride, n_quads, &xacc, x_increment); y1 = j + 1; } vs_scanline_merge_linear_UYVY (dest->pixels + i * dest->stride, tmp2, tmp1, n_quads, x); } else { xacc = 0; vs_scanline_resample_linear_UYVY (tmp1, src->pixels + j * src->stride, n_quads, &xacc, x_increment); y1 = j; xacc = 0; vs_scanline_resample_linear_UYVY (tmp2, src->pixels + (j + 1) * src->stride, n_quads, &xacc, x_increment); y2 = (j + 1); vs_scanline_merge_linear_UYVY (dest->pixels + i * dest->stride, tmp1, tmp2, n_quads, x); } } acc += y_increment; } } /* greyscale */ void vs_image_scale_nearest_Y (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf) { int acc; int y_increment; int x_increment; int i; int j; int x; int xacc; y_increment = ((src->height - 1) << 16) / (dest->height - 1); x_increment = ((src->width - 1) << 16) / (dest->width - 1); acc = 0; for (i = 0; i < dest->height; i++) { j = acc >> 16; x = acc & 0xffff; xacc = 0; vs_scanline_resample_nearest_Y (dest->pixels + i * dest->stride, src->pixels + j * src->stride, dest->width, &xacc, x_increment); acc += y_increment; } } void vs_image_scale_linear_Y (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf) { int acc; int y_increment; int x_increment; uint8_t *tmp1; uint8_t *tmp2; int y1; int y2; int i; int j; int x; int dest_size; int xacc; y_increment = ((src->height - 1) << 16) / (dest->height - 1); x_increment = ((src->width - 1) << 16) / (dest->width - 1); dest_size = dest->width; tmp1 = tmpbuf; tmp2 = tmpbuf + dest_size; acc = 0; xacc = 0; y2 = -1; vs_scanline_resample_linear_Y (tmp1, src->pixels, dest->width, &xacc, x_increment); y1 = 0; for (i = 0; i < dest->height; i++) { j = acc >> 16; x = acc & 0xffff; if (x == 0) { if (j == y1) { memcpy (dest->pixels + i * dest->stride, tmp1, dest_size); } else if (j == y2) { memcpy (dest->pixels + i * dest->stride, tmp2, dest_size); } else { xacc = 0; vs_scanline_resample_linear_Y (tmp1, src->pixels + j * src->stride, dest->width, &xacc, x_increment); y1 = j; memcpy (dest->pixels + i * dest->stride, tmp1, dest_size); } } else { if (j == y1) { if (j + 1 != y2) { xacc = 0; vs_scanline_resample_linear_Y (tmp2, src->pixels + (j + 1) * src->stride, dest->width, &xacc, x_increment); y2 = j + 1; } vs_scanline_merge_linear_Y (dest->pixels + i * dest->stride, tmp1, tmp2, dest->width, x); } else if (j == y2) { if (j + 1 != y1) { xacc = 0; vs_scanline_resample_linear_Y (tmp1, src->pixels + (j + 1) * src->stride, dest->width, &xacc, x_increment); y1 = j + 1; } vs_scanline_merge_linear_Y (dest->pixels + i * dest->stride, tmp2, tmp1, dest->width, x); } else { xacc = 0; vs_scanline_resample_linear_Y (tmp1, src->pixels + j * src->stride, dest->width, &xacc, x_increment); y1 = j; xacc = 0; vs_scanline_resample_linear_Y (tmp2, src->pixels + (j + 1) * src->stride, dest->width, &xacc, x_increment); y2 = (j + 1); vs_scanline_merge_linear_Y (dest->pixels + i * dest->stride, tmp1, tmp2, dest->width, x); } } acc += y_increment; } } /* RGB565 */ void vs_image_scale_nearest_RGB565 (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf) { int acc; int y_increment; int x_increment; int i; int j; int x; int xacc; y_increment = ((src->height - 1) << 16) / (dest->height - 1); x_increment = ((src->width - 1) << 16) / (dest->width - 1); acc = 0; for (i = 0; i < dest->height; i++) { j = acc >> 16; x = acc & 0xffff; xacc = 0; vs_scanline_resample_nearest_RGB565 (dest->pixels + i * dest->stride, src->pixels + j * src->stride, dest->width, &xacc, x_increment); acc += y_increment; } } void vs_image_scale_linear_RGB565 (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf) { int acc; int y_increment; int x_increment; uint8_t *tmp1; uint8_t *tmp2; int y1; int y2; int i; int j; int x; int dest_size; int xacc; y_increment = ((src->height - 1) << 16) / (dest->height - 1); x_increment = ((src->width - 1) << 16) / (dest->width - 1); dest_size = dest->width * 2; tmp1 = tmpbuf; tmp2 = tmpbuf + dest_size; acc = 0; xacc = 0; y2 = -1; vs_scanline_resample_linear_RGB565 (tmp1, src->pixels, dest->width, &xacc, x_increment); y1 = 0; for (i = 0; i < dest->height; i++) { j = acc >> 16; x = acc & 0xffff; if (x == 0) { if (j == y1) { memcpy (dest->pixels + i * dest->stride, tmp1, dest_size); } else if (j == y2) { memcpy (dest->pixels + i * dest->stride, tmp2, dest_size); } else { xacc = 0; vs_scanline_resample_linear_RGB565 (tmp1, src->pixels + j * src->stride, dest->width, &xacc, x_increment); y1 = j; memcpy (dest->pixels + i * dest->stride, tmp1, dest_size); } } else { if (j == y1) { if (j + 1 != y2) { xacc = 0; vs_scanline_resample_linear_RGB565 (tmp2, src->pixels + (j + 1) * src->stride, dest->width, &xacc, x_increment); y2 = j + 1; } vs_scanline_merge_linear_RGB565 (dest->pixels + i * dest->stride, tmp1, tmp2, dest->width, x); } else if (j == y2) { if (j + 1 != y1) { xacc = 0; vs_scanline_resample_linear_RGB565 (tmp1, src->pixels + (j + 1) * src->stride, dest->width, &xacc, x_increment); y1 = j + 1; } vs_scanline_merge_linear_RGB565 (dest->pixels + i * dest->stride, tmp2, tmp1, dest->width, x); } else { xacc = 0; vs_scanline_resample_linear_RGB565 (tmp1, src->pixels + j * src->stride, dest->width, &xacc, x_increment); y1 = j; xacc = 0; vs_scanline_resample_linear_RGB565 (tmp2, src->pixels + (j + 1) * src->stride, dest->width, &xacc, x_increment); y2 = (j + 1); vs_scanline_merge_linear_RGB565 (dest->pixels + i * dest->stride, tmp1, tmp2, dest->width, x); } } acc += y_increment; } } /* RGB555 */ void vs_image_scale_nearest_RGB555 (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf) { int acc; int y_increment; int x_increment; int i; int j; int x; int xacc; y_increment = ((src->height - 1) << 16) / (dest->height - 1); x_increment = ((src->width - 1) << 16) / (dest->width - 1); acc = 0; for (i = 0; i < dest->height; i++) { j = acc >> 16; x = acc & 0xffff; xacc = 0; vs_scanline_resample_nearest_RGB555 (dest->pixels + i * dest->stride, src->pixels + j * src->stride, dest->width, &xacc, x_increment); acc += y_increment; } } void vs_image_scale_linear_RGB555 (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf) { int acc; int y_increment; int x_increment; uint8_t *tmp1; uint8_t *tmp2; int y1; int y2; int i; int j; int x; int dest_size; int xacc; y_increment = ((src->height - 1) << 16) / (dest->height - 1); x_increment = ((src->width - 1) << 16) / (dest->width - 1); dest_size = dest->width * 2; tmp1 = tmpbuf; tmp2 = tmpbuf + dest_size; acc = 0; xacc = 0; y2 = -1; vs_scanline_resample_linear_RGB555 (tmp1, src->pixels, dest->width, &xacc, x_increment); y1 = 0; for (i = 0; i < dest->height; i++) { j = acc >> 16; x = acc & 0xffff; if (x == 0) { if (j == y1) { memcpy (dest->pixels + i * dest->stride, tmp1, dest_size); } else if (j == y2) { memcpy (dest->pixels + i * dest->stride, tmp2, dest_size); } else { xacc = 0; vs_scanline_resample_linear_RGB555 (tmp1, src->pixels + j * src->stride, dest->width, &xacc, x_increment); y1 = j; memcpy (dest->pixels + i * dest->stride, tmp1, dest_size); } } else { if (j == y1) { if (j + 1 != y2) { xacc = 0; vs_scanline_resample_linear_RGB555 (tmp2, src->pixels + (j + 1) * src->stride, dest->width, &xacc, x_increment); y2 = j + 1; } vs_scanline_merge_linear_RGB555 (dest->pixels + i * dest->stride, tmp1, tmp2, dest->width, x); } else if (j == y2) { if (j + 1 != y1) { xacc = 0; vs_scanline_resample_linear_RGB555 (tmp1, src->pixels + (j + 1) * src->stride, dest->width, &xacc, x_increment); y1 = j + 1; } vs_scanline_merge_linear_RGB555 (dest->pixels + i * dest->stride, tmp2, tmp1, dest->width, x); } else { xacc = 0; vs_scanline_resample_linear_RGB555 (tmp1, src->pixels + j * src->stride, dest->width, &xacc, x_increment); y1 = j; xacc = 0; vs_scanline_resample_linear_RGB555 (tmp2, src->pixels + (j + 1) * src->stride, dest->width, &xacc, x_increment); y2 = (j + 1); vs_scanline_merge_linear_RGB555 (dest->pixels + i * dest->stride, tmp1, tmp2, dest->width, x); } } acc += y_increment; } } liboil-0.3.17/examples/videoscale/vs_4tap.c0000644000175000017500000001070010717203073015453 00000000000000/* * Image Scaling Functions (4 tap) * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "vs_image.h" #include "vs_scanline.h" #include #include #define SHIFT 10 int16_t vs_4tap_taps[256][4]; double vs_4tap_func (double x) { #if 0 if (x<-1) return 0; if (x>1) return 0; if (x<0) return 1 + x; return 1 - x; #endif #if 0 if (x==0) return 1; return sin(M_PI*x)/(M_PI*x) * (1 - 0.25*x*x); #endif #if 1 if (x==0) return 1; return sin(M_PI*x)/(M_PI*x); #endif } void vs_4tap_init (void) { int i; double a, b, c, d; double sum; for(i=0;i<256;i++){ a = vs_4tap_func(-1 - i/256.0); b = vs_4tap_func(0 - i/256.0); c = vs_4tap_func(1 - i/256.0); d = vs_4tap_func(2 - i/256.0); sum = a + b + c + d; vs_4tap_taps[i][0] = rint((1<>16; x = (acc&0xff00)>>8; y = (vs_4tap_taps[x][0] * src[MAX(j-1,0)] + vs_4tap_taps[x][1] * src[j] + vs_4tap_taps[x][2] * src[j+1] + vs_4tap_taps[x][3] * src[j+2] + (1<<(SHIFT-1))) >> SHIFT; if (y<0) y = 0; if (y>255) y = 255; dest[i] = y; acc += increment; } *xacc = acc; } void vs_scanline_merge_4tap_Y (uint8_t *dest, uint8_t *src1, uint8_t *src2, uint8_t *src3, uint8_t *src4, int n, int acc) { int i; int y; acc = (acc>>8) & 0xff; for(i=0;i> SHIFT; if (y<0) y = 0; if (y>255) y = 255; dest[i] = y; } } void vs_image_scale_4tap_Y (const VSImage * dest, const VSImage * src, uint8_t * tmpbuf) { int yacc; int y_increment; int x_increment; int i; int j; int xacc; int k; y_increment = ((src->height - 1) << 16) / (dest->height - 1); x_increment = ((src->width - 1) << 16) / (dest->width - 1); k = 0; for(i=0;i<4;i++){ xacc = 0; vs_scanline_resample_4tap_Y (tmpbuf + i * dest->width, src->pixels + i * src->stride, dest->width, &xacc, x_increment); } yacc = 0; for (i = 0; i < dest->height; i++) { uint8_t *t0, *t1, *t2, *t3; j = yacc >> 16; if (j > k) { k++; if (k + 3 < src->height) { xacc = 0; vs_scanline_resample_4tap_Y (tmpbuf + ((k+3)&3) * dest->width, src->pixels + (k+3) * src->stride, dest->width, &xacc, x_increment); } } t0 = tmpbuf + (CLAMP(j - 1, 0, src->height - 1)&3) * dest->width; t1 = tmpbuf + (CLAMP(j , 0, src->height - 1)&3) * dest->width; t2 = tmpbuf + (CLAMP(j + 1, 0, src->height - 1)&3) * dest->width; t3 = tmpbuf + (CLAMP(j + 2, 0, src->height - 1)&3) * dest->width; vs_scanline_merge_4tap_Y (dest->pixels + i*dest->stride, t0, t1, t2, t3, dest->width, yacc & 0xffff); yacc += y_increment; } } liboil-0.3.17/examples/videoscale/vs_scanline.h0000644000175000017500000001012010717203073016400 00000000000000/* * Image Scaling Functions * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __VS_SCANLINE_H__ #define __VS_SCANLINE_H__ #include void vs_scanline_downsample_Y (uint8_t *dest, uint8_t *src, int n); void vs_scanline_resample_nearest_Y (uint8_t *dest, uint8_t *src, int n, int *accumulator, int increment); void vs_scanline_resample_linear_Y (uint8_t *dest, uint8_t *src, int n, int *accumulator, int increment); void vs_scanline_merge_linear_Y (uint8_t *dest, uint8_t *src1, uint8_t *src2, int n, int x); void vs_scanline_downsample_RGBA (uint8_t *dest, uint8_t *src, int n); void vs_scanline_resample_nearest_RGBA (uint8_t *dest, uint8_t *src, int n, int *accumulator, int increment); void vs_scanline_resample_linear_RGBA (uint8_t *dest, uint8_t *src, int n, int *accumulator, int increment); void vs_scanline_merge_linear_RGBA (uint8_t *dest, uint8_t *src1, uint8_t *src2, int n, int x); void vs_scanline_downsample_RGB (uint8_t *dest, uint8_t *src, int n); void vs_scanline_resample_nearest_RGB (uint8_t *dest, uint8_t *src, int n, int *accumulator, int increment); void vs_scanline_resample_linear_RGB (uint8_t *dest, uint8_t *src, int n, int *accumulator, int increment); void vs_scanline_merge_linear_RGB (uint8_t *dest, uint8_t *src1, uint8_t *src2, int n, int x); void vs_scanline_downsample_YUYV (uint8_t *dest, uint8_t *src, int n); void vs_scanline_resample_nearest_YUYV (uint8_t *dest, uint8_t *src, int n, int *accumulator, int increment); void vs_scanline_resample_linear_YUYV (uint8_t *dest, uint8_t *src, int n, int *accumulator, int increment); void vs_scanline_merge_linear_YUYV (uint8_t *dest, uint8_t *src1, uint8_t *src2, int n, int x); void vs_scanline_downsample_UYVY (uint8_t *dest, uint8_t *src, int n); void vs_scanline_resample_nearest_UYVY (uint8_t *dest, uint8_t *src, int n, int *accumulator, int increment); void vs_scanline_resample_linear_UYVY (uint8_t *dest, uint8_t *src, int n, int *accumulator, int increment); void vs_scanline_merge_linear_UYVY (uint8_t *dest, uint8_t *src1, uint8_t *src2, int n, int x); void vs_scanline_downsample_RGB565 (uint8_t *dest, uint8_t *src, int n); void vs_scanline_resample_nearest_RGB565 (uint8_t *dest, uint8_t *src, int n, int *accumulator, int increment); void vs_scanline_resample_linear_RGB565 (uint8_t *dest, uint8_t *src, int n, int *accumulator, int increment); void vs_scanline_merge_linear_RGB565 (uint8_t *dest, uint8_t *src1, uint8_t *src2, int n, int x); void vs_scanline_downsample_RGB555 (uint8_t *dest, uint8_t *src, int n); void vs_scanline_resample_nearest_RGB555 (uint8_t *dest, uint8_t *src, int n, int *accumulator, int increment); void vs_scanline_resample_linear_RGB555 (uint8_t *dest, uint8_t *src, int n, int *accumulator, int increment); void vs_scanline_merge_linear_RGB555 (uint8_t *dest, uint8_t *src1, uint8_t *src2, int n, int x); #endif liboil-0.3.17/examples/videoscale/Makefile.in0000644000175000017500000004557211332627670016022 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples/videoscale DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libvideoscale_la_LIBADD = am_libvideoscale_la_OBJECTS = libvideoscale_la-vs_4tap.lo \ libvideoscale_la-vs_image.lo libvideoscale_la-vs_scanline.lo libvideoscale_la_OBJECTS = $(am_libvideoscale_la_OBJECTS) libvideoscale_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libvideoscale_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libvideoscale_la_SOURCES) DIST_SOURCES = $(libvideoscale_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libvideoscale.la #noinst_PROGRAMS = videoscale_test libvideoscale_la_SOURCES = vs_4tap.c vs_image.c vs_scanline.c libvideoscale_la_CFLAGS = $(LIBOIL_CFLAGS) noinst_HEADERS = vs_4tap.h vs_image.h vs_scanline.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/videoscale/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/videoscale/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libvideoscale.la: $(libvideoscale_la_OBJECTS) $(libvideoscale_la_DEPENDENCIES) $(libvideoscale_la_LINK) $(libvideoscale_la_OBJECTS) $(libvideoscale_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvideoscale_la-vs_4tap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvideoscale_la-vs_image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvideoscale_la-vs_scanline.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libvideoscale_la-vs_4tap.lo: vs_4tap.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvideoscale_la_CFLAGS) $(CFLAGS) -MT libvideoscale_la-vs_4tap.lo -MD -MP -MF $(DEPDIR)/libvideoscale_la-vs_4tap.Tpo -c -o libvideoscale_la-vs_4tap.lo `test -f 'vs_4tap.c' || echo '$(srcdir)/'`vs_4tap.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libvideoscale_la-vs_4tap.Tpo $(DEPDIR)/libvideoscale_la-vs_4tap.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vs_4tap.c' object='libvideoscale_la-vs_4tap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvideoscale_la_CFLAGS) $(CFLAGS) -c -o libvideoscale_la-vs_4tap.lo `test -f 'vs_4tap.c' || echo '$(srcdir)/'`vs_4tap.c libvideoscale_la-vs_image.lo: vs_image.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvideoscale_la_CFLAGS) $(CFLAGS) -MT libvideoscale_la-vs_image.lo -MD -MP -MF $(DEPDIR)/libvideoscale_la-vs_image.Tpo -c -o libvideoscale_la-vs_image.lo `test -f 'vs_image.c' || echo '$(srcdir)/'`vs_image.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libvideoscale_la-vs_image.Tpo $(DEPDIR)/libvideoscale_la-vs_image.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vs_image.c' object='libvideoscale_la-vs_image.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvideoscale_la_CFLAGS) $(CFLAGS) -c -o libvideoscale_la-vs_image.lo `test -f 'vs_image.c' || echo '$(srcdir)/'`vs_image.c libvideoscale_la-vs_scanline.lo: vs_scanline.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvideoscale_la_CFLAGS) $(CFLAGS) -MT libvideoscale_la-vs_scanline.lo -MD -MP -MF $(DEPDIR)/libvideoscale_la-vs_scanline.Tpo -c -o libvideoscale_la-vs_scanline.lo `test -f 'vs_scanline.c' || echo '$(srcdir)/'`vs_scanline.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libvideoscale_la-vs_scanline.Tpo $(DEPDIR)/libvideoscale_la-vs_scanline.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vs_scanline.c' object='libvideoscale_la-vs_scanline.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvideoscale_la_CFLAGS) $(CFLAGS) -c -o libvideoscale_la-vs_scanline.lo `test -f 'vs_scanline.c' || echo '$(srcdir)/'`vs_scanline.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am #videoscale_test_SOURCES = test.c #videoscale_test_CFLAGS = $(LIBOIL_CFLAGS) #videoscale_test_LDADD = libvideoscale.la $(LIBOIL_LIBS) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/examples/videoscale/vs_image.h0000644000175000017500000000556610717203073015710 00000000000000/* * Image Scaling Functions * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __VS_IMAGE_H__ #define __VS_IMAGE_H__ #include typedef struct _VSImage VSImage; struct _VSImage { uint8_t *pixels; int width; int height; int stride; }; void vs_image_scale_nearest_RGBA (const VSImage *dest, const VSImage *src, uint8_t *tmpbuf); void vs_image_scale_linear_RGBA (const VSImage *dest, const VSImage *src, uint8_t *tmpbuf); void vs_image_scale_nearest_RGB (const VSImage *dest, const VSImage *src, uint8_t *tmpbuf); void vs_image_scale_linear_RGB (const VSImage *dest, const VSImage *src, uint8_t *tmpbuf); void vs_image_scale_nearest_YUYV (const VSImage *dest, const VSImage *src, uint8_t *tmpbuf); void vs_image_scale_linear_YUYV (const VSImage *dest, const VSImage *src, uint8_t *tmpbuf); void vs_image_scale_nearest_UYVY (const VSImage *dest, const VSImage *src, uint8_t *tmpbuf); void vs_image_scale_linear_UYVY (const VSImage *dest, const VSImage *src, uint8_t *tmpbuf); void vs_image_scale_nearest_Y (const VSImage *dest, const VSImage *src, uint8_t *tmpbuf); void vs_image_scale_linear_Y (const VSImage *dest, const VSImage *src, uint8_t *tmpbuf); void vs_image_scale_nearest_RGB565 (const VSImage *dest, const VSImage *src, uint8_t *tmpbuf); void vs_image_scale_linear_RGB565 (const VSImage *dest, const VSImage *src, uint8_t *tmpbuf); void vs_image_scale_nearest_RGB555 (const VSImage *dest, const VSImage *src, uint8_t *tmpbuf); void vs_image_scale_linear_RGB555 (const VSImage *dest, const VSImage *src, uint8_t *tmpbuf); #endif liboil-0.3.17/examples/taylor/0000777000175000017500000000000011332637400013210 500000000000000liboil-0.3.17/examples/taylor/Makefile.am0000644000175000017500000000020010717203073015151 00000000000000 noinst_PROGRAMS = example1 example1_SOURCES = example1.c example1_CFLAGS = $(LIBOIL_CFLAGS) example1_LDADD = $(LIBOIL_LIBS) liboil-0.3.17/examples/taylor/example1.c0000644000175000017500000000654510717203073015017 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #define N 1000 static void taylor4_f32_ref (float *dest, float *src, float *tmp, float *a, int n); static void taylor4_f32_oil (float *dest, float *src, float *tmp, float *a, int n); int main(int argc, char *argv[]) { float *dest; float *src; float *tmp; float a[4]; int i; OilProfile prof; double ave, std; oil_init(); src = malloc(N*sizeof(float)); dest = malloc(N*sizeof(float)); tmp = malloc(3*N*sizeof(float)); for(i=0;i #include #include #include #include #include #define ALIGN(ptr,n) ((void *)((unsigned long)(ptr) & (~(unsigned long)(n-1)))) int main(int argc, char *argv[]) { char *s, *d; uint32_t *src, *dest; OilProfile prof; double ave, std; int i,j; double cpufreq; OilFunctionClass *klass; OilFunctionImpl *impl; int the_class; the_class = 2; oil_init (); cpufreq = 1788e6; s = malloc(1024*1024*64+1024); d = malloc(1024*1024*64+1024); src = ALIGN(s,128); dest = ALIGN(d,128); switch(the_class) { case 0: klass = oil_class_get ("splat_u32_ns"); break; case 1: klass = oil_class_get ("copy_u8"); break; case 2: klass = oil_class_get ("sum_s16"); break; } for(impl=klass->first_impl;impl;impl=impl->next) { printf("impl %s\n", impl->name); if (!oil_impl_is_usable(impl)) { printf(" not usable\n"); continue; } oil_class_choose_by_name (klass, impl->name); for(i=10;i<24;i++){ oil_profile_init (&prof); for(j=0;j<10;j++){ switch(the_class) { case 0: oil_profile_start(&prof); oil_splat_u32_ns (dest, src, 1<<(i-2)); oil_profile_stop(&prof); break; case 1: oil_profile_start(&prof); oil_memcpy (dest, src, 1< * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include #include #ifdef HAVE_INTTYPES_H #include #endif #ifndef PRIx8 #define PRIx8 "x" #define PRIx16 "x" #define PRIx32 "x" #define PRIx64 "llx" #define PRId8 "d" #define PRId16 "d" #define PRId32 "d" #define PRId64 "lld" #define PRIu8 "u" #define PRIu16 "u" #define PRIu32 "u" #define PRIu64 "llu" #endif int hex; void register_impls(void); void test(void) { int32_t dest[1]; uint8_t src[100]; int i; for(i=0;i<100;i++){ src[i] = oil_rand_u8() & 0x7f; } dest[0] = 0; oil_utf8_validate (dest, src, 100); #if 0 for(i=0;i<100;i++){ printf("%d %d\n",dest[i],src[i]); } #endif printf("%d\n", dest[0]); } void dump_array (void *data, void *ref_data, OilType type, int pre_n, int stride, int post_n) { int i, j; int s2 = oil_type_sizeof (type); double x; #define DUMP(type, format) do { \ for(i=0;i= 0.00001) { \ printf("*" format "* ", OIL_GET(data, i*stride + j*s2, type)); \ } else { \ printf(format " ", OIL_GET(data, i*stride + j*s2, type)); \ } \ } \ printf("\n"); \ } \ } while(0) if (hex) { switch(type) { case OIL_TYPE_s8p: case OIL_TYPE_u8p: DUMP(uint8_t, "%02" PRIx8); break; case OIL_TYPE_s16p: case OIL_TYPE_u16p: DUMP(uint16_t, "%04" PRIx16); break; case OIL_TYPE_s32p: case OIL_TYPE_u32p: case OIL_TYPE_f32p: DUMP(uint32_t, "%08" PRIx32); break; case OIL_TYPE_s64p: case OIL_TYPE_u64p: case OIL_TYPE_f64p: DUMP(uint64_t, "%016" PRIx64); break; default: break; } } else { switch(type) { case OIL_TYPE_s8p: DUMP(int8_t, "%" PRId8); break; case OIL_TYPE_u8p: DUMP(uint8_t, "%" PRIu8); break; case OIL_TYPE_s16p: DUMP(int16_t, "%" PRId16); break; case OIL_TYPE_u16p: DUMP(uint16_t, "%" PRIu16); break; case OIL_TYPE_s32p: DUMP(int32_t, "%" PRId32); break; case OIL_TYPE_u32p: DUMP(uint32_t, "%" PRIu32); break; case OIL_TYPE_s64p: DUMP(int64_t, "%" PRId64); break; case OIL_TYPE_u64p: DUMP(uint64_t, "%" PRIu64); break; case OIL_TYPE_f32p: DUMP(float, "%g"); break; case OIL_TYPE_f64p: DUMP(double, "%g"); break; default: break; } } } void dump_test (OilTest *test) { int i; for(i=0;iparams[i]; if (p->is_pointer) { if (p->direction == 'i' || p->direction == 'd') { printf (" %s:\n", p->parameter_name); dump_array (p->test_data + OIL_TEST_HEADER, p->ref_data + OIL_TEST_HEADER, p->type, p->pre_n, p->stride, p->post_n); } } } } void dump_source (OilTest *test) { int i; for(i=0;iparams[i]; if (p->is_pointer) { if (p->direction == 'i' || p->direction == 's') { printf (" %s:\n", p->parameter_name); dump_array (p->src_data + OIL_TEST_HEADER, p->src_data + OIL_TEST_HEADER, p->type, p->pre_n, p->stride, p->post_n); } } } } void help (void) { printf("oil-test [-x] \n"); exit(0); } int main (int argc, char *argv[]) { OilFunctionClass *klass; OilFunctionImpl *impl; OilTest *test; double ave, std; char *class_name = NULL; int i; int n = 10; srand(time(NULL)); oil_init (); for (i=1;in = n; test->m = n; impl = klass->reference_impl; ave = impl->profile_ave; std = impl->profile_std; oil_test_check_impl (test, impl); printf ("source array\n"); dump_source(test); printf ("reference impl %s\n", impl->name); printf(" ave=%g std=%g\n", ave, std); printf(" (this test) ave=%g std=%g\n", test->profile_ave, test->profile_std); dump_test(test); for (impl = klass->first_impl; impl; impl = impl->next) { if (impl == klass->reference_impl) continue; printf ("impl %s\n", impl->name); if (oil_impl_is_runnable (impl)) { printf(" ave=%g std=%g\n", impl->profile_ave, impl->profile_std); oil_test_check_impl (test, impl); printf(" (this test) ave=%g std=%g\n", test->profile_ave, test->profile_std); printf(" abs diff=%g\n", test->sum_abs_diff); dump_test(test); } } return 0; } liboil-0.3.17/examples/audioresample/0000777000175000017500000000000011332637400014530 500000000000000liboil-0.3.17/examples/audioresample/functable.c0000644000175000017500000001312610717203073016557 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2001,2006 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include "functable.h" void functable_function_sinc(double *fx, double *dfx, double x, double param1, double param2) { double y; if(x==0){ *fx = 1; *dfx = 0; return; } y = x * param1; *fx = sin(y)/y; *dfx = (cos(y) - sin(y)/y)/x; } void functable_function_boxcar(double *fx, double *dfx, double x, double param1, double param2) { double width = param1; if (x < width && x > -width) { *fx = 1; } else { *fx = 0; } *dfx = 0; } void functable_function_hanning(double *fx, double *dfx, double x, double param1, double param2) { double width = param1; if (x < width && x > -width) { x /= width; *fx = (1-x*x)*(1-x*x); *dfx = -2*2*x/width*(1-x*x); } else { *fx = 0; *dfx = 0; } } Functable * functable_new (int length, int oversample, double offset, double multiplier) { Functable *ft; ft = malloc (sizeof(Functable)); memset (ft, 0, sizeof(Functable)); ft->length = length; ft->offset = offset; ft->multiplier = multiplier; ft->oversample = oversample; ft->inv_multiplier = 1.0 / ft->multiplier; ft->submultiplier = ft->multiplier / ft->oversample; ft->inv_submultiplier = 1.0 / ft->submultiplier; ft->fx = malloc(sizeof(double)*ft->length*(ft->oversample + 1)); ft->dfx = malloc(sizeof(double)*ft->length*(ft->oversample + 1)); memset (ft->fx, 0, sizeof(double)*ft->length*(ft->oversample + 1)); memset (ft->dfx, 0, sizeof(double)*ft->length*(ft->oversample + 1)); return ft; } void functable_free (Functable *ft) { free (ft->fx); free (ft->dfx); free (ft); } void functable_calculate (Functable *t, FunctableFunc func, double param1, double param2) { int i, j; double x; double *fx; double *dfx; for(j=0;joversample + 1;j++){ fx = t->fx + t->length*j; dfx = t->dfx + t->length*j; for(i=0;ilength;i++){ x = t->offset + t->submultiplier * (i * t->oversample + j); func (&fx[i], &dfx[i], x, param1, param2); dfx[i] *= t->submultiplier; } } } void functable_calculate_multiply (Functable *t, FunctableFunc func, double param1, double param2) { int i; int j; double x; double *fx; double *dfx; double afx, dafx, bfx, dbfx; for(j=0;joversample + 1;j++){ fx = t->fx + t->length*j; dfx = t->dfx + t->length*j; for(i=0;ilength;i++){ x = t->offset + t->submultiplier * (i * t->oversample + j); afx = fx[i]; dafx = dfx[i]; func (&bfx, &dbfx, x, param1, param2); fx[i] = afx * bfx; dfx[i] = afx * dbfx + dafx * bfx; } } } double functable_evaluate (Functable *t, double x) { int i, j; double f0, f1, w0, w1; double x2, x3; double w; double *fx1, *fx2; double *dfx1, *dfx2; int xi; if(xoffset || x>(t->offset+t->length*t->multiplier)){ OIL_DEBUG ("x out of range %g",x); return 0; } x -= t->offset; x *= t->inv_submultiplier; xi = floor(x); j = xi % t->oversample; i = xi / t->oversample; x -= xi; fx1 = t->fx + j*t->length; fx2 = t->fx + (j+1)*t->length; dfx1 = t->dfx + j*t->length; dfx2 = t->dfx + (j+1)*t->length; x2 = x * x; x3 = x2 * x; f1 = 3 * x2 - 2 * x3; f0 = 1 - f1; w0 = x - 2 * x2 + x3; w1 = -x2 + x3; w = fx1[i] * f0 + fx2[i] * f1 + dfx1[i] * w0 + dfx2[i] * w1; return w; } double functable_mult_and_sum (Functable *t, double x, double *data, int n) { int i, j; double f0, f1, w0, w1; double x2, x3; double w; double *fx1, *fx2; double *dfx1, *dfx2; int xi; double sum; if(xoffset || x>(t->offset+t->length*t->multiplier)){ OIL_DEBUG ("x out of range %g",x); return 0; } x -= t->offset; x *= t->inv_submultiplier; xi = floor(x); j = xi % t->oversample; i = xi / t->oversample; x -= xi; fx1 = t->fx + j*t->length + i; fx2 = t->fx + (j+1)*t->length + i; dfx1 = t->dfx + j*t->length + i; dfx2 = t->dfx + (j+1)*t->length + i; x2 = x * x; x3 = x2 * x; f1 = 3 * x2 - 2 * x3; f0 = 1 - f1; w0 = x - 2 * x2 + x3; w1 = -x2 + x3; sum = 0; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __RESAMPLE_H__ #define __RESAMPLE_H__ #include "functable.h" typedef enum { RESAMPLE_FORMAT_S16 = 0, RESAMPLE_FORMAT_S32, RESAMPLE_FORMAT_F32, RESAMPLE_FORMAT_F64 } ResampleFormat; typedef void (*ResampleCallback) (void *); typedef struct _ResampleState ResampleState; struct _ResampleState { /* static parameters */ int n_channels; ResampleFormat format; /* dynamic parameters */ int filter_length; int ratio_n; int ratio_d; double sinc_scale; int oversample; /* internal parameters */ void *last_buffer; int need_reinit; int sample_size; Functable *ft; void *forward_data; int forward_samples; /* filter state */ int eos; void *buffer; int buffer_len; int offset; }; void resample_init(void); ResampleState *resample_new (ResampleFormat format, int n_channels); void resample_free (ResampleState *state); void resample_set_filter_length (ResampleState *r, int length); void resample_set_ratio (ResampleState *r, int n, int d); int resample_get_sample_size (ResampleState *r); void resample_preload_data (ResampleState * r, void *data, int n_samples); void resample_set_offset (ResampleState *r, int offset); int resample_get_offset (ResampleState *r); void resample_push_data (ResampleState * r, void *data, int n_samples); void resample_push_eos (ResampleState *r); int resample_get_output_size (ResampleState *r); void resample_get_output_data (ResampleState *r, void *data, int size); #endif /* __RESAMPLE_H__ */ liboil-0.3.17/examples/audioresample/Makefile.am0000644000175000017500000000106610717203073016504 00000000000000 noinst_PROGRAMS = test_functable1 noinst_LTLIBRARIES = libaudioresample.la #noinst_PROGRAMS = audioresample_test libaudioresample_la_SOURCES = functable.c resample.c libaudioresample_la_CFLAGS = $(LIBOIL_CFLAGS) $(GLIB_CFLAGS) noinst_HEADERS = functable.h resample.h #audioresample_test_SOURCES = test.c #audioresample_test_CFLAGS = $(LIBOIL_CFLAGS) #audioresample_test_LDADD = libaudioresample.la $(LIBOIL_LIBS) test_functable1_SOURCES = test_functable1.c test_functable1_CFLAGS = $(LIBOIL_CFLAGS) test_functable1_LDADD = libaudioresample.la $(LIBOIL_LIBS) liboil-0.3.17/examples/audioresample/functable.h0000644000175000017500000000451710717203073016570 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2001,2006 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef __FUNCTABLE_H__ #define __FUNCTABLE_H__ typedef void FunctableFunc (double *fx, double *dfx, double x, double param1, double param2); typedef struct _Functable Functable; struct _Functable { int length; int oversample; double offset; double multiplier; double submultiplier; double inv_multiplier; double inv_submultiplier; double *fx; double *dfx; }; Functable *functable_new (int length, int oversample, double offset, double multiplier); void functable_free (Functable *t); void functable_calculate (Functable *t, FunctableFunc func, double param1, double param2); void functable_calculate_multiply (Functable *t, FunctableFunc func, double param1, double param2); double functable_evaluate (Functable *t, double x); double functable_mult_and_sum (Functable *t, double x0, double *data, int n); FunctableFunc functable_function_sinc; FunctableFunc functable_function_boxcar; FunctableFunc functable_function_hanning; #endif /* __FUNCTABLE_H__ */ liboil-0.3.17/examples/audioresample/test_functable1.c0000644000175000017500000000372510717203073017703 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2001,2006 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include "functable.h" void dump_functable(Functable *ft); int main (int argc, char *argv[]) { Functable *ft; ft = functable_new (10, 10, -10.0, 2.0); functable_calculate (ft, functable_function_sinc, M_PI, 0); dump_functable(ft); functable_free(ft); return 0; } void dump_functable(Functable *ft) { int i; double x; for(i=0;i<2000;i++){ x = -10.0 + 0.01*i; printf("%g %g\n", x, functable_evaluate (ft, x)); } } liboil-0.3.17/examples/audioresample/resample.c0000644000175000017500000001041110717203073016416 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2001,2006 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include "resample.h" #define MAX_FILTER_LENGTH 64 #define OFFSET(ptr,offset) ((void *)((uint8_t *)(ptr) + (offset)) ) static int resample_format_size (ResampleFormat format); void resample_scale_ref (ResampleState * r); void resample_scale_functable (ResampleState * r); void resample_init (void) { static int inited = 0; if (!inited) { oil_init (); inited = 1; } } ResampleState * resample_new (ResampleFormat format, int n_channels) { ResampleState *r; int size; r = malloc(sizeof(ResampleState)); memset(r,0,sizeof(ResampleState)); r->format = format; r->n_channels = n_channels; r->filter_length = 16; r->ratio_n = 1; r->ratio_d = 1; r->sinc_scale = 1.0; r->oversample = 10; r->sample_size = resample_format_size (r->format) * r->n_channels; size = MAX_FILTER_LENGTH * r->sample_size; r->last_buffer = malloc (size); memset (r->last_buffer, 0, size); r->ft = functable_new(r->filter_length, r->oversample, -0.5*r->filter_length, 1.0); functable_calculate (r->ft, functable_function_sinc, M_PI, 0); r->need_reinit = 1; return r; } static int resample_format_size (ResampleFormat format) { switch(format){ case RESAMPLE_FORMAT_S16: return 2; case RESAMPLE_FORMAT_S32: case RESAMPLE_FORMAT_F32: return 4; case RESAMPLE_FORMAT_F64: return 8; } return 0; } void resample_free (ResampleState * r) { if (r->last_buffer) { free (r->last_buffer); } if (r->ft) { functable_free (r->ft); } free (r); } void resample_set_filter_length (ResampleState *r, int length) { r->filter_length = length; /* FIXME adjust the buffer */ } void resample_set_ratio (ResampleState *r, int n, int d) { r->ratio_n = n; r->ratio_d = d; /* FIXME adjust offset */ } int resample_get_sample_size (ResampleState *r) { return r->sample_size; } void resample_preload_data (ResampleState *r, void *data, int n_samples) { if (n_samples > r->filter_length) { data = OFFSET(data, r->sample_size * (n_samples - r->filter_length)); n_samples = r->filter_length; } memcpy (OFFSET(r->buffer, r->sample_size * (r->filter_length - n_samples)), data, r->sample_size * n_samples); } void resample_set_offset (ResampleState *r, int offset) { r->offset = offset; /* FIXME */ } int resample_get_offset (ResampleState *r) { return r->offset; } void resample_push_data (ResampleState * r, void *data, int n_samples) { r->forward_data = data; r->forward_samples = n_samples; } void resample_push_eos (ResampleState *r) { r->eos = 1; } int resample_get_output_size (ResampleState *r) { if (r->eos) { return 42; } else { return 43; } } void resample_get_output_data (ResampleState *r, void *data, int size) { /* FIXME do stuff */ } liboil-0.3.17/examples/audioresample/Makefile.in0000644000175000017500000005225411332627670016531 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = test_functable1$(EXEEXT) subdir = examples/audioresample DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libaudioresample_la_LIBADD = am_libaudioresample_la_OBJECTS = libaudioresample_la-functable.lo \ libaudioresample_la-resample.lo libaudioresample_la_OBJECTS = $(am_libaudioresample_la_OBJECTS) libaudioresample_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libaudioresample_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ PROGRAMS = $(noinst_PROGRAMS) am_test_functable1_OBJECTS = \ test_functable1-test_functable1.$(OBJEXT) test_functable1_OBJECTS = $(am_test_functable1_OBJECTS) am__DEPENDENCIES_1 = test_functable1_DEPENDENCIES = libaudioresample.la \ $(am__DEPENDENCIES_1) test_functable1_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(test_functable1_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libaudioresample_la_SOURCES) $(test_functable1_SOURCES) DIST_SOURCES = $(libaudioresample_la_SOURCES) \ $(test_functable1_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libaudioresample.la #noinst_PROGRAMS = audioresample_test libaudioresample_la_SOURCES = functable.c resample.c libaudioresample_la_CFLAGS = $(LIBOIL_CFLAGS) $(GLIB_CFLAGS) noinst_HEADERS = functable.h resample.h #audioresample_test_SOURCES = test.c #audioresample_test_CFLAGS = $(LIBOIL_CFLAGS) #audioresample_test_LDADD = libaudioresample.la $(LIBOIL_LIBS) test_functable1_SOURCES = test_functable1.c test_functable1_CFLAGS = $(LIBOIL_CFLAGS) test_functable1_LDADD = libaudioresample.la $(LIBOIL_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/audioresample/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/audioresample/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libaudioresample.la: $(libaudioresample_la_OBJECTS) $(libaudioresample_la_DEPENDENCIES) $(libaudioresample_la_LINK) $(libaudioresample_la_OBJECTS) $(libaudioresample_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list test_functable1$(EXEEXT): $(test_functable1_OBJECTS) $(test_functable1_DEPENDENCIES) @rm -f test_functable1$(EXEEXT) $(test_functable1_LINK) $(test_functable1_OBJECTS) $(test_functable1_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libaudioresample_la-functable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libaudioresample_la-resample.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_functable1-test_functable1.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libaudioresample_la-functable.lo: functable.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libaudioresample_la_CFLAGS) $(CFLAGS) -MT libaudioresample_la-functable.lo -MD -MP -MF $(DEPDIR)/libaudioresample_la-functable.Tpo -c -o libaudioresample_la-functable.lo `test -f 'functable.c' || echo '$(srcdir)/'`functable.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libaudioresample_la-functable.Tpo $(DEPDIR)/libaudioresample_la-functable.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='functable.c' object='libaudioresample_la-functable.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libaudioresample_la_CFLAGS) $(CFLAGS) -c -o libaudioresample_la-functable.lo `test -f 'functable.c' || echo '$(srcdir)/'`functable.c libaudioresample_la-resample.lo: resample.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libaudioresample_la_CFLAGS) $(CFLAGS) -MT libaudioresample_la-resample.lo -MD -MP -MF $(DEPDIR)/libaudioresample_la-resample.Tpo -c -o libaudioresample_la-resample.lo `test -f 'resample.c' || echo '$(srcdir)/'`resample.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libaudioresample_la-resample.Tpo $(DEPDIR)/libaudioresample_la-resample.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resample.c' object='libaudioresample_la-resample.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libaudioresample_la_CFLAGS) $(CFLAGS) -c -o libaudioresample_la-resample.lo `test -f 'resample.c' || echo '$(srcdir)/'`resample.c test_functable1-test_functable1.o: test_functable1.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_functable1_CFLAGS) $(CFLAGS) -MT test_functable1-test_functable1.o -MD -MP -MF $(DEPDIR)/test_functable1-test_functable1.Tpo -c -o test_functable1-test_functable1.o `test -f 'test_functable1.c' || echo '$(srcdir)/'`test_functable1.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_functable1-test_functable1.Tpo $(DEPDIR)/test_functable1-test_functable1.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_functable1.c' object='test_functable1-test_functable1.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_functable1_CFLAGS) $(CFLAGS) -c -o test_functable1-test_functable1.o `test -f 'test_functable1.c' || echo '$(srcdir)/'`test_functable1.c test_functable1-test_functable1.obj: test_functable1.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_functable1_CFLAGS) $(CFLAGS) -MT test_functable1-test_functable1.obj -MD -MP -MF $(DEPDIR)/test_functable1-test_functable1.Tpo -c -o test_functable1-test_functable1.obj `if test -f 'test_functable1.c'; then $(CYGPATH_W) 'test_functable1.c'; else $(CYGPATH_W) '$(srcdir)/test_functable1.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/test_functable1-test_functable1.Tpo $(DEPDIR)/test_functable1-test_functable1.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='test_functable1.c' object='test_functable1-test_functable1.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_functable1_CFLAGS) $(CFLAGS) -c -o test_functable1-test_functable1.obj `if test -f 'test_functable1.c'; then $(CYGPATH_W) 'test_functable1.c'; else $(CYGPATH_W) '$(srcdir)/test_functable1.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/examples/oil-random.c0000644000175000017500000000327010717203073014022 00000000000000 #include #include #include #include #include typedef struct _OilRandomState OilRandomState; struct _OilRandomState { int index; uint32_t mt[624]; uint32_t bits[624]; }; OilRandomState state; static void _oil_random_init (void); uint32_t oil_random_get_int (OilRandomState *state); void oil_random_get_bits (OilRandomState *state, uint8_t *dest, int n); int main (int argc, char *argv[]) { int i; uint32_t a[10]; oil_init(); _oil_random_init(); for(i=0;i<10;i++){ printf("%d\n", oil_random_get_int(&state)); } oil_random_get_bits (&state, (void *)a, 10*4); for(i=0;i<10;i++){ printf("%d\n", a[i]); } return 0; } void oil_random_state_seed (OilRandomState *state, uint32_t seed) { uint32_t *mt = state->mt; int i; mt[0] = seed; for(i=1;i<624;i++) { mt[i] = (1812433253UL * (mt[i-1] ^ (mt[i-1] >> 30)) + i); } oil_mt19937 (state->bits, state->mt); state->index = 0; } static void _oil_random_init (void) { int seed; seed = time(NULL); OIL_ERROR("seed is %d", seed); oil_random_state_seed (&state, seed); } uint32_t oil_random_get_int (OilRandomState *state) { if (state->index >= 624) { oil_mt19937 (state->bits, state->mt); state->index = 0; } return state->bits[state->index++]; } void oil_random_get_bits (OilRandomState *state, uint8_t *dest, int n) { int i = state->index * 4; int m; while(n > 0) { if (i >= 624*4) { oil_mt19937 (state->bits, state->mt); i = 0; } m = n; if (m > 624*4 - i) m = 624*4 - i; memcpy (dest, ((uint8_t *)state->bits) + i, m); i += m; n -= m; } state->index = (i+3)/4; } liboil-0.3.17/examples/example1.c0000644000175000017500000000343310717203073013476 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include int main(int argc, char *argv[]) { double *dest; int32_t *src; int i; oil_init(); src = malloc(100*sizeof(int32_t)); dest = malloc(100*sizeof(double)); for(i=0;i<100;i++){ src[i] = i; } oil_conv_f64_s32 (dest, sizeof(double), src, sizeof(int32_t), 100); for(i=0;i<100;i++){ printf("%d %g\n",src[i],dest[i]); } return 0; } liboil-0.3.17/examples/oil-bugreport.c0000644000175000017500000001313610717203073014555 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include #include #if 0 int retval = EXIT_SUCCESS; static void printerr (char *format, ...) { va_list var_args; va_start (var_args, format); vfprintf (stderr, format, var_args); va_end (var_args); retval = EXIT_FAILURE; } static char * string_append (char *str, const char *append) { char *ret; if (str) { size_t size = strlen (str) + 2 + strlen (append) + 1; ret = malloc (size); snprintf (ret, size, "%s, %s", str, append); free (str); } else { ret = strdup (append); } return ret; } static char * oil_flags_to_string (unsigned int flags) { char *ret = NULL; if (flags & OIL_IMPL_FLAG_REF) ret = string_append (ret, "REF"); if (flags & OIL_IMPL_FLAG_OPT) ret = string_append (ret, "altopt"); if (flags & OIL_IMPL_FLAG_ASM) ret = string_append (ret, "asm"); #ifdef HAVE_CPU_I386 if (flags & OIL_IMPL_FLAG_CMOV) ret = string_append (ret, "cmov"); if (flags & OIL_IMPL_FLAG_MMX) ret = string_append (ret, "mmx"); if (flags & OIL_IMPL_FLAG_SSE) ret = string_append (ret, "sse"); if (flags & OIL_IMPL_FLAG_MMXEXT) ret = string_append (ret, "mmxext"); if (flags & OIL_IMPL_FLAG_SSE2) ret = string_append (ret, "sse2"); if (flags & OIL_IMPL_FLAG_3DNOW) ret = string_append (ret, "3dnow"); if (flags & OIL_IMPL_FLAG_3DNOWEXT) ret = string_append (ret, "3dnowext"); #endif #ifdef HAVE_CPU_PPC if (flags & OIL_IMPL_FLAG_ALTIVEC) ret = string_append (ret, "altivec"); #endif return ret; } #endif #if 0 static void oil_print_impl (OilFunctionImpl *impl, OilTest *test, char* prefix) { char *c; unsigned int cpu_flags = oil_cpu_get_flags(); oil_test_check_impl (test, impl); printf ("%s%s\n", prefix, impl->name); c = oil_flags_to_string (impl->flags); if (c) { printf ("%s flags: %s\n", prefix, c); free (c); } if (impl->profile_ave) { printf ("%s profile: %g ticks (std.dev. %g)\n", prefix, impl->profile_ave, impl->profile_std); } if (test && !(impl->flags & OIL_IMPL_FLAG_REF)) { printf ("%s sum abs difference: %g (n=%d)\n", prefix, test->sum_abs_diff, test->n_points); } if ((impl->flags & OIL_CPU_FLAG_MASK) & (~cpu_flags)) { printf ("%s disabled\n", prefix); } } #endif #if 0 static int impl_compare (const void *a, const void *b) { const OilFunctionImpl *ia = *(OilFunctionImpl **)a; const OilFunctionImpl *ib = *(OilFunctionImpl **)b; if (ia->profile_ave < ib->profile_ave) return -1; if (ia->profile_ave > ib->profile_ave) return 1; return 0; } #endif static int get_n_impls(OilFunctionClass *klass) { OilFunctionImpl *impl; int n; n = 0; for(impl=klass->first_impl;impl;impl=impl->next)n++; return n; } static void oil_print_class (OilFunctionClass *klass, int verbose) { int n_impls; n_impls = get_n_impls(klass); printf ("%-20s %d %-10g %-10g %-10.3g %s %s\n", klass->name, n_impls, klass->reference_impl->profile_ave, klass->chosen_impl->profile_ave, klass->reference_impl->profile_ave/klass->chosen_impl->profile_ave, (klass->chosen_impl->flags & OIL_IMPL_FLAG_OPT)?"*":" ", klass->chosen_impl->name ); } static void oil_print_all (void) { int i; int n; n = oil_class_get_n_classes (); for (i = 0; i < n; i++){ OilFunctionClass *klass = oil_class_get_by_index (i); oil_print_class (klass, 0); } } static void _debug_print_valist (int level, const char *file, const char *func, int line, const char *format, va_list args) { static const char *level_names[] = { "NONE", "ERROR", "WARNING", "INFO", "DEBUG", "LOG" }; const char *level_name = "unknown"; if (level > 3) return; if(level>=OIL_DEBUG_NONE && level<=OIL_DEBUG_LOG){ level_name = level_names[level]; } fprintf (stdout, "OIL: %s %s %d: %s(): ", level_name, file, line, func); vfprintf (stdout, format, args); fprintf (stdout, "\n"); } int main (int argc, char *argv[]) { oil_debug_set_print_function (_debug_print_valist); oil_init(); oil_print_all (); return 0; } liboil-0.3.17/examples/Makefile.in0000644000175000017500000014236411332627670013701 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = oil-bugreport$(EXEEXT) noinst_PROGRAMS = example1$(EXEEXT) oil-graph$(EXEEXT) \ oil-inspect$(EXEEXT) oil-test$(EXEEXT) memcpy-speed$(EXEEXT) \ oil-suggest$(EXEEXT) printcpu$(EXEEXT) oil-mt19937$(EXEEXT) \ report$(EXEEXT) oil-random$(EXEEXT) subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_example1_OBJECTS = example1-example1.$(OBJEXT) example1_OBJECTS = $(am_example1_OBJECTS) am__DEPENDENCIES_1 = example1_DEPENDENCIES = $(am__DEPENDENCIES_1) example1_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(example1_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_memcpy_speed_OBJECTS = memcpy_speed-memcpy-speed.$(OBJEXT) memcpy_speed_OBJECTS = $(am_memcpy_speed_OBJECTS) memcpy_speed_DEPENDENCIES = $(am__DEPENDENCIES_1) memcpy_speed_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(memcpy_speed_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_oil_bugreport_OBJECTS = oil_bugreport-oil-bugreport.$(OBJEXT) oil_bugreport_OBJECTS = $(am_oil_bugreport_OBJECTS) oil_bugreport_DEPENDENCIES = $(am__DEPENDENCIES_1) oil_bugreport_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(oil_bugreport_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_oil_graph_OBJECTS = oil_graph-oil-graph.$(OBJEXT) oil_graph_OBJECTS = $(am_oil_graph_OBJECTS) oil_graph_DEPENDENCIES = $(am__DEPENDENCIES_1) oil_graph_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(oil_graph_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_oil_inspect_OBJECTS = oil_inspect-oil-inspect.$(OBJEXT) oil_inspect_OBJECTS = $(am_oil_inspect_OBJECTS) oil_inspect_DEPENDENCIES = $(am__DEPENDENCIES_1) oil_inspect_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(oil_inspect_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_oil_mt19937_OBJECTS = oil_mt19937-oil-mt19937.$(OBJEXT) oil_mt19937_OBJECTS = $(am_oil_mt19937_OBJECTS) oil_mt19937_DEPENDENCIES = $(am__DEPENDENCIES_1) oil_mt19937_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(oil_mt19937_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_oil_random_OBJECTS = oil_random-oil-random.$(OBJEXT) oil_random_OBJECTS = $(am_oil_random_OBJECTS) oil_random_DEPENDENCIES = $(am__DEPENDENCIES_1) oil_random_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(oil_random_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_oil_suggest_OBJECTS = oil_suggest-oil-suggest.$(OBJEXT) oil_suggest_OBJECTS = $(am_oil_suggest_OBJECTS) oil_suggest_DEPENDENCIES = $(am__DEPENDENCIES_1) oil_suggest_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(oil_suggest_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_oil_test_OBJECTS = oil_test-oil-test.$(OBJEXT) oil_test_OBJECTS = $(am_oil_test_OBJECTS) oil_test_DEPENDENCIES = $(am__DEPENDENCIES_1) oil_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(oil_test_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_printcpu_OBJECTS = printcpu-printcpu.$(OBJEXT) printcpu_OBJECTS = $(am_printcpu_OBJECTS) printcpu_DEPENDENCIES = $(am__DEPENDENCIES_1) printcpu_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(printcpu_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_report_OBJECTS = report-report.$(OBJEXT) report_OBJECTS = $(am_report_OBJECTS) report_DEPENDENCIES = $(am__DEPENDENCIES_1) report_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(report_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(example1_SOURCES) $(memcpy_speed_SOURCES) \ $(oil_bugreport_SOURCES) $(oil_graph_SOURCES) \ $(oil_inspect_SOURCES) $(oil_mt19937_SOURCES) \ $(oil_random_SOURCES) $(oil_suggest_SOURCES) \ $(oil_test_SOURCES) $(printcpu_SOURCES) $(report_SOURCES) DIST_SOURCES = $(example1_SOURCES) $(memcpy_speed_SOURCES) \ $(oil_bugreport_SOURCES) $(oil_graph_SOURCES) \ $(oil_inspect_SOURCES) $(oil_mt19937_SOURCES) \ $(oil_random_SOURCES) $(oil_suggest_SOURCES) \ $(oil_test_SOURCES) $(printcpu_SOURCES) $(report_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = jpeg md5 uberopt work huffman taylor videoscale audioresample example1_SOURCES = example1.c example1_CFLAGS = $(LIBOIL_CFLAGS) example1_LDADD = $(LIBOIL_LIBS) oil_graph_SOURCES = oil-graph.c oil_graph_CFLAGS = $(LIBOIL_CFLAGS) oil_graph_LDADD = $(LIBOIL_LIBS) oil_inspect_SOURCES = oil-inspect.c oil_inspect_CFLAGS = $(LIBOIL_CFLAGS) oil_inspect_LDADD = $(LIBOIL_LIBS) oil_suggest_SOURCES = oil-suggest.c oil_suggest_CFLAGS = $(LIBOIL_CFLAGS) oil_suggest_LDADD = $(LIBOIL_LIBS) oil_test_SOURCES = oil-test.c oil_test_CFLAGS = $(LIBOIL_CFLAGS) oil_test_LDADD = $(LIBOIL_LIBS) oil_bugreport_SOURCES = oil-bugreport.c oil_bugreport_CFLAGS = $(LIBOIL_CFLAGS) oil_bugreport_LDADD = $(LIBOIL_LIBS) report_SOURCES = report.c report_CFLAGS = $(LIBOIL_CFLAGS) report_LDADD = $(LIBOIL_LIBS) memcpy_speed_SOURCES = memcpy-speed.c memcpy_speed_CFLAGS = $(LIBOIL_CFLAGS) memcpy_speed_LDADD = $(LIBOIL_LIBS) printcpu_SOURCES = printcpu.c printcpu_CFLAGS = $(LIBOIL_CFLAGS) printcpu_LDADD = $(LIBOIL_LIBS) oil_mt19937_SOURCES = oil-mt19937.c oil_mt19937_CFLAGS = $(LIBOIL_CFLAGS) oil_mt19937_LDADD = $(LIBOIL_LIBS) oil_random_SOURCES = oil-random.c oil_random_CFLAGS = $(LIBOIL_CFLAGS) oil_random_LDADD = $(LIBOIL_LIBS) all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list example1$(EXEEXT): $(example1_OBJECTS) $(example1_DEPENDENCIES) @rm -f example1$(EXEEXT) $(example1_LINK) $(example1_OBJECTS) $(example1_LDADD) $(LIBS) memcpy-speed$(EXEEXT): $(memcpy_speed_OBJECTS) $(memcpy_speed_DEPENDENCIES) @rm -f memcpy-speed$(EXEEXT) $(memcpy_speed_LINK) $(memcpy_speed_OBJECTS) $(memcpy_speed_LDADD) $(LIBS) oil-bugreport$(EXEEXT): $(oil_bugreport_OBJECTS) $(oil_bugreport_DEPENDENCIES) @rm -f oil-bugreport$(EXEEXT) $(oil_bugreport_LINK) $(oil_bugreport_OBJECTS) $(oil_bugreport_LDADD) $(LIBS) oil-graph$(EXEEXT): $(oil_graph_OBJECTS) $(oil_graph_DEPENDENCIES) @rm -f oil-graph$(EXEEXT) $(oil_graph_LINK) $(oil_graph_OBJECTS) $(oil_graph_LDADD) $(LIBS) oil-inspect$(EXEEXT): $(oil_inspect_OBJECTS) $(oil_inspect_DEPENDENCIES) @rm -f oil-inspect$(EXEEXT) $(oil_inspect_LINK) $(oil_inspect_OBJECTS) $(oil_inspect_LDADD) $(LIBS) oil-mt19937$(EXEEXT): $(oil_mt19937_OBJECTS) $(oil_mt19937_DEPENDENCIES) @rm -f oil-mt19937$(EXEEXT) $(oil_mt19937_LINK) $(oil_mt19937_OBJECTS) $(oil_mt19937_LDADD) $(LIBS) oil-random$(EXEEXT): $(oil_random_OBJECTS) $(oil_random_DEPENDENCIES) @rm -f oil-random$(EXEEXT) $(oil_random_LINK) $(oil_random_OBJECTS) $(oil_random_LDADD) $(LIBS) oil-suggest$(EXEEXT): $(oil_suggest_OBJECTS) $(oil_suggest_DEPENDENCIES) @rm -f oil-suggest$(EXEEXT) $(oil_suggest_LINK) $(oil_suggest_OBJECTS) $(oil_suggest_LDADD) $(LIBS) oil-test$(EXEEXT): $(oil_test_OBJECTS) $(oil_test_DEPENDENCIES) @rm -f oil-test$(EXEEXT) $(oil_test_LINK) $(oil_test_OBJECTS) $(oil_test_LDADD) $(LIBS) printcpu$(EXEEXT): $(printcpu_OBJECTS) $(printcpu_DEPENDENCIES) @rm -f printcpu$(EXEEXT) $(printcpu_LINK) $(printcpu_OBJECTS) $(printcpu_LDADD) $(LIBS) report$(EXEEXT): $(report_OBJECTS) $(report_DEPENDENCIES) @rm -f report$(EXEEXT) $(report_LINK) $(report_OBJECTS) $(report_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/example1-example1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memcpy_speed-memcpy-speed.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oil_bugreport-oil-bugreport.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oil_graph-oil-graph.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oil_inspect-oil-inspect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oil_mt19937-oil-mt19937.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oil_random-oil-random.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oil_suggest-oil-suggest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oil_test-oil-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printcpu-printcpu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/report-report.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< example1-example1.o: example1.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(example1_CFLAGS) $(CFLAGS) -MT example1-example1.o -MD -MP -MF $(DEPDIR)/example1-example1.Tpo -c -o example1-example1.o `test -f 'example1.c' || echo '$(srcdir)/'`example1.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/example1-example1.Tpo $(DEPDIR)/example1-example1.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='example1.c' object='example1-example1.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(example1_CFLAGS) $(CFLAGS) -c -o example1-example1.o `test -f 'example1.c' || echo '$(srcdir)/'`example1.c example1-example1.obj: example1.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(example1_CFLAGS) $(CFLAGS) -MT example1-example1.obj -MD -MP -MF $(DEPDIR)/example1-example1.Tpo -c -o example1-example1.obj `if test -f 'example1.c'; then $(CYGPATH_W) 'example1.c'; else $(CYGPATH_W) '$(srcdir)/example1.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/example1-example1.Tpo $(DEPDIR)/example1-example1.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='example1.c' object='example1-example1.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(example1_CFLAGS) $(CFLAGS) -c -o example1-example1.obj `if test -f 'example1.c'; then $(CYGPATH_W) 'example1.c'; else $(CYGPATH_W) '$(srcdir)/example1.c'; fi` memcpy_speed-memcpy-speed.o: memcpy-speed.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(memcpy_speed_CFLAGS) $(CFLAGS) -MT memcpy_speed-memcpy-speed.o -MD -MP -MF $(DEPDIR)/memcpy_speed-memcpy-speed.Tpo -c -o memcpy_speed-memcpy-speed.o `test -f 'memcpy-speed.c' || echo '$(srcdir)/'`memcpy-speed.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/memcpy_speed-memcpy-speed.Tpo $(DEPDIR)/memcpy_speed-memcpy-speed.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='memcpy-speed.c' object='memcpy_speed-memcpy-speed.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(memcpy_speed_CFLAGS) $(CFLAGS) -c -o memcpy_speed-memcpy-speed.o `test -f 'memcpy-speed.c' || echo '$(srcdir)/'`memcpy-speed.c memcpy_speed-memcpy-speed.obj: memcpy-speed.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(memcpy_speed_CFLAGS) $(CFLAGS) -MT memcpy_speed-memcpy-speed.obj -MD -MP -MF $(DEPDIR)/memcpy_speed-memcpy-speed.Tpo -c -o memcpy_speed-memcpy-speed.obj `if test -f 'memcpy-speed.c'; then $(CYGPATH_W) 'memcpy-speed.c'; else $(CYGPATH_W) '$(srcdir)/memcpy-speed.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/memcpy_speed-memcpy-speed.Tpo $(DEPDIR)/memcpy_speed-memcpy-speed.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='memcpy-speed.c' object='memcpy_speed-memcpy-speed.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(memcpy_speed_CFLAGS) $(CFLAGS) -c -o memcpy_speed-memcpy-speed.obj `if test -f 'memcpy-speed.c'; then $(CYGPATH_W) 'memcpy-speed.c'; else $(CYGPATH_W) '$(srcdir)/memcpy-speed.c'; fi` oil_bugreport-oil-bugreport.o: oil-bugreport.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_bugreport_CFLAGS) $(CFLAGS) -MT oil_bugreport-oil-bugreport.o -MD -MP -MF $(DEPDIR)/oil_bugreport-oil-bugreport.Tpo -c -o oil_bugreport-oil-bugreport.o `test -f 'oil-bugreport.c' || echo '$(srcdir)/'`oil-bugreport.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/oil_bugreport-oil-bugreport.Tpo $(DEPDIR)/oil_bugreport-oil-bugreport.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oil-bugreport.c' object='oil_bugreport-oil-bugreport.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_bugreport_CFLAGS) $(CFLAGS) -c -o oil_bugreport-oil-bugreport.o `test -f 'oil-bugreport.c' || echo '$(srcdir)/'`oil-bugreport.c oil_bugreport-oil-bugreport.obj: oil-bugreport.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_bugreport_CFLAGS) $(CFLAGS) -MT oil_bugreport-oil-bugreport.obj -MD -MP -MF $(DEPDIR)/oil_bugreport-oil-bugreport.Tpo -c -o oil_bugreport-oil-bugreport.obj `if test -f 'oil-bugreport.c'; then $(CYGPATH_W) 'oil-bugreport.c'; else $(CYGPATH_W) '$(srcdir)/oil-bugreport.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/oil_bugreport-oil-bugreport.Tpo $(DEPDIR)/oil_bugreport-oil-bugreport.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oil-bugreport.c' object='oil_bugreport-oil-bugreport.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_bugreport_CFLAGS) $(CFLAGS) -c -o oil_bugreport-oil-bugreport.obj `if test -f 'oil-bugreport.c'; then $(CYGPATH_W) 'oil-bugreport.c'; else $(CYGPATH_W) '$(srcdir)/oil-bugreport.c'; fi` oil_graph-oil-graph.o: oil-graph.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_graph_CFLAGS) $(CFLAGS) -MT oil_graph-oil-graph.o -MD -MP -MF $(DEPDIR)/oil_graph-oil-graph.Tpo -c -o oil_graph-oil-graph.o `test -f 'oil-graph.c' || echo '$(srcdir)/'`oil-graph.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/oil_graph-oil-graph.Tpo $(DEPDIR)/oil_graph-oil-graph.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oil-graph.c' object='oil_graph-oil-graph.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_graph_CFLAGS) $(CFLAGS) -c -o oil_graph-oil-graph.o `test -f 'oil-graph.c' || echo '$(srcdir)/'`oil-graph.c oil_graph-oil-graph.obj: oil-graph.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_graph_CFLAGS) $(CFLAGS) -MT oil_graph-oil-graph.obj -MD -MP -MF $(DEPDIR)/oil_graph-oil-graph.Tpo -c -o oil_graph-oil-graph.obj `if test -f 'oil-graph.c'; then $(CYGPATH_W) 'oil-graph.c'; else $(CYGPATH_W) '$(srcdir)/oil-graph.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/oil_graph-oil-graph.Tpo $(DEPDIR)/oil_graph-oil-graph.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oil-graph.c' object='oil_graph-oil-graph.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_graph_CFLAGS) $(CFLAGS) -c -o oil_graph-oil-graph.obj `if test -f 'oil-graph.c'; then $(CYGPATH_W) 'oil-graph.c'; else $(CYGPATH_W) '$(srcdir)/oil-graph.c'; fi` oil_inspect-oil-inspect.o: oil-inspect.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_inspect_CFLAGS) $(CFLAGS) -MT oil_inspect-oil-inspect.o -MD -MP -MF $(DEPDIR)/oil_inspect-oil-inspect.Tpo -c -o oil_inspect-oil-inspect.o `test -f 'oil-inspect.c' || echo '$(srcdir)/'`oil-inspect.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/oil_inspect-oil-inspect.Tpo $(DEPDIR)/oil_inspect-oil-inspect.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oil-inspect.c' object='oil_inspect-oil-inspect.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_inspect_CFLAGS) $(CFLAGS) -c -o oil_inspect-oil-inspect.o `test -f 'oil-inspect.c' || echo '$(srcdir)/'`oil-inspect.c oil_inspect-oil-inspect.obj: oil-inspect.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_inspect_CFLAGS) $(CFLAGS) -MT oil_inspect-oil-inspect.obj -MD -MP -MF $(DEPDIR)/oil_inspect-oil-inspect.Tpo -c -o oil_inspect-oil-inspect.obj `if test -f 'oil-inspect.c'; then $(CYGPATH_W) 'oil-inspect.c'; else $(CYGPATH_W) '$(srcdir)/oil-inspect.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/oil_inspect-oil-inspect.Tpo $(DEPDIR)/oil_inspect-oil-inspect.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oil-inspect.c' object='oil_inspect-oil-inspect.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_inspect_CFLAGS) $(CFLAGS) -c -o oil_inspect-oil-inspect.obj `if test -f 'oil-inspect.c'; then $(CYGPATH_W) 'oil-inspect.c'; else $(CYGPATH_W) '$(srcdir)/oil-inspect.c'; fi` oil_mt19937-oil-mt19937.o: oil-mt19937.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_mt19937_CFLAGS) $(CFLAGS) -MT oil_mt19937-oil-mt19937.o -MD -MP -MF $(DEPDIR)/oil_mt19937-oil-mt19937.Tpo -c -o oil_mt19937-oil-mt19937.o `test -f 'oil-mt19937.c' || echo '$(srcdir)/'`oil-mt19937.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/oil_mt19937-oil-mt19937.Tpo $(DEPDIR)/oil_mt19937-oil-mt19937.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oil-mt19937.c' object='oil_mt19937-oil-mt19937.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_mt19937_CFLAGS) $(CFLAGS) -c -o oil_mt19937-oil-mt19937.o `test -f 'oil-mt19937.c' || echo '$(srcdir)/'`oil-mt19937.c oil_mt19937-oil-mt19937.obj: oil-mt19937.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_mt19937_CFLAGS) $(CFLAGS) -MT oil_mt19937-oil-mt19937.obj -MD -MP -MF $(DEPDIR)/oil_mt19937-oil-mt19937.Tpo -c -o oil_mt19937-oil-mt19937.obj `if test -f 'oil-mt19937.c'; then $(CYGPATH_W) 'oil-mt19937.c'; else $(CYGPATH_W) '$(srcdir)/oil-mt19937.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/oil_mt19937-oil-mt19937.Tpo $(DEPDIR)/oil_mt19937-oil-mt19937.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oil-mt19937.c' object='oil_mt19937-oil-mt19937.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_mt19937_CFLAGS) $(CFLAGS) -c -o oil_mt19937-oil-mt19937.obj `if test -f 'oil-mt19937.c'; then $(CYGPATH_W) 'oil-mt19937.c'; else $(CYGPATH_W) '$(srcdir)/oil-mt19937.c'; fi` oil_random-oil-random.o: oil-random.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_random_CFLAGS) $(CFLAGS) -MT oil_random-oil-random.o -MD -MP -MF $(DEPDIR)/oil_random-oil-random.Tpo -c -o oil_random-oil-random.o `test -f 'oil-random.c' || echo '$(srcdir)/'`oil-random.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/oil_random-oil-random.Tpo $(DEPDIR)/oil_random-oil-random.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oil-random.c' object='oil_random-oil-random.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_random_CFLAGS) $(CFLAGS) -c -o oil_random-oil-random.o `test -f 'oil-random.c' || echo '$(srcdir)/'`oil-random.c oil_random-oil-random.obj: oil-random.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_random_CFLAGS) $(CFLAGS) -MT oil_random-oil-random.obj -MD -MP -MF $(DEPDIR)/oil_random-oil-random.Tpo -c -o oil_random-oil-random.obj `if test -f 'oil-random.c'; then $(CYGPATH_W) 'oil-random.c'; else $(CYGPATH_W) '$(srcdir)/oil-random.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/oil_random-oil-random.Tpo $(DEPDIR)/oil_random-oil-random.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oil-random.c' object='oil_random-oil-random.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_random_CFLAGS) $(CFLAGS) -c -o oil_random-oil-random.obj `if test -f 'oil-random.c'; then $(CYGPATH_W) 'oil-random.c'; else $(CYGPATH_W) '$(srcdir)/oil-random.c'; fi` oil_suggest-oil-suggest.o: oil-suggest.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_suggest_CFLAGS) $(CFLAGS) -MT oil_suggest-oil-suggest.o -MD -MP -MF $(DEPDIR)/oil_suggest-oil-suggest.Tpo -c -o oil_suggest-oil-suggest.o `test -f 'oil-suggest.c' || echo '$(srcdir)/'`oil-suggest.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/oil_suggest-oil-suggest.Tpo $(DEPDIR)/oil_suggest-oil-suggest.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oil-suggest.c' object='oil_suggest-oil-suggest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_suggest_CFLAGS) $(CFLAGS) -c -o oil_suggest-oil-suggest.o `test -f 'oil-suggest.c' || echo '$(srcdir)/'`oil-suggest.c oil_suggest-oil-suggest.obj: oil-suggest.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_suggest_CFLAGS) $(CFLAGS) -MT oil_suggest-oil-suggest.obj -MD -MP -MF $(DEPDIR)/oil_suggest-oil-suggest.Tpo -c -o oil_suggest-oil-suggest.obj `if test -f 'oil-suggest.c'; then $(CYGPATH_W) 'oil-suggest.c'; else $(CYGPATH_W) '$(srcdir)/oil-suggest.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/oil_suggest-oil-suggest.Tpo $(DEPDIR)/oil_suggest-oil-suggest.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oil-suggest.c' object='oil_suggest-oil-suggest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_suggest_CFLAGS) $(CFLAGS) -c -o oil_suggest-oil-suggest.obj `if test -f 'oil-suggest.c'; then $(CYGPATH_W) 'oil-suggest.c'; else $(CYGPATH_W) '$(srcdir)/oil-suggest.c'; fi` oil_test-oil-test.o: oil-test.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_test_CFLAGS) $(CFLAGS) -MT oil_test-oil-test.o -MD -MP -MF $(DEPDIR)/oil_test-oil-test.Tpo -c -o oil_test-oil-test.o `test -f 'oil-test.c' || echo '$(srcdir)/'`oil-test.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/oil_test-oil-test.Tpo $(DEPDIR)/oil_test-oil-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oil-test.c' object='oil_test-oil-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_test_CFLAGS) $(CFLAGS) -c -o oil_test-oil-test.o `test -f 'oil-test.c' || echo '$(srcdir)/'`oil-test.c oil_test-oil-test.obj: oil-test.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_test_CFLAGS) $(CFLAGS) -MT oil_test-oil-test.obj -MD -MP -MF $(DEPDIR)/oil_test-oil-test.Tpo -c -o oil_test-oil-test.obj `if test -f 'oil-test.c'; then $(CYGPATH_W) 'oil-test.c'; else $(CYGPATH_W) '$(srcdir)/oil-test.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/oil_test-oil-test.Tpo $(DEPDIR)/oil_test-oil-test.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='oil-test.c' object='oil_test-oil-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(oil_test_CFLAGS) $(CFLAGS) -c -o oil_test-oil-test.obj `if test -f 'oil-test.c'; then $(CYGPATH_W) 'oil-test.c'; else $(CYGPATH_W) '$(srcdir)/oil-test.c'; fi` printcpu-printcpu.o: printcpu.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(printcpu_CFLAGS) $(CFLAGS) -MT printcpu-printcpu.o -MD -MP -MF $(DEPDIR)/printcpu-printcpu.Tpo -c -o printcpu-printcpu.o `test -f 'printcpu.c' || echo '$(srcdir)/'`printcpu.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/printcpu-printcpu.Tpo $(DEPDIR)/printcpu-printcpu.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='printcpu.c' object='printcpu-printcpu.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(printcpu_CFLAGS) $(CFLAGS) -c -o printcpu-printcpu.o `test -f 'printcpu.c' || echo '$(srcdir)/'`printcpu.c printcpu-printcpu.obj: printcpu.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(printcpu_CFLAGS) $(CFLAGS) -MT printcpu-printcpu.obj -MD -MP -MF $(DEPDIR)/printcpu-printcpu.Tpo -c -o printcpu-printcpu.obj `if test -f 'printcpu.c'; then $(CYGPATH_W) 'printcpu.c'; else $(CYGPATH_W) '$(srcdir)/printcpu.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/printcpu-printcpu.Tpo $(DEPDIR)/printcpu-printcpu.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='printcpu.c' object='printcpu-printcpu.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(printcpu_CFLAGS) $(CFLAGS) -c -o printcpu-printcpu.obj `if test -f 'printcpu.c'; then $(CYGPATH_W) 'printcpu.c'; else $(CYGPATH_W) '$(srcdir)/printcpu.c'; fi` report-report.o: report.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(report_CFLAGS) $(CFLAGS) -MT report-report.o -MD -MP -MF $(DEPDIR)/report-report.Tpo -c -o report-report.o `test -f 'report.c' || echo '$(srcdir)/'`report.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/report-report.Tpo $(DEPDIR)/report-report.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='report.c' object='report-report.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(report_CFLAGS) $(CFLAGS) -c -o report-report.o `test -f 'report.c' || echo '$(srcdir)/'`report.c report-report.obj: report.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(report_CFLAGS) $(CFLAGS) -MT report-report.obj -MD -MP -MF $(DEPDIR)/report-report.Tpo -c -o report-report.obj `if test -f 'report.c'; then $(CYGPATH_W) 'report.c'; else $(CYGPATH_W) '$(srcdir)/report.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/report-report.Tpo $(DEPDIR)/report-report.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='report.c' object='report-report.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(report_CFLAGS) $(CFLAGS) -c -o report-report.obj `if test -f 'report.c'; then $(CYGPATH_W) 'report.c'; else $(CYGPATH_W) '$(srcdir)/report.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool clean-noinstPROGRAMS ctags \ ctags-recursive distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/examples/oil-mt19937.c0000644000175000017500000001670610717203073013607 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2006 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* A C-program for MT19937, with initialization improved 2002/1/26. Coded by Takuji Nishimura and Makoto Matsumoto. Before using, initialize the state by using init_genrand(seed) or init_by_array(init_key, key_length). Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Notes about the liboil version: This program is an adaptation of the Mersenne Twister example program downloaded from the web site listed below. The kernel of the generator is implemented in liboil, and the function genrand_int32() has been replaced with a library call. Note that the liboil function calculates an entire output array at once instead of individually like the original. This makes it easier to use memcpy to copy out many outputs at once. Notes from the original authors: Any feedback is very welcome. http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space) */ #ifdef HAVE_CONFIG_H #include #endif #include #include /* Period parameters */ #define N 624 #define M 397 #define MATRIX_A 0x9908b0dfUL /* constant vector a */ #define UPPER_MASK 0x80000000UL /* most significant w-r bits */ #define LOWER_MASK 0x7fffffffUL /* least significant r bits */ static uint32_t mt[N]; /* the array for the state vector */ static uint32_t mt_outputs[N]; /* the array for the outputs */ static int mti=N+1; /* mti==N+1 means mt[N] is not initialized */ /* initializes mt[N] with a seed */ void init_genrand(unsigned long s) { mt[0]= s & 0xffffffffUL; for (mti=1; mti> 30)) + mti); /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ /* In the previous versions, MSBs of the seed affect */ /* only MSBs of the array mt[]. */ /* 2002/01/09 modified by Makoto Matsumoto */ mt[mti] &= 0xffffffffUL; /* for >32 bit machines */ } } /* initialize by an array with array-length */ /* init_key is the array for initializing keys */ /* key_length is its length */ /* slight change for C++, 2004/2/26 */ void init_by_array(unsigned long init_key[], int key_length) { int i, j, k; init_genrand(19650218UL); i=1; j=0; k = (N>key_length ? N : key_length); for (; k; k--) { mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525UL)) + init_key[j] + j; /* non linear */ mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ i++; j++; if (i>=N) { mt[0] = mt[N-1]; i=1; } if (j>=key_length) j=0; } for (k=N-1; k; k--) { mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941UL)) - i; /* non linear */ mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ i++; if (i>=N) { mt[0] = mt[N-1]; i=1; } } mt[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */ } /* generates a random number on [0,0xffffffff]-interval */ unsigned long genrand_int32(void) { if (mti >= N) { /* generate N words at one time */ oil_mt19937 (mt_outputs, mt); mti = 0; } return mt_outputs[mti++]; } /* generates a random number on [0,0x7fffffff]-interval */ long genrand_int31(void) { return (long)(genrand_int32()>>1); } /* generates a random number on [0,1]-real-interval */ double genrand_real1(void) { return genrand_int32()*(1.0/4294967295.0); /* divided by 2^32-1 */ } /* generates a random number on [0,1)-real-interval */ double genrand_real2(void) { return genrand_int32()*(1.0/4294967296.0); /* divided by 2^32 */ } /* generates a random number on (0,1)-real-interval */ double genrand_real3(void) { return (((double)genrand_int32()) + 0.5)*(1.0/4294967296.0); /* divided by 2^32 */ } /* generates a random number on [0,1) with 53-bit resolution*/ double genrand_res53(void) { unsigned long a=genrand_int32()>>5, b=genrand_int32()>>6; return(a*67108864.0+b)*(1.0/9007199254740992.0); } /* These real versions are due to Isaku Wada, 2002/01/09 added */ int main(void) { int i; unsigned long init[4]={0x123, 0x234, 0x345, 0x456}, length=4; oil_init(); init_by_array(init, length); printf("1000 outputs of genrand_int32()\n"); for (i=0; i<1000; i++) { printf("%10lu ", genrand_int32()); if (i%5==4) printf("\n"); } printf("\n1000 outputs of genrand_real2()\n"); for (i=0; i<1000; i++) { printf("%10.8f ", genrand_real2()); if (i%5==4) printf("\n"); } return 0; } liboil-0.3.17/examples/work/0000777000175000017500000000000011332637377012675 500000000000000liboil-0.3.17/examples/work/work.c0000644000175000017500000001215410717203073013726 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ //#define KLASS_NAME "conv_s16_f32" #define KLASS_NAME "clip_s16" #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include #define SOME_FILE #include SOME_FILE void register_impls(void); void test(void) { int32_t dest[1]; uint8_t src[100]; int i; for(i=0;i<100;i++){ src[i] = oil_rand_u8() & 0x7f; } dest[0] = 0; oil_utf8_validate (dest, src, 100); #if 0 for(i=0;i<100;i++){ g_print("%d %d\n",dest[i],src[i]); } #endif g_print("%d\n", dest[0]); } void dump_array (void *data, void *ref_data, OilType type, int pre_n, int stride, int post_n) { int i, j; int s2 = oil_type_sizeof (type); double x; #define DUMP(type, format) do { \ for(i=0;i= 1.0) { \ g_print("[" format "] ", OIL_GET(data, i*stride + j*s2, type)); \ } else { \ g_print(format " ", OIL_GET(data, i*stride + j*s2, type)); \ } \ } \ g_print("\n"); \ } \ } while(0) switch(type) { case OIL_TYPE_s8p: DUMP(int8_t, "%d"); break; case OIL_TYPE_u8p: DUMP(uint8_t, "%d"); break; case OIL_TYPE_s16p: DUMP(int16_t, "%d"); break; case OIL_TYPE_u16p: DUMP(uint16_t, "%d"); break; case OIL_TYPE_s32p: DUMP(int32_t, "%d"); break; case OIL_TYPE_u32p: DUMP(uint32_t, "%u"); break; case OIL_TYPE_f32p: DUMP(float, "%g"); break; case OIL_TYPE_f64p: DUMP(double, "%g"); break; default: break; } } void dump_test (OilTest *test) { int i; for(i=0;iparams[i]; if (p->is_pointer) { if (p->direction == 'i' || p->direction == 'd') { g_print (" %s:\n", p->parameter_name); dump_array (p->test_data + OIL_TEST_HEADER, p->ref_data + OIL_TEST_HEADER, p->type, p->pre_n, p->stride, p->post_n); } } } } void dump_source (OilTest *test) { int i; for(i=0;iparams[i]; if (p->is_pointer) { if (p->direction == 'i' || p->direction == 's') { g_print (" %s:\n", p->parameter_name); dump_array (p->src_data + OIL_TEST_HEADER, p->src_data + OIL_TEST_HEADER, p->type, p->pre_n, p->stride, p->post_n); } } } } int main (int argc, char *argv[]) { OilFunctionClass *klass; OilFunctionImpl *impl; OilTest *test; //const char *klass_name = "utf8_validate"; const char *klass_name = KLASS_NAME; double ave, std; oil_init (); //register_impls(); klass = oil_class_get (klass_name); if (klass == NULL) { g_print("class not found: %s\n", klass_name); exit(0); } oil_class_optimize (klass); test = oil_test_new(klass); oil_test_set_iterations(test, 1); test->n = 10; test->m = 10; impl = klass->reference_impl; ave = impl->profile_ave; std = impl->profile_std; oil_test_check_impl (test, impl); g_print ("source array\n"); dump_source(test); g_print ("reference impl %s\n", impl->name); g_print(" ave=%g std=%g\n", ave, std); dump_test(test); for (impl = klass->first_impl; impl; impl = impl->next) { if (impl == klass->reference_impl) continue; g_print ("impl %s\n", impl->name); if (oil_impl_is_runnable (impl)) { g_print(" ave=%g std=%g\n", impl->profile_ave, impl->profile_std); oil_test_check_impl (test, impl); dump_test(test); } } return 0; } liboil-0.3.17/examples/work/Makefile.am0000644000175000017500000000026210717203073014631 00000000000000 if HAVE_GLIB noinst_PROGRAMS = work else noinst_PROGRAMS = endif work_SOURCES = work.c AM_LDFLAGS = $(LIBOIL_LIBS) $(GLIB_LIBS) AM_CFLAGS = $(LIBOIL_CFLAGS) $(GLIB_CFLAGS) liboil-0.3.17/examples/work/Makefile.in0000644000175000017500000003567111332627670014665 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @HAVE_GLIB_TRUE@noinst_PROGRAMS = work$(EXEEXT) subdir = examples/work DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_work_OBJECTS = work.$(OBJEXT) work_OBJECTS = $(am_work_OBJECTS) work_LDADD = $(LDADD) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(work_SOURCES) DIST_SOURCES = $(work_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ work_SOURCES = work.c AM_LDFLAGS = $(LIBOIL_LIBS) $(GLIB_LIBS) AM_CFLAGS = $(LIBOIL_CFLAGS) $(GLIB_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/work/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/work/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list work$(EXEEXT): $(work_OBJECTS) $(work_DEPENDENCIES) @rm -f work$(EXEEXT) $(LINK) $(work_OBJECTS) $(work_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/work.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/BUG-REPORTING0000644000175000017500000000570110717203073011707 00000000000000 Bugs can be reported on liboil at https://bugs.freedesktop.org/. When starting a program that uses liboil, it is not uncommon to see an error message such as: OIL: ERROR liboiltest.c 309: oil_test_check_impl(): function fbCompositeSolid_nx8888mmx in class composite_over_argb_const_src failed check (1.67772e+07 > 100) outside=0 This message is an error for liboil, but because of the way that liboil works, the error does not affect the performance of the program being run. Bug reporting: 1. I get a message like the one above: What to do: - File a bug on the liboil package of your distro with a severity/priority of 'normal'. You may also want to file the bug and/or search for duplicates in the upstream bugzilla. What to include: - The output of oil-bugreport. Triaging: - Debug messages with the same function ('fbCompositeSolid_nx8888mmx') are duplicates. If the function is different, they are not duplicates and should be separate bug reports. 2. I get a message like the one above and my program crashes. I think it's caused by liboil. It's not. The bug is elsewhere. Really. The debug message means that liboil caught a potential crash and is avoiding it. 3. My program crashes on startup and the backtrace includes oil_init(). What to do: - File a bug on liboil with a severity 'crasher'. What to include: - The version of liboil - A stack backtrace. Alternately, set 'OIL_DEBUG=3' in the environment and capture the output of the program as it crashes. - The output of oil-bugreport. Workarounds: - User: Set 'OIL_CPU_FLAGS=0' in your environment. This will make function calls to liboil really slow, but will generally avoid any serious problems. - Distributor: Find the offending function the source code and disable it by commenting out the function and the OIL_DEFINE_IMPL() line (usually immediately following it). 4. When I debug a program that uses liboil, gdb stops with SIGILL. Illegal instruction signals can be a normal occurance during the startup of liboil, depending on your particular CPU. Liboil is either testing features of your CPU and the kernel is reporting that a feature is not supported, or liboil is running an implementation that isn't flagged correctly for the CPU features that it uses. In the latter case, an error message is printed, which should be reported as a normal bug. By default, gdb stops the debugged program when it gets a SIGILL signal. That's not the desired behavior however, since liboil is prepared (and sometimes expecting) to get the signal. So you should use the gdb command 'c' to continue past these signals. If you do lots of liboil debugging (like I do), you may prefer to ignore all SIGILL signals using the command 'handle SIGILL nostop noprint'. liboil-0.3.17/m4/0000777000175000017500000000000011332637374010412 500000000000000liboil-0.3.17/m4/as-nano.m40000644000175000017500000000117110717203073012113 00000000000000dnl as-version.m4 0.1.0 dnl autostars m4 macro for versioning (modified) dnl Thomas Vander Stichele dnl David Schleef dnl $Id: as-nano.m4,v 1.2 2007-03-16 23:30:02 ds Exp $ dnl AS_VERSION(ACTION-IF-NO-NANO, [ACTION-IF-NANO]) AC_DEFUN([AS_NANO], [ AC_MSG_CHECKING(nano version) NANO=$(echo AC_PACKAGE_VERSION | sed ['s/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.*//']) AC_SUBST(NANO) if test x"$NANO" = x || test "x$NANO" = "x0" ; then AC_MSG_RESULT([0 (release)]) NANO=0 ifelse([$1], , :, [$1]) else AC_MSG_RESULT($NANO) ifelse([$2], , :, [$2]) fi ]) liboil-0.3.17/m4/ax_create_stdint_h.m40000644000175000017500000006151511066774524014432 00000000000000##### http://autoconf-archive.cryp.to/ax_create_stdint_h.html # # SYNOPSIS # # AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])] # # DESCRIPTION # # the "ISO C9X: 7.18 Integer types " section requires the # existence of an include file that defines a set of # typedefs, especially uint8_t,int32_t,uintptr_t. Many older # installations will not provide this file, but some will have the # very same definitions in . In other enviroments we can # use the inet-types in which would define the typedefs # int8_t and u_int8_t respectivly. # # This macros will create a local "_stdint.h" or the headerfile given # as an argument. In many cases that file will just "#include # " or "#include ", while in other environments # it will provide the set of basic 'stdint's definitions/typedefs: # # int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t # int_least32_t.. int_fast32_t.. intmax_t # # which may or may not rely on the definitions of other files, or # using the AC_CHECK_SIZEOF macro to determine the actual sizeof each # type. # # if your header files require the stdint-types you will want to # create an installable file mylib-int.h that all your other # installable header may include. So if you have a library package # named "mylib", just use # # AX_CREATE_STDINT_H(mylib-int.h) # # in configure.ac and go to install that very header file in # Makefile.am along with the other headers (mylib.h) - and the # mylib-specific headers can simply use "#include " to # obtain the stdint-types. # # Remember, if the system already had a valid , the # generated file will include it directly. No need for fuzzy # HAVE_STDINT_H things... (oops, GCC 4.2.x has deliberatly disabled # its stdint.h for non-c99 compilation and the c99-mode is not the # default. Therefore this macro will not use the compiler's stdint.h # - please complain to the GCC developers). # # LAST MODIFICATION # # 2007-06-27 # # COPYLEFT # # Copyright (c) 2007 Guido U. Draheim # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # # As a special exception, the respective Autoconf Macro's copyright # owner gives unlimited permission to copy, distribute and modify the # configure scripts that are the output of Autoconf when processing # the Macro. You need not follow the terms of the GNU General Public # License when using or distributing such scripts, even though # portions of the text of the Macro appear in them. The GNU General # Public License (GPL) does govern all other use of the material that # constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the # Autoconf Macro released by the Autoconf Macro Archive. When you # make and distribute a modified version of the Autoconf Macro, you # may extend this special exception to the GPL to apply to your # modified version as well. AC_DEFUN([AX_CHECK_DATA_MODEL],[ AC_CHECK_SIZEOF(char) AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(void*) ac_cv_char_data_model="" ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char" ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short" ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int" ac_cv_long_data_model="" ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int" ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long" ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp" AC_MSG_CHECKING([data model]) case "$ac_cv_char_data_model/$ac_cv_long_data_model" in 122/242) ac_cv_data_model="IP16" ; n="standard 16bit machine" ;; 122/244) ac_cv_data_model="LP32" ; n="standard 32bit machine" ;; 122/*) ac_cv_data_model="i16" ; n="unusual int16 model" ;; 124/444) ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;; 124/488) ac_cv_data_model="LP64" ; n="standard 64bit unixish" ;; 124/448) ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;; 124/*) ac_cv_data_model="i32" ; n="unusual int32 model" ;; 128/888) ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;; 128/*) ac_cv_data_model="i64" ; n="unusual int64 model" ;; 222/*2) ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;; 333/*3) ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;; 444/*4) ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;; 666/*6) ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;; 888/*8) ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;; 222/*|333/*|444/*|666/*|888/*) : ac_cv_data_model="iDSP" ; n="unusual dsptype" ;; *) ac_cv_data_model="none" ; n="very unusual model" ;; esac AC_MSG_RESULT([$ac_cv_data_model ($ac_cv_long_data_model, $n)]) ]) dnl AX_CHECK_HEADER_STDINT_X([HEADERLIST][,ACTION-IF]) AC_DEFUN([AX_CHECK_HEADER_STDINT_X],[ AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[ ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h) AC_MSG_RESULT([(..)]) for i in m4_ifval([$1],[$1],[stdint.h inttypes.h sys/inttypes.h sys/types.h]) do unset ac_cv_type_uintptr_t unset ac_cv_type_uint64_t AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>]) AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) m4_ifvaln([$2],[$2]) break done AC_MSG_CHECKING([for stdint uintptr_t]) ]) ]) AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[ AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[ ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h) AC_MSG_RESULT([(..)]) for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h sys/types.h stdint.h]) do unset ac_cv_type_uint32_t unset ac_cv_type_uint64_t AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>]) AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) m4_ifvaln([$2],[$2]) break break; done AC_MSG_CHECKING([for stdint uint32_t]) ]) ]) AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[ AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[ ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h) AC_MSG_RESULT([(..)]) for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do unset ac_cv_type_u_int32_t unset ac_cv_type_u_int64_t AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>]) AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>]) m4_ifvaln([$2],[$2]) break break; done AC_MSG_CHECKING([for stdint u_int32_t]) ]) ]) AC_DEFUN([AX_CREATE_STDINT_H], [# ------ AX CREATE STDINT H ------------------------------------- AC_MSG_CHECKING([for stdint types]) ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)` # try to shortcircuit - if the default include path of the compiler # can find a "stdint.h" header then we assume that all compilers can. AC_CACHE_VAL([ac_cv_header_stdint_t],[ old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS="" old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="" old_CFLAGS="$CFLAGS" ; CFLAGS="" AC_TRY_COMPILE([#include ],[int_least32_t v = 0;], [ac_cv_stdint_result="(assuming C99 compatible system)" ac_cv_header_stdint_t="stdint.h"; ], [ac_cv_header_stdint_t=""]) if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then CFLAGS="-std=c99" AC_TRY_COMPILE([#include ],[int_least32_t v = 0;], [AC_MSG_WARN(your GCC compiler has a defunct stdint.h for its default-mode)]) fi CXXFLAGS="$old_CXXFLAGS" CPPFLAGS="$old_CPPFLAGS" CFLAGS="$old_CFLAGS" ]) v="... $ac_cv_header_stdint_h" if test "$ac_stdint_h" = "stdint.h" ; then AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)]) elif test "$ac_stdint_h" = "inttypes.h" ; then AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)]) elif test "_$ac_cv_header_stdint_t" = "_" ; then AC_MSG_RESULT([(putting them into $ac_stdint_h)$v]) else ac_cv_header_stdint="$ac_cv_header_stdint_t" AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)]) fi if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit.. dnl .....intro message done, now do a few system checks..... dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type, dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW dnl instead that is triggered with 3 or more arguments (see types.m4) inttype_headers=`echo $2 | sed -e 's/,/ /g'` ac_cv_stdint_result="(no helpful system typedefs seen)" AX_CHECK_HEADER_STDINT_X(dnl stdint.h inttypes.h sys/inttypes.h $inttype_headers, ac_cv_stdint_result="(seen uintptr_t$and64 in $i)") if test "_$ac_cv_header_stdint_x" = "_" ; then AX_CHECK_HEADER_STDINT_O(dnl, inttypes.h sys/inttypes.h stdint.h $inttype_headers, ac_cv_stdint_result="(seen uint32_t$and64 in $i)") fi if test "_$ac_cv_header_stdint_x" = "_" ; then if test "_$ac_cv_header_stdint_o" = "_" ; then AX_CHECK_HEADER_STDINT_U(dnl, sys/types.h inttypes.h sys/inttypes.h $inttype_headers, ac_cv_stdint_result="(seen u_int32_t$and64 in $i)") fi fi dnl if there was no good C99 header file, do some typedef checks... if test "_$ac_cv_header_stdint_x" = "_" ; then AC_MSG_CHECKING([for stdint datatype model]) AC_MSG_RESULT([(..)]) AX_CHECK_DATA_MODEL fi if test "_$ac_cv_header_stdint_x" != "_" ; then ac_cv_header_stdint="$ac_cv_header_stdint_x" elif test "_$ac_cv_header_stdint_o" != "_" ; then ac_cv_header_stdint="$ac_cv_header_stdint_o" elif test "_$ac_cv_header_stdint_u" != "_" ; then ac_cv_header_stdint="$ac_cv_header_stdint_u" else ac_cv_header_stdint="stddef.h" fi AC_MSG_CHECKING([for extra inttypes in chosen header]) AC_MSG_RESULT([($ac_cv_header_stdint)]) dnl see if int_least and int_fast types are present in _this_ header. unset ac_cv_type_int_least32_t unset ac_cv_type_int_fast32_t AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>]) AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>]) AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>]) fi # shortcircut to system "stdint.h" # ------------------ PREPARE VARIABLES ------------------------------ if test "$GCC" = "yes" ; then ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1` else ac_cv_stdint_message="using $CC" fi AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl $ac_cv_stdint_result]) dnl ----------------------------------------------------------------- # ----------------- DONE inttypes.h checks START header ------------- AC_CONFIG_COMMANDS([$ac_stdint_h],[ AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h) ac_stdint=$tmp/_stdint.h echo "#ifndef" $_ac_stdint_h >$ac_stdint echo "#define" $_ac_stdint_h "1" >>$ac_stdint echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint if test "_$ac_cv_header_stdint_t" != "_" ; then echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint echo "#include " >>$ac_stdint echo "#endif" >>$ac_stdint echo "#endif" >>$ac_stdint else cat >>$ac_stdint < #else #include /* .................... configured part ............................ */ STDINT_EOF echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint if test "_$ac_cv_header_stdint_x" != "_" ; then ac_header="$ac_cv_header_stdint_x" echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint else echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint fi echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint if test "_$ac_cv_header_stdint_o" != "_" ; then ac_header="$ac_cv_header_stdint_o" echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint else echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint fi echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint if test "_$ac_cv_header_stdint_u" != "_" ; then ac_header="$ac_cv_header_stdint_u" echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint else echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint fi echo "" >>$ac_stdint if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then echo "#include <$ac_header>" >>$ac_stdint echo "" >>$ac_stdint fi fi echo "/* which 64bit typedef has been found */" >>$ac_stdint if test "$ac_cv_type_uint64_t" = "yes" ; then echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint fi if test "$ac_cv_type_u_int64_t" = "yes" ; then echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint fi echo "" >>$ac_stdint echo "/* which type model has been detected */" >>$ac_stdint if test "_$ac_cv_char_data_model" != "_" ; then echo "#define _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint echo "#define _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint else echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint fi echo "" >>$ac_stdint echo "/* whether int_least types were detected */" >>$ac_stdint if test "$ac_cv_type_int_least32_t" = "yes"; then echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint fi echo "/* whether int_fast types were detected */" >>$ac_stdint if test "$ac_cv_type_int_fast32_t" = "yes"; then echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint fi echo "/* whether intmax_t type was detected */" >>$ac_stdint if test "$ac_cv_type_intmax_t" = "yes"; then echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint fi echo "" >>$ac_stdint cat >>$ac_stdint <= 199901L #define _HAVE_UINT64_T #define _HAVE_LONGLONG_UINT64_T typedef long long int64_t; typedef unsigned long long uint64_t; #elif !defined __STRICT_ANSI__ #if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ #define _HAVE_UINT64_T typedef __int64 int64_t; typedef unsigned __int64 uint64_t; #elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__ /* note: all ELF-systems seem to have loff-support which needs 64-bit */ #if !defined _NO_LONGLONG #define _HAVE_UINT64_T #define _HAVE_LONGLONG_UINT64_T typedef long long int64_t; typedef unsigned long long uint64_t; #endif #elif defined __alpha || (defined __mips && defined _ABIN32) #if !defined _NO_LONGLONG typedef long int64_t; typedef unsigned long uint64_t; #endif /* compiler/cpu type to define int64_t */ #endif #endif #endif #if defined _STDINT_HAVE_U_INT_TYPES /* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */ typedef u_int8_t uint8_t; typedef u_int16_t uint16_t; typedef u_int32_t uint32_t; /* glibc compatibility */ #ifndef __int8_t_defined #define __int8_t_defined #endif #endif #ifdef _STDINT_NEED_INT_MODEL_T /* we must guess all the basic types. Apart from byte-adressable system, */ /* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */ /* (btw, those nibble-addressable systems are way off, or so we assume) */ dnl /* have a look at "64bit and data size neutrality" at */ dnl /* http://unix.org/version2/whatsnew/login_64bit.html */ dnl /* (the shorthand "ILP" types always have a "P" part) */ #if defined _STDINT_BYTE_MODEL #if _STDINT_LONG_MODEL+0 == 242 /* 2:4:2 = IP16 = a normal 16-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned long uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef long int32_t; #endif #elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444 /* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */ /* 4:4:4 = ILP32 = a normal 32-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef int int32_t; #endif #elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488 /* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */ /* 4:8:8 = LP64 = a normal 64-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef int int32_t; #endif /* this system has a "long" of 64bit */ #ifndef _HAVE_UINT64_T #define _HAVE_UINT64_T typedef unsigned long uint64_t; typedef long int64_t; #endif #elif _STDINT_LONG_MODEL+0 == 448 /* LLP64 a 64-bit system derived from a 32-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef int int32_t; #endif /* assuming the system has a "long long" */ #ifndef _HAVE_UINT64_T #define _HAVE_UINT64_T #define _HAVE_LONGLONG_UINT64_T typedef unsigned long long uint64_t; typedef long long int64_t; #endif #else #define _STDINT_NO_INT32_T #endif #else #define _STDINT_NO_INT8_T #define _STDINT_NO_INT32_T #endif #endif /* * quote from SunOS-5.8 sys/inttypes.h: * Use at your own risk. As of February 1996, the committee is squarely * behind the fixed sized types; the "least" and "fast" types are still being * discussed. The probability that the "fast" types may be removed before * the standard is finalized is high enough that they are not currently * implemented. */ #if defined _STDINT_NEED_INT_LEAST_T typedef int8_t int_least8_t; typedef int16_t int_least16_t; typedef int32_t int_least32_t; #ifdef _HAVE_UINT64_T typedef int64_t int_least64_t; #endif typedef uint8_t uint_least8_t; typedef uint16_t uint_least16_t; typedef uint32_t uint_least32_t; #ifdef _HAVE_UINT64_T typedef uint64_t uint_least64_t; #endif /* least types */ #endif #if defined _STDINT_NEED_INT_FAST_T typedef int8_t int_fast8_t; typedef int int_fast16_t; typedef int32_t int_fast32_t; #ifdef _HAVE_UINT64_T typedef int64_t int_fast64_t; #endif typedef uint8_t uint_fast8_t; typedef unsigned uint_fast16_t; typedef uint32_t uint_fast32_t; #ifdef _HAVE_UINT64_T typedef uint64_t uint_fast64_t; #endif /* fast types */ #endif #ifdef _STDINT_NEED_INTMAX_T #ifdef _HAVE_UINT64_T typedef int64_t intmax_t; typedef uint64_t uintmax_t; #else typedef long intmax_t; typedef unsigned long uintmax_t; #endif #endif #ifdef _STDINT_NEED_INTPTR_T #ifndef __intptr_t_defined #define __intptr_t_defined /* we encourage using "long" to store pointer values, never use "int" ! */ #if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484 typedef unsigned int uintptr_t; typedef int intptr_t; #elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444 typedef unsigned long uintptr_t; typedef long intptr_t; #elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T typedef uint64_t uintptr_t; typedef int64_t intptr_t; #else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */ typedef unsigned long uintptr_t; typedef long intptr_t; #endif #endif #endif /* The ISO C99 standard specifies that in C++ implementations these should only be defined if explicitly requested. */ #if !defined __cplusplus || defined __STDC_CONSTANT_MACROS #ifndef UINT32_C /* Signed. */ # define INT8_C(c) c # define INT16_C(c) c # define INT32_C(c) c # ifdef _HAVE_LONGLONG_UINT64_T # define INT64_C(c) c ## L # else # define INT64_C(c) c ## LL # endif /* Unsigned. */ # define UINT8_C(c) c ## U # define UINT16_C(c) c ## U # define UINT32_C(c) c ## U # ifdef _HAVE_LONGLONG_UINT64_T # define UINT64_C(c) c ## UL # else # define UINT64_C(c) c ## ULL # endif /* Maximal type. */ # ifdef _HAVE_LONGLONG_UINT64_T # define INTMAX_C(c) c ## L # define UINTMAX_C(c) c ## UL # else # define INTMAX_C(c) c ## LL # define UINTMAX_C(c) c ## ULL # endif /* literalnumbers */ #endif #endif /* These limits are merily those of a two complement byte-oriented system */ /* Minimum of signed integral types. */ # define INT8_MIN (-128) # define INT16_MIN (-32767-1) # define INT32_MIN (-2147483647-1) # define INT64_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum of signed integral types. */ # define INT8_MAX (127) # define INT16_MAX (32767) # define INT32_MAX (2147483647) # define INT64_MAX (__INT64_C(9223372036854775807)) /* Maximum of unsigned integral types. */ # define UINT8_MAX (255) # define UINT16_MAX (65535) # define UINT32_MAX (4294967295U) # define UINT64_MAX (__UINT64_C(18446744073709551615)) /* Minimum of signed integral types having a minimum size. */ # define INT_LEAST8_MIN INT8_MIN # define INT_LEAST16_MIN INT16_MIN # define INT_LEAST32_MIN INT32_MIN # define INT_LEAST64_MIN INT64_MIN /* Maximum of signed integral types having a minimum size. */ # define INT_LEAST8_MAX INT8_MAX # define INT_LEAST16_MAX INT16_MAX # define INT_LEAST32_MAX INT32_MAX # define INT_LEAST64_MAX INT64_MAX /* Maximum of unsigned integral types having a minimum size. */ # define UINT_LEAST8_MAX UINT8_MAX # define UINT_LEAST16_MAX UINT16_MAX # define UINT_LEAST32_MAX UINT32_MAX # define UINT_LEAST64_MAX UINT64_MAX /* shortcircuit*/ #endif /* once */ #endif #endif STDINT_EOF fi if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then AC_MSG_NOTICE([$ac_stdint_h is unchanged]) else ac_dir=`AS_DIRNAME(["$ac_stdint_h"])` AS_MKDIR_P(["$ac_dir"]) rm -f $ac_stdint_h mv $ac_stdint $ac_stdint_h fi ],[# variables for create stdint.h replacement PACKAGE="$PACKAGE" VERSION="$VERSION" ac_stdint_h="$ac_stdint_h" _ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h) ac_cv_stdint_message="$ac_cv_stdint_message" ac_cv_header_stdint_t="$ac_cv_header_stdint_t" ac_cv_header_stdint_x="$ac_cv_header_stdint_x" ac_cv_header_stdint_o="$ac_cv_header_stdint_o" ac_cv_header_stdint_u="$ac_cv_header_stdint_u" ac_cv_type_uint64_t="$ac_cv_type_uint64_t" ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t" ac_cv_char_data_model="$ac_cv_char_data_model" ac_cv_long_data_model="$ac_cv_long_data_model" ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t" ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t" ac_cv_type_intmax_t="$ac_cv_type_intmax_t" ]) ]) liboil-0.3.17/m4/pkg.m40000644000175000017500000001122311067011142011330 00000000000000# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_ifval([$1], [$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) if test $pkg_failed = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met. Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables to avoid the need to call pkg-config. See the pkg-config man page for more details.])], [$4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES liboil-0.3.17/m4/gtk-doc.m40000644000175000017500000000245411066763263012126 00000000000000dnl -*- mode: autoconf -*- # serial 1 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) AC_DEFUN([GTK_DOC_CHECK], [ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first dnl for overriding the documentation installation directory AC_ARG_WITH([html-dir], AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, [with_html_dir='${datadir}/gtk-doc/html']) HTML_DIR="$with_html_dir" AC_SUBST([HTML_DIR]) dnl enable/disable documentation building AC_ARG_ENABLE([gtk-doc], AS_HELP_STRING([--enable-gtk-doc], [use gtk-doc to build documentation [[default=no]]]),, [enable_gtk_doc=no]) if test x$enable_gtk_doc = xyes; then ifelse([$1],[], [PKG_CHECK_EXISTS([gtk-doc],, AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], [PKG_CHECK_EXISTS([gtk-doc >= $1],, AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build gtk-doc]))]) fi AC_MSG_CHECKING([whether to build gtk-doc documentation]) AC_MSG_RESULT($enable_gtk_doc) AC_PATH_PROGS(GTKDOC_CHECK,gtkdoc-check,) AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) ]) liboil-0.3.17/m4/as-gcc-inline-assembly.m40000644000175000017500000000326211066773257015026 00000000000000dnl as-gcc-inline-assembly.m4 0.1.0 dnl autostars m4 macro for detection of gcc inline assembly dnl David Schleef dnl $Id: as-gcc-inline-assembly.m4,v 1.5 2007-11-14 06:48:57 ds Exp $ dnl AS_COMPILER_FLAG(ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CFLAGS. dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, dnl and ACTION-IF-NOT-ACCEPTED otherwise. AC_DEFUN([AS_GCC_INLINE_ASSEMBLY], [ AC_MSG_CHECKING([if compiler supports gcc-style inline assembly]) AC_TRY_COMPILE([], [ #ifndef __GNUC__ #error Not GCC #endif #ifdef __GNUC_MINOR__ #if (__GNUC__ * 1000 + __GNUC_MINOR__) < 3004 #error GCC before 3.4 has critical bugs compiling inline assembly #endif #endif __asm__ (""::) ], [flag_ok=yes], [flag_ok=no]) if test "X$flag_ok" = Xyes ; then $1 true else $2 true fi AC_MSG_RESULT([$flag_ok]) ]) AC_DEFUN([AS_GCC_ASM_POWERPC_FPU], [ AC_MSG_CHECKING([if compiler supports FPU instructions on PowerPC]) AC_TRY_COMPILE([], [double x = 0; __asm__ ("fadd 0,0,0"::"f" (x):"32") ], [flag_ok=yes], [flag_ok=no]) if test "X$flag_ok" = Xyes ; then $1 true else $2 true fi AC_MSG_RESULT([$flag_ok]) ]) AC_DEFUN([AS_GCC_INLINE_ASM_INSTRUCTION], [ AC_MSG_CHECKING([if compiler supports '$1' asm instruction]) AC_TRY_COMPILE([], [ #ifndef __GNUC__ #error Not GCC #endif #ifdef __GNUC_MINOR__ #if (__GNUC__ * 1000 + __GNUC_MINOR__) < 3004 #error GCC before 3.4 has critical bugs compiling inline assembly #endif #endif __asm__ ("$1"::) ], [flag_ok=yes], [flag_ok=no]) if test "X$flag_ok" = Xyes ; then $2 true else $3 true fi AC_MSG_RESULT([$flag_ok]) ]) liboil-0.3.17/m4/libtool.m40000644000175000017500000077437411332627657012265 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 56 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl _LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\[$]0 --fallback-echo"')dnl " lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` ;; esac _LT_OUTPUT_LIBTOOL_INIT ]) # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) cat >"$CONFIG_LT" <<_LTEOF #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2008 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. if test "$no_create" != yes; then lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) fi ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_XSI_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX # ----------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. m4_defun([_LT_PROG_ECHO_BACKSLASH], [_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac ECHO=${lt_ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF [$]* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(lt_ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method == "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE(int foo(void) {}, _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then _LT_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [fix_srcfile_path], [1], [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_PROG_CXX # ------------ # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ # compiler, we have our own version here. m4_defun([_LT_PROG_CXX], [ pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) AC_PROG_CXX if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_CXX dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_CXX], []) # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [AC_REQUIRE([_LT_PROG_CXX])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_PROG_F77 # ------------ # Since AC_PROG_F77 is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_F77], [ pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) AC_PROG_F77 if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_F77 dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_F77], []) # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_REQUIRE([_LT_PROG_F77])dnl AC_LANG_PUSH(Fortran 77) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${F77-"f77"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_PROG_FC # ----------- # Since AC_PROG_FC is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_FC], [ pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) AC_PROG_FC if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_FC dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_FC], []) # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_REQUIRE([_LT_PROG_FC])dnl AC_LANG_PUSH(Fortran) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${FC-"f95"} compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC="$lt_save_CC" ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC= CC=${RC-"windres"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC="$lt_save_CC" ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_XSI_SHELLFNS # --------------------- # Bourne and XSI compatible variants of some useful shell functions. m4_defun([_LT_PROG_XSI_SHELLFNS], [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $[*] )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } dnl func_dirname_and_basename dnl A portable version of this function is already defined in general.m4sh dnl so there is no need for it here. # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[[^=]]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$[@]"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]+=\$[2]" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]=\$$[1]\$[2]" } _LT_EOF ;; esac ]) liboil-0.3.17/m4/ltoptions.m40000644000175000017500000002724211332627657012635 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) liboil-0.3.17/m4/as-host-defines.m40000644000175000017500000000247311067011142013547 00000000000000dnl as-host-defines.m4 0.1.0 dnl autostars m4 macro for generating defines for various host architectures dnl David Schleef dnl $Id: as-host-defines.m4,v 1.3 2007-08-22 20:55:24 uid2631 Exp $ dnl AS_HOST_DEFINES() AC_DEFUN([AS_HOST_DEFINES], [ case "x${host_cpu}" in xi?86 | k?) HAVE_I386=yes AC_DEFINE(HAVE_I386, 1, [Defined if host is i386]) ;; xx86_64|xamd64) HAVE_AMD64=yes AC_DEFINE(HAVE_AMD64, 1, [Defined if host is amd64]) ;; xpowerpc|xppc|xpowerpc64|xppc64) HAVE_POWERPC=yes AC_DEFINE(HAVE_POWERPC, 1, [Defined if host is powerpc]) ;; xarm) HAVE_ARM=yes AC_DEFINE(HAVE_ARM, 1, [Defined if host is arm]) ;; esac AM_CONDITIONAL(HAVE_I386, test "x$HAVE_I386" = "xyes") AM_CONDITIONAL(HAVE_AMD64, test "x$HAVE_AMD64" = "xyes") AM_CONDITIONAL(HAVE_POWERPC, test "x$HAVE_POWERPC" = "xyes") AM_CONDITIONAL(HAVE_ARM, test "x$HAVE_ARM" = "xyes") case "${host_os}" in mingw*) HAVE_OS_WIN32=yes AC_DEFINE(HAVE_OS_WIN32, 1, [Defined if host OS is MS Windows]) ;; linux*) HAVE_OS_LINUX=yes AC_DEFINE(HAVE_OS_LINUX, 1, [Defined if host OS is linux]) ;; esac AM_CONDITIONAL(HAVE_OS_WIN32, test "$HAVE_WIN32" = "yes") AM_CONDITIONAL(HAVE_OS_LINUX, test "$HAVE_LINUX" = "yes") ]) liboil-0.3.17/m4/ltversion.m40000644000175000017500000000127511332627660012617 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # Generated from ltversion.in. # serial 3012 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6]) m4_define([LT_PACKAGE_REVISION], [1.3012]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6' macro_revision='1.3012' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) liboil-0.3.17/m4/ac_libtool_tags.m40000644000175000017500000000317710717203073013714 00000000000000 # backported from libtool 1.6 by Paolo Bonzini # When AC_LIBTOOL_TAGS is used, I redefine _LT_AC_TAGCONFIG # to be more similar to the libtool 1.6 implementation, which # uses an m4 loop and m4 case instead of a shell loop. This # way the CXX/GCJ/F77/RC tests are not always expanded. # AC_LIBTOOL_TAGS # --------------- # tags to enable AC_DEFUN([AC_LIBTOOL_TAGS], [m4_define([_LT_TAGS],[$1]) m4_define([_LT_AC_TAGCONFIG], [ if test -f "$ltmain"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi AC_FOREACH([_LT_TAG], _LT_TAGS, [m4_case(_LT_TAG, [CXX], [ if test -n "$CXX" && test "X$CXX" != "Xno"; then AC_LIBTOOL_LANG_CXX_CONFIG available_tags="$available_tags _LT_TAG" fi], [F77], [ if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG available_tags="$available_tags _LT_TAG" fi], [GCJ], [ if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG available_tags="$available_tags _LT_TAG" fi], [RC], [ if test -n "$RC" && test "X$RC" != "Xno"; then AC_LIBTOOL_LANG_RC_CONFIG available_tags="$available_tags _LT_TAG" fi], [m4_errprintn(m4_location[: error: invalid tag name: ]"_LT_TAG") m4_exit(1)]) ]) fi ])dnl _LT_AC_TAG_CONFIG ]) liboil-0.3.17/m4/as-unaligned-access.m40000644000175000017500000000243511151570030014362 00000000000000dnl AS_UNALIGNED_ACCESS dnl check if unaligned memory access works correctly AC_DEFUN([AS_UNALIGNED_ACCESS], [ AC_MSG_CHECKING([if unaligned memory access works correctly]) if test x"$as_cv_unaligned_access" = x ; then case $host in alpha*|arm*|hp*|mips*|sh*|sparc*|ia64*) _AS_ECHO_N([(blacklisted) ]) as_cv_unaligned_access=no ;; i?86*|x86_64|amd64|powerpc*|m68k*|cris*) _AS_ECHO_N([(whitelisted) ]) as_cv_unaligned_access=yes ;; esac else _AS_ECHO_N([(cached) ]) fi if test x"$as_cv_unaligned_access" = x ; then AC_TRY_RUN([ int main(int argc, char **argv) { char array[] = "ABCDEFGH"; unsigned int iarray[2]; memcpy(iarray,array,8); #define GET(x) (*(unsigned int *)((char *)iarray + (x))) if(GET(0) != 0x41424344 && GET(0) != 0x44434241) return 1; if(GET(1) != 0x42434445 && GET(1) != 0x45444342) return 1; if(GET(2) != 0x43444546 && GET(2) != 0x46454443) return 1; if(GET(3) != 0x44454647 && GET(3) != 0x47464544) return 1; return 0; } ], as_cv_unaligned_access="yes", as_cv_unaligned_access="no") fi AC_MSG_RESULT($as_cv_unaligned_access) if test "$as_cv_unaligned_access" = "yes"; then AC_DEFINE_UNQUOTED(HAVE_UNALIGNED_ACCESS, 1, [defined if unaligned memory access works correctly]) fi ]) liboil-0.3.17/m4/lt~obsolete.m40000644000175000017500000001311311332627660013136 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 4 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) liboil-0.3.17/m4/as-compiler-flag.m40000644000175000017500000000135410717203073013704 00000000000000dnl as-compiler-flag.m4 0.1.0 dnl autostars m4 macro for detection of compiler flags dnl David Schleef dnl $Id: as-compiler-flag.m4,v 1.1 2004-08-20 22:25:22 ds Exp $ dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CFLAGS. dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, dnl and ACTION-IF-NOT-ACCEPTED otherwise. AC_DEFUN([AS_COMPILER_FLAG], [ AC_MSG_CHECKING([to see if compiler understands $1]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then $2 true else $3 true fi AC_MSG_RESULT([$flag_ok]) ]) liboil-0.3.17/m4/as-intrinsics.m40000644000175000017500000001176311067011142013346 00000000000000dnl as-intrinsics.m4 0.1.0 dnl autostars m4 macro for detection of gcc inline assembly dnl David Schleef dnl $Id: as-intrinsics.m4,v 1.5 2006-05-19 06:58:29 ds Exp $ dnl AS_MMX_INTRINSICS(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CFLAGS. dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, dnl and ACTION-IF-NOT-ACCEPTED otherwise. AC_DEFUN([AS_MMX_INTRINSICS], [ AC_MSG_CHECKING([if compiler supports MMX intrinsics]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mmmx" AC_TRY_COMPILE([#include ], [_mm_empty()], [flag_ok=yes], [flag_ok=no]) CFLAGS="$save_CFLAGS" $1="-mmmx" if test "X$flag_ok" = Xyes ; then $2 true else $3 true fi AC_MSG_RESULT([$flag_ok]) ]) dnl AS_SSE_INTRINSICS(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CFLAGS. dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, dnl and ACTION-IF-NOT-ACCEPTED otherwise. AC_DEFUN([AS_SSE_INTRINSICS], [ AC_MSG_CHECKING([if compiler supports SSE intrinsics]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -msse" AC_TRY_COMPILE([#include ], [ #ifdef __GNUC_MINOR__ #if (__GNUC__ * 1000 + __GNUC_MINOR__) < 4002 #error GCC before 4.2 has critical bugs compiling SSE intrinsics #endif #endif __m128 a; a = _mm_or_ps(a,a)], [flag_ok=yes], [flag_ok=no]) CFLAGS="$save_CFLAGS" $1="-msse" if test "X$flag_ok" = Xyes ; then $2 true else $3 true fi AC_MSG_RESULT([$flag_ok]) ]) dnl AS_SSE2_INTRINSICS(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CFLAGS. dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, dnl and ACTION-IF-NOT-ACCEPTED otherwise. AC_DEFUN([AS_SSE2_INTRINSICS], [ AC_MSG_CHECKING([if compiler supports SSE2 intrinsics]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -msse2" AC_TRY_COMPILE([#include ], [ #ifdef __GNUC_MINOR__ #if (__GNUC__ * 1000 + __GNUC_MINOR__) < 4002 #error GCC before 4.2 has critical bugs compiling SSE2 intrinsics #endif #endif __m128i a; a = _mm_setzero_si128(); a = _mm_srli_epi16(a,8)], [flag_ok=yes], [flag_ok=no]) CFLAGS="$save_CFLAGS" $1="-msse2" if test "X$flag_ok" = Xyes ; then $2 true else $3 true fi AC_MSG_RESULT([$flag_ok]) ]) dnl AS_SSE3_INTRINSICS(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CFLAGS. dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, dnl and ACTION-IF-NOT-ACCEPTED otherwise. AC_DEFUN([AS_SSE3_INTRINSICS], [ AC_MSG_CHECKING([if compiler supports SSE3 intrinsics]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -msse3" AC_TRY_COMPILE([#include ], [ #ifdef __GNUC_MINOR__ #if (__GNUC__ * 1000 + __GNUC_MINOR__) < 4002 #error GCC before 4.2 has critical bugs compiling SSE2 intrinsics #endif #endif __m128 a; a = _mm_addsub_ps(a,a)], [flag_ok=yes], [flag_ok=no]) CFLAGS="$save_CFLAGS" $1="-msse3" if test "X$flag_ok" = Xyes ; then $2 true else $3 true fi AC_MSG_RESULT([$flag_ok]) ]) dnl AS_3DNOW_INTRINSICS(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CFLAGS. dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, dnl and ACTION-IF-NOT-ACCEPTED otherwise. AC_DEFUN([AS_3DNOW_INTRINSICS], [ AC_MSG_CHECKING([if compiler supports 3DNOW intrinsics]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -m3dnow" AC_TRY_COMPILE([#include ], [_m_femms()], [flag_ok=yes], [flag_ok=no]) CFLAGS="$save_CFLAGS" $1="-m3dnow" if test "X$flag_ok" = Xyes ; then $2 true else $3 true fi AC_MSG_RESULT([$flag_ok]) ]) dnl AS_3DNOWEXT_INTRINSICS(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CFLAGS. dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, dnl and ACTION-IF-NOT-ACCEPTED otherwise. AC_DEFUN([AS_3DNOWEXT_INTRINSICS], [ AC_MSG_CHECKING([if compiler supports 3DNOWEXT intrinsics]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -m3dnow -march=athlon" AC_TRY_COMPILE([#include ], [__m64 a;a=_m_pf2iw(a)], [flag_ok=yes], [flag_ok=no]) CFLAGS="$save_CFLAGS" $1="-m3dnow -march=athlon" if test "X$flag_ok" = Xyes ; then $2 true else $3 true fi AC_MSG_RESULT([$flag_ok]) ]) dnl AS_ALTIVEC_INTRINSICS(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) dnl Tries to compile with the given CFLAGS. dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, dnl and ACTION-IF-NOT-ACCEPTED otherwise. AC_DEFUN([AS_ALTIVEC_INTRINSICS], [ AC_MSG_CHECKING([if compiler supports ALTIVEC intrinsics]) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -maltivec" AC_TRY_COMPILE([#include ], [__vector a; a = vec_or(a,a)], [flag_ok=yes], [flag_ok=no]) CFLAGS="$save_CFLAGS" $1="-maltivec" if test "X$flag_ok" = Xyes ; then $2 true else $3 true fi AC_MSG_RESULT([$flag_ok]) ]) liboil-0.3.17/m4/ltsugar.m40000644000175000017500000001042411332627660012247 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) liboil-0.3.17/gtk-doc.make0000644000175000017500000001036010717203073012164 00000000000000# -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### if GTK_DOC_USE_LIBTOOL GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) else GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) endif # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) EXTRA_DIST = \ $(content_files) \ $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE).types \ $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS) if ENABLE_GTK_DOC all-local: html-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @echo '*** Scanning header files ***' @-chmod -R u+w $(srcdir) if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ else \ cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi cd $(srcdir) && \ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp @true #### templates #### tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @echo '*** Rebuilding template files ***' @-chmod -R u+w $(srcdir) cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) touch tmpl-build.stamp tmpl.stamp: tmpl-build.stamp @true #### xml #### sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml @echo '*** Building XML ***' @-chmod -R u+w $(srcdir) cd $(srcdir) && \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml $(MKDB_OPTIONS) touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo '*** Building HTML ***' @-chmod -R u+w $(srcdir) rm -rf $(srcdir)/html mkdir $(srcdir)/html cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) @echo '-- Fixing Crossreferences' cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) touch html-build.stamp else all-local: endif ############## clean-local: rm -f *~ *.bak rm -rf .libs maintainer-clean-local: clean cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt install-data-local: installfiles=`echo $(srcdir)/html/*`; \ if test "$$installfiles" = '$(srcdir)/html/*'; \ then echo '-- Nothing to install' ; \ else \ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ done; \ echo '-- Installing $(srcdir)/html/index.sgml' ; \ $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \ fi uninstall-local: rm -f $(DESTDIR)$(TARGET_DIR)/* # # Require gtk-doc when making dist # if ENABLE_GTK_DOC dist-check-gtkdoc: else dist-check-gtkdoc: @echo "*** gtk-doc must be installed and enabled in order to make dist" @false endif dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/tmpl mkdir $(distdir)/xml mkdir $(distdir)/html -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl -cp $(srcdir)/xml/*.xml $(distdir)/xml -cp $(srcdir)/html/* $(distdir)/html .PHONY : dist-hook-local liboil-0.3.17/autogen.sh0000755000175000017500000000031311067011142011764 00000000000000#!/bin/sh if [ $(whoami) = ds ] ; then confflags="--enable-gtk-doc" else confflags="--enable-gtk-doc" fi autoreconf -i -f && ./configure --enable-maintainer-mode --disable-static $confflags $@ liboil-0.3.17/Makefile.am0000644000175000017500000000116211332625775012044 00000000000000 AUTOMAKE_OPTIONS = foreign SUBDIRS = liboil testsuite examples doc EXTRA_DIST = COPYING autogen.sh gtk-doc.make HACKING BUG-REPORTING DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc pkgconfig_DATA = liboil-$(LIBOIL_MAJORMINOR).pc liboil-$(LIBOIL_MAJORMINOR).pc: liboil.pc cp liboil.pc liboil-$(LIBOIL_MAJORMINOR).pc liboil-$(LIBOIL_MAJORMINOR)-uninstalled.pc: liboil-uninstalled.pc cp liboil-uninstalled.pc liboil-$(LIBOIL_MAJORMINOR)-uninstalled.pc BUILT_SOURCES=liboil-$(LIBOIL_MAJORMINOR)-uninstalled.pc CLEANFILES = liboil-$(LIBOIL_MAJORMINOR).pc liboil-$(LIBOIL_MAJORMINOR)-uninstalled.pc ACLOCAL_AMFLAGS = -I m4 liboil-0.3.17/missing0000755000175000017500000002623311332627667011417 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: liboil-0.3.17/configure0000755000175000017500000170521511332627666011733 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.64 for liboil 0.3.17. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software # Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF $* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='liboil' PACKAGE_TARNAME='liboil' PACKAGE_VERSION='0.3.17' PACKAGE_STRING='liboil 0.3.17' PACKAGE_BUGREPORT='' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_unique_file="liboil/liboil.h" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS pkgconfigdir LIBOIL_LIBS LIBOIL_CFLAGS ALTIVEC_CFLAGS _3DNOWEXT_CFLAGS _3DNOW_CFLAGS SSE3_CFLAGS SSE2_CFLAGS SSE_CFLAGS MMX_CFLAGS HAVE_ALTIVEC_INTRINSICS_FALSE HAVE_ALTIVEC_INTRINSICS_TRUE HAVE_3DNOWEXT_INTRINSICS_FALSE HAVE_3DNOWEXT_INTRINSICS_TRUE HAVE_3DNOW_INTRINSICS_FALSE HAVE_3DNOW_INTRINSICS_TRUE HAVE_SSE3_INTRINSICS_FALSE HAVE_SSE3_INTRINSICS_TRUE HAVE_SSE2_INTRINSICS_FALSE HAVE_SSE2_INTRINSICS_TRUE HAVE_SSE_INTRINSICS_FALSE HAVE_SSE_INTRINSICS_TRUE HAVE_MMX_INTRINSICS_FALSE HAVE_MMX_INTRINSICS_TRUE HAVE_ASM_BLOCKS_FALSE HAVE_ASM_BLOCKS_TRUE VFP_CFLAGS LIBRT LIBM sys_symbol_underscore HAVE_GCC_ASM_POWERPC_FPU_FALSE HAVE_GCC_ASM_POWERPC_FPU_TRUE HAVE_OS_LINUX_FALSE HAVE_OS_LINUX_TRUE HAVE_OS_WIN32_FALSE HAVE_OS_WIN32_TRUE HAVE_ARM_FALSE HAVE_ARM_TRUE HAVE_POWERPC_FALSE HAVE_POWERPC_TRUE HAVE_AMD64_FALSE HAVE_AMD64_TRUE HAVE_I386_FALSE HAVE_I386_TRUE HAVE_GCC_ASM_FALSE HAVE_GCC_ASM_TRUE GTK_DOC_USE_LIBTOOL_FALSE GTK_DOC_USE_LIBTOOL_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE GTKDOC_CHECK HTML_DIR LIBOIL_OLD_MAJORMINOR LIBOIL_MAJORMINOR USE_NEW_ABI_FALSE USE_NEW_ABI_TRUE LIBOIL_OPT_CFLAGS USE_ALT_OPT_FALSE USE_ALT_OPT_TRUE HAVE_GLIB_FALSE HAVE_GLIB_TRUE GLIB_LIBS GLIB_CFLAGS PKG_CONFIG am__fastdepCCAS_FALSE am__fastdepCCAS_TRUE CCASDEPMODE CCASFLAGS CCAS CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO RANLIB AR LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC LIBTOOL OBJDUMP DLLTOOL AS LIBOIL_LIBVERSION MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM host_os host_vendor host_cpu host build_os build_vendor build_cpu build NANO target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_shared enable_static with_pic enable_fast_install enable_dependency_tracking with_gnu_ld enable_libtool_lock enable_glib enable_prototype_checking with_alternate_optimization enable_broken_implementations with_html_dir enable_gtk_doc enable_vfp ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CCAS CCASFLAGS PKG_CONFIG GLIB_CFLAGS GLIB_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error "unrecognized option: \`$ac_option' Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures liboil 0.3.17 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/liboil] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of liboil 0.3.17:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) --disable-glib disable usage of glib --enable-prototype-checking compile with strict prototype checking --enable-broken-implementations compile with broken implementations --enable-gtk-doc use gtk-doc to build documentation [default=no] --enable-vfp compile with Vector Floating-point unit support Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-alternate-optimization=CFLAGS compile with alternate optimization flags --with-html-dir=PATH path to installed docs Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CCAS assembler compiler command (defaults to CC) CCASFLAGS assembler compiler flags (defaults to CFLAGS) PKG_CONFIG path to pkg-config utility GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config GLIB_LIBS linker flags for GLIB, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF liboil configure 0.3.17 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_type # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by liboil $as_me 0.3.17, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking nano version" >&5 $as_echo_n "checking nano version... " >&6; } NANO=$(echo 0.3.17 | sed 's/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.*//') if test x"$NANO" = x || test "x$NANO" = "x0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: 0 (release)" >&5 $as_echo "0 (release)" >&6; } NANO=0 LIBOIL_CVS=no else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NANO" >&5 $as_echo "$NANO" >&6; } LIBOIL_CVS=yes fi ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='liboil' VERSION='0.3.17' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE #LIBOIL_MAJORMINOR=0.3 #AC_SUBST(LIBOIL_MAJORMINOR) ac_config_headers="$ac_config_headers config.h" LIBOIL_LIBVERSION="3:0:3" enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AS+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.2.6' macro_revision='1.3012' ltmain="$ac_aux_dir/ltmain.sh" DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "no acceptable C compiler found in \$PATH See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 rm -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of object files: cannot compile See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:5124: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:5127: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:5130: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 6333 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7861: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7865: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8200: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:8204: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8305: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:8309: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8360: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:8364: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) link_all_deplibs=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo(void) {} _ACEOF if ac_fn_c_try_link "$LINENO"; then : archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 10743 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 10839 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: # By default we simply use the C compiler to build assembly code. test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS depcc="$CCAS" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CCAS_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CCAS_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CCAS_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 $as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then am__fastdepCCAS_TRUE= am__fastdepCCAS_FALSE='#' else am__fastdepCCAS_TRUE='#' am__fastdepCCAS_FALSE= fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 $as_echo_n "checking for GLIB... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$GLIB_CFLAGS"; then pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$GLIB_LIBS"; then pkg_cv_GLIB_LIBS="$GLIB_LIBS" else if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0"` # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" 1>&5 HAVE_GLIB=no elif test $pkg_failed = untried; then HAVE_GLIB=no else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS GLIB_LIBS=$pkg_cv_GLIB_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_GLIB=yes fi # Check whether --enable-glib was given. if test "${enable_glib+set}" = set; then : enableval=$enable_glib; case "${enableval}" in yes) HAVE_GLIB=yes ;; no) HAVE_GLIB=no ;; *) as_fn_error "bad value ${enableval} for --disable-glib" "$LINENO" 5 ;; esac fi if test "x$HAVE_GLIB" = "xyes"; then HAVE_GLIB_TRUE= HAVE_GLIB_FALSE='#' else HAVE_GLIB_TRUE='#' HAVE_GLIB_FALSE= fi # Check whether --enable-prototype-checking was given. if test "${enable_prototype_checking+set}" = set; then : enableval=$enable_prototype_checking; enable_proto_check=$enableval else enable_proto_check=no fi if test "x$enable_proto_check" = xyes ; then $as_echo "#define LIBOIL_STRICT_PROTOTYPES 1" >>confdefs.h fi # Check whether --with-alternate-optimization was given. if test "${with_alternate_optimization+set}" = set; then : withval=$with_alternate_optimization; enable_alt_opt=yes; LIBOIL_OPT_CFLAGS=$withval else enable_alt_opt=no fi if test "x$enable_alt_opt" = xyes ; then LIBOIL_OPT_CFLAGS="$LIBOIL_OPT_CFLAGS -D'OIL_OPT_MANGLE(a)=a\#\#_alt' -D'OIL_OPT_SUFFIX=\"_alt\"'" fi if test "x$enable_alt_opt" = xyes; then USE_ALT_OPT_TRUE= USE_ALT_OPT_FALSE='#' else USE_ALT_OPT_TRUE='#' USE_ALT_OPT_FALSE= fi # Check whether --enable-broken-implementations was given. if test "${enable_broken_implementations+set}" = set; then : enableval=$enable_broken_implementations; enable_broken_implementations=$enableval else enable_broken_implementations=no fi if test "x$enable_broken_implementations" = xyes ; then $as_echo "#define ENABLE_BROKEN_IMPLS 1" >>confdefs.h fi #AC_ARG_ENABLE(new-abi, # AC_HELP_STRING([--enable-new-abi],[enable experimental 0.4 ABI]), # enable_new_abi=$enableval,enable_new_abi=no) if test "x$enable_new_abi" = xyes ; then $as_echo "#define ENABLE_NEW_ABI 1" >>confdefs.h fi if test "x$enable_new_abi" = xyes; then USE_NEW_ABI_TRUE= USE_NEW_ABI_FALSE='#' else USE_NEW_ABI_TRUE='#' USE_NEW_ABI_FALSE= fi if test "x$enable_new_abi" = xyes ; then LIBOIL_MAJORMINOR=0.4 LIBOIL_OLD_MAJORMINOR=0.3 else LIBOIL_MAJORMINOR=0.3 LIBOIL_OLD_MAJORMINOR=0.2 fi ################################################## # Check for gtk-doc. ################################################## if test "x$cross_compiling" = "xyes" ; then enable_gtk_doc=no fi # Check whether --with-html-dir was given. if test "${with_html_dir+set}" = set; then : withval=$with_html_dir; else with_html_dir='${datadir}/gtk-doc/html' fi HTML_DIR="$with_html_dir" # Check whether --enable-gtk-doc was given. if test "${enable_gtk_doc+set}" = set; then : enableval=$enable_gtk_doc; else enable_gtk_doc=no fi if test x$enable_gtk_doc = xyes; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : else as_fn_error "You need to have gtk-doc >= 1.0 installed to build gtk-doc" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 $as_echo_n "checking whether to build gtk-doc documentation... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 $as_echo "$enable_gtk_doc" >&6; } for ac_prog in gtkdoc-check do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GTKDOC_CHECK+set}" = set; then : $as_echo_n "(cached) " >&6 else case $GTKDOC_CHECK in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK if test -n "$GTKDOC_CHECK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 $as_echo "$GTKDOC_CHECK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GTKDOC_CHECK" && break done if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= ENABLE_GTK_DOC_FALSE='#' else ENABLE_GTK_DOC_TRUE='#' ENABLE_GTK_DOC_FALSE= fi if test -n "$LIBTOOL"; then GTK_DOC_USE_LIBTOOL_TRUE= GTK_DOC_USE_LIBTOOL_FALSE='#' else GTK_DOC_USE_LIBTOOL_TRUE='#' GTK_DOC_USE_LIBTOOL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports gcc-style inline assembly" >&5 $as_echo_n "checking if compiler supports gcc-style inline assembly... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ #error Not GCC #endif #ifdef __GNUC_MINOR__ #if (__GNUC__ * 1000 + __GNUC_MINOR__) < 3004 #error GCC before 3.4 has critical bugs compiling inline assembly #endif #endif __asm__ (""::) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "X$flag_ok" = Xyes ; then HAVE_GCC_ASM=yes true else HAVE_GCC_ASM=no true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } if test x$HAVE_GCC_ASM = xyes ; then $as_echo "#define HAVE_GCC_ASM 1" >>confdefs.h fi if test "x$HAVE_GCC_ASM" = "xyes"; then HAVE_GCC_ASM_TRUE= HAVE_GCC_ASM_FALSE='#' else HAVE_GCC_ASM_TRUE='#' HAVE_GCC_ASM_FALSE= fi case "x${host_cpu}" in xi?86 | k?) HAVE_I386=yes $as_echo "#define HAVE_I386 1" >>confdefs.h ;; xx86_64|xamd64) HAVE_AMD64=yes $as_echo "#define HAVE_AMD64 1" >>confdefs.h ;; xpowerpc|xppc|xpowerpc64|xppc64) HAVE_POWERPC=yes $as_echo "#define HAVE_POWERPC 1" >>confdefs.h ;; xarm) HAVE_ARM=yes $as_echo "#define HAVE_ARM 1" >>confdefs.h ;; esac if test "x$HAVE_I386" = "xyes"; then HAVE_I386_TRUE= HAVE_I386_FALSE='#' else HAVE_I386_TRUE='#' HAVE_I386_FALSE= fi if test "x$HAVE_AMD64" = "xyes"; then HAVE_AMD64_TRUE= HAVE_AMD64_FALSE='#' else HAVE_AMD64_TRUE='#' HAVE_AMD64_FALSE= fi if test "x$HAVE_POWERPC" = "xyes"; then HAVE_POWERPC_TRUE= HAVE_POWERPC_FALSE='#' else HAVE_POWERPC_TRUE='#' HAVE_POWERPC_FALSE= fi if test "x$HAVE_ARM" = "xyes"; then HAVE_ARM_TRUE= HAVE_ARM_FALSE='#' else HAVE_ARM_TRUE='#' HAVE_ARM_FALSE= fi case "${host_os}" in mingw*) HAVE_OS_WIN32=yes $as_echo "#define HAVE_OS_WIN32 1" >>confdefs.h ;; linux*) HAVE_OS_LINUX=yes $as_echo "#define HAVE_OS_LINUX 1" >>confdefs.h ;; esac if test "$HAVE_WIN32" = "yes"; then HAVE_OS_WIN32_TRUE= HAVE_OS_WIN32_FALSE='#' else HAVE_OS_WIN32_TRUE='#' HAVE_OS_WIN32_FALSE= fi if test "$HAVE_LINUX" = "yes"; then HAVE_OS_LINUX_TRUE= HAVE_OS_LINUX_FALSE='#' else HAVE_OS_LINUX_TRUE='#' HAVE_OS_LINUX_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports FPU instructions on PowerPC" >&5 $as_echo_n "checking if compiler supports FPU instructions on PowerPC... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { double x = 0; __asm__ ("fadd 0,0,0"::"f" (x):"32") ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "X$flag_ok" = Xyes ; then HAVE_GCC_ASM_POWERPC_FPU=yes true else HAVE_GCC_ASM_POWERPC_FPU=no true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } if test x$HAVE_GCC_ASM_POWERPC_FPU = xyes ; then $as_echo "#define HAVE_GCC_ASM_POWERPC_FPU 1" >>confdefs.h fi if test "x$HAVE_GCC_ASM_POWERPC" = "xyes"; then HAVE_GCC_ASM_POWERPC_FPU_TRUE= HAVE_GCC_ASM_POWERPC_FPU_FALSE='#' else HAVE_GCC_ASM_POWERPC_FPU_TRUE='#' HAVE_GCC_ASM_POWERPC_FPU_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if test "${ac_cv_c_bigendian+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if unaligned memory access works correctly" >&5 $as_echo_n "checking if unaligned memory access works correctly... " >&6; } if test x"$as_cv_unaligned_access" = x ; then case $host in alpha*|arm*|hp*|mips*|sh*|sparc*|ia64*) $as_echo_n "(blacklisted) " >&6 as_cv_unaligned_access=no ;; i?86*|x86_64|amd64|powerpc*|m68k*|cris*) $as_echo_n "(whitelisted) " >&6 as_cv_unaligned_access=yes ;; esac else $as_echo_n "(cached) " >&6 fi if test x"$as_cv_unaligned_access" = x ; then if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run test program while cross compiling See \`config.log' for more details." "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(int argc, char **argv) { char array[] = "ABCDEFGH"; unsigned int iarray[2]; memcpy(iarray,array,8); #define GET(x) (*(unsigned int *)((char *)iarray + (x))) if(GET(0) != 0x41424344 && GET(0) != 0x44434241) return 1; if(GET(1) != 0x42434445 && GET(1) != 0x45444342) return 1; if(GET(2) != 0x43444546 && GET(2) != 0x46454443) return 1; if(GET(3) != 0x44454647 && GET(3) != 0x47464544) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : as_cv_unaligned_access="yes" else as_cv_unaligned_access="no" fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $as_cv_unaligned_access" >&5 $as_echo "$as_cv_unaligned_access" >&6; } if test "$as_cv_unaligned_access" = "yes"; then cat >>confdefs.h <<_ACEOF #define HAVE_UNALIGNED_ACCESS 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _ prefix in compiled symbols" >&5 $as_echo_n "checking for _ prefix in compiled symbols... " >&6; } if test "${lt_cv_sys_symbol_underscore+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_sys_symbol_underscore=no cat > conftest.$ac_ext <<_LT_EOF void nm_test_func(){} int main(){nm_test_func;return 0;} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. ac_nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then lt_cv_sys_symbol_underscore=yes else if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then : else echo "configure: cannot find nm_test_func in $ac_nlist" >&5 fi fi else echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "configure: failed program was:" >&5 cat conftest.c >&5 fi rm -rf conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_symbol_underscore" >&5 $as_echo "$lt_cv_sys_symbol_underscore" >&6; } sys_symbol_underscore=$lt_cv_sys_symbol_underscore if test x${lt_cv_sys_symbol_underscore} = xyes ; then $as_echo "#define HAVE_SYMBOL_UNDERSCORE 1" >>confdefs.h fi # ------ AX CREATE STDINT H ------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint types" >&5 $as_echo_n "checking for stdint types... " >&6; } ac_stdint_h=`echo liboil/liboil-stdint.h` # try to shortcircuit - if the default include path of the compiler # can find a "stdint.h" header then we assume that all compilers can. if test "${ac_cv_header_stdint_t+set}" = set; then : $as_echo_n "(cached) " >&6 else old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS="" old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="" old_CFLAGS="$CFLAGS" ; CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int_least32_t v = 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_stdint_result="(assuming C99 compatible system)" ac_cv_header_stdint_t="stdint.h"; else ac_cv_header_stdint_t="" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then CFLAGS="-std=c99" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int_least32_t v = 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: your GCC compiler has a defunct stdint.h for its default-mode" >&5 $as_echo "$as_me: WARNING: your GCC compiler has a defunct stdint.h for its default-mode" >&2;} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CXXFLAGS="$old_CXXFLAGS" CPPFLAGS="$old_CPPFLAGS" CFLAGS="$old_CFLAGS" fi v="... $ac_cv_header_stdint_h" if test "$ac_stdint_h" = "stdint.h" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (are you sure you want them in ./stdint.h?)" >&5 $as_echo "(are you sure you want them in ./stdint.h?)" >&6; } elif test "$ac_stdint_h" = "inttypes.h" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (are you sure you want them in ./inttypes.h?)" >&5 $as_echo "(are you sure you want them in ./inttypes.h?)" >&6; } elif test "_$ac_cv_header_stdint_t" = "_" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: (putting them into $ac_stdint_h)$v" >&5 $as_echo "(putting them into $ac_stdint_h)$v" >&6; } else ac_cv_header_stdint="$ac_cv_header_stdint_t" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint (shortcircuit)" >&5 $as_echo "$ac_cv_header_stdint (shortcircuit)" >&6; } fi if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit.. inttype_headers=`echo | sed -e 's/,/ /g'` ac_cv_stdint_result="(no helpful system typedefs seen)" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uintptr_t" >&5 $as_echo_n "checking for stdint uintptr_t... " >&6; } if test "${ac_cv_header_stdint_x+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h) { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 $as_echo "(..)" >&6; } for i in stdint.h inttypes.h sys/inttypes.h $inttype_headers do unset ac_cv_type_uintptr_t unset ac_cv_type_uint64_t ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#include <$i> " if test "x$ac_cv_type_uintptr_t" = x""yes; then : ac_cv_header_stdint_x=$i else continue fi ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include<$i> " if test "x$ac_cv_type_uint64_t" = x""yes; then : and64="/uint64_t" else and64="" fi ac_cv_stdint_result="(seen uintptr_t$and64 in $i)" break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uintptr_t" >&5 $as_echo_n "checking for stdint uintptr_t... " >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_x" >&5 $as_echo "$ac_cv_header_stdint_x" >&6; } if test "_$ac_cv_header_stdint_x" = "_" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uint32_t" >&5 $as_echo_n "checking for stdint uint32_t... " >&6; } if test "${ac_cv_header_stdint_o+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h) { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 $as_echo "(..)" >&6; } for i in inttypes.h sys/inttypes.h stdint.h $inttype_headers do unset ac_cv_type_uint32_t unset ac_cv_type_uint64_t ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "#include <$i> " if test "x$ac_cv_type_uint32_t" = x""yes; then : ac_cv_header_stdint_o=$i else continue fi ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "#include<$i> " if test "x$ac_cv_type_uint64_t" = x""yes; then : and64="/uint64_t" else and64="" fi ac_cv_stdint_result="(seen uint32_t$and64 in $i)" break break; done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint uint32_t" >&5 $as_echo_n "checking for stdint uint32_t... " >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_o" >&5 $as_echo "$ac_cv_header_stdint_o" >&6; } fi if test "_$ac_cv_header_stdint_x" = "_" ; then if test "_$ac_cv_header_stdint_o" = "_" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint u_int32_t" >&5 $as_echo_n "checking for stdint u_int32_t... " >&6; } if test "${ac_cv_header_stdint_u+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h) { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 $as_echo "(..)" >&6; } for i in sys/types.h inttypes.h sys/inttypes.h $inttype_headers ; do unset ac_cv_type_u_int32_t unset ac_cv_type_u_int64_t ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "#include <$i> " if test "x$ac_cv_type_u_int32_t" = x""yes; then : ac_cv_header_stdint_u=$i else continue fi ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "#include<$i> " if test "x$ac_cv_type_u_int64_t" = x""yes; then : and64="/u_int64_t" else and64="" fi ac_cv_stdint_result="(seen u_int32_t$and64 in $i)" break break; done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint u_int32_t" >&5 $as_echo_n "checking for stdint u_int32_t... " >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdint_u" >&5 $as_echo "$ac_cv_header_stdint_u" >&6; } fi fi if test "_$ac_cv_header_stdint_x" = "_" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint datatype model" >&5 $as_echo_n "checking for stdint datatype model... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: (..)" >&5 $as_echo "(..)" >&6; } # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 $as_echo_n "checking size of char... " >&6; } if test "${ac_cv_sizeof_char+set}" = set; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : else if test "$ac_cv_type_char" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "cannot compute sizeof (char) See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_char=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 $as_echo "$ac_cv_sizeof_char" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_CHAR $ac_cv_sizeof_char _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 $as_echo_n "checking size of short... " >&6; } if test "${ac_cv_sizeof_short+set}" = set; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : else if test "$ac_cv_type_short" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "cannot compute sizeof (short) See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_short=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 $as_echo "$ac_cv_sizeof_short" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } if test "${ac_cv_sizeof_int+set}" = set; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "cannot compute sizeof (int) See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if test "${ac_cv_sizeof_long+set}" = set; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "cannot compute sizeof (long) See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5 $as_echo_n "checking size of void*... " >&6; } if test "${ac_cv_sizeof_voidp+set}" = set; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp" "$ac_includes_default"; then : else if test "$ac_cv_type_voidp" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "cannot compute sizeof (void*) See \`config.log' for more details." "$LINENO" 5; }; } else ac_cv_sizeof_voidp=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_voidp" >&5 $as_echo "$ac_cv_sizeof_voidp" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_VOIDP $ac_cv_sizeof_voidp _ACEOF ac_cv_char_data_model="" ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char" ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short" ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int" ac_cv_long_data_model="" ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int" ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long" ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp" { $as_echo "$as_me:${as_lineno-$LINENO}: checking data model" >&5 $as_echo_n "checking data model... " >&6; } case "$ac_cv_char_data_model/$ac_cv_long_data_model" in 122/242) ac_cv_data_model="IP16" ; n="standard 16bit machine" ;; 122/244) ac_cv_data_model="LP32" ; n="standard 32bit machine" ;; 122/*) ac_cv_data_model="i16" ; n="unusual int16 model" ;; 124/444) ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;; 124/488) ac_cv_data_model="LP64" ; n="standard 64bit unixish" ;; 124/448) ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;; 124/*) ac_cv_data_model="i32" ; n="unusual int32 model" ;; 128/888) ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;; 128/*) ac_cv_data_model="i64" ; n="unusual int64 model" ;; 222/*2) ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;; 333/*3) ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;; 444/*4) ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;; 666/*6) ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;; 888/*8) ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;; 222/*|333/*|444/*|666/*|888/*) : ac_cv_data_model="iDSP" ; n="unusual dsptype" ;; *) ac_cv_data_model="none" ; n="very unusual model" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_data_model ($ac_cv_long_data_model, $n)" >&5 $as_echo "$ac_cv_data_model ($ac_cv_long_data_model, $n)" >&6; } fi if test "_$ac_cv_header_stdint_x" != "_" ; then ac_cv_header_stdint="$ac_cv_header_stdint_x" elif test "_$ac_cv_header_stdint_o" != "_" ; then ac_cv_header_stdint="$ac_cv_header_stdint_o" elif test "_$ac_cv_header_stdint_u" != "_" ; then ac_cv_header_stdint="$ac_cv_header_stdint_u" else ac_cv_header_stdint="stddef.h" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra inttypes in chosen header" >&5 $as_echo_n "checking for extra inttypes in chosen header... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: ($ac_cv_header_stdint)" >&5 $as_echo "($ac_cv_header_stdint)" >&6; } unset ac_cv_type_int_least32_t unset ac_cv_type_int_fast32_t ac_fn_c_check_type "$LINENO" "int_least32_t" "ac_cv_type_int_least32_t" "#include <$ac_cv_header_stdint> " if test "x$ac_cv_type_int_least32_t" = x""yes; then : fi ac_fn_c_check_type "$LINENO" "int_fast32_t" "ac_cv_type_int_fast32_t" "#include<$ac_cv_header_stdint> " if test "x$ac_cv_type_int_fast32_t" = x""yes; then : fi ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "#include <$ac_cv_header_stdint> " if test "x$ac_cv_type_intmax_t" = x""yes; then : fi fi # shortcircut to system "stdint.h" # ------------------ PREPARE VARIABLES ------------------------------ if test "$GCC" = "yes" ; then ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1` else ac_cv_stdint_message="using $CC" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&5 $as_echo "make use of $ac_cv_header_stdint in $ac_stdint_h $ac_cv_stdint_result" >&6; } # ----------------- DONE inttypes.h checks START header ------------- ac_config_commands="$ac_config_commands $ac_stdint_h" for ac_header in stdlib.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" if test "x$ac_cv_func_getpagesize" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_mmap_fixed_mapped=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; int i, pagesize; int fd; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 1; if (write (fd, data, pagesize) != pagesize) return 1; close (fd); /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) return 1; data2 = (char *) malloc (2 * pagesize); if (!data2) return 1; data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 1; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) return 1; if (read (fd, data3, pagesize) != pagesize) return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 1; close (fd); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_mmap_fixed_mapped=yes else ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then $as_echo "#define HAVE_MMAP 1" >>confdefs.h fi rm -f conftest.mmap { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rint in -lm" >&5 $as_echo_n "checking for rint in -lm... " >&6; } if test "${ac_cv_lib_m_rint+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char rint (); int main () { return rint (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_rint=yes else ac_cv_lib_m_rint=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_rint" >&5 $as_echo "$ac_cv_lib_m_rint" >&6; } if test "x$ac_cv_lib_m_rint" = x""yes; then : $as_echo "#define HAVE_RINT 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rintf in -lm" >&5 $as_echo_n "checking for rintf in -lm... " >&6; } if test "${ac_cv_lib_m_rintf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char rintf (); int main () { return rintf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_rintf=yes else ac_cv_lib_m_rintf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_rintf" >&5 $as_echo "$ac_cv_lib_m_rintf" >&6; } if test "x$ac_cv_lib_m_rintf" = x""yes; then : $as_echo "#define HAVE_RINTF 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lrint in -lm" >&5 $as_echo_n "checking for lrint in -lm... " >&6; } if test "${ac_cv_lib_m_lrint+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char lrint (); int main () { return lrint (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_lrint=yes else ac_cv_lib_m_lrint=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_lrint" >&5 $as_echo "$ac_cv_lib_m_lrint" >&6; } if test "x$ac_cv_lib_m_lrint" = x""yes; then : $as_echo "#define HAVE_LRINT 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lrintf in -lm" >&5 $as_echo_n "checking for lrintf in -lm... " >&6; } if test "${ac_cv_lib_m_lrintf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char lrintf (); int main () { return lrintf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_lrintf=yes else ac_cv_lib_m_lrintf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_lrintf" >&5 $as_echo "$ac_cv_lib_m_lrintf" >&6; } if test "x$ac_cv_lib_m_lrintf" = x""yes; then : $as_echo "#define HAVE_LRINTF 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sincos in -lm" >&5 $as_echo_n "checking for sincos in -lm... " >&6; } if test "${ac_cv_lib_m_sincos+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sincos (); int main () { return sincos (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sincos=yes else ac_cv_lib_m_sincos=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sincos" >&5 $as_echo "$ac_cv_lib_m_sincos" >&6; } if test "x$ac_cv_lib_m_sincos" = x""yes; then : $as_echo "#define HAVE_SINCOS 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "ieee754.h" "ac_cv_header_ieee754_h" "$ac_includes_default" if test "x$ac_cv_header_ieee754_h" = x""yes; then : $as_echo "#define HAVE_IEEE754_H 1" >>confdefs.h fi for ac_header in inttypes.h do : ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" if test "x$ac_cv_header_inttypes_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H 1 _ACEOF fi done for ac_header in sys/time.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIME_H 1 _ACEOF fi done for ac_header in unistd.h do : ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF fi done for ac_func in gettimeofday do : ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" if test "x$ac_cv_func_gettimeofday" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETTIMEOFDAY 1 _ACEOF fi done for ac_func in sigaction do : ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction" if test "x$ac_cv_func_sigaction" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SIGACTION 1 _ACEOF fi done for ac_func in sigsetjmp do : ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp" if test "x$ac_cv_func_sigsetjmp" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SIGSETJMP 1 _ACEOF fi done LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 $as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } if test "${ac_cv_lib_mw__mwvalidcheckl+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmw $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _mwvalidcheckl (); int main () { return _mwvalidcheckl (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_mw__mwvalidcheckl=yes else ac_cv_lib_mw__mwvalidcheckl=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 $as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } if test "x$ac_cv_lib_mw__mwvalidcheckl" = x""yes; then : LIBM="-lmw" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } if test "${ac_cv_lib_m_cos+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cos (); int main () { return cos (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes else ac_cv_lib_m_cos=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } if test "x$ac_cv_lib_m_cos" = x""yes; then : LIBM="$LIBM -lm" fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } if test "${ac_cv_lib_m_cos+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cos (); int main () { return cos (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes else ac_cv_lib_m_cos=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } if test "x$ac_cv_lib_m_cos" = x""yes; then : LIBM="-lm" fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then : $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h LIBRT=-lrt fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for monotonic clocks" >&5 $as_echo_n "checking for monotonic clocks... " >&6; } if test "${oil_cv_monotonic_clock+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main() { #if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC)) #error No monotonic clock #endif return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : oil_cv_monotonic_clock=yes else oil_cv_monotonic_clock=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $oil_cv_monotonic_clock" >&5 $as_echo "$oil_cv_monotonic_clock" >&6; } if test "$oil_cv_monotonic_clock" = "yes"; then $as_echo "#define HAVE_MONOTONIC_CLOCK 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wall" >&5 $as_echo_n "checking to see if compiler understands -Wall... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then LIBOIL_CFLAGS="$LIBOIL_CFLAGS -Wall" true else true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } if test "x$LIBOIL_CVS" = "xyes" then { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Werror" >&5 $as_echo_n "checking to see if compiler understands -Werror... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then LIBOIL_CFLAGS="$LIBOIL_CFLAGS -Werror" true else true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } fi if test x$HAVE_GCC_ASM = xyes -a x$HAVE_POWERPC = xyes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands \"-Wa,-maltivec\"" >&5 $as_echo_n "checking to see if compiler understands \"-Wa,-maltivec\"... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS "-Wa,-maltivec"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then LIBOIL_CFLAGS="$LIBOIL_CFLAGS -Wa,-maltivec" true else true true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands \"-Wa,-mregnames\"" >&5 $as_echo_n "checking to see if compiler understands \"-Wa,-mregnames\"... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS "-Wa,-mregnames"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then LIBOIL_CFLAGS="$LIBOIL_CFLAGS -Wa,-mregnames" true else true true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands \"-force_cpusubtype_ALL\"" >&5 $as_echo_n "checking to see if compiler understands \"-force_cpusubtype_ALL\"... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS "-force_cpusubtype_ALL"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then LIBOIL_CFLAGS="$LIBOIL_CFLAGS -force_cpusubtype_ALL" true else true true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands \"-fno-tree-vectorize\"" >&5 $as_echo_n "checking to see if compiler understands \"-fno-tree-vectorize\"... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS "-fno-tree-vectorize"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then LIBOIL_CFLAGS="$LIBOIL_CFLAGS -fno-tree-vectorize" true else true true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } fi # Check whether --enable-vfp was given. if test "${enable_vfp+set}" = set; then : enableval=$enable_vfp; enable_vfp=$enableval else enable_vfp=yes fi if test "x$enable-vfp" = xyes -a x$HAVE_GCC_ASM = xyes -a x$HAVE_ARM = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands \"-Wa,-mfpu=vfp\"" >&5 $as_echo_n "checking to see if compiler understands \"-Wa,-mfpu=vfp\"... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS "-Wa,-mfpu=vfp"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" if test "X$flag_ok" = Xyes ; then VFP_CFLAGS="$VFP_CFLAGS -mfpu=vfp" true else true true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } #AS_COMPILER_FLAG(["-Wa,-mfloat-abi=softfp"], # [VFP_CFLAGS="$VFP_CFLAGS -mfloat-abi=softfp"], # true) fi #AS_COMPILER_FLAG(["-fasm-blocks"], HAVE_ASM_BLOCKS=yes, HAVE_ASM_BLOCKS=no) HAVE_ASM_BLOCKS=no if test "x$HAVE_ASM_BLOCKS" = "xyes" then LIBOIL_CFLAGS="$LIBOIL_CFLAGS -fasm-blocks" fi if test "x$HAVE_ASM_BLOCKS" = "xyes"; then HAVE_ASM_BLOCKS_TRUE= HAVE_ASM_BLOCKS_FALSE='#' else HAVE_ASM_BLOCKS_TRUE='#' HAVE_ASM_BLOCKS_FALSE= fi #if test "x$HAVE_I386" = "xyes" #then # # I'd write a test for this, but as of 4.1.2, gcc is still broken # AC_DEFINE(USE_SSE_WRAPPER, 1, [Defined if SSE functions need stack alignment wrappers]) #fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports MMX intrinsics" >&5 $as_echo_n "checking if compiler supports MMX intrinsics... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mmmx" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { _mm_empty() ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" MMX_CFLAGS="-mmmx" if test "X$flag_ok" = Xyes ; then HAVE_MMX_INTRINSICS=yes true else HAVE_MMX_INTRINSICS=no true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE intrinsics" >&5 $as_echo_n "checking if compiler supports SSE intrinsics... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -msse" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifdef __GNUC_MINOR__ #if (__GNUC__ * 1000 + __GNUC_MINOR__) < 4002 #error GCC before 4.2 has critical bugs compiling SSE intrinsics #endif #endif __m128 a; a = _mm_or_ps(a,a) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" SSE_CFLAGS="-msse" if test "X$flag_ok" = Xyes ; then HAVE_SSE_INTRINSICS=yes true else HAVE_SSE_INTRINSICS=no true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE2 intrinsics" >&5 $as_echo_n "checking if compiler supports SSE2 intrinsics... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -msse2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifdef __GNUC_MINOR__ #if (__GNUC__ * 1000 + __GNUC_MINOR__) < 4002 #error GCC before 4.2 has critical bugs compiling SSE2 intrinsics #endif #endif __m128i a; a = _mm_setzero_si128(); a = _mm_srli_epi16(a,8) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" SSE2_CFLAGS="-msse2" if test "X$flag_ok" = Xyes ; then HAVE_SSE2_INTRINSICS=yes true else HAVE_SSE2_INTRINSICS=no true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports SSE3 intrinsics" >&5 $as_echo_n "checking if compiler supports SSE3 intrinsics... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -msse3" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifdef __GNUC_MINOR__ #if (__GNUC__ * 1000 + __GNUC_MINOR__) < 4002 #error GCC before 4.2 has critical bugs compiling SSE2 intrinsics #endif #endif __m128 a; a = _mm_addsub_ps(a,a) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" SSE3_CFLAGS="-msse3" if test "X$flag_ok" = Xyes ; then HAVE_SSE3_INTRINSICS=yes true else HAVE_SSE3_INTRINSICS=no true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports 3DNOW intrinsics" >&5 $as_echo_n "checking if compiler supports 3DNOW intrinsics... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -m3dnow" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { _m_femms() ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" _3DNOW_CFLAGS="-m3dnow" if test "X$flag_ok" = Xyes ; then HAVE_3DNOW_INTRINSICS=yes true else HAVE_3DNOW_INTRINSICS=no true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports 3DNOWEXT intrinsics" >&5 $as_echo_n "checking if compiler supports 3DNOWEXT intrinsics... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -m3dnow -march=athlon" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { __m64 a;a=_m_pf2iw(a) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" _3DNOWEXT_CFLAGS="-m3dnow -march=athlon" if test "X$flag_ok" = Xyes ; then HAVE_3DNOWEXT_INTRINSICS=yes true else HAVE_3DNOWEXT_INTRINSICS=no true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports ALTIVEC intrinsics" >&5 $as_echo_n "checking if compiler supports ALTIVEC intrinsics... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -maltivec" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { __vector a; a = vec_or(a,a) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" ALTIVEC_CFLAGS="-maltivec" if test "X$flag_ok" = Xyes ; then HAVE_ALTIVEC_INTRINSICS=yes true else HAVE_ALTIVEC_INTRINSICS=no true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } if test "x$HAVE_MMX_INTRINSICS" = "xyes"; then HAVE_MMX_INTRINSICS_TRUE= HAVE_MMX_INTRINSICS_FALSE='#' else HAVE_MMX_INTRINSICS_TRUE='#' HAVE_MMX_INTRINSICS_FALSE= fi if test "x$HAVE_SSE_INTRINSICS" = "xyes"; then HAVE_SSE_INTRINSICS_TRUE= HAVE_SSE_INTRINSICS_FALSE='#' else HAVE_SSE_INTRINSICS_TRUE='#' HAVE_SSE_INTRINSICS_FALSE= fi if test "x$HAVE_SSE2_INTRINSICS" = "xyes"; then HAVE_SSE2_INTRINSICS_TRUE= HAVE_SSE2_INTRINSICS_FALSE='#' else HAVE_SSE2_INTRINSICS_TRUE='#' HAVE_SSE2_INTRINSICS_FALSE= fi if test "x$HAVE_SSE3_INTRINSICS" = "xyes"; then HAVE_SSE3_INTRINSICS_TRUE= HAVE_SSE3_INTRINSICS_FALSE='#' else HAVE_SSE3_INTRINSICS_TRUE='#' HAVE_SSE3_INTRINSICS_FALSE= fi if test "x$HAVE_3DNOW_INTRINSICS" = "xyes"; then HAVE_3DNOW_INTRINSICS_TRUE= HAVE_3DNOW_INTRINSICS_FALSE='#' else HAVE_3DNOW_INTRINSICS_TRUE='#' HAVE_3DNOW_INTRINSICS_FALSE= fi if test "x$HAVE_3DNOWEXT_INTRINSICS" = "xyes"; then HAVE_3DNOWEXT_INTRINSICS_TRUE= HAVE_3DNOWEXT_INTRINSICS_FALSE='#' else HAVE_3DNOWEXT_INTRINSICS_TRUE='#' HAVE_3DNOWEXT_INTRINSICS_FALSE= fi if test "x$HAVE_ALTIVEC_INTRINSICS" = "xyes"; then HAVE_ALTIVEC_INTRINSICS_TRUE= HAVE_ALTIVEC_INTRINSICS_FALSE='#' else HAVE_ALTIVEC_INTRINSICS_TRUE='#' HAVE_ALTIVEC_INTRINSICS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports 'pmaddubsw %%mm0, %%mm0' asm instruction" >&5 $as_echo_n "checking if compiler supports 'pmaddubsw %%mm0, %%mm0' asm instruction... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ #error Not GCC #endif #ifdef __GNUC_MINOR__ #if (__GNUC__ * 1000 + __GNUC_MINOR__) < 3004 #error GCC before 3.4 has critical bugs compiling inline assembly #endif #endif __asm__ ("pmaddubsw %%mm0, %%mm0"::) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : flag_ok=yes else flag_ok=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "X$flag_ok" = Xyes ; then HAVE_SSSE3_ASM=yes true else HAVE_SSSE3_ASM=no true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } if test "x$HAVE_SSSE3_ASM" = xyes ; then $as_echo "#define HAVE_SSSE3_ASM 1" >>confdefs.h fi $as_echo "#define OIL_EXPORTS 1" >>confdefs.h LIBOIL_CFLAGS="$LIBOIL_CFLAGS -D_BSD_SOURCE -D_GNU_SOURCE -I\$(top_srcdir) -DOIL_ENABLE_UNSTABLE_API" LIBOIL_LIBS="\$(top_builddir)/liboil/liboil-$LIBOIL_MAJORMINOR.la $LIBM $LIBRT" pkgconfigdir="\$(libdir)/pkgconfig" ac_config_files="$ac_config_files Makefile doc/Makefile liboil/Makefile liboil/amd64/Makefile liboil/3dnow/Makefile liboil/c/Makefile liboil/colorspace/Makefile liboil/conv/Makefile liboil/copy/Makefile liboil/dct/Makefile liboil/deprecated/Makefile liboil/fb/Makefile liboil/i386/Makefile liboil/i386_amd64/Makefile liboil/jpeg/Makefile liboil/math/Makefile liboil/md5/Makefile liboil/mmx/Makefile liboil/motovec/Makefile liboil/powerpc/Makefile liboil/powerpc_asm_blocks/Makefile liboil/ref/Makefile liboil/simdpack/Makefile liboil/sse/Makefile liboil/utf8/Makefile liboil/arm/Makefile testsuite/Makefile testsuite/instruction/Makefile examples/Makefile examples/audioresample/Makefile examples/huffman/Makefile examples/jpeg/Makefile examples/md5/Makefile examples/taylor/Makefile examples/uberopt/Makefile examples/videoscale/Makefile examples/work/Makefile liboil-uninstalled.pc liboil.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then as_fn_error "conditional \"am__fastdepCCAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GLIB_TRUE}" && test -z "${HAVE_GLIB_FALSE}"; then as_fn_error "conditional \"HAVE_GLIB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_ALT_OPT_TRUE}" && test -z "${USE_ALT_OPT_FALSE}"; then as_fn_error "conditional \"USE_ALT_OPT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_NEW_ABI_TRUE}" && test -z "${USE_NEW_ABI_FALSE}"; then as_fn_error "conditional \"USE_NEW_ABI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GTK_DOC_USE_LIBTOOL_TRUE}" && test -z "${GTK_DOC_USE_LIBTOOL_FALSE}"; then as_fn_error "conditional \"GTK_DOC_USE_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GCC_ASM_TRUE}" && test -z "${HAVE_GCC_ASM_FALSE}"; then as_fn_error "conditional \"HAVE_GCC_ASM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_I386_TRUE}" && test -z "${HAVE_I386_FALSE}"; then as_fn_error "conditional \"HAVE_I386\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_AMD64_TRUE}" && test -z "${HAVE_AMD64_FALSE}"; then as_fn_error "conditional \"HAVE_AMD64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_POWERPC_TRUE}" && test -z "${HAVE_POWERPC_FALSE}"; then as_fn_error "conditional \"HAVE_POWERPC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_ARM_TRUE}" && test -z "${HAVE_ARM_FALSE}"; then as_fn_error "conditional \"HAVE_ARM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_OS_WIN32_TRUE}" && test -z "${HAVE_OS_WIN32_FALSE}"; then as_fn_error "conditional \"HAVE_OS_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_OS_LINUX_TRUE}" && test -z "${HAVE_OS_LINUX_FALSE}"; then as_fn_error "conditional \"HAVE_OS_LINUX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GCC_ASM_POWERPC_FPU_TRUE}" && test -z "${HAVE_GCC_ASM_POWERPC_FPU_FALSE}"; then as_fn_error "conditional \"HAVE_GCC_ASM_POWERPC_FPU\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_ASM_BLOCKS_TRUE}" && test -z "${HAVE_ASM_BLOCKS_FALSE}"; then as_fn_error "conditional \"HAVE_ASM_BLOCKS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_MMX_INTRINSICS_TRUE}" && test -z "${HAVE_MMX_INTRINSICS_FALSE}"; then as_fn_error "conditional \"HAVE_MMX_INTRINSICS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SSE_INTRINSICS_TRUE}" && test -z "${HAVE_SSE_INTRINSICS_FALSE}"; then as_fn_error "conditional \"HAVE_SSE_INTRINSICS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SSE2_INTRINSICS_TRUE}" && test -z "${HAVE_SSE2_INTRINSICS_FALSE}"; then as_fn_error "conditional \"HAVE_SSE2_INTRINSICS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SSE3_INTRINSICS_TRUE}" && test -z "${HAVE_SSE3_INTRINSICS_FALSE}"; then as_fn_error "conditional \"HAVE_SSE3_INTRINSICS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_3DNOW_INTRINSICS_TRUE}" && test -z "${HAVE_3DNOW_INTRINSICS_FALSE}"; then as_fn_error "conditional \"HAVE_3DNOW_INTRINSICS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_3DNOWEXT_INTRINSICS_TRUE}" && test -z "${HAVE_3DNOWEXT_INTRINSICS_FALSE}"; then as_fn_error "conditional \"HAVE_3DNOWEXT_INTRINSICS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_ALTIVEC_INTRINSICS_TRUE}" && test -z "${HAVE_ALTIVEC_INTRINSICS_FALSE}"; then as_fn_error "conditional \"HAVE_ALTIVEC_INTRINSICS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by liboil $as_me 0.3.17, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ liboil config.status 0.3.17 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' # variables for create stdint.h replacement PACKAGE="$PACKAGE" VERSION="$VERSION" ac_stdint_h="$ac_stdint_h" _ac_stdint_h=`$as_echo "_$PACKAGE-$ac_stdint_h" | $as_tr_cpp` ac_cv_stdint_message="$ac_cv_stdint_message" ac_cv_header_stdint_t="$ac_cv_header_stdint_t" ac_cv_header_stdint_x="$ac_cv_header_stdint_x" ac_cv_header_stdint_o="$ac_cv_header_stdint_o" ac_cv_header_stdint_u="$ac_cv_header_stdint_u" ac_cv_type_uint64_t="$ac_cv_type_uint64_t" ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t" ac_cv_char_data_model="$ac_cv_char_data_model" ac_cv_long_data_model="$ac_cv_long_data_model" ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t" ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t" ac_cv_type_intmax_t="$ac_cv_type_intmax_t" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "$ac_stdint_h") CONFIG_COMMANDS="$CONFIG_COMMANDS $ac_stdint_h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "liboil/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/Makefile" ;; "liboil/amd64/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/amd64/Makefile" ;; "liboil/3dnow/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/3dnow/Makefile" ;; "liboil/c/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/c/Makefile" ;; "liboil/colorspace/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/colorspace/Makefile" ;; "liboil/conv/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/conv/Makefile" ;; "liboil/copy/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/copy/Makefile" ;; "liboil/dct/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/dct/Makefile" ;; "liboil/deprecated/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/deprecated/Makefile" ;; "liboil/fb/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/fb/Makefile" ;; "liboil/i386/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/i386/Makefile" ;; "liboil/i386_amd64/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/i386_amd64/Makefile" ;; "liboil/jpeg/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/jpeg/Makefile" ;; "liboil/math/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/math/Makefile" ;; "liboil/md5/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/md5/Makefile" ;; "liboil/mmx/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/mmx/Makefile" ;; "liboil/motovec/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/motovec/Makefile" ;; "liboil/powerpc/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/powerpc/Makefile" ;; "liboil/powerpc_asm_blocks/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/powerpc_asm_blocks/Makefile" ;; "liboil/ref/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/ref/Makefile" ;; "liboil/simdpack/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/simdpack/Makefile" ;; "liboil/sse/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/sse/Makefile" ;; "liboil/utf8/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/utf8/Makefile" ;; "liboil/arm/Makefile") CONFIG_FILES="$CONFIG_FILES liboil/arm/Makefile" ;; "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; "testsuite/instruction/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/instruction/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "examples/audioresample/Makefile") CONFIG_FILES="$CONFIG_FILES examples/audioresample/Makefile" ;; "examples/huffman/Makefile") CONFIG_FILES="$CONFIG_FILES examples/huffman/Makefile" ;; "examples/jpeg/Makefile") CONFIG_FILES="$CONFIG_FILES examples/jpeg/Makefile" ;; "examples/md5/Makefile") CONFIG_FILES="$CONFIG_FILES examples/md5/Makefile" ;; "examples/taylor/Makefile") CONFIG_FILES="$CONFIG_FILES examples/taylor/Makefile" ;; "examples/uberopt/Makefile") CONFIG_FILES="$CONFIG_FILES examples/uberopt/Makefile" ;; "examples/videoscale/Makefile") CONFIG_FILES="$CONFIG_FILES examples/videoscale/Makefile" ;; "examples/work/Makefile") CONFIG_FILES="$CONFIG_FILES examples/work/Makefile" ;; "liboil-uninstalled.pc") CONFIG_FILES="$CONFIG_FILES liboil-uninstalled.pc" ;; "liboil.pc") CONFIG_FILES="$CONFIG_FILES liboil.pc" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Assembler program. AS=$AS # DLL creation program. DLLTOOL=$DLLTOOL # Object dumper program. OBJDUMP=$OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == "file_magic". file_magic_cmd=$lt_file_magic_cmd # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; "$ac_stdint_h":C) { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_stdint_h : $_ac_stdint_h" >&5 $as_echo "$as_me: creating $ac_stdint_h : $_ac_stdint_h" >&6;} ac_stdint=$tmp/_stdint.h echo "#ifndef" $_ac_stdint_h >$ac_stdint echo "#define" $_ac_stdint_h "1" >>$ac_stdint echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint if test "_$ac_cv_header_stdint_t" != "_" ; then echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint echo "#include " >>$ac_stdint echo "#endif" >>$ac_stdint echo "#endif" >>$ac_stdint else cat >>$ac_stdint < #else #include /* .................... configured part ............................ */ STDINT_EOF echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint if test "_$ac_cv_header_stdint_x" != "_" ; then ac_header="$ac_cv_header_stdint_x" echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint else echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint fi echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint if test "_$ac_cv_header_stdint_o" != "_" ; then ac_header="$ac_cv_header_stdint_o" echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint else echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint fi echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint if test "_$ac_cv_header_stdint_u" != "_" ; then ac_header="$ac_cv_header_stdint_u" echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint else echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint fi echo "" >>$ac_stdint if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then echo "#include <$ac_header>" >>$ac_stdint echo "" >>$ac_stdint fi fi echo "/* which 64bit typedef has been found */" >>$ac_stdint if test "$ac_cv_type_uint64_t" = "yes" ; then echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint fi if test "$ac_cv_type_u_int64_t" = "yes" ; then echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint fi echo "" >>$ac_stdint echo "/* which type model has been detected */" >>$ac_stdint if test "_$ac_cv_char_data_model" != "_" ; then echo "#define _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint echo "#define _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint else echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint fi echo "" >>$ac_stdint echo "/* whether int_least types were detected */" >>$ac_stdint if test "$ac_cv_type_int_least32_t" = "yes"; then echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint fi echo "/* whether int_fast types were detected */" >>$ac_stdint if test "$ac_cv_type_int_fast32_t" = "yes"; then echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint fi echo "/* whether intmax_t type was detected */" >>$ac_stdint if test "$ac_cv_type_intmax_t" = "yes"; then echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint else echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint fi echo "" >>$ac_stdint cat >>$ac_stdint <= 199901L #define _HAVE_UINT64_T #define _HAVE_LONGLONG_UINT64_T typedef long long int64_t; typedef unsigned long long uint64_t; #elif !defined __STRICT_ANSI__ #if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ #define _HAVE_UINT64_T typedef __int64 int64_t; typedef unsigned __int64 uint64_t; #elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__ /* note: all ELF-systems seem to have loff-support which needs 64-bit */ #if !defined _NO_LONGLONG #define _HAVE_UINT64_T #define _HAVE_LONGLONG_UINT64_T typedef long long int64_t; typedef unsigned long long uint64_t; #endif #elif defined __alpha || (defined __mips && defined _ABIN32) #if !defined _NO_LONGLONG typedef long int64_t; typedef unsigned long uint64_t; #endif /* compiler/cpu type to define int64_t */ #endif #endif #endif #if defined _STDINT_HAVE_U_INT_TYPES /* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */ typedef u_int8_t uint8_t; typedef u_int16_t uint16_t; typedef u_int32_t uint32_t; /* glibc compatibility */ #ifndef __int8_t_defined #define __int8_t_defined #endif #endif #ifdef _STDINT_NEED_INT_MODEL_T /* we must guess all the basic types. Apart from byte-adressable system, */ /* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */ /* (btw, those nibble-addressable systems are way off, or so we assume) */ #if defined _STDINT_BYTE_MODEL #if _STDINT_LONG_MODEL+0 == 242 /* 2:4:2 = IP16 = a normal 16-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned long uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef long int32_t; #endif #elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444 /* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */ /* 4:4:4 = ILP32 = a normal 32-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef int int32_t; #endif #elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488 /* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */ /* 4:8:8 = LP64 = a normal 64-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef int int32_t; #endif /* this system has a "long" of 64bit */ #ifndef _HAVE_UINT64_T #define _HAVE_UINT64_T typedef unsigned long uint64_t; typedef long int64_t; #endif #elif _STDINT_LONG_MODEL+0 == 448 /* LLP64 a 64-bit system derived from a 32-bit system */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #ifndef __int8_t_defined #define __int8_t_defined typedef char int8_t; typedef short int16_t; typedef int int32_t; #endif /* assuming the system has a "long long" */ #ifndef _HAVE_UINT64_T #define _HAVE_UINT64_T #define _HAVE_LONGLONG_UINT64_T typedef unsigned long long uint64_t; typedef long long int64_t; #endif #else #define _STDINT_NO_INT32_T #endif #else #define _STDINT_NO_INT8_T #define _STDINT_NO_INT32_T #endif #endif /* * quote from SunOS-5.8 sys/inttypes.h: * Use at your own risk. As of February 1996, the committee is squarely * behind the fixed sized types; the "least" and "fast" types are still being * discussed. The probability that the "fast" types may be removed before * the standard is finalized is high enough that they are not currently * implemented. */ #if defined _STDINT_NEED_INT_LEAST_T typedef int8_t int_least8_t; typedef int16_t int_least16_t; typedef int32_t int_least32_t; #ifdef _HAVE_UINT64_T typedef int64_t int_least64_t; #endif typedef uint8_t uint_least8_t; typedef uint16_t uint_least16_t; typedef uint32_t uint_least32_t; #ifdef _HAVE_UINT64_T typedef uint64_t uint_least64_t; #endif /* least types */ #endif #if defined _STDINT_NEED_INT_FAST_T typedef int8_t int_fast8_t; typedef int int_fast16_t; typedef int32_t int_fast32_t; #ifdef _HAVE_UINT64_T typedef int64_t int_fast64_t; #endif typedef uint8_t uint_fast8_t; typedef unsigned uint_fast16_t; typedef uint32_t uint_fast32_t; #ifdef _HAVE_UINT64_T typedef uint64_t uint_fast64_t; #endif /* fast types */ #endif #ifdef _STDINT_NEED_INTMAX_T #ifdef _HAVE_UINT64_T typedef int64_t intmax_t; typedef uint64_t uintmax_t; #else typedef long intmax_t; typedef unsigned long uintmax_t; #endif #endif #ifdef _STDINT_NEED_INTPTR_T #ifndef __intptr_t_defined #define __intptr_t_defined /* we encourage using "long" to store pointer values, never use "int" ! */ #if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484 typedef unsigned int uintptr_t; typedef int intptr_t; #elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444 typedef unsigned long uintptr_t; typedef long intptr_t; #elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T typedef uint64_t uintptr_t; typedef int64_t intptr_t; #else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */ typedef unsigned long uintptr_t; typedef long intptr_t; #endif #endif #endif /* The ISO C99 standard specifies that in C++ implementations these should only be defined if explicitly requested. */ #if !defined __cplusplus || defined __STDC_CONSTANT_MACROS #ifndef UINT32_C /* Signed. */ # define INT8_C(c) c # define INT16_C(c) c # define INT32_C(c) c # ifdef _HAVE_LONGLONG_UINT64_T # define INT64_C(c) c ## L # else # define INT64_C(c) c ## LL # endif /* Unsigned. */ # define UINT8_C(c) c ## U # define UINT16_C(c) c ## U # define UINT32_C(c) c ## U # ifdef _HAVE_LONGLONG_UINT64_T # define UINT64_C(c) c ## UL # else # define UINT64_C(c) c ## ULL # endif /* Maximal type. */ # ifdef _HAVE_LONGLONG_UINT64_T # define INTMAX_C(c) c ## L # define UINTMAX_C(c) c ## UL # else # define INTMAX_C(c) c ## LL # define UINTMAX_C(c) c ## ULL # endif /* literalnumbers */ #endif #endif /* These limits are merily those of a two complement byte-oriented system */ /* Minimum of signed integral types. */ # define INT8_MIN (-128) # define INT16_MIN (-32767-1) # define INT32_MIN (-2147483647-1) # define INT64_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum of signed integral types. */ # define INT8_MAX (127) # define INT16_MAX (32767) # define INT32_MAX (2147483647) # define INT64_MAX (__INT64_C(9223372036854775807)) /* Maximum of unsigned integral types. */ # define UINT8_MAX (255) # define UINT16_MAX (65535) # define UINT32_MAX (4294967295U) # define UINT64_MAX (__UINT64_C(18446744073709551615)) /* Minimum of signed integral types having a minimum size. */ # define INT_LEAST8_MIN INT8_MIN # define INT_LEAST16_MIN INT16_MIN # define INT_LEAST32_MIN INT32_MIN # define INT_LEAST64_MIN INT64_MIN /* Maximum of signed integral types having a minimum size. */ # define INT_LEAST8_MAX INT8_MAX # define INT_LEAST16_MAX INT16_MAX # define INT_LEAST32_MAX INT32_MAX # define INT_LEAST64_MAX INT64_MAX /* Maximum of unsigned integral types having a minimum size. */ # define UINT_LEAST8_MAX UINT8_MAX # define UINT_LEAST16_MAX UINT16_MAX # define UINT_LEAST32_MAX UINT32_MAX # define UINT_LEAST64_MAX UINT64_MAX /* shortcircuit*/ #endif /* once */ #endif #endif STDINT_EOF fi if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_stdint_h is unchanged" >&5 $as_echo "$as_me: $ac_stdint_h is unchanged" >&6;} else ac_dir=`$as_dirname -- "$ac_stdint_h" || $as_expr X"$ac_stdint_h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_stdint_h" : 'X\(//\)[^/]' \| \ X"$ac_stdint_h" : 'X\(//\)$' \| \ X"$ac_stdint_h" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_stdint_h" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p rm -f $ac_stdint_h mv $ac_stdint $ac_stdint_h fi ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi liboil-0.3.17/doc/0000777000175000017500000000000011332637400010625 500000000000000liboil-0.3.17/doc/liboil-overrides.txt0000644000175000017500000000013510717203073014554 00000000000000NULL OIL_OPT_MANGLE OIL_OPT_SUFFIX LIBOIL_CHECK_PROTOTYPE OIL_OPT_FLAG_MANGLE OIL_NO_CLASSES liboil-0.3.17/doc/liboil-sections.txt0000644000175000017500000002035210717203073014404 00000000000000
liboilinit oil_init
liboilinit-unstable oil_init_no_optimize oil_optimize_all oil_optimize
liboilcpu oil_cpu_get_flags oil_cpu_fault_check_enable oil_cpu_fault_check_disable oil_cpu_fault_check_try oil_cpu_get_ticks_per_second
liboildebug OilDebugPrintFunc OilDebugLevel oil_debug_set_print_function oil_debug_get_level oil_debug_set_level OIL_ERROR OIL_WARNING OIL_INFO OIL_DEBUG OIL_LOG OIL_FUNCTION OIL_DEBUG_PRINT
liboilclass-unstable OilFunctionClass OIL_DECLARE_CLASS OIL_DEFINE_CLASS_FULL OIL_DEFINE_CLASS oil_class_get_by_index oil_class_get oil_class_optimize oil_class_get_n_classes oil_class_choose_by_name oil_class_register_impl_by_name oil_class_register_impl oil_class_register_impl_full
liboilimpl-unstable OilFunctionImpl oil_impl_get_by_index oil_impl_is_runnable OilImplFlag OIL_CPU_FLAG_MASK OIL_DEFINE_IMPL_FULL OIL_DEFINE_IMPL OIL_DEFINE_IMPL_REF OIL_DEFINE_IMPL_ASM OIL_DEFINE_IMPL_DEPENDS
liboilprofile OilProfile OIL_PROFILE_HIST_LENGTH oil_profile_stamp oil_profile_init oil_profile_stop_handle oil_profile_get_ave_std oil_profile_start oil_profile_stop
liboilprototype OilPrototype oil_prototype_from_string oil_prototype_to_string oil_prototype_to_arg_string oil_prototype_free oil_prototype_append_param
liboiltypes OilType oil_type_sizeof oil_type_is_floating_point oil_type_name OilArgType oil_arg_type_name oil_type_s8 oil_type_u8 oil_type_s16 oil_type_u16 oil_type_s32 oil_type_u32 oil_type_s64 oil_type_u64 oil_type_f32 oil_type_f64 oil_type_min_s8 oil_type_min_u8 oil_type_min_s16 oil_type_min_u16 oil_type_min_s32 oil_type_min_u32 oil_type_max_s8 oil_type_max_u8 oil_type_max_s16 oil_type_max_u16 oil_type_max_s32 oil_type_max_u32
liboilparameter OilParameter oil_param_get_source_data
liboilrandom oil_rand_s32 oil_rand_s16 oil_rand_s8 oil_rand_u32 oil_rand_u16 oil_rand_u8 oil_rand_s64 oil_rand_u64 oil_rand_rgba oil_rand_f32 oil_rand_f64 oil_random_alpha oil_random_argb oil_random_f32 oil_random_f64 oil_random_s16 oil_random_s32 oil_random_s64 oil_random_s8 oil_random_u16 oil_random_u32 oil_random_u64 oil_random_u8
liboiltest OilTest OilTestFunction OIL_TEST_HEADER OIL_TEST_FOOTER oil_test_new oil_test_init oil_test_free oil_test_set_iterations oil_test_check_ref oil_test_check_impl oil_test_cleanup oil_test_get_source_data oil_test_get_value oil_test_set_test_footer oil_test_set_test_header
liboiljunk OIL_OPT_MANGLE OIL_OPT_SUFFIX OIL_CHECK_PROTOTYPE OIL_OPT_FLAG_MANGLE OIL_NO_CLASSES NULL
liboilfuncs-conv oil_clipconv8x8_u8_s16 oil_clipconv_s16_f32 oil_clipconv_s16_f64 oil_clipconv_s16_s32 oil_clipconv_s16_u16 oil_clipconv_s16_u32 oil_clipconv_s32_f32 oil_clipconv_s32_f64 oil_clipconv_s32_u32 oil_clipconv_s8_f32 oil_clipconv_s8_f64 oil_clipconv_s8_s16 oil_clipconv_s8_s32 oil_clipconv_s8_u16 oil_clipconv_s8_u32 oil_clipconv_s8_u8 oil_clipconv_u16_f32 oil_clipconv_u16_f64 oil_clipconv_u16_s16 oil_clipconv_u16_s32 oil_clipconv_u16_u32 oil_clipconv_u32_f32 oil_clipconv_u32_f64 oil_clipconv_u32_s32 oil_clipconv_u8_f32 oil_clipconv_u8_f64 oil_clipconv_u8_s16 oil_clipconv_u8_s32 oil_clipconv_u8_s8 oil_clipconv_u8_u16 oil_clipconv_u8_u32 oil_conv8x8_f64_s16 oil_conv8x8_s16_f64 oil_conv_f32_f64 oil_conv_f32_s16 oil_conv_f32_s32 oil_conv_f32_s8 oil_conv_f32_u16 oil_conv_f32_u32 oil_conv_f32_u8 oil_conv_f64_f32 oil_conv_f64_s16 oil_conv_f64_s32 oil_conv_f64_s8 oil_conv_f64_u16 oil_conv_f64_u32 oil_conv_f64_u8 oil_conv_s16_f32 oil_conv_s16_f64 oil_conv_s16_s32 oil_conv_s16_s8 oil_conv_s16_u16 oil_conv_s16_u32 oil_conv_s16_u8 oil_conv_s32_f32 oil_conv_s32_f64 oil_conv_s32_s16 oil_conv_s32_s8 oil_conv_s32_u16 oil_conv_s32_u32 oil_conv_s32_u8 oil_conv_s8_f32 oil_conv_s8_f64 oil_conv_s8_s16 oil_conv_s8_s32 oil_conv_s8_u16 oil_conv_s8_u32 oil_conv_s8_u8 oil_conv_u16_f32 oil_conv_u16_f64 oil_conv_u16_s16 oil_conv_u16_s32 oil_conv_u16_s8 oil_conv_u16_u32 oil_conv_u16_u8 oil_conv_u32_f32 oil_conv_u32_f64 oil_conv_u32_s16 oil_conv_u32_s32 oil_conv_u32_s8 oil_conv_u32_u16 oil_conv_u32_u8 oil_conv_u8_f32 oil_conv_u8_f64 oil_conv_u8_s16 oil_conv_u8_s32 oil_conv_u8_s8 oil_conv_u8_u16 oil_conv_u8_u32 oil_scaleconv_f32_s16 oil_scaleconv_f32_s32 oil_scaleconv_f32_s8 oil_scaleconv_f32_u16 oil_scaleconv_f32_u32 oil_scaleconv_f32_u8 oil_scaleconv_f64_s16 oil_scaleconv_f64_s32 oil_scaleconv_f64_s8 oil_scaleconv_f64_u16 oil_scaleconv_f64_u32 oil_scaleconv_f64_u8 oil_scaleconv_s16_f32 oil_scaleconv_s16_f64 oil_scaleconv_s32_f32 oil_scaleconv_s32_f64 oil_scaleconv_s8_f32 oil_scaleconv_s8_f64 oil_scaleconv_u16_f32 oil_scaleconv_u16_f64 oil_scaleconv_u32_f32 oil_scaleconv_u32_f64 oil_scaleconv_u8_f32 oil_scaleconv_u8_f64
liboilfuncs-copy oil_compare_u8 oil_copy_u8 oil_permute_f32 oil_permute_f64 oil_permute_s16 oil_permute_s32 oil_permute_s8 oil_permute_u16 oil_permute_u32 oil_permute_u8 oil_splat_u32 oil_splat_u8 oil_swab_u16 oil_swab_u32 oil_tablelookup_u8 oil_testzero_u8 oil_trans8x8_f64 oil_trans8x8_u16 oil_trans8x8_u32 oil_trans8x8_u8 oil_unzigzag8x8_s16 oil_zigzag8x8_s16 oil_splat_u32_ns oil_splat_u8_ns oil_trans8x8_s16 oil_memcpy
liboilfuncs-math oil_abs_f32_f32 oil_abs_f64_f64 oil_abs_u16_s16 oil_abs_u32_s32 oil_abs_u8_s8 oil_average2_u8 oil_multsum_f32 oil_multsum_f64 oil_scalaradd_f32 oil_scalaradd_f64 oil_scalaradd_s16 oil_scalaradd_s32 oil_scalaradd_s8 oil_scalaradd_u16 oil_scalaradd_u32 oil_scalaradd_u8 oil_scalarmult_f32 oil_scalarmult_f64 oil_scalarmult_s16 oil_scalarmult_s32 oil_scalarmult_s8 oil_scalarmult_u16 oil_scalarmult_u32 oil_scalarmult_u8 oil_vectoradd_f32 oil_vectoradd_f64 oil_vectoradd_s16 oil_vectoradd_s32 oil_vectoradd_s8 oil_vectoradd_u16 oil_vectoradd_u32 oil_vectoradd_u8 oil_vectoradd_s_s8 oil_vectoradd_s_u8 oil_vectoradd_s_s16 oil_vectoradd_s_u16 oil_vectoradd_s_f32 oil_vectoradd_s_f64 oil_squaresum_f64 oil_squaresum_shifted_s16 oil_sum_f64 oil_add_f32 oil_divide_f32 oil_floor_f32 oil_inverse_f32 oil_maximum_f32 oil_minimum_f32 oil_multiply_f32 oil_negative_f32 oil_scalaradd_f32_ns oil_scalarmultiply_f32_ns oil_sign_f32 oil_subtract_f32
liboilfuncs-math8x8 oil_mult8x8_s16 oil_sad8x8_f64 oil_sad8x8_s16 oil_sad8x8_f64_2 oil_sad8x8_s16_2 oil_sad8x8_u8
liboilfuncs-dct oil_dct36_f32 oil_fdct8_f64 oil_fdct8x8_f64 oil_fdct8x8s_s16 oil_idct8_f64 oil_idct8x8_f64 oil_idct8x8_s16 oil_imdct12_f64 oil_imdct32_f32 oil_imdct36_f64 oil_mdct12_f64 oil_mdct36_f64 oil_idct8theora_s16 oil_idct8x8lim10_f64 oil_idct8x8lim10_s16 oil_idct8x8theora_s16
liboilfuncs-pixel oil_argb_paint_u8 oil_ayuv2argb_u8 oil_ayuv2uyvy oil_ayuv2yuyv oil_ayuv2yvyu oil_composite_add_argb oil_composite_add_argb_const_src oil_composite_in_argb oil_composite_in_argb_const_mask oil_composite_in_argb_const_src oil_composite_in_over_argb oil_composite_in_over_argb_const_mask oil_composite_in_over_argb_const_src oil_composite_over_argb oil_composite_over_argb_const_src oil_merge_linear_argb oil_resample_linear_argb oil_resample_linear_u8 oil_rgb2bgr oil_rgb2rgba oil_yuv2rgbx_sub2_u8 oil_yuv2rgbx_sub4_u8 oil_yuv2rgbx_u8 oil_uyvy2ayuv oil_yuyv2ayuv oil_yvyu2ayuv
liboilfuncs-doc oil_clip_f32 oil_clip_f64 oil_clip_s16 oil_clip_s32 oil_clip_s8 oil_clip_u16 oil_clip_u32 oil_clip_u8 oil_dequantize8x8_s16 oil_diffsquaresum_f64 oil_md5 oil_mix_u8 oil_null oil_scanlinescale2_u8 oil_sincos_f64 oil_utf8_validate oil_diff8x8_s16_u8 oil_diff8x8_average_s16_u8 oil_err_inter8x8_u8_avg oil_recon8x8_inter oil_err_intra8x8_u8 oil_recon8x8_intra oil_colsad8x8_u8 oil_composite_over_u8 oil_diff8x8_const128_s16_u8 oil_copy8x8_u8 oil_err_inter8x8_u8 oil_fdct8x8theora oil_rowsad8x8_u8 oil_recon8x8_inter2 oil_composite_add_u8 oil_sad8x8_u8_avg
liboilmacros oil_min oil_max oil_divide_255 oil_argb oil_argb_noclamp oil_argb_A oil_argb_G oil_argb_B oil_argb_R oil_muldiv_255 oil_clamp_255 OIL_GET OIL_OFFSET OIL_INCREMENT
liboil-0.3.17/doc/Makefile.am0000644000175000017500000000471210717203073012602 00000000000000## Process this file with automake to produce Makefile.in # We require automake 1.6 at least. AUTOMAKE_OPTIONS = 1.6 # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # The name of the module, e.g. 'glib'. DOC_MODULE=liboil # The top-level SGML file. You can change this if you want to. DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting the functions and macros. # e.g. DOC_SOURCE_DIR=../../../gtk DOC_SOURCE_DIR=../liboil # Extra options to pass to gtkdoc-scangobj. Not normally needed. SCANGOBJ_OPTIONS= # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" SCAN_OPTIONS= # Extra options to supply to gtkdoc-mkdb. # e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml MKDB_OPTIONS=--sgml-mode --output-format=xml # Extra options to supply to gtkdoc-fixref. Not normally needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS= # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB=$(top_srcdir)/liboil/*.h CFILE_GLOB=$(top_srcdir)/liboil/*.c # Header files to ignore when scanning. # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h IGNORE_HFILES=liboilfuncs.h fbmmx.h fbpict.h liboil-stdint.h # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES= # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml content_files= # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) INCLUDES= GTKDOC_LIBS= # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in EXTRA_DIST += sync: cd html && rsync -a . freedesktop.org:/srv/liboil.freedesktop.org/www/documentation/ liboil-0.3.17/doc/liboil.types0000644000175000017500000000000210717203073013072 00000000000000 liboil-0.3.17/doc/tmpl/0000777000175000017500000000000011332637400011601 500000000000000liboil-0.3.17/doc/tmpl/liboilfuncs-pixel.sgml0000644000175000017500000000531611332637400016036 00000000000000 @i_4xn: @s1_4: @s2_n: @n: @d_4xn: @s_4xn: @n: @d_n: @s_n: @n: @d_n: @s_n: @n: @d_n: @s_n: @n: @i_n: @s1_n: @n: @i_n: @s1_1: @n: @d_n: @s1_n: @s2_n: @n: @d_n: @s1_n: @s2_1: @n: @d_n: @s1_1: @s2_n: @n: @i_n: @s1_n: @s2_n: @n: @i_n: @s1_n: @s2_1: @n: @i_n: @s1_1: @s2_n: @n: @i_n: @s1_n: @n: @i_n: @s1_1: @n: @d_n: @s_n: @s2_n: @s3_1: @n: @d_n: @s_2xn: @n: @i_2: @d_n: @s_2xn: @n: @i_2: @d_3xn: @s_3xn: @n: @d_4xn: @s_3xn: @n: @d_4xn: @src1: @src2: @src3: @n: @d_4xn: @src1: @src2: @src3: @n: @d_4xn: @src1: @src2: @src3: @n: @d_n: @s_n: @n: @d_n: @s_n: @n: @d_n: @s_n: @n: liboil-0.3.17/doc/tmpl/liboilfunction.sgml0000644000175000017500000000553111332637400015425 00000000000000 @klass: @klass: @string: @test: @klass: @string: @i: @Returns: @class_name: @Returns: @klass: @Returns: @klass: @name: @klass_name: @impl: @klass: @impl: @klass: @func: @name: @flags: @i: @Returns: @impl: @Returns: @function: @klass: @flags: @function: @klass: @function: @klass: @function: @klass: @function: @klass: @...: liboil-0.3.17/doc/tmpl/liboilfuncs-copy.sgml0000644000175000017500000000544011332637400015665 00000000000000 @d_1: @s1: @s2: @n: @dest: @src: @n: @dest: @dstr: @src1: @sstr1: @src2: @sstr2: @n: @dest: @dstr: @src1: @sstr1: @src2: @sstr2: @n: @dest: @dstr: @src1: @sstr1: @src2: @sstr2: @n: @dest: @dstr: @src1: @sstr1: @src2: @sstr2: @n: @dest: @dstr: @src1: @sstr1: @src2: @sstr2: @n: @dest: @dstr: @src1: @sstr1: @src2: @sstr2: @n: @dest: @dstr: @src1: @sstr1: @src2: @sstr2: @n: @dest: @dstr: @src1: @sstr1: @src2: @sstr2: @n: @dest: @dstr: @s1_1: @n: @dest: @dstr: @s1_1: @n: @d_n: @s_n: @n: @d_n: @s_n: @n: @d: @ds: @s1: @ss1: @s2_256: @ss2: @n: @d_1: @s: @n: @d_8x8: @ds: @s_8x8: @ss: @d_8x8: @ds: @s_8x8: @ss: @d_8x8: @ds: @s_8x8: @ss: @d_8x8: @ds: @s_8x8: @ss: @d_8x8: @ds: @s_8x8: @ss: @d_8x8: @ds: @s_8x8: @ss: @dest: @s1_1: @n: @dest: @s1_1: @n: @dest: @dstr: @src: @sstr: @dest: @src: @n_bytes: liboil-0.3.17/doc/tmpl/liboilfuncs-dct.sgml0000644000175000017500000000331211332637400015461 00000000000000 @d_36: @dstr: @s_36: @sstr: @d_8: @s_8: @dstr: @sstr: @d_8x8: @dstr: @s_8x8: @sstr: @d_8x8: @ds: @s_8x8: @ss: @d_8: @dstr: @s_8: @sstr: @d_8x8: @dstr: @s_8x8: @sstr: @d_8x8: @dstr: @s_8x8: @sstr: @d_12: @s_6: @d_32: @s_32: @d_36: @s_18: @d_6: @s_12: @d_18: @s_36: @d_8: @dstr: @s_8: @sstr: @d_8x8: @dstr: @s_8x8: @sstr: @d_8x8: @dstr: @s_8x8: @sstr: @d_8x8: @dstr: @s_8x8: @sstr: liboil-0.3.17/doc/tmpl/liboilfuncs-doc.sgml0000644000175000017500000000700511332637400015457 00000000000000 @dest: @dstr: @src: @sstr: @n: @s2_1: @s3_1: @dest: @dstr: @src: @sstr: @n: @s2_1: @s3_1: @dest: @dstr: @src: @sstr: @n: @s2_1: @s3_1: @dest: @dstr: @src: @sstr: @n: @s2_1: @s3_1: @dest: @dstr: @src: @sstr: @n: @s2_1: @s3_1: @dest: @dstr: @src: @sstr: @n: @s2_1: @s3_1: @dest: @dstr: @src: @sstr: @n: @s2_1: @s3_1: @dest: @dstr: @src: @sstr: @n: @s2_1: @s3_1: @d_8x8: @dstr: @s1_8x8: @sstr1: @s2_8x8: @sstr2: @d_1: @src1: @sstr1: @src2: @sstr2: @n: @i_4: @s_16: @dest: @src1: @src2: @src3: @n: @d: @s: @n: @dest1: @dest2: @n: @s1_1: @s2_1: @d_1: @s: @n: @d_8x8: @s1_8x8: @ss1: @s2_8x8: @ss2: @d_8x8: @s1_8x8: @ss1: @s2_8x8: @ss2: @s3_8x8: @ss3: @d_1: @s1_8x8: @ss1: @s2_8x8: @s3_8x8: @ss2: @d_8x8: @ds: @s1_8x8: @ss1: @s2_8x8: @d_1: @s1_8x8: @ss1: @d_8x8: @ds: @s_8x8: @d_1: @s1_8x8: @ss1: @s2_8x8: @ss2: @i_n: @s1_n: @n: @d_8x8: @s1_8x8: @ss1: @d_8x8: @ds: @s_8x8: @ss: @d_1: @s1_8x8: @ss1: @s2_8x8: @ss2: @s_8x8: @d_8x8: @d_1: @s1_8x8: @s2_8x8: @d_8x8: @ds: @s1_8x8: @ss1: @s2_8x8: @ss2: @s3_8x8: @i_n: @s1_n: @n: @d_1: @s1_8x8: @ss1: @s2_8x8: @s3_8x8: @ss2: liboil-0.3.17/doc/tmpl/liboiljunk.sgml0000644000175000017500000000120211332637400014536 00000000000000 liboiljunk @a: @a: @a: liboil-0.3.17/doc/tmpl/liboilparameter.sgml0000644000175000017500000000062511332637400015557 00000000000000 @param: @Returns: liboil-0.3.17/doc/tmpl/liboil.sgml0000644000175000017500000000046511332637400013660 00000000000000 liboil-0.3.17/doc/tmpl/liboilinit.sgml0000644000175000017500000000046511332637400014544 00000000000000 liboil-0.3.17/doc/tmpl/liboil-unused.sgml0000644000175000017500000001122011332637400015150 00000000000000 @a: @OIL_IMPL_FLAG_CMOV: @OIL_IMPL_FLAG_MMX: @OIL_IMPL_FLAG_SSE: @OIL_IMPL_FLAG_MMXEXT: @OIL_IMPL_FLAG_SSE2: @OIL_IMPL_FLAG_3DNOW: @OIL_IMPL_FLAG_3DNOWEXT: @OIL_IMPL_FLAG_SSE3: @OIL_IMPL_FLAG_ALTIVEC: @func: @priv: @Returns: @Returns: @dest: @n: @a: liboil-0.3.17/doc/tmpl/liboilclass-unstable.sgml0000644000175000017500000000242111332637400016513 00000000000000 @klass: @klass: @string: @test: @klass: @string: @i: @Returns: @class_name: @Returns: @klass: @Returns: @klass: @name: @klass_name: @impl: @klass: @impl: @klass: @func: @name: @flags: liboil-0.3.17/doc/tmpl/liboiltypes.sgml0000644000175000017500000000535311332637400014746 00000000000000 @OIL_TYPE_UNKNOWN: @OIL_TYPE_INT: @OIL_TYPE_s8: @OIL_TYPE_u8: @OIL_TYPE_s16: @OIL_TYPE_u16: @OIL_TYPE_s32: @OIL_TYPE_u32: @OIL_TYPE_s64: @OIL_TYPE_u64: @OIL_TYPE_f32: @OIL_TYPE_f64: @OIL_TYPE_s8p: @OIL_TYPE_u8p: @OIL_TYPE_s16p: @OIL_TYPE_u16p: @OIL_TYPE_s32p: @OIL_TYPE_u32p: @OIL_TYPE_s64p: @OIL_TYPE_u64p: @OIL_TYPE_f32p: @OIL_TYPE_f64p: @type: @Returns: @type: @type: @Returns: @OIL_ARG_UNKNOWN: @OIL_ARG_N: @OIL_ARG_M: @OIL_ARG_DEST1: @OIL_ARG_DSTR1: @OIL_ARG_DEST2: @OIL_ARG_DSTR2: @OIL_ARG_DEST3: @OIL_ARG_DSTR3: @OIL_ARG_SRC1: @OIL_ARG_SSTR1: @OIL_ARG_SRC2: @OIL_ARG_SSTR2: @OIL_ARG_SRC3: @OIL_ARG_SSTR3: @OIL_ARG_SRC4: @OIL_ARG_SSTR4: @OIL_ARG_SRC5: @OIL_ARG_SSTR5: @OIL_ARG_INPLACE1: @OIL_ARG_ISTR1: @OIL_ARG_INPLACE2: @OIL_ARG_ISTR2: @OIL_ARG_LAST: @type: @Returns: liboil-0.3.17/doc/tmpl/liboiltest.sgml0000644000175000017500000000271011332637400014553 00000000000000 @test: @klass: @Returns: @test: @test: @test: @iterations: @test: @test: @impl: @Returns: @test: @test: @arg_type: @Returns: @test: @arg_type: @Returns: @test: @p: @test_footer: @test: @p: @test_header: liboil-0.3.17/doc/tmpl/liboilprototype.sgml0000644000175000017500000000143111332637400015640 00000000000000 @n_params: @params: @klass: @s: @Returns: @proto: @Returns: @proto: @Returns: @proto: @proto: @param: liboil-0.3.17/doc/tmpl/liboilprofile.sgml0000644000175000017500000000151711332637400015240 00000000000000 @Returns: @prof: @prof: @prof: @ave_p: @std_p: @x: @x: liboil-0.3.17/doc/tmpl/liboilfuncs-math.sgml0000644000175000017500000001331711332637400015646 00000000000000 @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @d: @dstr: @s1: @sstr1: @s2: @sstr2: @n: @dest: @src1: @sstr1: @src2: @sstr2: @n: @dest: @src1: @sstr1: @src2: @sstr2: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr: @s2_1: @n: @d: @dstr: @s1: @sstr1: @s2: @sstr2: @n: @s3_1: @s4_1: @d: @dstr: @s1: @sstr1: @s2: @sstr2: @n: @s3_1: @s4_1: @d: @dstr: @s1: @sstr1: @s2: @sstr2: @n: @s3_1: @s4_1: @d: @dstr: @s1: @sstr1: @s2: @sstr2: @n: @s3_1: @s4_1: @d: @dstr: @s1: @sstr1: @s2: @sstr2: @n: @s3_1: @s4_1: @d: @dstr: @s1: @sstr1: @s2: @sstr2: @n: @s3_1: @s4_1: @d: @dstr: @s1: @sstr1: @s2: @sstr2: @n: @s3_1: @s4_1: @d: @dstr: @s1: @sstr1: @s2: @sstr2: @n: @s3_1: @s4_1: @d: @dstr: @s1: @sstr1: @s2: @sstr2: @n: @d: @dstr: @s1: @sstr1: @s2: @sstr2: @n: @d: @dstr: @s1: @sstr1: @s2: @sstr2: @n: @d: @dstr: @s1: @sstr1: @s2: @sstr2: @n: @d: @dstr: @s1: @sstr1: @s2: @sstr2: @n: @d: @dstr: @s1: @sstr1: @s2: @sstr2: @n: @d: @s: @n: @d: @s: @n: @d_1: @s: @sstr: @n: @d: @s1: @s2: @n: @d: @s1: @s2: @n: @d: @s: @n: @d: @s: @n: @d: @s1: @s2: @n: @d: @s1: @s2: @n: @d: @s1: @s2: @n: @d: @s: @n: @d: @s1: @s2_1: @n: @d: @s1: @s2_1: @n: @d: @s: @n: @d: @s1: @s2: @n: liboil-0.3.17/doc/tmpl/liboildebug.sgml0000644000175000017500000000233211332637400014662 00000000000000 @level: @file: @func: @line: @format: @varargs: @OIL_DEBUG_NONE: @OIL_DEBUG_ERROR: @OIL_DEBUG_WARNING: @OIL_DEBUG_INFO: @OIL_DEBUG_DEBUG: @OIL_DEBUG_LOG: @func: @Returns: @level: @...: @...: @...: @...: @...: @level: @...: liboil-0.3.17/doc/tmpl/liboilimpl-unstable.sgml0000644000175000017500000000264411332637400016356 00000000000000 @i: @Returns: @impl: @Returns: @OIL_IMPL_FLAG_REF: @OIL_IMPL_FLAG_OPT: @OIL_IMPL_FLAG_ASM: @OIL_IMPL_FLAG_DISABLED: @OIL_IMPL_FLAG_CMOV: @OIL_IMPL_FLAG_MMX: @OIL_IMPL_FLAG_SSE: @OIL_IMPL_FLAG_MMXEXT: @OIL_IMPL_FLAG_SSE2: @OIL_IMPL_FLAG_3DNOW: @OIL_IMPL_FLAG_3DNOWEXT: @OIL_IMPL_FLAG_SSE3: @OIL_IMPL_FLAG_ALTIVEC: @OIL_IMPL_FLAG_EDSP: @OIL_IMPL_FLAG_ARM6: @OIL_IMPL_FLAG_VFP: @OIL_IMPL_FLAG_SSSE3: @function: @klass: @flags: @function: @klass: @function: @klass: @function: @klass: @function: @klass: @...: liboil-0.3.17/doc/tmpl/liboilrandom.sgml0000644000175000017500000000334411332637400015060 00000000000000 @dest: @n: @dest: @n: @dest: @n: @dest: @n: @dest: @n: @dest: @n: @dest: @n: @dest: @n: @dest: @n: @dest: @n: @dest: @n: @dest: @n: liboil-0.3.17/doc/tmpl/liboilfuncs-conv.sgml0000644000175000017500000002730311332637400015662 00000000000000 @d_8x8: @dstr: @s_8x8: @sstr: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @d_8x8: @dstr: @s_8x8: @sstr: @d_8x8: @dstr: @s_8x8: @sstr: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @dstr: @src: @sstr: @n: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: @dest: @src: @n: @s2_1: @s3_1: liboil-0.3.17/doc/tmpl/liboilfuncs-math8x8.sgml0000644000175000017500000000161511332637400016214 00000000000000 @d_8x8: @s1_8x8: @s2_8x8: @ds: @ss1: @ss2: @d_8x8: @ds: @s1_8x8: @ss1: @s2_8x8: @ss2: @d_8x8: @ds: @s1_8x8: @ss1: @s2_8x8: @ss2: @d_1: @s1_8x8: @ss1: @s2_8x8: @ss2: @d_1: @s1_8x8: @ss1: @s2_8x8: @ss2: @d_1: @s1_8x8: @ss1: @s2_8x8: @ss2: liboil-0.3.17/doc/tmpl/liboilmacros.sgml0000644000175000017500000000232111332637400015056 00000000000000 @x: @y: @x: @y: @x: @a: @r: @g: @b: @a: @r: @g: @b: @color: @color: @color: @color: @a: @b: @x: @ptr: @offset: @type: @ptr: @offset: @ptr: @offset: liboil-0.3.17/doc/tmpl/liboilinit-unstable.sgml0000644000175000017500000000071711332637400016357 00000000000000 @class_name: liboil-0.3.17/doc/tmpl/liboilcpu.sgml0000644000175000017500000000064211332637400014365 00000000000000 @Returns: @Returns: liboil-0.3.17/doc/liboil-docs.sgml0000644000175000017500000000350510717203073013631 00000000000000 Liboil Reference Manual Liboil Stable API These functions are part of the stable API, and will not change during the lifetime of the 0.3 series. Liboil Unstable API These functions are part of the unstable API, and may change between releases in the 0.3 series. These functions should not be used by applications. Some of this functionality may be moved to the stable API during the 0.3 series. liboil-0.3.17/doc/xml/0000777000175000017500000000000011332637400011425 500000000000000liboil-0.3.17/doc/xml/liboiltest.xml0000644000175000017500000003657211332637400014252 00000000000000 OilTest 3 LIBOIL Library OilTest Test and profile function implementations. Synopsis OilTest; void (*OilTestFunction) (OilTest *test); #define OIL_TEST_HEADER #define OIL_TEST_FOOTER OilTest * oil_test_new (OilFunctionClass *klass); void oil_test_init (OilTest *test); void oil_test_free (OilTest *test); void oil_test_set_iterations (OilTest *test, int iterations); void oil_test_check_ref (OilTest *test); int oil_test_check_impl (OilTest *test, OilFunctionImpl *impl); void oil_test_cleanup (OilTest *test); void * oil_test_get_source_data (OilTest *test, OilArgType arg_type); int oil_test_get_value (OilTest *test, OilArgType arg_type); void oil_test_set_test_footer (OilTest *test, OilParameter *p, int test_footer); void oil_test_set_test_header (OilTest *test, OilParameter *p, int test_header); Description Details OilTest OilTesttypedef struct { } OilTest; An opaque structure describing how to test an OilFunctionImpl for an OilFunctionClass. OilTestFunction () OilTestFunctionvoid (*OilTestFunction) (OilTest *test); Typedef for functions that initialize special values in source arrays for a particular function class. test : the OilTest structure OIL_TEST_HEADER OIL_TEST_HEADER#define OIL_TEST_HEADER 256 Default number of bytes that are prepended to the array test area. OIL_TEST_FOOTER OIL_TEST_FOOTER#define OIL_TEST_FOOTER 256 Default number of bytes that are appended to the array test area. oil_test_new () oil_test_newOilTest * oil_test_new (OilFunctionClass *klass); Creates a new OilTest for the OilFunctionClass represented by klass. klass : an OilFunctionClass Returns : the new OilTest oil_test_init () oil_test_initvoid oil_test_init (OilTest *test); Intializes test. FIXME: needs work test : the OilTest oil_test_free () oil_test_freevoid oil_test_free (OilTest *test); Frees memory associated with test. test : the OilTest oil_test_set_iterations () oil_test_set_iterationsvoid oil_test_set_iterations (OilTest *test, int iterations); Sets the number of iterations of test to iterations. test : the OilTest iterations : the number of iterations oil_test_check_ref () oil_test_check_refvoid oil_test_check_ref (OilTest *test); Runs the test specified by test on the reference function of the class being tested. test : the OilTest oil_test_check_impl () oil_test_check_implint oil_test_check_impl (OilTest *test, OilFunctionImpl *impl); Runs the testing procedure described by test on the implementation impl. test : the OilTest impl : an OilFunctionImpl Returns : 1 if impl passes the test, 0 if it fails oil_test_cleanup () oil_test_cleanupvoid oil_test_cleanup (OilTest *test); Cleans up test. FIXME: needs work test : the OilTest oil_test_get_source_data () oil_test_get_source_datavoid * oil_test_get_source_data (OilTest *test, OilArgType arg_type); test : arg_type : Returns : oil_test_get_value () oil_test_get_valueint oil_test_get_value (OilTest *test, OilArgType arg_type); test : arg_type : Returns : oil_test_set_test_footer () oil_test_set_test_footervoid oil_test_set_test_footer (OilTest *test, OilParameter *p, int test_footer); Sets the number of bytes of guard footer for p to test_footer. test : the OilTest p : the OilParameter to change the footer for test_footer : the number of bytes of guard footer oil_test_set_test_header () oil_test_set_test_headervoid oil_test_set_test_header (OilTest *test, OilParameter *p, int test_header); Sets the number of bytes of guard header for p to test_header. test : the OilTest p : the OilParameter to change the header for test_header : the number of bytes of guard header liboil-0.3.17/doc/xml/api-index-deprecated.xml0000644000175000017500000000027211332637400016040 00000000000000 liboil-0.3.17/doc/xml/liboilprofile.xml0000644000175000017500000001736611332637400014733 00000000000000 OilProfile 3 LIBOIL Library OilProfile Measuring the length of time needed to execute Liboil functions. Synopsis OilProfile; #define OIL_PROFILE_HIST_LENGTH unsigned long oil_profile_stamp (void); void oil_profile_init (OilProfile *prof); void oil_profile_stop_handle (OilProfile *prof); void oil_profile_get_ave_std (OilProfile *prof, double *ave_p, double *std_p); #define oil_profile_start (x) #define oil_profile_stop (x) Description Details OilProfile OilProfiletypedef struct { } OilProfile; An opaque structure representing profiling information. OIL_PROFILE_HIST_LENGTH OIL_PROFILE_HIST_LENGTH#define OIL_PROFILE_HIST_LENGTH 10 Internal definition of the number of histogram entries in OilProfile. oil_profile_stamp () oil_profile_stampunsigned long oil_profile_stamp (void); Creates a timestamp based on a CPU-specific high-frequency counter, if available. Returns : a timestamp oil_profile_init () oil_profile_initvoid oil_profile_init (OilProfile *prof); Initializes a profiling structure. prof : the OilProfile structure oil_profile_stop_handle () oil_profile_stop_handlevoid oil_profile_stop_handle (OilProfile *prof); Handles post-processing of a single profiling run. FIXME: need more info prof : the OilProfile structure oil_profile_get_ave_std () oil_profile_get_ave_stdvoid oil_profile_get_ave_std (OilProfile *prof, double *ave_p, double *std_p); Calculates the average and standard deviation of a number of profiling runs, and places the results in the locations provided by ave_p and std_p. Either ave_p and std_p may be NULL, in which case the values will not be written. prof : the OilProfile structure ave_p : pointer to average std_p : pointer to standard deviation oil_profile_start() oil_profile_start#define oil_profile_start(x) Starts a profiling run by obtaining a timestamp via oil_profile_stamp() and writing it into x. x : a pointer to an OilProfile structure oil_profile_stop() oil_profile_stop#define oil_profile_stop(x) Stops a profiling run by obtaining a timestamp via oil_profile_stamp() and writing it into x. It then calls oil_profile_stop_handle() to handle post-processing of the profiling run. x : a pointer to an OilProfile structure liboil-0.3.17/doc/xml/liboildebug.xml0000644000175000017500000002717511332637400014360 00000000000000 Debug 3 LIBOIL Library Debug Printing and formatting debug information Synopsis void (*OilDebugPrintFunc) (int level, const char *file, const char *func, int line, const char *format, va_list varargs); enum OilDebugLevel; void oil_debug_set_print_function (OilDebugPrintFunc func); int oil_debug_get_level (void); void oil_debug_set_level (int level); #define OIL_ERROR (...) #define OIL_WARNING (...) #define OIL_INFO (...) #define OIL_DEBUG (...) #define OIL_LOG (...) #define OIL_FUNCTION #define OIL_DEBUG_PRINT (level, ...) Description Details OilDebugPrintFunc () OilDebugPrintFuncvoid (*OilDebugPrintFunc) (int level, const char *file, const char *func, int line, const char *format, va_list varargs); Typedef describing functions that can be registered using oil_debug_set_print_function() so that it is called to print debugging messages. level : the debug level file : name of the file where the debug message occurs func : name of the function where the debug message occurs line : line in the file where the debug message occurs format : a printf format varargs : varargs for the printf format enum OilDebugLevel OilDebugLeveltypedef enum { OIL_DEBUG_NONE = 0, OIL_DEBUG_ERROR, OIL_DEBUG_WARNING, OIL_DEBUG_INFO, OIL_DEBUG_DEBUG, OIL_DEBUG_LOG } OilDebugLevel; Enumeration describing debug levels in Liboil. oil_debug_set_print_function () oil_debug_set_print_functionvoid oil_debug_set_print_function (OilDebugPrintFunc func); Sets the function to call when outputting debugging information. A value of NULL for func will restore the default handler, which prints debugging information to stderr. func : oil_debug_get_level () oil_debug_get_levelint oil_debug_get_level (void); Gets the current debug level. Returns : the current debug level oil_debug_set_level () oil_debug_set_levelvoid oil_debug_set_level (int level); Sets the current debug level. level : the new debug level OIL_ERROR() OIL_ERROR#define OIL_ERROR(...) OIL_DEBUG_PRINT(OIL_DEBUG_ERROR, __VA_ARGS__) Macro to call OIL_DEBUG_PRINT() with a level of OIL_DEBUG_ERROR. ... : OIL_WARNING() OIL_WARNING#define OIL_WARNING(...) OIL_DEBUG_PRINT(OIL_DEBUG_WARNING, __VA_ARGS__) Macro to call OIL_DEBUG_PRINT() with a level of OIL_DEBUG_WARNING. ... : OIL_INFO() OIL_INFO#define OIL_INFO(...) OIL_DEBUG_PRINT(OIL_DEBUG_INFO, __VA_ARGS__) Macro to call OIL_DEBUG_PRINT() with a level of OIL_DEBUG_INFO. ... : OIL_DEBUG() OIL_DEBUG#define OIL_DEBUG(...) OIL_DEBUG_PRINT(OIL_DEBUG_DEBUG, __VA_ARGS__) Macro to call OIL_DEBUG_PRINT() with a level of OIL_DEBUG_DEBUG. ... : OIL_LOG() OIL_LOG#define OIL_LOG(...) OIL_DEBUG_PRINT(OIL_DEBUG_LOG, __VA_ARGS__) Macro to call OIL_DEBUG_PRINT() with a level of OIL_DEBUG_LOG. ... : OIL_FUNCTION OIL_FUNCTION#define OIL_FUNCTION Internal macro that points to __PRETTY_FUNCTION__ or __func__ if the former is not available. OIL_DEBUG_PRINT() OIL_DEBUG_PRINT#define OIL_DEBUG_PRINT(level, ...) Macro to call oil_debug_print() with the correct values for the name of the source file, line of source file, and function. level : ... : liboil-0.3.17/doc/xml/liboiltypes.xml0000644000175000017500000003523611332637400014433 00000000000000 liboiltypes 3 LIBOIL Library liboiltypes Internal Liboil types Synopsis enum OilType; int oil_type_sizeof (OilType type); #define oil_type_is_floating_point (type) const char * oil_type_name (OilType type); enum OilArgType; const char * oil_arg_type_name (OilArgType type); #define oil_type_s8 #define oil_type_u8 #define oil_type_s16 #define oil_type_u16 #define oil_type_s32 #define oil_type_u32 #define oil_type_s64 #define oil_type_u64 #define oil_type_f32 #define oil_type_f64 #define oil_type_min_s8 #define oil_type_min_u8 #define oil_type_min_s16 #define oil_type_min_u16 #define oil_type_min_s32 #define oil_type_min_u32 #define oil_type_max_s8 #define oil_type_max_u8 #define oil_type_max_s16 #define oil_type_max_u16 #define oil_type_max_s32 #define oil_type_max_u32 Description Details enum OilType OilTypetypedef enum { OIL_TYPE_UNKNOWN = 0, OIL_TYPE_INT, OIL_TYPE_s8, OIL_TYPE_u8, OIL_TYPE_s16, OIL_TYPE_u16, OIL_TYPE_s32, OIL_TYPE_u32, OIL_TYPE_s64, OIL_TYPE_u64, OIL_TYPE_f32, OIL_TYPE_f64, OIL_TYPE_s8p, OIL_TYPE_u8p, OIL_TYPE_s16p, OIL_TYPE_u16p, OIL_TYPE_s32p, OIL_TYPE_u32p, OIL_TYPE_s64p, OIL_TYPE_u64p, OIL_TYPE_f32p, OIL_TYPE_f64p, } OilType; Enumeration containing the data types understood by Liboil. oil_type_sizeof () oil_type_sizeofint oil_type_sizeof (OilType type); Looks up the size of the OilType represented by type. type : the OilType Returns : the size of type oil_type_is_floating_point() oil_type_is_floating_point#define oil_type_is_floating_point(type) type : oil_type_name () oil_type_nameconst char * oil_type_name (OilType type); Looks up the name of the OilType given by type. type : an OilType Returns : a string containing the name of the OilType type. enum OilArgType OilArgTypetypedef enum { OIL_ARG_UNKNOWN = 0, OIL_ARG_N, OIL_ARG_M, OIL_ARG_DEST1, OIL_ARG_DSTR1, OIL_ARG_DEST2, OIL_ARG_DSTR2, OIL_ARG_DEST3, OIL_ARG_DSTR3, OIL_ARG_SRC1, OIL_ARG_SSTR1, OIL_ARG_SRC2, OIL_ARG_SSTR2, OIL_ARG_SRC3, OIL_ARG_SSTR3, OIL_ARG_SRC4, OIL_ARG_SSTR4, OIL_ARG_SRC5, OIL_ARG_SSTR5, OIL_ARG_INPLACE1, OIL_ARG_ISTR1, OIL_ARG_INPLACE2, OIL_ARG_ISTR2, OIL_ARG_LAST } OilArgType; Enumeration containing the types of parameter types understood by Liboil. oil_arg_type_name () oil_arg_type_nameconst char * oil_arg_type_name (OilArgType type); Looks up the name of the OilArgType specified by type. type : an OilArgType Returns : a string containing the name oil_type_s8 oil_type_s8#define oil_type_s8 int8_t Useful for autogenerated code. Do not use otherwise. oil_type_u8 oil_type_u8#define oil_type_u8 uint8_t Useful for autogenerated code. Do not use otherwise. oil_type_s16 oil_type_s16#define oil_type_s16 int16_t Useful for autogenerated code. Do not use otherwise. oil_type_u16 oil_type_u16#define oil_type_u16 uint16_t Useful for autogenerated code. Do not use otherwise. oil_type_s32 oil_type_s32#define oil_type_s32 int32_t Useful for autogenerated code. Do not use otherwise. oil_type_u32 oil_type_u32#define oil_type_u32 uint32_t Useful for autogenerated code. Do not use otherwise. oil_type_s64 oil_type_s64#define oil_type_s64 int64_t Useful for autogenerated code. Do not use otherwise. oil_type_u64 oil_type_u64#define oil_type_u64 uint64_t Useful for autogenerated code. Do not use otherwise. oil_type_f32 oil_type_f32#define oil_type_f32 float Useful for autogenerated code. Do not use otherwise. oil_type_f64 oil_type_f64#define oil_type_f64 double Useful for autogenerated code. Do not use otherwise. oil_type_min_s8 oil_type_min_s8#define oil_type_min_s8 (-128) Useful for autogenerated code. Do not use otherwise. oil_type_min_u8 oil_type_min_u8#define oil_type_min_u8 (0) Useful for autogenerated code. Do not use otherwise. oil_type_min_s16 oil_type_min_s16#define oil_type_min_s16 (-32768) Useful for autogenerated code. Do not use otherwise. oil_type_min_u16 oil_type_min_u16#define oil_type_min_u16 (0) Useful for autogenerated code. Do not use otherwise. oil_type_min_s32 oil_type_min_s32#define oil_type_min_s32 (-2147483647 - 1) Useful for autogenerated code. Do not use otherwise. oil_type_min_u32 oil_type_min_u32#define oil_type_min_u32 (0) Useful for autogenerated code. Do not use otherwise. oil_type_max_s8 oil_type_max_s8#define oil_type_max_s8 (127) Useful for autogenerated code. Do not use otherwise. oil_type_max_u8 oil_type_max_u8#define oil_type_max_u8 (255) Useful for autogenerated code. Do not use otherwise. oil_type_max_s16 oil_type_max_s16#define oil_type_max_s16 (32767) Useful for autogenerated code. Do not use otherwise. oil_type_max_u16 oil_type_max_u16#define oil_type_max_u16 (65535) Useful for autogenerated code. Do not use otherwise. oil_type_max_s32 oil_type_max_s32#define oil_type_max_s32 (2147483647) Useful for autogenerated code. Do not use otherwise. oil_type_max_u32 oil_type_max_u32#define oil_type_max_u32 (4294967295U) Useful for autogenerated code. Do not use otherwise. liboil-0.3.17/doc/xml/liboilfuncs-conv.xml0000644000175000017500000076016111332637400015352 00000000000000 Type Conversion 3 LIBOIL Library Type Conversion Type conversion Synopsis void oil_clipconv8x8_u8_s16 (uint8_t *d_8x8, int dstr, const int16_t *s_8x8, int sstr); void oil_clipconv_s16_f32 (int16_t *dest, int dstr, const float *src, int sstr, int n); void oil_clipconv_s16_f64 (int16_t *dest, int dstr, const double *src, int sstr, int n); void oil_clipconv_s16_s32 (int16_t *dest, int dstr, const int32_t *src, int sstr, int n); void oil_clipconv_s16_u16 (int16_t *dest, int dstr, const uint16_t *src, int sstr, int n); void oil_clipconv_s16_u32 (int16_t *dest, int dstr, const uint32_t *src, int sstr, int n); void oil_clipconv_s32_f32 (int32_t *dest, int dstr, const float *src, int sstr, int n); void oil_clipconv_s32_f64 (int32_t *dest, int dstr, const double *src, int sstr, int n); void oil_clipconv_s32_u32 (int32_t *dest, int dstr, const uint32_t *src, int sstr, int n); void oil_clipconv_s8_f32 (int8_t *dest, int dstr, const float *src, int sstr, int n); void oil_clipconv_s8_f64 (int8_t *dest, int dstr, const double *src, int sstr, int n); void oil_clipconv_s8_s16 (int8_t *dest, int dstr, const int16_t *src, int sstr, int n); void oil_clipconv_s8_s32 (int8_t *dest, int dstr, const int32_t *src, int sstr, int n); void oil_clipconv_s8_u16 (int8_t *dest, int dstr, const uint16_t *src, int sstr, int n); void oil_clipconv_s8_u32 (int8_t *dest, int dstr, const uint32_t *src, int sstr, int n); void oil_clipconv_s8_u8 (int8_t *dest, int dstr, const uint8_t *src, int sstr, int n); void oil_clipconv_u16_f32 (uint16_t *dest, int dstr, const float *src, int sstr, int n); void oil_clipconv_u16_f64 (uint16_t *dest, int dstr, const double *src, int sstr, int n); void oil_clipconv_u16_s16 (uint16_t *dest, int dstr, const int16_t *src, int sstr, int n); void oil_clipconv_u16_s32 (uint16_t *dest, int dstr, const int32_t *src, int sstr, int n); void oil_clipconv_u16_u32 (uint16_t *dest, int dstr, const uint32_t *src, int sstr, int n); void oil_clipconv_u32_f32 (uint32_t *dest, int dstr, const float *src, int sstr, int n); void oil_clipconv_u32_f64 (uint32_t *dest, int dstr, const double *src, int sstr, int n); void oil_clipconv_u32_s32 (uint32_t *dest, int dstr, const int32_t *src, int sstr, int n); void oil_clipconv_u8_f32 (uint8_t *dest, int dstr, const float *src, int sstr, int n); void oil_clipconv_u8_f64 (uint8_t *dest, int dstr, const double *src, int sstr, int n); void oil_clipconv_u8_s16 (uint8_t *dest, int dstr, const int16_t *src, int sstr, int n); void oil_clipconv_u8_s32 (uint8_t *dest, int dstr, const int32_t *src, int sstr, int n); void oil_clipconv_u8_s8 (uint8_t *dest, int dstr, const int8_t *src, int sstr, int n); void oil_clipconv_u8_u16 (uint8_t *dest, int dstr, const uint16_t *src, int sstr, int n); void oil_clipconv_u8_u32 (uint8_t *dest, int dstr, const uint32_t *src, int sstr, int n); void oil_conv8x8_f64_s16 (double *d_8x8, int dstr, const int16_t *s_8x8, int sstr); void oil_conv8x8_s16_f64 (int16_t *d_8x8, int dstr, const double *s_8x8, int sstr); void oil_conv_f32_f64 (float *dest, int dstr, const double *src, int sstr, int n); void oil_conv_f32_s16 (float *dest, int dstr, const int16_t *src, int sstr, int n); void oil_conv_f32_s32 (float *dest, int dstr, const int32_t *src, int sstr, int n); void oil_conv_f32_s8 (float *dest, int dstr, const int8_t *src, int sstr, int n); void oil_conv_f32_u16 (float *dest, int dstr, const uint16_t *src, int sstr, int n); void oil_conv_f32_u32 (float *dest, int dstr, const uint32_t *src, int sstr, int n); void oil_conv_f32_u8 (float *dest, int dstr, const uint8_t *src, int sstr, int n); void oil_conv_f64_f32 (double *dest, int dstr, const float *src, int sstr, int n); void oil_conv_f64_s16 (double *dest, int dstr, const int16_t *src, int sstr, int n); void oil_conv_f64_s32 (double *dest, int dstr, const int32_t *src, int sstr, int n); void oil_conv_f64_s8 (double *dest, int dstr, const int8_t *src, int sstr, int n); void oil_conv_f64_u16 (double *dest, int dstr, const uint16_t *src, int sstr, int n); void oil_conv_f64_u32 (double *dest, int dstr, const uint32_t *src, int sstr, int n); void oil_conv_f64_u8 (double *dest, int dstr, const uint8_t *src, int sstr, int n); void oil_conv_s16_f32 (int16_t *dest, int dstr, const float *src, int sstr, int n); void oil_conv_s16_f64 (int16_t *dest, int dstr, const double *src, int sstr, int n); void oil_conv_s16_s32 (int16_t *dest, int dstr, const int32_t *src, int sstr, int n); void oil_conv_s16_s8 (int16_t *dest, int dstr, const int8_t *src, int sstr, int n); void oil_conv_s16_u16 (int16_t *dest, int dstr, const uint16_t *src, int sstr, int n); void oil_conv_s16_u32 (int16_t *dest, int dstr, const uint32_t *src, int sstr, int n); void oil_conv_s16_u8 (int16_t *dest, int dstr, const uint8_t *src, int sstr, int n); void oil_conv_s32_f32 (int32_t *dest, int dstr, const float *src, int sstr, int n); void oil_conv_s32_f64 (int32_t *dest, int dstr, const double *src, int sstr, int n); void oil_conv_s32_s16 (int32_t *dest, int dstr, const int16_t *src, int sstr, int n); void oil_conv_s32_s8 (int32_t *dest, int dstr, const int8_t *src, int sstr, int n); void oil_conv_s32_u16 (int32_t *dest, int dstr, const uint16_t *src, int sstr, int n); void oil_conv_s32_u32 (int32_t *dest, int dstr, const uint32_t *src, int sstr, int n); void oil_conv_s32_u8 (int32_t *dest, int dstr, const uint8_t *src, int sstr, int n); void oil_conv_s8_f32 (int8_t *dest, int dstr, const float *src, int sstr, int n); void oil_conv_s8_f64 (int8_t *dest, int dstr, const double *src, int sstr, int n); void oil_conv_s8_s16 (int8_t *dest, int dstr, const int16_t *src, int sstr, int n); void oil_conv_s8_s32 (int8_t *dest, int dstr, const int32_t *src, int sstr, int n); void oil_conv_s8_u16 (int8_t *dest, int dstr, const uint16_t *src, int sstr, int n); void oil_conv_s8_u32 (int8_t *dest, int dstr, const uint32_t *src, int sstr, int n); void oil_conv_s8_u8 (int8_t *dest, int dstr, const uint8_t *src, int sstr, int n); void oil_conv_u16_f32 (uint16_t *dest, int dstr, const float *src, int sstr, int n); void oil_conv_u16_f64 (uint16_t *dest, int dstr, const double *src, int sstr, int n); void oil_conv_u16_s16 (uint16_t *dest, int dstr, const int16_t *src, int sstr, int n); void oil_conv_u16_s32 (uint16_t *dest, int dstr, const int32_t *src, int sstr, int n); void oil_conv_u16_s8 (uint16_t *dest, int dstr, const int8_t *src, int sstr, int n); void oil_conv_u16_u32 (uint16_t *dest, int dstr, const uint32_t *src, int sstr, int n); void oil_conv_u16_u8 (uint16_t *dest, int dstr, const uint8_t *src, int sstr, int n); void oil_conv_u32_f32 (uint32_t *dest, int dstr, const float *src, int sstr, int n); void oil_conv_u32_f64 (uint32_t *dest, int dstr, const double *src, int sstr, int n); void oil_conv_u32_s16 (uint32_t *dest, int dstr, const int16_t *src, int sstr, int n); void oil_conv_u32_s32 (uint32_t *dest, int dstr, const int32_t *src, int sstr, int n); void oil_conv_u32_s8 (uint32_t *dest, int dstr, const int8_t *src, int sstr, int n); void oil_conv_u32_u16 (uint32_t *dest, int dstr, const uint16_t *src, int sstr, int n); void oil_conv_u32_u8 (uint32_t *dest, int dstr, const uint8_t *src, int sstr, int n); void oil_conv_u8_f32 (uint8_t *dest, int dstr, const float *src, int sstr, int n); void oil_conv_u8_f64 (uint8_t *dest, int dstr, const double *src, int sstr, int n); void oil_conv_u8_s16 (uint8_t *dest, int dstr, const int16_t *src, int sstr, int n); void oil_conv_u8_s32 (uint8_t *dest, int dstr, const int32_t *src, int sstr, int n); void oil_conv_u8_s8 (uint8_t *dest, int dstr, const int8_t *src, int sstr, int n); void oil_conv_u8_u16 (uint8_t *dest, int dstr, const uint16_t *src, int sstr, int n); void oil_conv_u8_u32 (uint8_t *dest, int dstr, const uint32_t *src, int sstr, int n); void oil_scaleconv_f32_s16 (float *dest, const int16_t *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_f32_s32 (float *dest, const int32_t *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_f32_s8 (float *dest, const int8_t *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_f32_u16 (float *dest, const uint16_t *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_f32_u32 (float *dest, const uint32_t *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_f32_u8 (float *dest, const uint8_t *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_f64_s16 (double *dest, const int16_t *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_f64_s32 (double *dest, const int32_t *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_f64_s8 (double *dest, const int8_t *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_f64_u16 (double *dest, const uint16_t *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_f64_u32 (double *dest, const uint32_t *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_f64_u8 (double *dest, const uint8_t *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_s16_f32 (int16_t *dest, const float *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_s16_f64 (int16_t *dest, const double *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_s32_f32 (int32_t *dest, const float *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_s32_f64 (int32_t *dest, const double *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_s8_f32 (int8_t *dest, const float *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_s8_f64 (int8_t *dest, const double *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_u16_f32 (uint16_t *dest, const float *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_u16_f64 (uint16_t *dest, const double *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_u32_f32 (uint32_t *dest, const float *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_u32_f64 (uint32_t *dest, const double *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_u8_f32 (uint8_t *dest, const float *src, int n, const double *s2_1, const double *s3_1); void oil_scaleconv_u8_f64 (uint8_t *dest, const double *src, int n, const double *s2_1, const double *s3_1); Description The functions in this section perform type conversion. The conv functions convert value from the source type to the destination type. Conversion of values outside the destination range is undefined and may vary between implementations. The clipconv functions convert values from the source type to the destination type. Conversion of values outside the destination range are saturated to the destination range. The scaleconv functions multiply the source values by a constant factor before converting to the destination type. Conversion of values outside the destination range is undefined and may vary between implementations. Conversion of values from floating point types to integer types is done using a round-to-nearest policy. Rounding of half-integers is undefined and may vary between implementations. Details oil_clipconv8x8_u8_s16 () oil_clipconv8x8_u8_s16void oil_clipconv8x8_u8_s16 (uint8_t *d_8x8, int dstr, const int16_t *s_8x8, int sstr); Converts elements in source array s_8x8 to the destination type, placing the results in d_8x8. Source values outside the destination range are clipped to the destination range. d_8x8 : dstr : s_8x8 : sstr : oil_clipconv_s16_f32 () oil_clipconv_s16_f32void oil_clipconv_s16_f32 (int16_t *dest, int dstr, const float *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_s16_f64 () oil_clipconv_s16_f64void oil_clipconv_s16_f64 (int16_t *dest, int dstr, const double *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_s16_s32 () oil_clipconv_s16_s32void oil_clipconv_s16_s32 (int16_t *dest, int dstr, const int32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_s16_u16 () oil_clipconv_s16_u16void oil_clipconv_s16_u16 (int16_t *dest, int dstr, const uint16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_s16_u32 () oil_clipconv_s16_u32void oil_clipconv_s16_u32 (int16_t *dest, int dstr, const uint32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_s32_f32 () oil_clipconv_s32_f32void oil_clipconv_s32_f32 (int32_t *dest, int dstr, const float *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_s32_f64 () oil_clipconv_s32_f64void oil_clipconv_s32_f64 (int32_t *dest, int dstr, const double *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_s32_u32 () oil_clipconv_s32_u32void oil_clipconv_s32_u32 (int32_t *dest, int dstr, const uint32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_s8_f32 () oil_clipconv_s8_f32void oil_clipconv_s8_f32 (int8_t *dest, int dstr, const float *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_s8_f64 () oil_clipconv_s8_f64void oil_clipconv_s8_f64 (int8_t *dest, int dstr, const double *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_s8_s16 () oil_clipconv_s8_s16void oil_clipconv_s8_s16 (int8_t *dest, int dstr, const int16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_s8_s32 () oil_clipconv_s8_s32void oil_clipconv_s8_s32 (int8_t *dest, int dstr, const int32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_s8_u16 () oil_clipconv_s8_u16void oil_clipconv_s8_u16 (int8_t *dest, int dstr, const uint16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_s8_u32 () oil_clipconv_s8_u32void oil_clipconv_s8_u32 (int8_t *dest, int dstr, const uint32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_s8_u8 () oil_clipconv_s8_u8void oil_clipconv_s8_u8 (int8_t *dest, int dstr, const uint8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_u16_f32 () oil_clipconv_u16_f32void oil_clipconv_u16_f32 (uint16_t *dest, int dstr, const float *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_u16_f64 () oil_clipconv_u16_f64void oil_clipconv_u16_f64 (uint16_t *dest, int dstr, const double *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_u16_s16 () oil_clipconv_u16_s16void oil_clipconv_u16_s16 (uint16_t *dest, int dstr, const int16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_u16_s32 () oil_clipconv_u16_s32void oil_clipconv_u16_s32 (uint16_t *dest, int dstr, const int32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_u16_u32 () oil_clipconv_u16_u32void oil_clipconv_u16_u32 (uint16_t *dest, int dstr, const uint32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_u32_f32 () oil_clipconv_u32_f32void oil_clipconv_u32_f32 (uint32_t *dest, int dstr, const float *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_u32_f64 () oil_clipconv_u32_f64void oil_clipconv_u32_f64 (uint32_t *dest, int dstr, const double *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_u32_s32 () oil_clipconv_u32_s32void oil_clipconv_u32_s32 (uint32_t *dest, int dstr, const int32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_u8_f32 () oil_clipconv_u8_f32void oil_clipconv_u8_f32 (uint8_t *dest, int dstr, const float *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_u8_f64 () oil_clipconv_u8_f64void oil_clipconv_u8_f64 (uint8_t *dest, int dstr, const double *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_u8_s16 () oil_clipconv_u8_s16void oil_clipconv_u8_s16 (uint8_t *dest, int dstr, const int16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_u8_s32 () oil_clipconv_u8_s32void oil_clipconv_u8_s32 (uint8_t *dest, int dstr, const int32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_u8_s8 () oil_clipconv_u8_s8void oil_clipconv_u8_s8 (uint8_t *dest, int dstr, const int8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_u8_u16 () oil_clipconv_u8_u16void oil_clipconv_u8_u16 (uint8_t *dest, int dstr, const uint16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_clipconv_u8_u32 () oil_clipconv_u8_u32void oil_clipconv_u8_u32 (uint8_t *dest, int dstr, const uint32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv8x8_f64_s16 () oil_conv8x8_f64_s16void oil_conv8x8_f64_s16 (double *d_8x8, int dstr, const int16_t *s_8x8, int sstr); Converts elements in source array s_8x8 to the destination type, placing the results in d_8x8. The conversion of source values outside the destination range are undefined and implementation dependent. d_8x8 : dstr : s_8x8 : sstr : oil_conv8x8_s16_f64 () oil_conv8x8_s16_f64void oil_conv8x8_s16_f64 (int16_t *d_8x8, int dstr, const double *s_8x8, int sstr); Converts elements in source array s_8x8 to the destination type, placing the results in d_8x8. d_8x8 : dstr : s_8x8 : sstr : oil_conv_f32_f64 () oil_conv_f32_f64void oil_conv_f32_f64 (float *dest, int dstr, const double *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_f32_s16 () oil_conv_f32_s16void oil_conv_f32_s16 (float *dest, int dstr, const int16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_f32_s32 () oil_conv_f32_s32void oil_conv_f32_s32 (float *dest, int dstr, const int32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_f32_s8 () oil_conv_f32_s8void oil_conv_f32_s8 (float *dest, int dstr, const int8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_f32_u16 () oil_conv_f32_u16void oil_conv_f32_u16 (float *dest, int dstr, const uint16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_f32_u32 () oil_conv_f32_u32void oil_conv_f32_u32 (float *dest, int dstr, const uint32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_f32_u8 () oil_conv_f32_u8void oil_conv_f32_u8 (float *dest, int dstr, const uint8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_f64_f32 () oil_conv_f64_f32void oil_conv_f64_f32 (double *dest, int dstr, const float *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_f64_s16 () oil_conv_f64_s16void oil_conv_f64_s16 (double *dest, int dstr, const int16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_f64_s32 () oil_conv_f64_s32void oil_conv_f64_s32 (double *dest, int dstr, const int32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_f64_s8 () oil_conv_f64_s8void oil_conv_f64_s8 (double *dest, int dstr, const int8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_f64_u16 () oil_conv_f64_u16void oil_conv_f64_u16 (double *dest, int dstr, const uint16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_f64_u32 () oil_conv_f64_u32void oil_conv_f64_u32 (double *dest, int dstr, const uint32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_f64_u8 () oil_conv_f64_u8void oil_conv_f64_u8 (double *dest, int dstr, const uint8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s16_f32 () oil_conv_s16_f32void oil_conv_s16_f32 (int16_t *dest, int dstr, const float *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s16_f64 () oil_conv_s16_f64void oil_conv_s16_f64 (int16_t *dest, int dstr, const double *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s16_s32 () oil_conv_s16_s32void oil_conv_s16_s32 (int16_t *dest, int dstr, const int32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s16_s8 () oil_conv_s16_s8void oil_conv_s16_s8 (int16_t *dest, int dstr, const int8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s16_u16 () oil_conv_s16_u16void oil_conv_s16_u16 (int16_t *dest, int dstr, const uint16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s16_u32 () oil_conv_s16_u32void oil_conv_s16_u32 (int16_t *dest, int dstr, const uint32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s16_u8 () oil_conv_s16_u8void oil_conv_s16_u8 (int16_t *dest, int dstr, const uint8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s32_f32 () oil_conv_s32_f32void oil_conv_s32_f32 (int32_t *dest, int dstr, const float *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s32_f64 () oil_conv_s32_f64void oil_conv_s32_f64 (int32_t *dest, int dstr, const double *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s32_s16 () oil_conv_s32_s16void oil_conv_s32_s16 (int32_t *dest, int dstr, const int16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s32_s8 () oil_conv_s32_s8void oil_conv_s32_s8 (int32_t *dest, int dstr, const int8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s32_u16 () oil_conv_s32_u16void oil_conv_s32_u16 (int32_t *dest, int dstr, const uint16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s32_u32 () oil_conv_s32_u32void oil_conv_s32_u32 (int32_t *dest, int dstr, const uint32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s32_u8 () oil_conv_s32_u8void oil_conv_s32_u8 (int32_t *dest, int dstr, const uint8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s8_f32 () oil_conv_s8_f32void oil_conv_s8_f32 (int8_t *dest, int dstr, const float *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s8_f64 () oil_conv_s8_f64void oil_conv_s8_f64 (int8_t *dest, int dstr, const double *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s8_s16 () oil_conv_s8_s16void oil_conv_s8_s16 (int8_t *dest, int dstr, const int16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s8_s32 () oil_conv_s8_s32void oil_conv_s8_s32 (int8_t *dest, int dstr, const int32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s8_u16 () oil_conv_s8_u16void oil_conv_s8_u16 (int8_t *dest, int dstr, const uint16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s8_u32 () oil_conv_s8_u32void oil_conv_s8_u32 (int8_t *dest, int dstr, const uint32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_s8_u8 () oil_conv_s8_u8void oil_conv_s8_u8 (int8_t *dest, int dstr, const uint8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u16_f32 () oil_conv_u16_f32void oil_conv_u16_f32 (uint16_t *dest, int dstr, const float *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u16_f64 () oil_conv_u16_f64void oil_conv_u16_f64 (uint16_t *dest, int dstr, const double *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u16_s16 () oil_conv_u16_s16void oil_conv_u16_s16 (uint16_t *dest, int dstr, const int16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u16_s32 () oil_conv_u16_s32void oil_conv_u16_s32 (uint16_t *dest, int dstr, const int32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u16_s8 () oil_conv_u16_s8void oil_conv_u16_s8 (uint16_t *dest, int dstr, const int8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u16_u32 () oil_conv_u16_u32void oil_conv_u16_u32 (uint16_t *dest, int dstr, const uint32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u16_u8 () oil_conv_u16_u8void oil_conv_u16_u8 (uint16_t *dest, int dstr, const uint8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u32_f32 () oil_conv_u32_f32void oil_conv_u32_f32 (uint32_t *dest, int dstr, const float *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u32_f64 () oil_conv_u32_f64void oil_conv_u32_f64 (uint32_t *dest, int dstr, const double *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u32_s16 () oil_conv_u32_s16void oil_conv_u32_s16 (uint32_t *dest, int dstr, const int16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u32_s32 () oil_conv_u32_s32void oil_conv_u32_s32 (uint32_t *dest, int dstr, const int32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u32_s8 () oil_conv_u32_s8void oil_conv_u32_s8 (uint32_t *dest, int dstr, const int8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u32_u16 () oil_conv_u32_u16void oil_conv_u32_u16 (uint32_t *dest, int dstr, const uint16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u32_u8 () oil_conv_u32_u8void oil_conv_u32_u8 (uint32_t *dest, int dstr, const uint8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u8_f32 () oil_conv_u8_f32void oil_conv_u8_f32 (uint8_t *dest, int dstr, const float *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u8_f64 () oil_conv_u8_f64void oil_conv_u8_f64 (uint8_t *dest, int dstr, const double *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u8_s16 () oil_conv_u8_s16void oil_conv_u8_s16 (uint8_t *dest, int dstr, const int16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u8_s32 () oil_conv_u8_s32void oil_conv_u8_s32 (uint8_t *dest, int dstr, const int32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u8_s8 () oil_conv_u8_s8void oil_conv_u8_s8 (uint8_t *dest, int dstr, const int8_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u8_u16 () oil_conv_u8_u16void oil_conv_u8_u16 (uint8_t *dest, int dstr, const uint16_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_conv_u8_u32 () oil_conv_u8_u32void oil_conv_u8_u32 (uint8_t *dest, int dstr, const uint32_t *src, int sstr, int n); Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : dstr : src : sstr : n : oil_scaleconv_f32_s16 () oil_scaleconv_f32_s16void oil_scaleconv_f32_s16 (float *dest, const int16_t *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_f32_s32 () oil_scaleconv_f32_s32void oil_scaleconv_f32_s32 (float *dest, const int32_t *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_f32_s8 () oil_scaleconv_f32_s8void oil_scaleconv_f32_s8 (float *dest, const int8_t *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_f32_u16 () oil_scaleconv_f32_u16void oil_scaleconv_f32_u16 (float *dest, const uint16_t *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_f32_u32 () oil_scaleconv_f32_u32void oil_scaleconv_f32_u32 (float *dest, const uint32_t *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_f32_u8 () oil_scaleconv_f32_u8void oil_scaleconv_f32_u8 (float *dest, const uint8_t *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_f64_s16 () oil_scaleconv_f64_s16void oil_scaleconv_f64_s16 (double *dest, const int16_t *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_f64_s32 () oil_scaleconv_f64_s32void oil_scaleconv_f64_s32 (double *dest, const int32_t *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_f64_s8 () oil_scaleconv_f64_s8void oil_scaleconv_f64_s8 (double *dest, const int8_t *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_f64_u16 () oil_scaleconv_f64_u16void oil_scaleconv_f64_u16 (double *dest, const uint16_t *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_f64_u32 () oil_scaleconv_f64_u32void oil_scaleconv_f64_u32 (double *dest, const uint32_t *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_f64_u8 () oil_scaleconv_f64_u8void oil_scaleconv_f64_u8 (double *dest, const uint8_t *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_s16_f32 () oil_scaleconv_s16_f32void oil_scaleconv_s16_f32 (int16_t *dest, const float *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_s16_f64 () oil_scaleconv_s16_f64void oil_scaleconv_s16_f64 (int16_t *dest, const double *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_s32_f32 () oil_scaleconv_s32_f32void oil_scaleconv_s32_f32 (int32_t *dest, const float *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_s32_f64 () oil_scaleconv_s32_f64void oil_scaleconv_s32_f64 (int32_t *dest, const double *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_s8_f32 () oil_scaleconv_s8_f32void oil_scaleconv_s8_f32 (int8_t *dest, const float *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_s8_f64 () oil_scaleconv_s8_f64void oil_scaleconv_s8_f64 (int8_t *dest, const double *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_u16_f32 () oil_scaleconv_u16_f32void oil_scaleconv_u16_f32 (uint16_t *dest, const float *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_u16_f64 () oil_scaleconv_u16_f64void oil_scaleconv_u16_f64 (uint16_t *dest, const double *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_u32_f32 () oil_scaleconv_u32_f32void oil_scaleconv_u32_f32 (uint32_t *dest, const float *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_u32_f64 () oil_scaleconv_u32_f64void oil_scaleconv_u32_f64 (uint32_t *dest, const double *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_u8_f32 () oil_scaleconv_u8_f32void oil_scaleconv_u8_f32 (uint8_t *dest, const float *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : oil_scaleconv_u8_f64 () oil_scaleconv_u8_f64void oil_scaleconv_u8_f64 (uint8_t *dest, const double *src, int n, const double *s2_1, const double *s3_1); Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section. dest : src : n : # s2_1: # s3_1: s2_1 : s3_1 : liboil-0.3.17/doc/xml/liboilmacros.xml0000644000175000017500000003004311332637400014542 00000000000000 Macros 3 LIBOIL Library Macros Macros Synopsis #define oil_min (x,y) #define oil_max (x,y) #define oil_divide_255 (x) #define oil_argb (a,r,g,b) #define oil_argb_noclamp (a,r,g,b) #define oil_argb_A (color) #define oil_argb_G (color) #define oil_argb_B (color) #define oil_argb_R (color) #define oil_muldiv_255 (a,b) #define oil_clamp_255 (x) #define OIL_GET (ptr, offset, type) #define OIL_OFFSET (ptr, offset) #define OIL_INCREMENT (ptr, offset) Description Details oil_min() oil_min#define oil_min(x,y) ((x)<(y)?(x):(y)) Evaluates to the minimum of x and y. x : a value y : a value oil_max() oil_max#define oil_max(x,y) ((x)>(y)?(x):(y)) Evaluates to the maximum of x and y. x : a value y : a value oil_divide_255() oil_divide_255#define oil_divide_255(x) ((((x)+128) + (((x)+128)>>8))>>8) Divides x by 255 in a way that is compatible with the pixel operations in Liboil. The number 65025 is 255*255. Evaluates to x divided by 255. x : a value in the range [0,65025] oil_argb() oil_argb#define oil_argb(a,r,g,b) Creates a Liboil ARGB value from individual components. Clamps each component to [0,255]. Evaluates to the ARGB value a : alpha component r : red component g : green component b : blue component oil_argb_noclamp() oil_argb_noclamp#define oil_argb_noclamp(a,r,g,b) Creates a Liboil ARGB value from individual components. Does not clamp components. Evaluates to the ARGB value a : alpha component r : red component g : green component b : blue component oil_argb_A() oil_argb_A#define oil_argb_A(color) (((color)>>24)&0xff) Extracts the alpha component from color. Evaluates to the alpha component color : an ARGB value oil_argb_G() oil_argb_G#define oil_argb_G(color) (((color)>>8)&0xff) Extracts the green component from color. Evaluates to the green component color : an ARGB value oil_argb_B() oil_argb_B#define oil_argb_B(color) (((color)>>0)&0xff) Extracts the blue component from color. Evaluates to the blue component color : an ARGB value oil_argb_R() oil_argb_R#define oil_argb_R(color) (((color)>>16)&0xff) Extracts the red component from color. Evaluates to the red component color : an ARGB value oil_muldiv_255() oil_muldiv_255#define oil_muldiv_255(a,b) oil_divide_255((a)*(b)) Multiplies a and b and divides the result by 255 in a way that is compatible with the pixel operations in Liboil. Evaluates to the result. a : a value in the range [0,255] b : a value in the range [0,255] oil_clamp_255() oil_clamp_255#define oil_clamp_255(x) oil_max(0,oil_min((x),255)) Clamps x to the range [0,255]. Evaluates to the clamped value. x : a value OIL_GET() OIL_GET#define OIL_GET(ptr, offset, type) (*(type *)((uint8_t *)(ptr) + (offset)) ) Offsets ptr by offset number of bytes, and dereferences it as type type. Note that the offset is in bytes, and not in the size of the pointer type. ptr : offset : type : OIL_OFFSET() OIL_OFFSET#define OIL_OFFSET(ptr, offset) ((void *)((uint8_t *)(ptr) + (offset)) ) Add offset bytes to the pointer ptr. ptr : offset : OIL_INCREMENT() OIL_INCREMENT#define OIL_INCREMENT(ptr, offset) (ptr = (void *)((uint8_t *)ptr + (offset)) ) Increments the pointer ptr by offset number of bytes. ptr : offset : liboil-0.3.17/doc/xml/liboilprototype.xml0000644000175000017500000001606311332637400015331 00000000000000 OilPrototype 3 LIBOIL Library OilPrototype Functions to manipulate prototype information. Synopsis OilPrototype; OilPrototype * oil_prototype_from_string (const char *s); char * oil_prototype_to_string (OilPrototype *proto); char * oil_prototype_to_arg_string (OilPrototype *proto); void oil_prototype_free (OilPrototype *proto); void oil_prototype_append_param (OilPrototype *proto, OilParameter *param); Description Details OilPrototype OilPrototypetypedef struct { int n_params; OilParameter *params; OilFunctionClass *klass; } OilPrototype; An opaque structure describing the C function prototype of an OilFunctionClass. oil_prototype_from_string () oil_prototype_from_stringOilPrototype * oil_prototype_from_string (const char *s); Converts the string s containing C prototype that follows Liboil parameter naming rules into a OilPrototype. If the string cannot be converted, NULL is returned. s : a string Returns : the OilPrototype. When it is no longer needed, free the prototype using oil_prototype_free(). oil_prototype_to_string () oil_prototype_to_stringchar * oil_prototype_to_string (OilPrototype *proto); Converts a prototype into the corresponding C style declaration. proto : the OilPrototype Returns : a string that should be freed using free() when it is no longer needed. oil_prototype_to_arg_string () oil_prototype_to_arg_stringchar * oil_prototype_to_arg_string (OilPrototype *proto); Converts a prototype into the corresponding C argument list. proto : the OilPrototype Returns : a string that should be freed using free() when it is no longer needed. oil_prototype_free () oil_prototype_freevoid oil_prototype_free (OilPrototype *proto); Frees memory associated with proto. proto : the OilPrototype oil_prototype_append_param () oil_prototype_append_paramvoid oil_prototype_append_param (OilPrototype *proto, OilParameter *param); Appends param to the list of parameters contained in proto. The contents of param are copied. proto : the OilPrototype param : an OilParameter liboil-0.3.17/doc/xml/api-index-full.xml0000644000175000017500000015575111332637400014717 00000000000000 N NULL O OilArgType OilDebugLevel OilDebugPrintFunc OilFunctionClass OilFunctionImpl OilImplFlag OilParameter OilProfile OilPrototype OilTest OilTestFunction OilType oil_abs_f32_f32 oil_abs_f64_f64 oil_abs_u16_s16 oil_abs_u32_s32 oil_abs_u8_s8 oil_add_f32 oil_argb oil_argb_A oil_argb_B oil_argb_G oil_argb_noclamp oil_argb_paint_u8 oil_argb_R oil_arg_type_name oil_average2_u8 oil_ayuv2argb_u8 oil_ayuv2uyvy oil_ayuv2yuyv oil_ayuv2yvyu OIL_CHECK_PROTOTYPE oil_clamp_255 oil_class_choose_by_name oil_class_get oil_class_get_by_index oil_class_get_n_classes oil_class_optimize oil_class_register_impl oil_class_register_impl_by_name oil_class_register_impl_full oil_clipconv8x8_u8_s16 oil_clipconv_s16_f32 oil_clipconv_s16_f64 oil_clipconv_s16_s32 oil_clipconv_s16_u16 oil_clipconv_s16_u32 oil_clipconv_s32_f32 oil_clipconv_s32_f64 oil_clipconv_s32_u32 oil_clipconv_s8_f32 oil_clipconv_s8_f64 oil_clipconv_s8_s16 oil_clipconv_s8_s32 oil_clipconv_s8_u16 oil_clipconv_s8_u32 oil_clipconv_s8_u8 oil_clipconv_u16_f32 oil_clipconv_u16_f64 oil_clipconv_u16_s16 oil_clipconv_u16_s32 oil_clipconv_u16_u32 oil_clipconv_u32_f32 oil_clipconv_u32_f64 oil_clipconv_u32_s32 oil_clipconv_u8_f32 oil_clipconv_u8_f64 oil_clipconv_u8_s16 oil_clipconv_u8_s32 oil_clipconv_u8_s8 oil_clipconv_u8_u16 oil_clipconv_u8_u32 oil_clip_f32 oil_clip_f64 oil_clip_s16 oil_clip_s32 oil_clip_s8 oil_clip_u16 oil_clip_u32 oil_clip_u8 oil_colsad8x8_u8 oil_compare_u8 oil_composite_add_argb oil_composite_add_argb_const_src oil_composite_add_u8 oil_composite_in_argb oil_composite_in_argb_const_mask oil_composite_in_argb_const_src oil_composite_in_over_argb oil_composite_in_over_argb_const_mask oil_composite_in_over_argb_const_src oil_composite_over_argb oil_composite_over_argb_const_src oil_composite_over_u8 oil_conv8x8_f64_s16 oil_conv8x8_s16_f64 oil_conv_f32_f64 oil_conv_f32_s16 oil_conv_f32_s32 oil_conv_f32_s8 oil_conv_f32_u16 oil_conv_f32_u32 oil_conv_f32_u8 oil_conv_f64_f32 oil_conv_f64_s16 oil_conv_f64_s32 oil_conv_f64_s8 oil_conv_f64_u16 oil_conv_f64_u32 oil_conv_f64_u8 oil_conv_s16_f32 oil_conv_s16_f64 oil_conv_s16_s32 oil_conv_s16_s8 oil_conv_s16_u16 oil_conv_s16_u32 oil_conv_s16_u8 oil_conv_s32_f32 oil_conv_s32_f64 oil_conv_s32_s16 oil_conv_s32_s8 oil_conv_s32_u16 oil_conv_s32_u32 oil_conv_s32_u8 oil_conv_s8_f32 oil_conv_s8_f64 oil_conv_s8_s16 oil_conv_s8_s32 oil_conv_s8_u16 oil_conv_s8_u32 oil_conv_s8_u8 oil_conv_u16_f32 oil_conv_u16_f64 oil_conv_u16_s16 oil_conv_u16_s32 oil_conv_u16_s8 oil_conv_u16_u32 oil_conv_u16_u8 oil_conv_u32_f32 oil_conv_u32_f64 oil_conv_u32_s16 oil_conv_u32_s32 oil_conv_u32_s8 oil_conv_u32_u16 oil_conv_u32_u8 oil_conv_u8_f32 oil_conv_u8_f64 oil_conv_u8_s16 oil_conv_u8_s32 oil_conv_u8_s8 oil_conv_u8_u16 oil_conv_u8_u32 oil_copy8x8_u8 oil_copy_u8 OIL_CPU_FLAG_MASK oil_cpu_get_flags oil_cpu_get_ticks_per_second oil_dct36_f32 OIL_DEBUG oil_debug_get_level OIL_DEBUG_PRINT oil_debug_set_level oil_debug_set_print_function OIL_DECLARE_CLASS OIL_DEFINE_CLASS OIL_DEFINE_CLASS_FULL OIL_DEFINE_IMPL OIL_DEFINE_IMPL_ASM OIL_DEFINE_IMPL_DEPENDS OIL_DEFINE_IMPL_FULL OIL_DEFINE_IMPL_REF oil_dequantize8x8_s16 oil_diff8x8_average_s16_u8 oil_diff8x8_const128_s16_u8 oil_diff8x8_s16_u8 oil_diffsquaresum_f64 oil_divide_255 oil_divide_f32 OIL_ERROR oil_err_inter8x8_u8 oil_err_inter8x8_u8_avg oil_err_intra8x8_u8 oil_fdct8x8s_s16 oil_fdct8x8theora oil_fdct8x8_f64 oil_fdct8_f64 oil_floor_f32 OIL_FUNCTION OIL_GET oil_idct8theora_s16 oil_idct8x8lim10_f64 oil_idct8x8lim10_s16 oil_idct8x8theora_s16 oil_idct8x8_f64 oil_idct8x8_s16 oil_idct8_f64 oil_imdct12_f64 oil_imdct32_f32 oil_imdct36_f64 oil_impl_get_by_index oil_impl_is_runnable OIL_INCREMENT OIL_INFO oil_init oil_init_no_optimize oil_inverse_f32 OIL_LOG oil_max oil_maximum_f32 oil_md5 oil_mdct12_f64 oil_mdct36_f64 oil_memcpy oil_merge_linear_argb oil_min oil_minimum_f32 oil_mix_u8 oil_muldiv_255 oil_mult8x8_s16 oil_multiply_f32 oil_multsum_f32 oil_multsum_f64 oil_negative_f32 OIL_NO_CLASSES oil_null OIL_OFFSET oil_optimize oil_optimize_all OIL_OPT_FLAG_MANGLE OIL_OPT_MANGLE OIL_OPT_SUFFIX oil_param_get_source_data oil_permute_f32 oil_permute_f64 oil_permute_s16 oil_permute_s32 oil_permute_s8 oil_permute_u16 oil_permute_u32 oil_permute_u8 oil_profile_get_ave_std OIL_PROFILE_HIST_LENGTH oil_profile_init oil_profile_stamp oil_profile_start oil_profile_stop oil_profile_stop_handle oil_prototype_append_param oil_prototype_free oil_prototype_from_string oil_prototype_to_arg_string oil_prototype_to_string oil_random_alpha oil_random_argb oil_random_f32 oil_random_f64 oil_random_s16 oil_random_s32 oil_random_s64 oil_random_s8 oil_random_u16 oil_random_u32 oil_random_u64 oil_random_u8 oil_rand_f32 oil_rand_f64 oil_rand_s16 oil_rand_s32 oil_rand_s64 oil_rand_s8 oil_rand_u16 oil_rand_u32 oil_rand_u64 oil_rand_u8 oil_recon8x8_inter oil_recon8x8_inter2 oil_recon8x8_intra oil_resample_linear_argb oil_resample_linear_u8 oil_rgb2bgr oil_rgb2rgba oil_rowsad8x8_u8 oil_sad8x8_f64 oil_sad8x8_f64_2 oil_sad8x8_s16 oil_sad8x8_s16_2 oil_sad8x8_u8 oil_sad8x8_u8_avg oil_scalaradd_f32 oil_scalaradd_f32_ns oil_scalaradd_f64 oil_scalaradd_s16 oil_scalaradd_s32 oil_scalaradd_s8 oil_scalaradd_u16 oil_scalaradd_u32 oil_scalaradd_u8 oil_scalarmultiply_f32_ns oil_scalarmult_f32 oil_scalarmult_f64 oil_scalarmult_s16 oil_scalarmult_s32 oil_scalarmult_s8 oil_scalarmult_u16 oil_scalarmult_u32 oil_scalarmult_u8 oil_scaleconv_f32_s16 oil_scaleconv_f32_s32 oil_scaleconv_f32_s8 oil_scaleconv_f32_u16 oil_scaleconv_f32_u32 oil_scaleconv_f32_u8 oil_scaleconv_f64_s16 oil_scaleconv_f64_s32 oil_scaleconv_f64_s8 oil_scaleconv_f64_u16 oil_scaleconv_f64_u32 oil_scaleconv_f64_u8 oil_scaleconv_s16_f32 oil_scaleconv_s16_f64 oil_scaleconv_s32_f32 oil_scaleconv_s32_f64 oil_scaleconv_s8_f32 oil_scaleconv_s8_f64 oil_scaleconv_u16_f32 oil_scaleconv_u16_f64 oil_scaleconv_u32_f32 oil_scaleconv_u32_f64 oil_scaleconv_u8_f32 oil_scaleconv_u8_f64 oil_scanlinescale2_u8 oil_sign_f32 oil_sincos_f64 oil_splat_u32 oil_splat_u32_ns oil_splat_u8 oil_splat_u8_ns oil_squaresum_f64 oil_squaresum_shifted_s16 oil_subtract_f32 oil_sum_f64 oil_swab_u16 oil_swab_u32 oil_tablelookup_u8 oil_testzero_u8 oil_test_check_impl oil_test_check_ref oil_test_cleanup OIL_TEST_FOOTER oil_test_free oil_test_get_source_data oil_test_get_value OIL_TEST_HEADER oil_test_init oil_test_new oil_test_set_iterations oil_test_set_test_footer oil_test_set_test_header oil_trans8x8_f64 oil_trans8x8_s16 oil_trans8x8_u16 oil_trans8x8_u32 oil_trans8x8_u8 oil_type_f32 oil_type_f64 oil_type_is_floating_point oil_type_max_s16 oil_type_max_s32 oil_type_max_s8 oil_type_max_u16 oil_type_max_u32 oil_type_max_u8 oil_type_min_s16 oil_type_min_s32 oil_type_min_s8 oil_type_min_u16 oil_type_min_u32 oil_type_min_u8 oil_type_name oil_type_s16 oil_type_s32 oil_type_s64 oil_type_s8 oil_type_sizeof oil_type_u16 oil_type_u32 oil_type_u64 oil_type_u8 oil_unzigzag8x8_s16 oil_utf8_validate oil_uyvy2ayuv oil_vectoradd_f32 oil_vectoradd_f64 oil_vectoradd_s16 oil_vectoradd_s32 oil_vectoradd_s8 oil_vectoradd_s_f32 oil_vectoradd_s_f64 oil_vectoradd_s_s16 oil_vectoradd_s_s8 oil_vectoradd_s_u16 oil_vectoradd_s_u8 oil_vectoradd_u16 oil_vectoradd_u32 oil_vectoradd_u8 OIL_WARNING oil_yuv2rgbx_sub2_u8 oil_yuv2rgbx_sub4_u8 oil_yuv2rgbx_u8 oil_yuyv2ayuv oil_yvyu2ayuv oil_zigzag8x8_s16 liboil-0.3.17/doc/xml/liboilfuncs-math.xml0000644000175000017500000040261111332637400015327 00000000000000 Simple Arithmetic 3 LIBOIL Library Simple Arithmetic Aritmetic operations Synopsis void oil_abs_f32_f32 (float *dest, int dstr, const float *src, int sstr, int n); void oil_abs_f64_f64 (double *dest, int dstr, const double *src, int sstr, int n); void oil_abs_u16_s16 (uint16_t *dest, int dstr, const int16_t *src, int sstr, int n); void oil_abs_u32_s32 (uint32_t *dest, int dstr, const int32_t *src, int sstr, int n); void oil_abs_u8_s8 (uint8_t *dest, int dstr, const int8_t *src, int sstr, int n); void oil_average2_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr1, const uint8_t *s2, int sstr2, int n); void oil_multsum_f32 (float *dest, const float *src1, int sstr1, const float *src2, int sstr2, int n); void oil_multsum_f64 (double *dest, const double *src1, int sstr1, const double *src2, int sstr2, int n); void oil_scalaradd_f32 (float *d, int dstr, const float *s1, int sstr, const float *s2_1, int n); void oil_scalaradd_f64 (double *d, int dstr, const double *s1, int sstr, const double *s2_1, int n); void oil_scalaradd_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr, const int16_t *s2_1, int n); void oil_scalaradd_s32 (int32_t *d, int dstr, const int32_t *s1, int sstr, const int32_t *s2_1, int n); void oil_scalaradd_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr, const int8_t *s2_1, int n); void oil_scalaradd_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr, const uint16_t *s2_1, int n); void oil_scalaradd_u32 (uint32_t *d, int dstr, const uint32_t *s1, int sstr, const uint32_t *s2_1, int n); void oil_scalaradd_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr, const uint8_t *s2_1, int n); void oil_scalarmult_f32 (float *d, int dstr, const float *s1, int sstr, const float *s2_1, int n); void oil_scalarmult_f64 (double *d, int dstr, const double *s1, int sstr, const double *s2_1, int n); void oil_scalarmult_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr, const int16_t *s2_1, int n); void oil_scalarmult_s32 (int32_t *d, int dstr, const int32_t *s1, int sstr, const int32_t *s2_1, int n); void oil_scalarmult_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr, const int8_t *s2_1, int n); void oil_scalarmult_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr, const uint16_t *s2_1, int n); void oil_scalarmult_u32 (uint32_t *d, int dstr, const uint32_t *s1, int sstr, const uint32_t *s2_1, int n); void oil_scalarmult_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr, const uint8_t *s2_1, int n); void oil_vectoradd_f32 (float *d, int dstr, const float *s1, int sstr1, const float *s2, int sstr2, int n, const float *s3_1, const float *s4_1); void oil_vectoradd_f64 (double *d, int dstr, const double *s1, int sstr1, const double *s2, int sstr2, int n, const double *s3_1, const double *s4_1); void oil_vectoradd_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr1, const int16_t *s2, int sstr2, int n, const int16_t *s3_1, const int16_t *s4_1); void oil_vectoradd_s32 (int32_t *d, int dstr, const int32_t *s1, int sstr1, const int32_t *s2, int sstr2, int n, const int32_t *s3_1, const int32_t *s4_1); void oil_vectoradd_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr1, const int8_t *s2, int sstr2, int n, const int8_t *s3_1, const int8_t *s4_1); void oil_vectoradd_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr1, const uint16_t *s2, int sstr2, int n, const uint16_t *s3_1, const uint16_t *s4_1); void oil_vectoradd_u32 (uint32_t *d, int dstr, const uint32_t *s1, int sstr1, const uint32_t *s2, int sstr2, int n, const uint32_t *s3_1, const uint32_t *s4_1); void oil_vectoradd_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr1, const uint8_t *s2, int sstr2, int n, const uint8_t *s3_1, const uint8_t *s4_1); void oil_vectoradd_s_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr1, const int8_t *s2, int sstr2, int n); void oil_vectoradd_s_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr1, const uint8_t *s2, int sstr2, int n); void oil_vectoradd_s_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr1, const int16_t *s2, int sstr2, int n); void oil_vectoradd_s_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr1, const uint16_t *s2, int sstr2, int n); void oil_vectoradd_s_f32 (float *d, int dstr, const float *s1, int sstr1, const float *s2, int sstr2, int n); void oil_vectoradd_s_f64 (double *d, int dstr, const double *s1, int sstr1, const double *s2, int sstr2, int n); void oil_squaresum_f64 (double *d, const double *s, int n); void oil_squaresum_shifted_s16 (uint32_t *d, const int16_t *s, int n); void oil_sum_f64 (double *d_1, const double *s, int sstr, int n); void oil_add_f32 (float *d, const float *s1, const float *s2, int n); void oil_divide_f32 (float *d, const float *s1, const float *s2, int n); void oil_floor_f32 (float *d, const float *s, int n); void oil_inverse_f32 (float *d, const float *s, int n); void oil_maximum_f32 (float *d, const float *s1, const float *s2, int n); void oil_minimum_f32 (float *d, const float *s1, const float *s2, int n); void oil_multiply_f32 (float *d, const float *s1, const float *s2, int n); void oil_negative_f32 (float *d, const float *s, int n); void oil_scalaradd_f32_ns (float *d, const float *s1, const float *s2_1, int n); void oil_scalarmultiply_f32_ns (float *d, const float *s1, const float *s2_1, int n); void oil_sign_f32 (float *d, const float *s, int n); void oil_subtract_f32 (float *d, const float *s1, const float *s2, int n); Description Details oil_abs_f32_f32 () oil_abs_f32_f32void oil_abs_f32_f32 (float *dest, int dstr, const float *src, int sstr, int n); Calculates the absolute value of each element in the source array and writes it into the destination array. dest : destination array dstr : stride of destination elements src : source array sstr : stride of source elements n : number of elements in arrays oil_abs_f64_f64 () oil_abs_f64_f64void oil_abs_f64_f64 (double *dest, int dstr, const double *src, int sstr, int n); Calculates the absolute value of each element in the source array and writes it into the destination array. dest : destination array dstr : stride of destination elements src : source array sstr : stride of source elements n : number of elements in arrays oil_abs_u16_s16 () oil_abs_u16_s16void oil_abs_u16_s16 (uint16_t *dest, int dstr, const int16_t *src, int sstr, int n); Calculates the absolute value of each element in the source array and writes it into the destination array. dest : destination array dstr : stride of destination elements src : source array sstr : stride of source elements n : number of elements in arrays oil_abs_u32_s32 () oil_abs_u32_s32void oil_abs_u32_s32 (uint32_t *dest, int dstr, const int32_t *src, int sstr, int n); Calculates the absolute value of each element in the source array and writes it into the destination array. dest : destination array dstr : stride of destination elements src : source array sstr : stride of source elements n : number of elements in arrays oil_abs_u8_s8 () oil_abs_u8_s8void oil_abs_u8_s8 (uint8_t *dest, int dstr, const int8_t *src, int sstr, int n); Calculates the absolute value of each element in the source array and writes it into the destination array. dest : destination array dstr : stride of destination elements src : source array sstr : stride of source elements n : number of elements in arrays oil_average2_u8 () oil_average2_u8void oil_average2_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr1, const uint8_t *s2, int sstr2, int n); Averages each element in s1 and s2 and places the result in d. FIXME: This class is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr1 : s2 : sstr2 : n : oil_multsum_f32 () oil_multsum_f32void oil_multsum_f32 (float *dest, const float *src1, int sstr1, const float *src2, int sstr2, int n); Multiplies each element in src1 and src2 and sums the results over the entire array, and places the sum into dest. dest : src1 : sstr1 : src2 : sstr2 : n : oil_multsum_f64 () oil_multsum_f64void oil_multsum_f64 (double *dest, const double *src1, int sstr1, const double *src2, int sstr2, int n); Multiplies each element in src1 and src2 and sums the results over the entire array, and places the sum into dest. dest : src1 : sstr1 : src2 : sstr2 : n : oil_scalaradd_f32 () oil_scalaradd_f32void oil_scalaradd_f32 (float *d, int dstr, const float *s1, int sstr, const float *s2_1, int n); Adds the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_scalaradd_f64 () oil_scalaradd_f64void oil_scalaradd_f64 (double *d, int dstr, const double *s1, int sstr, const double *s2_1, int n); Adds the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_scalaradd_s16 () oil_scalaradd_s16void oil_scalaradd_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr, const int16_t *s2_1, int n); Adds the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_scalaradd_s32 () oil_scalaradd_s32void oil_scalaradd_s32 (int32_t *d, int dstr, const int32_t *s1, int sstr, const int32_t *s2_1, int n); Adds the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_scalaradd_s8 () oil_scalaradd_s8void oil_scalaradd_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr, const int8_t *s2_1, int n); Adds the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_scalaradd_u16 () oil_scalaradd_u16void oil_scalaradd_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr, const uint16_t *s2_1, int n); Adds the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_scalaradd_u32 () oil_scalaradd_u32void oil_scalaradd_u32 (uint32_t *d, int dstr, const uint32_t *s1, int sstr, const uint32_t *s2_1, int n); Adds the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_scalaradd_u8 () oil_scalaradd_u8void oil_scalaradd_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr, const uint8_t *s2_1, int n); Adds the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_scalarmult_f32 () oil_scalarmult_f32void oil_scalarmult_f32 (float *d, int dstr, const float *s1, int sstr, const float *s2_1, int n); Multiplies the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_scalarmult_f64 () oil_scalarmult_f64void oil_scalarmult_f64 (double *d, int dstr, const double *s1, int sstr, const double *s2_1, int n); Multiplies the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_scalarmult_s16 () oil_scalarmult_s16void oil_scalarmult_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr, const int16_t *s2_1, int n); Multiplies the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_scalarmult_s32 () oil_scalarmult_s32void oil_scalarmult_s32 (int32_t *d, int dstr, const int32_t *s1, int sstr, const int32_t *s2_1, int n); Multiplies the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_scalarmult_s8 () oil_scalarmult_s8void oil_scalarmult_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr, const int8_t *s2_1, int n); Multiplies the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_scalarmult_u16 () oil_scalarmult_u16void oil_scalarmult_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr, const uint16_t *s2_1, int n); Multiplies the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_scalarmult_u32 () oil_scalarmult_u32void oil_scalarmult_u32 (uint32_t *d, int dstr, const uint32_t *s1, int sstr, const uint32_t *s2_1, int n); Multiplies the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_scalarmult_u8 () oil_scalarmult_u8void oil_scalarmult_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr, const uint8_t *s2_1, int n); Multiplies the constant value s2_1 to each value in s1 and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr : s2_1 : n : oil_vectoradd_f32 () oil_vectoradd_f32void oil_vectoradd_f32 (float *d, int dstr, const float *s1, int sstr1, const float *s2, int sstr2, int n, const float *s3_1, const float *s4_1); Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr1 : s2 : sstr2 : n : s3_1 : s4_1 : oil_vectoradd_f64 () oil_vectoradd_f64void oil_vectoradd_f64 (double *d, int dstr, const double *s1, int sstr1, const double *s2, int sstr2, int n, const double *s3_1, const double *s4_1); Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr1 : s2 : sstr2 : n : s3_1 : s4_1 : oil_vectoradd_s16 () oil_vectoradd_s16void oil_vectoradd_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr1, const int16_t *s2, int sstr2, int n, const int16_t *s3_1, const int16_t *s4_1); Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr1 : s2 : sstr2 : n : s3_1 : s4_1 : oil_vectoradd_s32 () oil_vectoradd_s32void oil_vectoradd_s32 (int32_t *d, int dstr, const int32_t *s1, int sstr1, const int32_t *s2, int sstr2, int n, const int32_t *s3_1, const int32_t *s4_1); Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr1 : s2 : sstr2 : n : s3_1 : s4_1 : oil_vectoradd_s8 () oil_vectoradd_s8void oil_vectoradd_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr1, const int8_t *s2, int sstr2, int n, const int8_t *s3_1, const int8_t *s4_1); Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr1 : s2 : sstr2 : n : s3_1 : s4_1 : oil_vectoradd_u16 () oil_vectoradd_u16void oil_vectoradd_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr1, const uint16_t *s2, int sstr2, int n, const uint16_t *s3_1, const uint16_t *s4_1); Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr1 : s2 : sstr2 : n : s3_1 : s4_1 : oil_vectoradd_u32 () oil_vectoradd_u32void oil_vectoradd_u32 (uint32_t *d, int dstr, const uint32_t *s1, int sstr1, const uint32_t *s2, int sstr2, int n, const uint32_t *s3_1, const uint32_t *s4_1); Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr1 : s2 : sstr2 : n : s3_1 : s4_1 : oil_vectoradd_u8 () oil_vectoradd_u8void oil_vectoradd_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr1, const uint8_t *s2, int sstr2, int n, const uint8_t *s3_1, const uint8_t *s4_1); Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr1 : s2 : sstr2 : n : s3_1 : s4_1 : oil_vectoradd_s_s8 () oil_vectoradd_s_s8void oil_vectoradd_s_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr1, const int8_t *s2, int sstr2, int n); Adds each element of s1 to s2 and clamps the result to the range of the type and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr1 : s2 : sstr2 : n : oil_vectoradd_s_u8 () oil_vectoradd_s_u8void oil_vectoradd_s_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr1, const uint8_t *s2, int sstr2, int n); Adds each element of s1 to s2 and clamps the result to the range of the type and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr1 : s2 : sstr2 : n : oil_vectoradd_s_s16 () oil_vectoradd_s_s16void oil_vectoradd_s_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr1, const int16_t *s2, int sstr2, int n); Adds each element of s1 to s2 and clamps the result to the range of the type and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr1 : s2 : sstr2 : n : oil_vectoradd_s_u16 () oil_vectoradd_s_u16void oil_vectoradd_s_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr1, const uint16_t *s2, int sstr2, int n); Adds each element of s1 to s2 and clamps the result to the range of the type and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr1 : s2 : sstr2 : n : oil_vectoradd_s_f32 () oil_vectoradd_s_f32void oil_vectoradd_s_f32 (float *d, int dstr, const float *s1, int sstr1, const float *s2, int sstr2, int n); Adds each element of s1 to s2 and clamps the result to the range [-1,1] and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr1 : s2 : sstr2 : n : oil_vectoradd_s_f64 () oil_vectoradd_s_f64void oil_vectoradd_s_f64 (double *d, int dstr, const double *s1, int sstr1, const double *s2, int sstr2, int n); Adds each element of s1 to s2 and clamps the result to the range [-1,1] and places the result in d. FIXME: This function is difficult to optimize and will likely be replaced. d : dstr : s1 : sstr1 : s2 : sstr2 : n : oil_squaresum_f64 () oil_squaresum_f64void oil_squaresum_f64 (double *d, const double *s, int n); Sums the square of each element in s and places the result in dest. d : s : n : oil_squaresum_shifted_s16 () oil_squaresum_shifted_s16void oil_squaresum_shifted_s16 (uint32_t *d, const int16_t *s, int n); Square each element in s and divide by (1<<15), and sum the results, placing the final result in d. d : s : n : oil_sum_f64 () oil_sum_f64void oil_sum_f64 (double *d_1, const double *s, int sstr, int n); Sums the elements in the source array and places the result in d. d_1 : destination s : source array sstr : stride of source elements n : number of elements oil_add_f32 () oil_add_f32void oil_add_f32 (float *d, const float *s1, const float *s2, int n); Adds elements in s2 and s1 and places the result in d. d : destination s1 : source 1 s2 : source 2 n : number of elements oil_divide_f32 () oil_divide_f32void oil_divide_f32 (float *d, const float *s1, const float *s2, int n); Divides elements in s1 by s2 and places the result in d. d : destination s1 : source 1 s2 : source 2 n : number of elements oil_floor_f32 () oil_floor_f32void oil_floor_f32 (float *d, const float *s, int n); Calculates the greatest integer less than or equal to each element in s and places the result in d. d : destination s : source n : number of elements oil_inverse_f32 () oil_inverse_f32void oil_inverse_f32 (float *d, const float *s, int n); Calculates the multiplicative inverse of each element in s and places the result in d. d : destination s : source n : number of elements oil_maximum_f32 () oil_maximum_f32void oil_maximum_f32 (float *d, const float *s1, const float *s2, int n); Places the greater of s1 and s2 in d. d : destination s1 : source 1 s2 : source 2 n : number of elements oil_minimum_f32 () oil_minimum_f32void oil_minimum_f32 (float *d, const float *s1, const float *s2, int n); Places the lesser of s1 and s2 in d. d : destination s1 : source 1 s2 : source 2 n : number of elements oil_multiply_f32 () oil_multiply_f32void oil_multiply_f32 (float *d, const float *s1, const float *s2, int n); Multiplies elements in s1 and s2 and places the result in d. d : destination s1 : source 1 s2 : source 2 n : number of elements oil_negative_f32 () oil_negative_f32void oil_negative_f32 (float *d, const float *s, int n); Negates each element in s and places the result in d. d : destination s : source n : number of elements oil_scalaradd_f32_ns () oil_scalaradd_f32_nsvoid oil_scalaradd_f32_ns (float *d, const float *s1, const float *s2_1, int n); Adds the constant value s2_1 to each source element and places the result in d. d : destination s1 : source s2_1 : source n : number of elements oil_scalarmultiply_f32_ns () oil_scalarmultiply_f32_nsvoid oil_scalarmultiply_f32_ns (float *d, const float *s1, const float *s2_1, int n); Multiplies the constant value s2_1 and each source element and places the result in d. d : destination s1 : source s2_1 : source n : number of elements oil_sign_f32 () oil_sign_f32void oil_sign_f32 (float *d, const float *s, int n); Calculates the sign of each element in s and places the result in d. d : destination s : source n : number of elements oil_subtract_f32 () oil_subtract_f32void oil_subtract_f32 (float *d, const float *s1, const float *s2, int n); Subtracts elements in s2 from s1 and places the result in d. d : destination s1 : source 1 s2 : source 2 n : number of elements liboil-0.3.17/doc/xml/liboilfuncs-doc.xml0000644000175000017500000021410311332637400015140 00000000000000 liboilfuncs-doc 3 LIBOIL Library liboilfuncs-doc Synopsis void oil_clip_f32 (float *dest, int dstr, const float *src, int sstr, int n, const float *s2_1, const float *s3_1); void oil_clip_f64 (double *dest, int dstr, const double *src, int sstr, int n, const double *s2_1, const double *s3_1); void oil_clip_s16 (int16_t *dest, int dstr, const int16_t *src, int sstr, int n, const int16_t *s2_1, const int16_t *s3_1); void oil_clip_s32 (int32_t *dest, int dstr, const int32_t *src, int sstr, int n, const int32_t *s2_1, const int32_t *s3_1); void oil_clip_s8 (int8_t *dest, int dstr, const int8_t *src, int sstr, int n, const int8_t *s2_1, const int8_t *s3_1); void oil_clip_u16 (uint16_t *dest, int dstr, const uint16_t *src, int sstr, int n, const uint16_t *s2_1, const uint16_t *s3_1); void oil_clip_u32 (uint32_t *dest, int dstr, const uint32_t *src, int sstr, int n, const uint32_t *s2_1, const uint32_t *s3_1); void oil_clip_u8 (uint8_t *dest, int dstr, const uint8_t *src, int sstr, int n, const uint8_t *s2_1, const uint8_t *s3_1); void oil_dequantize8x8_s16 (int16_t *d_8x8, int dstr, const int16_t *s1_8x8, int sstr1, const int16_t *s2_8x8, int sstr2); void oil_diffsquaresum_f64 (double *d_1, const double *src1, int sstr1, const double *src2, int sstr2, int n); void oil_md5 (uint32_t *i_4, const uint32_t *s_16); void oil_mix_u8 (uint8_t *dest, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int n); void oil_null (void); void oil_scanlinescale2_u8 (uint8_t *d, const uint8_t *s, int n); void oil_sincos_f64 (double *dest1, double *dest2, int n, const double *s1_1, const double *s2_1); void oil_utf8_validate (int32_t *d_1, const uint8_t *s, int n); void oil_diff8x8_s16_u8 (int16_t *d_8x8, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, int ss2); void oil_diff8x8_average_s16_u8 (int16_t *d_8x8, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, int ss2, const uint8_t *s3_8x8, int ss3); void oil_err_inter8x8_u8_avg (uint32_t *d_1, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, const uint8_t *s3_8x8, int ss2); void oil_recon8x8_inter (uint8_t *d_8x8, int ds, const uint8_t *s1_8x8, int ss1, const int16_t *s2_8x8); void oil_err_intra8x8_u8 (uint32_t *d_1, const uint8_t *s1_8x8, int ss1); void oil_recon8x8_intra (uint8_t *d_8x8, int ds, const int16_t *s_8x8); void oil_colsad8x8_u8 (uint32_t *d_1, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, int ss2); void oil_composite_over_u8 (uint8_t *i_n, const uint8_t *s1_n, int n); void oil_diff8x8_const128_s16_u8 (int16_t *d_8x8, const uint8_t *s1_8x8, int ss1); void oil_copy8x8_u8 (uint8_t *d_8x8, int ds, const uint8_t *s_8x8, int ss); void oil_err_inter8x8_u8 (uint32_t *d_1, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, int ss2); void oil_fdct8x8theora (const int16_t *s_8x8, int16_t *d_8x8); void oil_rowsad8x8_u8 (uint32_t *d_1, const uint8_t *s1_8x8, const uint8_t *s2_8x8); void oil_recon8x8_inter2 (uint8_t *d_8x8, int ds, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, int ss2, const int16_t *s3_8x8); void oil_composite_add_u8 (uint8_t *i_n, const uint8_t *s1_n, int n); void oil_sad8x8_u8_avg (uint32_t *d_1, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, const uint8_t *s3_8x8, int ss2); Description Details oil_clip_f32 () oil_clip_f32void oil_clip_f32 (float *dest, int dstr, const float *src, int sstr, int n, const float *s2_1, const float *s3_1); Clips each value in src to the range [s2_1,s3_1] and places the result in dest. dest : dstr : src : sstr : n : s2_1 : s3_1 : oil_clip_f64 () oil_clip_f64void oil_clip_f64 (double *dest, int dstr, const double *src, int sstr, int n, const double *s2_1, const double *s3_1); Clips each value in src to the range [s2_1,s3_1] and places the result in dest. dest : dstr : src : sstr : n : s2_1 : s3_1 : oil_clip_s16 () oil_clip_s16void oil_clip_s16 (int16_t *dest, int dstr, const int16_t *src, int sstr, int n, const int16_t *s2_1, const int16_t *s3_1); Clips each value in src to the range [s2_1,s3_1] and places the result in dest. dest : dstr : src : sstr : n : s2_1 : s3_1 : oil_clip_s32 () oil_clip_s32void oil_clip_s32 (int32_t *dest, int dstr, const int32_t *src, int sstr, int n, const int32_t *s2_1, const int32_t *s3_1); Clips each value in src to the range [s2_1,s3_1] and places the result in dest. dest : dstr : src : sstr : n : s2_1 : s3_1 : oil_clip_s8 () oil_clip_s8void oil_clip_s8 (int8_t *dest, int dstr, const int8_t *src, int sstr, int n, const int8_t *s2_1, const int8_t *s3_1); Clips each value in src to the range [s2_1,s3_1] and places the result in dest. dest : dstr : src : sstr : n : s2_1 : s3_1 : oil_clip_u16 () oil_clip_u16void oil_clip_u16 (uint16_t *dest, int dstr, const uint16_t *src, int sstr, int n, const uint16_t *s2_1, const uint16_t *s3_1); Clips each value in src to the range [s2_1,s3_1] and places the result in dest. dest : dstr : src : sstr : n : s2_1 : s3_1 : oil_clip_u32 () oil_clip_u32void oil_clip_u32 (uint32_t *dest, int dstr, const uint32_t *src, int sstr, int n, const uint32_t *s2_1, const uint32_t *s3_1); Clips each value in src to the range [s2_1,s3_1] and places the result in dest. dest : dstr : src : sstr : n : s2_1 : s3_1 : oil_clip_u8 () oil_clip_u8void oil_clip_u8 (uint8_t *dest, int dstr, const uint8_t *src, int sstr, int n, const uint8_t *s2_1, const uint8_t *s3_1); Clips each value in src to the range [s2_1,s3_1] and places the result in dest. dest : dstr : src : sstr : n : s2_1 : s3_1 : oil_dequantize8x8_s16 () oil_dequantize8x8_s16void oil_dequantize8x8_s16 (int16_t *d_8x8, int dstr, const int16_t *s1_8x8, int sstr1, const int16_t *s2_8x8, int sstr2); Multiplies each element in s1_8x8 by the corresponding element in s2_8x8 and places the result in d_8x8. d_8x8 : dstr : s1_8x8 : sstr1 : s2_8x8 : sstr2 : oil_diffsquaresum_f64 () oil_diffsquaresum_f64void oil_diffsquaresum_f64 (double *d_1, const double *src1, int sstr1, const double *src2, int sstr2, int n); Calculates the sum of squared differences between src1 and src2 and places the result in d_1. d_1 : src1 : sstr1 : src2 : sstr2 : n : oil_md5 () oil_md5void oil_md5 (uint32_t *i_4, const uint32_t *s_16); Performs an MD5 checksum iteration. The iteration operates on the 64 bytes contained in s_16, and changes the hash contained in i_4. This only implements a portion of the MD5 algorithm. The full MD5 algorithm requires initializing the hash with a specific value and additional handling of bytes at the end of the stream. See also the md5 example in the Liboil source code. FIXME: need a reference here i_4 : s_16 : oil_mix_u8 () oil_mix_u8void oil_mix_u8 (uint8_t *dest, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int n); Performs the compisiting operation DEST = (SRC2 IN MASK) OVER SRC1, except it is done incorrectly, so this function should not be used. FIXME: This function is broken. dest : DEST src1 : SRC1 src2 : SRC2 src3 : MASK n : oil_null () oil_nullvoid oil_null (void); Does nothing, and does it fast. This function is useful for testing the overhead of calling a Liboil function. oil_scanlinescale2_u8 () oil_scanlinescale2_u8void oil_scanlinescale2_u8 (uint8_t *d, const uint8_t *s, int n); Upsamples the source array by a factor of two. That is, if the values in s are A,B,C,D,E, the values written to d are A,A,B,B,C,C,D,D,E,E. Note that n is the number of elements written to d, and that half of s is not used. d : destination array s : source array n : number of elements oil_sincos_f64 () oil_sincos_f64void oil_sincos_f64 (double *dest1, double *dest2, int n, const double *s1_1, const double *s2_1); Calculates sin(x) and cos(x) and places the results in dest1 and dest2 respectively. Values for x start at s1_1 and are incremented by s2_1 for each destination element. dest1 : dest2 : n : s1_1 : s2_1 : oil_utf8_validate () oil_utf8_validatevoid oil_utf8_validate (int32_t *d_1, const uint8_t *s, int n); Checks s for valid UTF-8 characters. If the entire s array represents valid UTF-8 characters, n is written to d_1. Otherwise, the index in the array of the beginning of the first invalid UTF-8 character is written to d_1. d_1 : s : n : oil_diff8x8_s16_u8 () oil_diff8x8_s16_u8void oil_diff8x8_s16_u8 (int16_t *d_8x8, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, int ss2); Calculates the difference of each value in s1_8x8 and s2_8x8 and places the result in d_8x8. Note that the destination type is larger than the source type. d_8x8 : s1_8x8 : ss1 : s2_8x8 : ss2 : oil_diff8x8_average_s16_u8 () oil_diff8x8_average_s16_u8void oil_diff8x8_average_s16_u8 (int16_t *d_8x8, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, int ss2, const uint8_t *s3_8x8, int ss3); Calculates the difference of each value in s1_8x8 and the average of s2_8x8 and s3_8x8, and places the result in d_8x8. Note that the destination type is larger than the source type. d_8x8 : s1_8x8 : ss1 : s2_8x8 : ss2 : s3_8x8 : ss3 : oil_err_inter8x8_u8_avg () oil_err_inter8x8_u8_avgvoid oil_err_inter8x8_u8_avg (uint32_t *d_1, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, const uint8_t *s3_8x8, int ss2); Calculates an intermediate 8x8 block where each element is the difference between s1_8x8 and the average of s2_8x8 and s3_8x8. The sum of squares of the difference of each element in the intermediate block and the mean of the intermediate block is placed into d_1. This result is 64 times the variance of the mean of the intermediate block. FIXME: This function is broken, since the reference function uses ss2 as the stride for both s2_8x8 and s3_8x8. d_1 : s1_8x8 : ss1 : s2_8x8 : s3_8x8 : ss2 : oil_recon8x8_inter () oil_recon8x8_intervoid oil_recon8x8_inter (uint8_t *d_8x8, int ds, const uint8_t *s1_8x8, int ss1, const int16_t *s2_8x8); Adds each element in s1_8x8 and s2_8x8, clamps to the range [0,255], and places the result in the destination array. d_8x8 : ds : s1_8x8 : ss1 : s2_8x8 : oil_err_intra8x8_u8 () oil_err_intra8x8_u8void oil_err_intra8x8_u8 (uint32_t *d_1, const uint8_t *s1_8x8, int ss1); Calculates the sum of squared differences from the mean over s1_8x8 and places the result in d_1. This result is 64 times the variance of the mean of s1_8x8. d_1 : s1_8x8 : ss1 : oil_recon8x8_intra () oil_recon8x8_intravoid oil_recon8x8_intra (uint8_t *d_8x8, int ds, const int16_t *s_8x8); Adds 128 to each value in the source array, clamps to the range [0,255], and places the result in the destination array. d_8x8 : ds : s_8x8 : oil_colsad8x8_u8 () oil_colsad8x8_u8void oil_colsad8x8_u8 (uint32_t *d_1, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, int ss2); Divides the 8x8 block into 16 1x4 regions, and calculates the sum of absolute differences between s1_8x8 and s2_8x8 for each region. The maximum of the results in each region is placed in d_1. d_1 : s1_8x8 : ss1 : s2_8x8 : ss2 : oil_composite_over_u8 () oil_composite_over_u8void oil_composite_over_u8 (uint8_t *i_n, const uint8_t *s1_n, int n); Performs the compositing operation DEST = SRC OVER DEST. i_n : DEST s1_n : SRC n : number of elements oil_diff8x8_const128_s16_u8 () oil_diff8x8_const128_s16_u8void oil_diff8x8_const128_s16_u8 (int16_t *d_8x8, const uint8_t *s1_8x8, int ss1); Subtracts 128 from each value in s1_8x8 and places the result in d_8x8. Note that the destination type is larger than the source type. d_8x8 : s1_8x8 : ss1 : oil_copy8x8_u8 () oil_copy8x8_u8void oil_copy8x8_u8 (uint8_t *d_8x8, int ds, const uint8_t *s_8x8, int ss); Copies an 8x8 block. d_8x8 : ds : s_8x8 : ss : oil_err_inter8x8_u8 () oil_err_inter8x8_u8void oil_err_inter8x8_u8 (uint32_t *d_1, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, int ss2); Calculates an intermediate 8x8 block where each element is the difference between s1_8x8 and s2_8x8. The sum of squares of the difference of each element in the intermediate block and the mean of the intermediate block is placed into d_1. This result is equal to 64 times the variance of the mean of the intermediate block. d_1 : s1_8x8 : ss1 : s2_8x8 : ss2 : oil_fdct8x8theora () oil_fdct8x8theoravoid oil_fdct8x8theora (const int16_t *s_8x8, int16_t *d_8x8); Calculates the FDCT transformation of s_8x8 according to the Theora specification and places the result in d_8x8. Note that the source and destination arrays are reversed compared to normal Liboil order. s_8x8 : d_8x8 : oil_rowsad8x8_u8 () oil_rowsad8x8_u8void oil_rowsad8x8_u8 (uint32_t *d_1, const uint8_t *s1_8x8, const uint8_t *s2_8x8); Calculates the sum of absolute differences between s1_8x8 and s1_8s8 for the first 4 elements of the first row, and the sum of absolute differences for the last 4 elements of the first row, and places the maximum of those values in dest. FIXME: This function is declared incorrectly. d_1 : s1_8x8 : s2_8x8 : oil_recon8x8_inter2 () oil_recon8x8_inter2void oil_recon8x8_inter2 (uint8_t *d_8x8, int ds, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, int ss2, const int16_t *s3_8x8); Adds each element in s1_8x8 and s2_8x8, divides by 2, and adds to s3_8x8, clamps to the range [0,255], and places the result in the destination array. d_8x8 : ds : s1_8x8 : ss1 : s2_8x8 : ss2 : s3_8x8 : oil_composite_add_u8 () oil_composite_add_u8void oil_composite_add_u8 (uint8_t *i_n, const uint8_t *s1_n, int n); Performs the compositing operation DEST = SRC ADD DEST. i_n : DEST s1_n : SRC n : number of elements oil_sad8x8_u8_avg () oil_sad8x8_u8_avgvoid oil_sad8x8_u8_avg (uint32_t *d_1, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, const uint8_t *s3_8x8, int ss2); Calculates the sum of absolute differences between s1_8x8 and the average of s2_8x8 and s3_8x8. FIXME: This function is broken because the reference function assumes the stride for s3_8x8 is ss2. d_1 : s1_8x8 : ss1 : s2_8x8 : s3_8x8 : ss2 : liboil-0.3.17/doc/xml/liboilfuncs-dct.xml0000644000175000017500000006470411332637400015157 00000000000000 liboilfuncs-dct 3 LIBOIL Library liboilfuncs-dct Synopsis void oil_dct36_f32 (float *d_36, int dstr, const float *s_36, int sstr); void oil_fdct8_f64 (double *d_8, const double *s_8, int dstr, int sstr); void oil_fdct8x8_f64 (double *d_8x8, int dstr, const double *s_8x8, int sstr); void oil_fdct8x8s_s16 (int16_t *d_8x8, int ds, const int16_t *s_8x8, int ss); void oil_idct8_f64 (double *d_8, int dstr, const double *s_8, int sstr); void oil_idct8x8_f64 (double *d_8x8, int dstr, const double *s_8x8, int sstr); void oil_idct8x8_s16 (int16_t *d_8x8, int dstr, const int16_t *s_8x8, int sstr); void oil_imdct12_f64 (double *d_12, const double *s_6); void oil_imdct32_f32 (float *d_32, const float *s_32); void oil_imdct36_f64 (double *d_36, const double *s_18); void oil_mdct12_f64 (double *d_6, const double *s_12); void oil_mdct36_f64 (double *d_18, const double *s_36); void oil_idct8theora_s16 (int16_t *d_8, int dstr, const int16_t *s_8, int sstr); void oil_idct8x8lim10_f64 (double *d_8x8, int dstr, const double *s_8x8, int sstr); void oil_idct8x8lim10_s16 (int16_t *d_8x8, int dstr, const int16_t *s_8x8, int sstr); void oil_idct8x8theora_s16 (int16_t *d_8x8, int dstr, const int16_t *s_8x8, int sstr); Description Details oil_dct36_f32 () oil_dct36_f32void oil_dct36_f32 (float *d_36, int dstr, const float *s_36, int sstr); FIXME: This function is broken. d_36 : dstr : s_36 : sstr : oil_fdct8_f64 () oil_fdct8_f64void oil_fdct8_f64 (double *d_8, const double *s_8, int dstr, int sstr); Performs a Forward Discrete Cosine Transform on s_8 and places the result in d_8. d_8 : s_8 : dstr : sstr : oil_fdct8x8_f64 () oil_fdct8x8_f64void oil_fdct8x8_f64 (double *d_8x8, int dstr, const double *s_8x8, int sstr); Performs a 2-D Forward Discrete Cosine Transform on s_8x8 and places the result in d_8x8. d_8x8 : dstr : s_8x8 : sstr : oil_fdct8x8s_s16 () oil_fdct8x8s_s16void oil_fdct8x8s_s16 (int16_t *d_8x8, int ds, const int16_t *s_8x8, int ss); Performs a 2-D Forward Discrete Cosine Transform on s_8x8 and places the result in d_8x8. This function uses an alternate scaling used by RTjpeg. d_8x8 : ds : s_8x8 : ss : oil_idct8_f64 () oil_idct8_f64void oil_idct8_f64 (double *d_8, int dstr, const double *s_8, int sstr); Performs a Inverse Discrete Cosine Transform on s_8 and places the result in d_8. d_8 : dstr : s_8 : sstr : oil_idct8x8_f64 () oil_idct8x8_f64void oil_idct8x8_f64 (double *d_8x8, int dstr, const double *s_8x8, int sstr); Performs a 2-D Inverse Discrete Cosine Transform on s_8x8 and places the result in d_8x8. d_8x8 : dstr : s_8x8 : sstr : oil_idct8x8_s16 () oil_idct8x8_s16void oil_idct8x8_s16 (int16_t *d_8x8, int dstr, const int16_t *s_8x8, int sstr); Performs a limited 2-D Inverse Discrete Cosine Transform on s_8x8 and places the result in d_8x8. d_8x8 : dstr : s_8x8 : sstr : oil_imdct12_f64 () oil_imdct12_f64void oil_imdct12_f64 (double *d_12, const double *s_6); Performs a Inverse Modified Discrete Cosine Transform (IMDCT) on the source array s_6 and places the result in d_12. d_12 : s_6 : oil_imdct32_f32 () oil_imdct32_f32void oil_imdct32_f32 (float *d_32, const float *s_32); Performs a Inverse Modified Discrete Cosine Transform (IMDCT) on the source array s_32 and places the result in d_32. d_32 : s_32 : oil_imdct36_f64 () oil_imdct36_f64void oil_imdct36_f64 (double *d_36, const double *s_18); Performs a Inverse Modified Discrete Cosine Transform (IMDCT) on the source array s_18 and places the result in d_36. d_36 : s_18 : oil_mdct12_f64 () oil_mdct12_f64void oil_mdct12_f64 (double *d_6, const double *s_12); Performs a Modified Discrete Cosine Transform (MDCT) on the source array s_12 and places the result in d_6. d_6 : s_12 : oil_mdct36_f64 () oil_mdct36_f64void oil_mdct36_f64 (double *d_18, const double *s_36); Performs a Modified Discrete Cosine Transform (MDCT) on the source array s_36 and places the result in d_18. d_18 : s_36 : oil_idct8theora_s16 () oil_idct8theora_s16void oil_idct8theora_s16 (int16_t *d_8, int dstr, const int16_t *s_8, int sstr); Performs a Inverse Discrete Cosine Transform on s_8 and places the result in d_8, as defined by the Theora specification. d_8 : dstr : s_8 : sstr : oil_idct8x8lim10_f64 () oil_idct8x8lim10_f64void oil_idct8x8lim10_f64 (double *d_8x8, int dstr, const double *s_8x8, int sstr); Performs a 2-D Inverse Discrete Cosine Transform on s_8x8 and places the result in d_8x8. d_8x8 : dstr : s_8x8 : sstr : oil_idct8x8lim10_s16 () oil_idct8x8lim10_s16void oil_idct8x8lim10_s16 (int16_t *d_8x8, int dstr, const int16_t *s_8x8, int sstr); Performs a limited 2-D Inverse Discrete Cosine Transform on s_8x8 and places the result in d_8x8. The source 8x8 block must be non-zero only in the 10 lowest-order components. d_8x8 : dstr : s_8x8 : sstr : oil_idct8x8theora_s16 () oil_idct8x8theora_s16void oil_idct8x8theora_s16 (int16_t *d_8x8, int dstr, const int16_t *s_8x8, int sstr); Performs a Inverse Discrete Cosine Transform on s_8x8 and places the result in d_8x8, as defined by the Theora specification. d_8x8 : dstr : s_8x8 : sstr : liboil-0.3.17/doc/xml/liboilimpl-unstable.xml0000644000175000017500000003000711332637400016032 00000000000000 OilFunctionImpl 3 LIBOIL Library OilFunctionImpl Functions for manipulating function implementations. Synopsis OilFunctionImpl; OilFunctionImpl * oil_impl_get_by_index (int i); int oil_impl_is_runnable (OilFunctionImpl *impl); enum OilImplFlag; #define OIL_CPU_FLAG_MASK #define OIL_DEFINE_IMPL_FULL (function,klass,flags) #define OIL_DEFINE_IMPL (function,klass) #define OIL_DEFINE_IMPL_REF (function,klass) #define OIL_DEFINE_IMPL_ASM (function,klass) #define OIL_DEFINE_IMPL_DEPENDS (function,klass,...) Description Details OilFunctionImpl OilFunctionImpltypedef struct { } OilFunctionImpl; An opaque structure representing a function implementation. oil_impl_get_by_index () oil_impl_get_by_indexOilFunctionImpl * oil_impl_get_by_index (int i); Returns a pointer to the function implementation with index i. i : index Returns : a pointer to a function implementation structure oil_impl_is_runnable () oil_impl_is_runnableint oil_impl_is_runnable (OilFunctionImpl *impl); Determines whether the function implementation given by impl can be executed by the current CPU. impl : an OilFunctionImpl Returns : 1 if the implementation can be executed, otherwise 0 enum OilImplFlag OilImplFlagtypedef enum { OIL_IMPL_FLAG_REF = (1<<0), OIL_IMPL_FLAG_OPT = (1<<1), OIL_IMPL_FLAG_ASM = (1<<2), OIL_IMPL_FLAG_DISABLED = (1<<3), OIL_IMPL_FLAG_CMOV = (1<<16), OIL_IMPL_FLAG_MMX = (1<<17), OIL_IMPL_FLAG_SSE = (1<<18), OIL_IMPL_FLAG_MMXEXT = (1<<19), OIL_IMPL_FLAG_SSE2 = (1<<20), OIL_IMPL_FLAG_3DNOW = (1<<21), OIL_IMPL_FLAG_3DNOWEXT = (1<<22), OIL_IMPL_FLAG_SSE3 = (1<<23), OIL_IMPL_FLAG_ALTIVEC = (1<<24), OIL_IMPL_FLAG_EDSP = (1<<25), OIL_IMPL_FLAG_ARM6 = (1<<26), OIL_IMPL_FLAG_VFP = (1<<27), OIL_IMPL_FLAG_SSSE3 = (1<<28) } OilImplFlag; Implementation flags. OIL_IMPL_FLAG_REF: is the reference implementation for the class. OIL_IMPL_FLAG_OPT: was compiled with alternate CFLAGS as specified by --enable-alternate-optimization. OIL_IMPL_FLAG_ASM: is written in assembly code. OIL_IMPL_FLAG_DISABLED: is disabled. This can be set either in the source code or during library initialization. OIL_IMPL_FLAG_CMOV: uses the i386 instruction cmov or its variants. OIL_IMPL_FLAG_MMX: uses MMX instructions. OIL_IMPL_FLAG_SSE: uses SSE instructions. OIL_IMPL_FLAG_MMXEXT: uses AMD's extended MMX instructions. These are a subset of what Intel calls SSE2. If an implementation uses only AMD's extended MMX instructions, it should set this flag, and not OIL_IMPL_FLAG_SSE2. OIL_IMPL_FLAG_SSE2: uses SSE2 instructions. This flag implies OIL_IMPL_FLAG_SSE and OIL_IMPL_FLAG_MMXEXT. OIL_IMPL_FLAG_3DNOW: uses 3DNow! instructions. OIL_IMPL_FLAG_3DNOWEXT: uses extended 3DNow! instructions. OIL_IMPL_FLAG_SSE3: uses SSE3 instructions. This flag implies OIL_IMPL_FLAG_SSE2. OIL_IMPL_FLAG_SSSE3: uses SSSE3 instructions. This flag implies OIL_IMPL_FLAG_SSE3. OIL_IMPL_FLAG_ALTIVEC: uses Altivec instructions. OIL_CPU_FLAG_MASK OIL_CPU_FLAG_MASK#define OIL_CPU_FLAG_MASK 0xffff0000 Mask describing which bits in OilImplFlag depend on the current CPU. OIL_DEFINE_IMPL_FULL() OIL_DEFINE_IMPL_FULL#define OIL_DEFINE_IMPL_FULL(function,klass,flags) Defines a OilFunctionImpl structure for the function function and class klass. CPU-dependent flags in flags will indicate that this implementation requires the given CPU flags. function : name of function klass : name of class to declare (without oil_ prefix) flags : implementation flags and CPU requirements OIL_DEFINE_IMPL() OIL_DEFINE_IMPL#define OIL_DEFINE_IMPL(function,klass) Shorthand for defining a C implementation. See OIL_DEFINE_IMPL_FULL(). function : name of function klass : name of class to declare (without oil_ prefix) OIL_DEFINE_IMPL_REF() OIL_DEFINE_IMPL_REF#define OIL_DEFINE_IMPL_REF(function,klass) Shorthand for defining a reference implementation. See OIL_DEFINE_IMPL_FULL(). function : name of function klass : name of class to declare (without oil_ prefix) OIL_DEFINE_IMPL_ASM() OIL_DEFINE_IMPL_ASM#define OIL_DEFINE_IMPL_ASM(function,klass) Shorthand for defining an implementation written in inline assembly code. See OIL_DEFINE_IMPL_FULL(). function : name of function klass : name of class to declare (without oil_ prefix) OIL_DEFINE_IMPL_DEPENDS() OIL_DEFINE_IMPL_DEPENDS#define OIL_DEFINE_IMPL_DEPENDS(function,klass,...) Shorthand for defining an implementation that uses another Liboil function class. This is not currently used. See OIL_DEFINE_IMPL_FULL(). function : name of function klass : name of class to declare (without oil_ prefix) ... : other classes this implementation uses liboil-0.3.17/doc/xml/api-index-0.3.0.xml0000644000175000017500000000051611332637400014377 00000000000000 O oil_init liboil-0.3.17/doc/xml/liboilclass-unstable.xml0000644000175000017500000003671611332637400016213 00000000000000 OilFunctionClass 3 LIBOIL Library OilFunctionClass Functions for manipulating function classes Synopsis OilFunctionClass; #define OIL_DECLARE_CLASS (klass) #define OIL_DEFINE_CLASS_FULL (klass, string, test) #define OIL_DEFINE_CLASS (klass, string) OilFunctionClass * oil_class_get_by_index (int i); OilFunctionClass * oil_class_get (const char *class_name); void oil_class_optimize (OilFunctionClass *klass); int oil_class_get_n_classes (void); void oil_class_choose_by_name (OilFunctionClass *klass, const char *name); void oil_class_register_impl_by_name (const char *klass_name, OilFunctionImpl *impl); void oil_class_register_impl (OilFunctionClass *klass, OilFunctionImpl *impl); void oil_class_register_impl_full (OilFunctionClass *klass, void (funcvoid) (), const char *name, unsigned int flags); Description Functions operate on arrays of data. The arrays can be either source arrays (input only), destination arrays (output only), or in-place arrays (both input and output). The interpretation of a parameter can usually be determined from its name. Parameters for arrays are of the form d1_1xn, where the first character represents the direction (source, destination, or in-place), the second represents the index for that particular direction, and the characters after the underscore indicate the size of the array. In this case, "1xn" represents an array that is 1 by N. Note that the index and the size can both be omitted, giving a default of 1 for the index and 1xn for the size. Parameters that represent strides are of the form "d1s". The interpretation is similar to above, except that the s indicates a stride parameter. The exceptions to the above rule are "dest", "src", "dstr", "sstr", etc. These are aliases for "d1", "s1", "d1s", and "s1s", respectively. This form is deprecated and will be removed in the 0.4 series. Two special parameters are "n" and "m", which determine the size of the arrays in other parameters. Data arrays are laid out such that rows are separated by the number of bytes given by the corresponding stride. Elements in each row are contiguous. If there is no stride parameter corresponding to an array, the rows of the array are contiguous. Details OilFunctionClass OilFunctionClasstypedef struct { } OilFunctionClass; An opaque structure representing a function class. OIL_DECLARE_CLASS() OIL_DECLARE_CLASS#define OIL_DECLARE_CLASS(klass) Declares the Liboil function class klass. klass : the name of a function class (without the oil_ prefix) OIL_DEFINE_CLASS_FULL() OIL_DEFINE_CLASS_FULL#define OIL_DEFINE_CLASS_FULL(klass, string, test) Defines a OilFunctionClass structure for klass. Classes defined this way will be automatically at Liboil initialization time. klass : name of class to declare (without oil_ prefix) string : prototype of class test : test function OIL_DEFINE_CLASS() OIL_DEFINE_CLASS#define OIL_DEFINE_CLASS(klass, string) Defines a OilFunctionClass structure for klass. Classes defined this way will be automatically at Liboil initialization time. klass : name of class to declare (without oil_ prefix) string : prototype of class oil_class_get_by_index () oil_class_get_by_indexOilFunctionClass * oil_class_get_by_index (int i); Returns a pointer to the function class with index i. i : index Returns : an OilFunctionClass oil_class_get () oil_class_getOilFunctionClass * oil_class_get (const char *class_name); Returns a pointer to the function class that has the given class name. If no such class is found, NULL is returned. class_name : the name of the function class Returns : a pointer to a function class oil_class_optimize () oil_class_optimizevoid oil_class_optimize (OilFunctionClass *klass); Tests and profiles each implementation for the given function class. Testing compares the output of running each implementation on random input against the reference implementation for the same input. klass : a function class oil_class_get_n_classes () oil_class_get_n_classesint oil_class_get_n_classes (void); Returns the number of function classes. Returns : the number of function classes oil_class_choose_by_name () oil_class_choose_by_namevoid oil_class_choose_by_name (OilFunctionClass *klass, const char *name); Sets the chosen implementation for the given function class to the implementation with the given name. If no implementation having the given name is found, the chosen implementation is not changed. klass : a function class name : the name of an implementation oil_class_register_impl_by_name () oil_class_register_impl_by_namevoid oil_class_register_impl_by_name (const char *klass_name, OilFunctionImpl *impl); Adds impl to the list of implementations associated with the function class given by klass_name. klass_name : the name of the class impl : an implementation oil_class_register_impl () oil_class_register_implvoid oil_class_register_impl (OilFunctionClass *klass, OilFunctionImpl *impl); Adds impl to the list of implementations associated with the function class given by klass. klass : the class impl : an implementation oil_class_register_impl_full () oil_class_register_impl_fullvoid oil_class_register_impl_full (OilFunctionClass *klass, void (funcvoid) (), const char *name, unsigned int flags); Adds func to the list of implementations associated with the function class given by klass. klass : the class func : the function name : name of the function flags : CPU flags liboil-0.3.17/doc/xml/liboilrandom.xml0000644000175000017500000004574411332637400014554 00000000000000 Random Number Generation 3 LIBOIL Library Random Number Generation Random number generation Synopsis #define oil_rand_s32 () #define oil_rand_s16 () #define oil_rand_s8 () #define oil_rand_u32 () #define oil_rand_u16 () #define oil_rand_u8 () #define oil_rand_s64 () #define oil_rand_u64 () #define oil_rand_f32 () #define oil_rand_f64 () void oil_random_alpha (oil_type_u8 *dest, int n); void oil_random_argb (oil_type_u32 *dest, int n); void oil_random_f32 (oil_type_f32 *dest, int n); void oil_random_f64 (oil_type_f64 *dest, int n); void oil_random_s16 (oil_type_s16 *dest, int n); void oil_random_s32 (oil_type_s32 *dest, int n); void oil_random_s64 (oil_type_s64 *dest, int n); void oil_random_s8 (oil_type_s8 *dest, int n); void oil_random_u16 (oil_type_u16 *dest, int n); void oil_random_u32 (oil_type_u32 *dest, int n); void oil_random_u64 (oil_type_u64 *dest, int n); void oil_random_u8 (oil_type_u8 *dest, int n); Description Details oil_rand_s32() oil_rand_s32#define oil_rand_s32() ((rand()&0xffff)<<16 | (rand()&0xffff)) Evaluates to a random integer in the range [-(1<<31), (1<<31)-1]. oil_rand_s16() oil_rand_s16#define oil_rand_s16() ((int16_t)(rand()&0xffff)) Evaluates to a random integer in the range [-(1<<15), (1<<15)-1]. oil_rand_s8() oil_rand_s8#define oil_rand_s8() ((int8_t)(rand()&0xffff)) Evaluates to a random integer in the range [-(1<<7), (1<<7)-1]. oil_rand_u32() oil_rand_u32#define oil_rand_u32() ((uint32_t)((rand()&0xffff)<<16 | (rand()&0xffff))) Evaluates to a random integer in the range [0, (1<<32)-1]. oil_rand_u16() oil_rand_u16#define oil_rand_u16() ((uint16_t)(rand()&0xffff)) Evaluates to a random integer in the range [0, (1<<16)-1]. oil_rand_u8() oil_rand_u8#define oil_rand_u8() ((uint8_t)(rand()&0xffff)) Evaluates to a random integer in the range [0, (1<<8)-1]. oil_rand_s64() oil_rand_s64#define oil_rand_s64() ((int64_t)(oil_rand_s32())<<32 | oil_rand_s32()) Evaluates to a random integer in the range [-(1<<63), (1<<63)-1]. oil_rand_u64() oil_rand_u64#define oil_rand_u64() ((uint64_t)(oil_rand_u32())<<32 | oil_rand_u32()) Evaluates to a random integer in the range [0, (1<<64)-1]. oil_rand_f32() oil_rand_f32#define oil_rand_f32() (rand()/(RAND_MAX+1.0)) Evaluates to a random single-precision floating point number in the range [0, 1.0). oil_rand_f64() oil_rand_f64#define oil_rand_f64() (((rand()/(RAND_MAX+1.0))+rand())/(RAND_MAX+1.0)) Evaluates to a random double-precision floating point number in the range [0, 1.0). oil_random_alpha () oil_random_alphavoid oil_random_alpha (oil_type_u8 *dest, int n); Writes random values in the range [0, 255] to the destination array suitable for alpha values. This is similar to oil_random_u8(), except the values 0 and 255 are strongly favored. dest : n : oil_random_argb () oil_random_argbvoid oil_random_argb (oil_type_u32 *dest, int n); Creates valid random RGBA values and places them in the destination array. dest : destination array. n : number of values to write. oil_random_f32 () oil_random_f32void oil_random_f32 (oil_type_f32 *dest, int n); Writes random single-precision floating point values in the range [0, 1.0) to the destination array. dest : n : oil_random_f64 () oil_random_f64void oil_random_f64 (oil_type_f64 *dest, int n); Writes random double-precision floating point values in the range [0, 1.0) to the destination array. dest : n : oil_random_s16 () oil_random_s16void oil_random_s16 (oil_type_s16 *dest, int n); Writes random values in the range [-(1<<15), (1<<15)-1] to the destination array. dest : n : oil_random_s32 () oil_random_s32void oil_random_s32 (oil_type_s32 *dest, int n); Writes random values in the range [-(1<<31), (1<<31)-1] to the destination array. dest : n : oil_random_s64 () oil_random_s64void oil_random_s64 (oil_type_s64 *dest, int n); Writes random values in the range [-(1<<63), (1<<63)-1] to the destination array. dest : n : oil_random_s8 () oil_random_s8void oil_random_s8 (oil_type_s8 *dest, int n); Writes random values in the range [-(1<<7), (1<<7)-1] to the destination array. dest : n : oil_random_u16 () oil_random_u16void oil_random_u16 (oil_type_u16 *dest, int n); Writes random values in the range [0, (1<<16)-1] to the destination array. dest : n : oil_random_u32 () oil_random_u32void oil_random_u32 (oil_type_u32 *dest, int n); Writes random values in the range [0, (1<<32)-1] to the destination array. dest : n : oil_random_u64 () oil_random_u64void oil_random_u64 (oil_type_u64 *dest, int n); Writes random values in the range [0, (1<<64)-1] to the destination array. dest : n : oil_random_u8 () oil_random_u8void oil_random_u8 (oil_type_u8 *dest, int n); Writes random values in the range [0, (1<<8)-1] to the destination array. dest : n : liboil-0.3.17/doc/xml/liboiljunk.xml0000644000175000017500000001007011332637400014223 00000000000000 liboiljunk 3 LIBOIL Library liboiljunk Synopsis #define OIL_OPT_MANGLE (a) #define OIL_OPT_SUFFIX #define OIL_CHECK_PROTOTYPE (a) #define OIL_OPT_FLAG_MANGLE (a) #define OIL_NO_CLASSES #define NULL Description Details OIL_OPT_MANGLE() OIL_OPT_MANGLE#define OIL_OPT_MANGLE(a) a Used internally to implement the --enable-alternate-optimizations configure option. a : OIL_OPT_SUFFIX OIL_OPT_SUFFIX#define OIL_OPT_SUFFIX Used internally to implement the --enable-alternate-optimizations configure option. OIL_CHECK_PROTOTYPE() OIL_CHECK_PROTOTYPE#define OIL_CHECK_PROTOTYPE(a) Macro used internally to implement the --enable-prototype-checking configure option. a : OIL_OPT_FLAG_MANGLE() OIL_OPT_FLAG_MANGLE#define OIL_OPT_FLAG_MANGLE(a) Used internally to implement the --enable-alternate-optimizations configure option. a : OIL_NO_CLASSES OIL_NO_CLASSES#define OIL_NO_CLASSES Used internally to implement the --enable-alternate-optimizations configure option. NULL NULL#define NULL ((void *)0) FIXME: gtk-doc is broken and doesn't know how to ignore this. liboil-0.3.17/doc/xml/liboilfuncs-pixel.xml0000644000175000017500000013502111332637400015515 00000000000000 Pixel Operations 3 LIBOIL Library Pixel Operations Operations on pixels Synopsis void oil_argb_paint_u8 (uint8_t *i_4xn, const uint8_t *s1_4, const uint8_t *s2_n, int n); void oil_ayuv2argb_u8 (uint8_t *d_4xn, const uint8_t *s_4xn, int n); void oil_ayuv2uyvy (uint32_t *d_n, const uint32_t *s_n, int n); void oil_ayuv2yuyv (uint32_t *d_n, const uint32_t *s_n, int n); void oil_ayuv2yvyu (uint32_t *d_n, const uint32_t *s_n, int n); void oil_composite_add_argb (uint32_t *i_n, const uint32_t *s1_n, int n); void oil_composite_add_argb_const_src (uint32_t *i_n, const uint32_t *s1_1, int n); void oil_composite_in_argb (uint32_t *d_n, const uint32_t *s1_n, const uint8_t *s2_n, int n); void oil_composite_in_argb_const_mask (uint32_t *d_n, const uint32_t *s1_n, const uint8_t *s2_1, int n); void oil_composite_in_argb_const_src (uint32_t *d_n, const uint32_t *s1_1, const uint8_t *s2_n, int n); void oil_composite_in_over_argb (uint32_t *i_n, const uint32_t *s1_n, const uint8_t *s2_n, int n); void oil_composite_in_over_argb_const_mask (uint32_t *i_n, const uint32_t *s1_n, const uint8_t *s2_1, int n); void oil_composite_in_over_argb_const_src (uint32_t *i_n, const uint32_t *s1_1, const uint8_t *s2_n, int n); void oil_composite_over_argb (uint32_t *i_n, const uint32_t *s1_n, int n); void oil_composite_over_argb_const_src (uint32_t *i_n, const uint32_t *s1_1, int n); void oil_merge_linear_argb (uint32_t *d_n, const uint32_t *s_n, const uint32_t *s2_n, const uint32_t *s3_1, int n); void oil_resample_linear_argb (uint32_t *d_n, const uint32_t *s_2xn, int n, uint32_t *i_2); void oil_resample_linear_u8 (uint8_t *d_n, const uint8_t *s_2xn, int n, uint32_t *i_2); void oil_rgb2bgr (uint8_t *d_3xn, const uint8_t *s_3xn, int n); void oil_rgb2rgba (uint8_t *d_4xn, const uint8_t *s_3xn, int n); void oil_yuv2rgbx_sub2_u8 (uint8_t *d_4xn, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int n); void oil_yuv2rgbx_sub4_u8 (uint8_t *d_4xn, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int n); void oil_yuv2rgbx_u8 (uint8_t *d_4xn, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int n); void oil_uyvy2ayuv (uint32_t *d_n, const uint32_t *s_n, int n); void oil_yuyv2ayuv (uint32_t *d_n, const uint32_t *s_n, int n); void oil_yvyu2ayuv (uint32_t *d_n, const uint32_t *s_n, int n); Description Pixels are 4-element arrays of type uint8_t. The elements, in memory order, represent the alpha, red, green, and blue components respectively. The color components are premultiplied with the alpha component. Liboil functions represent pixels as the type uint32_t. The compositing operators IN, OVER, and ADD are defined the same as cairo. Details oil_argb_paint_u8 () oil_argb_paint_u8void oil_argb_paint_u8 (uint8_t *i_4xn, const uint8_t *s1_4, const uint8_t *s2_n, int n); Composites source color onto in-place array according to the alpha array. Deprecated. i_4xn : array s1_4 : source color s2_n : source alpha array n : number of elements oil_ayuv2argb_u8 () oil_ayuv2argb_u8void oil_ayuv2argb_u8 (uint8_t *d_4xn, const uint8_t *s_4xn, int n); Converts AYUV pixels to ARGB pixels. AYUV pixels are in the JPEG colorspace. Note that this function doesn't follow normal liboil pixel conventions. (This function should be replaced by one that handles other conversion factors.) d_4xn : s_4xn : n : oil_ayuv2uyvy () oil_ayuv2uyvyvoid oil_ayuv2uyvy (uint32_t *d_n, const uint32_t *s_n, int n); Converts pixels in AYUV format to UYVY. Note that only approximately half of the destination array is written. Alpha values are ignored. d_n : s_n : n: n : oil_ayuv2yuyv () oil_ayuv2yuyvvoid oil_ayuv2yuyv (uint32_t *d_n, const uint32_t *s_n, int n); Converts pixels in AYUV format to YUYV. Note that only approximately half of the destination array is written. Alpha values are ignored. d_n : s_n : n: n : oil_ayuv2yvyu () oil_ayuv2yvyuvoid oil_ayuv2yvyu (uint32_t *d_n, const uint32_t *s_n, int n); Converts pixels in AYUV format to YVYU. Note that only approximately half of the destination array is written. Alpha values are ignored. d_n : s_n : n: n : oil_composite_add_argb () oil_composite_add_argbvoid oil_composite_add_argb (uint32_t *i_n, const uint32_t *s1_n, int n); Performs the compositing operation DEST = SRC ADD DEST. i_n : DEST s1_n : SRC n : number of elements oil_composite_add_argb_const_src () oil_composite_add_argb_const_srcvoid oil_composite_add_argb_const_src (uint32_t *i_n, const uint32_t *s1_1, int n); Performs the compositing operation DEST = SRC ADD DEST, for a constant SRC. i_n : DEST s1_1 : SRC n : number of elements oil_composite_in_argb () oil_composite_in_argbvoid oil_composite_in_argb (uint32_t *d_n, const uint32_t *s1_n, const uint8_t *s2_n, int n); Performs the compositing operation DEST = SRC IN MASK. d_n : DEST s1_n : SRC s2_n : MASK n : number of elements oil_composite_in_argb_const_mask () oil_composite_in_argb_const_maskvoid oil_composite_in_argb_const_mask (uint32_t *d_n, const uint32_t *s1_n, const uint8_t *s2_1, int n); Performs the compositing operation DEST = SRC IN MASK, for a constant MASK. d_n : DEST s1_n : SRC s2_1 : MASK n : number of elements oil_composite_in_argb_const_src () oil_composite_in_argb_const_srcvoid oil_composite_in_argb_const_src (uint32_t *d_n, const uint32_t *s1_1, const uint8_t *s2_n, int n); Performs the compositing operation DEST = SRC IN MASK, for a constant SRC. d_n : DEST s1_1 : SRC s2_n : MASK n : number of elements oil_composite_in_over_argb () oil_composite_in_over_argbvoid oil_composite_in_over_argb (uint32_t *i_n, const uint32_t *s1_n, const uint8_t *s2_n, int n); Performs the compositing operation DEST = (SRC IN MASK) OVER DEST. i_n : DEST s1_n : SRC s2_n : MASK n : number of elements oil_composite_in_over_argb_const_mask () oil_composite_in_over_argb_const_maskvoid oil_composite_in_over_argb_const_mask (uint32_t *i_n, const uint32_t *s1_n, const uint8_t *s2_1, int n); Performs the compositing operation DEST = (SRC IN MASK) OVER DEST, for a constant MASK. i_n : DEST s1_n : SRC s2_1 : MASK n : number of elements oil_composite_in_over_argb_const_src () oil_composite_in_over_argb_const_srcvoid oil_composite_in_over_argb_const_src (uint32_t *i_n, const uint32_t *s1_1, const uint8_t *s2_n, int n); Performs the compositing operation DEST = (SRC IN MASK) OVER DEST, for a constant SRC. i_n : DEST s1_1 : SRC s2_n : MASK n : number of elements oil_composite_over_argb () oil_composite_over_argbvoid oil_composite_over_argb (uint32_t *i_n, const uint32_t *s1_n, int n); Performs the compositing operation DEST = SRC OVER DEST. i_n : DEST s1_n : SRC n : number of elements oil_composite_over_argb_const_src () oil_composite_over_argb_const_srcvoid oil_composite_over_argb_const_src (uint32_t *i_n, const uint32_t *s1_1, int n); Performs the compositing operation DEST = SRC OVER DEST, for a constant SRC. i_n : DEST s1_1 : SRC n : number of elements oil_merge_linear_argb () oil_merge_linear_argbvoid oil_merge_linear_argb (uint32_t *d_n, const uint32_t *s_n, const uint32_t *s2_n, const uint32_t *s3_1, int n); Linearly interpolate the s_n and s2_n arrays using the scale factor in s3_1. The value s3_1 must be in the range [0, 256] A value of 0 indicates weights of 1.0 and 0.0 for the s_n and s2_n arrays respectively. A value of 256 indicates weights of 0.0 and 1.0 respectively. This function is not intended for alpha blending; use one of the compositing functions instead. d_n : s_n : s2_n : s3_1 : n : oil_resample_linear_argb () oil_resample_linear_argbvoid oil_resample_linear_argb (uint32_t *d_n, const uint32_t *s_2xn, int n, uint32_t *i_2); Linearly resamples a row of pixels. FIXME. d_n : s_2xn : n : i_2 : oil_resample_linear_u8 () oil_resample_linear_u8void oil_resample_linear_u8 (uint8_t *d_n, const uint8_t *s_2xn, int n, uint32_t *i_2); Linearly resamples a row of pixels. FIXME. d_n : s_2xn : n : i_2 : oil_rgb2bgr () oil_rgb2bgrvoid oil_rgb2bgr (uint8_t *d_3xn, const uint8_t *s_3xn, int n); Converts arrays of 24-bit RGB pixels from RGBRGBRGB ordering to BGRBGRBGR ordering (and vice-versa). d_3xn : s_3xn : n : oil_rgb2rgba () oil_rgb2rgbavoid oil_rgb2rgba (uint8_t *d_4xn, const uint8_t *s_3xn, int n); Converts arrays of 24-bit RGB pixels in RGBRGBRGB memory order to 32-bit RGBA pixels in RGBARGBA order. d_4xn : s_3xn : n : oil_yuv2rgbx_sub2_u8 () oil_yuv2rgbx_sub2_u8void oil_yuv2rgbx_sub2_u8 (uint8_t *d_4xn, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int n); Converts YUV pixels to RGB pixels. Each YUV component is in a separate source array, and are combined and converted to RGB. The U and V arrays are subsampled by a factor of 2, so only half of each array is used. This function should be replaced by one that makes sense. d_4xn : src1 : Y component src2 : U component src3 : V component n : oil_yuv2rgbx_sub4_u8 () oil_yuv2rgbx_sub4_u8void oil_yuv2rgbx_sub4_u8 (uint8_t *d_4xn, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int n); Converts YUV pixels to RGB pixels. Each YUV component is in a separate source array, and are combined and converted to RGB. The U and V arrays are subsampled by a factor of 4, so only a quarter of each array is used. This function should be replaced by one that makes sense. d_4xn : src1 : Y component src2 : U component src3 : V component n : oil_yuv2rgbx_u8 () oil_yuv2rgbx_u8void oil_yuv2rgbx_u8 (uint8_t *d_4xn, const uint8_t *src1, const uint8_t *src2, const uint8_t *src3, int n); Converts YUV pixels to RGB pixels. Each YUV component is in a separate source array, and are combined and converted to RGB. This function should be replaced by one that makes sense. d_4xn : src1 : Y component src2 : U component src3 : V component n : oil_uyvy2ayuv () oil_uyvy2ayuvvoid oil_uyvy2ayuv (uint32_t *d_n, const uint32_t *s_n, int n); Converts pixels in UYVY format to AYUV. Note that only approximately half of the source array is used. Alpha values are set to 255. d_n : s_n : n: n : oil_yuyv2ayuv () oil_yuyv2ayuvvoid oil_yuyv2ayuv (uint32_t *d_n, const uint32_t *s_n, int n); Converts pixels in YUYV format to AYUV. Note that only approximately half of the source array is used. Alpha values are set to 255. d_n : s_n : n: n : oil_yvyu2ayuv () oil_yvyu2ayuvvoid oil_yvyu2ayuv (uint32_t *d_n, const uint32_t *s_n, int n); Converts pixels in YVYU format to AYUV. Note that only approximately half of the source array is used. Alpha values are set to 255. d_n : s_n : n: n : liboil-0.3.17/doc/xml/liboilcpu.xml0000644000175000017500000000547511332637400014060 00000000000000 CPU 3 LIBOIL Library CPU Check the capabilities of the current CPU Synopsis unsigned int oil_cpu_get_flags (void); double oil_cpu_get_ticks_per_second (void); Description Details oil_cpu_get_flags () oil_cpu_get_flagsunsigned int oil_cpu_get_flags (void); Returns a bitmask containing the available CPU features. Returns : the CPU features. oil_cpu_get_ticks_per_second () oil_cpu_get_ticks_per_seconddouble oil_cpu_get_ticks_per_second (void); Returns the estimated number of ticks per second. This feature is currently unimplemented. This function may take several milliseconds or more to execute in order to calculate a good estimate of the number of ticks (as measured by the profiling functions) per second. Note that the number of ticks per second is often dependent on the CPU frequency, which can change dynamically. Thus the value returned by this function may be incorrect as soon as it is returned. Returns : a double liboil-0.3.17/doc/xml/liboilfuncs-math8x8.xml0000644000175000017500000003545311332637400015705 00000000000000 Simple Arithmetic on Blocks 3 LIBOIL Library Simple Arithmetic on Blocks Aritmetic operations on 8x8 blocks Synopsis void oil_mult8x8_s16 (int16_t *d_8x8, const int16_t *s1_8x8, const int16_t *s2_8x8, int ds, int ss1, int ss2); void oil_sad8x8_f64 (double *d_8x8, int ds, const double *s1_8x8, int ss1, const double *s2_8x8, int ss2); void oil_sad8x8_s16 (uint32_t *d_8x8, int ds, const int16_t *s1_8x8, int ss1, const int16_t *s2_8x8, int ss2); void oil_sad8x8_f64_2 (double *d_1, const double *s1_8x8, int ss1, const double *s2_8x8, int ss2); void oil_sad8x8_s16_2 (uint32_t *d_1, const int16_t *s1_8x8, int ss1, const int16_t *s2_8x8, int ss2); void oil_sad8x8_u8 (uint32_t *d_1, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, int ss2); Description Details oil_mult8x8_s16 () oil_mult8x8_s16void oil_mult8x8_s16 (int16_t *d_8x8, const int16_t *s1_8x8, const int16_t *s2_8x8, int ds, int ss1, int ss2); Multiplies each element in s1_8x8 and s2_8x8 and places the result in d_8x8. d_8x8 : s1_8x8 : s2_8x8 : ds : ss1 : ss2 : oil_sad8x8_f64 () oil_sad8x8_f64void oil_sad8x8_f64 (double *d_8x8, int ds, const double *s1_8x8, int ss1, const double *s2_8x8, int ss2); FIXME: This function is broken and has been replaced by @oil_sad8x8_f64_2() because the destination of this function is an 8x8 block instead of a single value. d_8x8 : ds : s1_8x8 : ss1 : s2_8x8 : ss2 : oil_sad8x8_s16 () oil_sad8x8_s16void oil_sad8x8_s16 (uint32_t *d_8x8, int ds, const int16_t *s1_8x8, int ss1, const int16_t *s2_8x8, int ss2); FIXME: This function is broken and has been replaced by @oil_sad8x8_s16_2() because the destination of this function is an 8x8 block instead of a single value. d_8x8 : ds : s1_8x8 : ss1 : s2_8x8 : ss2 : oil_sad8x8_f64_2 () oil_sad8x8_f64_2void oil_sad8x8_f64_2 (double *d_1, const double *s1_8x8, int ss1, const double *s2_8x8, int ss2); Calculates the sum of absolute differences between elements in s1_8x8 and s2_8x8, and places the result in d_1. d_1 : s1_8x8 : ss1 : s2_8x8 : ss2 : oil_sad8x8_s16_2 () oil_sad8x8_s16_2void oil_sad8x8_s16_2 (uint32_t *d_1, const int16_t *s1_8x8, int ss1, const int16_t *s2_8x8, int ss2); Calculates the sum of absolute differences between elements in s1_8x8 and s2_8x8, and places the result in d_1. d_1 : s1_8x8 : ss1 : s2_8x8 : ss2 : oil_sad8x8_u8 () oil_sad8x8_u8void oil_sad8x8_u8 (uint32_t *d_1, const uint8_t *s1_8x8, int ss1, const uint8_t *s2_8x8, int ss2); Calculates the sum of absolute differences between elements in s1_8x8 and s2_8x8, and places the result in d_1. d_1 : s1_8x8 : ss1 : s2_8x8 : ss2 : liboil-0.3.17/doc/xml/liboilinit.xml0000644000175000017500000000314311332637400014222 00000000000000 Intialization 3 LIBOIL Library Intialization Initialization functions Synopsis void oil_init (void); Description Details oil_init () oil_initvoid oil_init (void); Initialize liboil. This function must be called before any other liboil function is used. oil_init() may be called multiple times. Since 0.3.0 liboil-0.3.17/doc/xml/liboilinit-unstable.xml0000644000175000017500000000572211332637400016042 00000000000000 Intialization 3 LIBOIL Library Intialization Initialization functions Synopsis void oil_init_no_optimize (void); void oil_optimize_all (void); void oil_optimize (const char *class_name); Description Details oil_init_no_optimize () oil_init_no_optimizevoid oil_init_no_optimize (void); Initialize liboil similar to oil_init(), but do not run the profiling stage. This function is mainly useful for internal programs. oil_optimize_all () oil_optimize_allvoid oil_optimize_all (void); Optimize all function classes. oil_optimize () oil_optimizevoid oil_optimize (const char *class_name); Optimize the function class that has the name specified by class_name. class_name : a string liboil-0.3.17/doc/xml/liboilparameter.xml0000644000175000017500000000445511332637400015246 00000000000000 OilParameter 3 LIBOIL Library OilParameter Functions to manipulate prototype parameter information. Synopsis OilParameter; void * oil_param_get_source_data (OilParameter *param); Description Details OilParameter OilParametertypedef struct { } OilParameter; An opaque structure representing a single parameter in the function prototype of an OilFunctionClass. oil_param_get_source_data () oil_param_get_source_datavoid * oil_param_get_source_data (OilParameter *param); param : Returns : liboil-0.3.17/doc/xml/liboilfuncs-copy.xml0000644000175000017500000015430011332637400015347 00000000000000 liboilfuncs-copy 3 LIBOIL Library liboilfuncs-copy Synopsis void oil_compare_u8 (uint32_t *d_1, const uint8_t *s1, const uint8_t *s2, int n); void oil_copy_u8 (uint8_t *dest, const uint8_t *src, int n); void oil_permute_f32 (float *dest, int dstr, const float *src1, int sstr1, const int32_t *src2, int sstr2, int n); void oil_permute_f64 (double *dest, int dstr, const double *src1, int sstr1, const int32_t *src2, int sstr2, int n); void oil_permute_s16 (int16_t *dest, int dstr, const int16_t *src1, int sstr1, const int32_t *src2, int sstr2, int n); void oil_permute_s32 (int32_t *dest, int dstr, const int32_t *src1, int sstr1, const int32_t *src2, int sstr2, int n); void oil_permute_s8 (int8_t *dest, int dstr, const int8_t *src1, int sstr1, const int32_t *src2, int sstr2, int n); void oil_permute_u16 (uint16_t *dest, int dstr, const uint16_t *src1, int sstr1, const int32_t *src2, int sstr2, int n); void oil_permute_u32 (uint32_t *dest, int dstr, const uint32_t *src1, int sstr1, const int32_t *src2, int sstr2, int n); void oil_permute_u8 (uint8_t *dest, int dstr, const uint8_t *src1, int sstr1, const int32_t *src2, int sstr2, int n); void oil_splat_u32 (uint32_t *dest, int dstr, const uint32_t *s1_1, int n); void oil_splat_u8 (uint8_t *dest, int dstr, const uint8_t *s1_1, int n); void oil_swab_u16 (uint16_t *d_n, const uint16_t *s_n, int n); void oil_swab_u32 (uint32_t *d_n, const uint32_t *s_n, int n); void oil_tablelookup_u8 (uint8_t *d, int ds, const uint8_t *s1, int ss1, const uint8_t *s2_256, int ss2, int n); void oil_testzero_u8 (uint32_t *d_1, const uint8_t *s, int n); void oil_trans8x8_f64 (double *d_8x8, int ds, const double *s_8x8, int ss); void oil_trans8x8_u16 (uint16_t *d_8x8, int ds, const uint16_t *s_8x8, int ss); void oil_trans8x8_u32 (uint32_t *d_8x8, int ds, const uint32_t *s_8x8, int ss); void oil_trans8x8_u8 (uint8_t *d_8x8, int ds, const uint8_t *s_8x8, int ss); void oil_unzigzag8x8_s16 (int16_t *d_8x8, int ds, const int16_t *s_8x8, int ss); void oil_zigzag8x8_s16 (int16_t *d_8x8, int ds, const int16_t *s_8x8, int ss); void oil_splat_u32_ns (uint32_t *dest, const uint32_t *s1_1, int n); void oil_splat_u8_ns (uint8_t *dest, const uint8_t *s1_1, int n); #define oil_trans8x8_s16 (dest, dstr, src, sstr) #define oil_memcpy (dest,src,n_bytes) Description Details oil_compare_u8 () oil_compare_u8void oil_compare_u8 (uint32_t *d_1, const uint8_t *s1, const uint8_t *s2, int n); Compares two arrays. The index of the first two elements that are unequal is written into dest. If all elements are equal, n is written into dest. d_1 : destination array s1 : source array s2 : source array n : number of elements oil_copy_u8 () oil_copy_u8void oil_copy_u8 (uint8_t *dest, const uint8_t *src, int n); Copies from source to destination. dest : destination array src : source array n : number of elements oil_permute_f32 () oil_permute_f32void oil_permute_f32 (float *dest, int dstr, const float *src1, int sstr1, const int32_t *src2, int sstr2, int n); Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n. dest : dstr : src1 : sstr1 : src2 : sstr2 : n : oil_permute_f64 () oil_permute_f64void oil_permute_f64 (double *dest, int dstr, const double *src1, int sstr1, const int32_t *src2, int sstr2, int n); Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n. dest : dstr : src1 : sstr1 : src2 : sstr2 : n : oil_permute_s16 () oil_permute_s16void oil_permute_s16 (int16_t *dest, int dstr, const int16_t *src1, int sstr1, const int32_t *src2, int sstr2, int n); Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n. dest : dstr : src1 : sstr1 : src2 : sstr2 : n : oil_permute_s32 () oil_permute_s32void oil_permute_s32 (int32_t *dest, int dstr, const int32_t *src1, int sstr1, const int32_t *src2, int sstr2, int n); Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n. dest : dstr : src1 : sstr1 : src2 : sstr2 : n : oil_permute_s8 () oil_permute_s8void oil_permute_s8 (int8_t *dest, int dstr, const int8_t *src1, int sstr1, const int32_t *src2, int sstr2, int n); Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n. dest : dstr : src1 : sstr1 : src2 : sstr2 : n : oil_permute_u16 () oil_permute_u16void oil_permute_u16 (uint16_t *dest, int dstr, const uint16_t *src1, int sstr1, const int32_t *src2, int sstr2, int n); Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n. dest : dstr : src1 : sstr1 : src2 : sstr2 : n : oil_permute_u32 () oil_permute_u32void oil_permute_u32 (uint32_t *dest, int dstr, const uint32_t *src1, int sstr1, const int32_t *src2, int sstr2, int n); Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n. dest : dstr : src1 : sstr1 : src2 : sstr2 : n : oil_permute_u8 () oil_permute_u8void oil_permute_u8 (uint8_t *dest, int dstr, const uint8_t *src1, int sstr1, const int32_t *src2, int sstr2, int n); Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n. dest : dstr : src1 : sstr1 : src2 : sstr2 : n : oil_splat_u32 () oil_splat_u32void oil_splat_u32 (uint32_t *dest, int dstr, const uint32_t *s1_1, int n); Copies the constant source value s1_1 to each element in dest. dest : dstr : s1_1 : n : oil_splat_u8 () oil_splat_u8void oil_splat_u8 (uint8_t *dest, int dstr, const uint8_t *s1_1, int n); Copies the constant source value s1_1 to each element in dest. dest : dstr : s1_1 : n : oil_swab_u16 () oil_swab_u16void oil_swab_u16 (uint16_t *d_n, const uint16_t *s_n, int n); Swaps the endianness of values in the source array and places the results in the destination array. The arguments s_n and d_n may be equal. d_n : s_n : n: n : oil_swab_u32 () oil_swab_u32void oil_swab_u32 (uint32_t *d_n, const uint32_t *s_n, int n); Swaps the endianness of values in the source array and places the results in the destination array. The arguments s_n and d_n may be equal. d_n : s_n : n: n : oil_tablelookup_u8 () oil_tablelookup_u8void oil_tablelookup_u8 (uint8_t *d, int ds, const uint8_t *s1, int ss1, const uint8_t *s2_256, int ss2, int n); Looks up each element in s1 using the lookup table in s2_256, and places the table value in d. d : ds : s1 : ss1 : s2_256 : ss2 : n : oil_testzero_u8 () oil_testzero_u8void oil_testzero_u8 (uint32_t *d_1, const uint8_t *s, int n); Tests each element in the source array for equality with 0. The index of the first zero element is written into dest. If all elements are non-zero, n is written into dest. This function is roughly equivalent to strnlen(). One notable difference is that implementations of this function may legally read past the zero byte. d_1 : destination array s : source array n : number of elements oil_trans8x8_f64 () oil_trans8x8_f64void oil_trans8x8_f64 (double *d_8x8, int ds, const double *s_8x8, int ss); Performs a matrix transpose the 8x8 block represented by s_8x8 and places the result in d_8x8. d_8x8 : ds : s_8x8 : ss : oil_trans8x8_u16 () oil_trans8x8_u16void oil_trans8x8_u16 (uint16_t *d_8x8, int ds, const uint16_t *s_8x8, int ss); Performs a matrix transpose the 8x8 block represented by s_8x8 and places the result in d_8x8. Note that this function can also be used for any type of this size. d_8x8 : ds : s_8x8 : ss : oil_trans8x8_u32 () oil_trans8x8_u32void oil_trans8x8_u32 (uint32_t *d_8x8, int ds, const uint32_t *s_8x8, int ss); Performs a matrix transpose the 8x8 block represented by s_8x8 and places the result in d_8x8. Note that this function can also be used for any type of this size. d_8x8 : ds : s_8x8 : ss : oil_trans8x8_u8 () oil_trans8x8_u8void oil_trans8x8_u8 (uint8_t *d_8x8, int ds, const uint8_t *s_8x8, int ss); Performs a matrix transpose the 8x8 block represented by s_8x8 and places the result in d_8x8. Note that this function can also be used for any type of this size. d_8x8 : ds : s_8x8 : ss : oil_unzigzag8x8_s16 () oil_unzigzag8x8_s16void oil_unzigzag8x8_s16 (int16_t *d_8x8, int ds, const int16_t *s_8x8, int ss); Reorders an 8x8 block to reverse the zig-zag reordering of oil_zigzag8x8_s16. d_8x8 : ds : s_8x8 : ss : oil_zigzag8x8_s16 () oil_zigzag8x8_s16void oil_zigzag8x8_s16 (int16_t *d_8x8, int ds, const int16_t *s_8x8, int ss); Reorders an 8x8 block using a zig-zag pattern. The zig-zag pattern is described in the JPEG specification. FIXME: describe zigzag pattern d_8x8 : ds : s_8x8 : ss : oil_splat_u32_ns () oil_splat_u32_nsvoid oil_splat_u32_ns (uint32_t *dest, const uint32_t *s1_1, int n); Copies the constant source value s1_1 to each element in dest. dest : s1_1 : n : oil_splat_u8_ns () oil_splat_u8_nsvoid oil_splat_u8_ns (uint8_t *dest, const uint8_t *s1_1, int n); Copies the constant source value s1_1 to each element in dest. dest : s1_1 : n : oil_trans8x8_s16() oil_trans8x8_s16#define oil_trans8x8_s16(dest, dstr, src, sstr) Macro wrapping trans8x8_u16(). dest : dstr : src : sstr : oil_memcpy() oil_memcpy#define oil_memcpy(dest,src,n_bytes) Macro that uses oil_copy_u8() to provide an implementation of memcpy(). Note that oil_copy_u8() is optimized for short copies, and may be very slow for large copies compared to alternatives, including the system memcpy(). dest : src : n_bytes : liboil-0.3.17/doc/Makefile.in0000644000175000017500000004454711332627667012642 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # -*- mode: makefile -*- #################################### # Everything below here is generic # #################################### VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/gtk-doc.make subdir = doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # We require automake 1.6 at least. AUTOMAKE_OPTIONS = 1.6 # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # The name of the module, e.g. 'glib'. DOC_MODULE = liboil # The top-level SGML file. You can change this if you want to. DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting the functions and macros. # e.g. DOC_SOURCE_DIR=../../../gtk DOC_SOURCE_DIR = ../liboil # Extra options to pass to gtkdoc-scangobj. Not normally needed. SCANGOBJ_OPTIONS = # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" SCAN_OPTIONS = # Extra options to supply to gtkdoc-mkdb. # e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml MKDB_OPTIONS = --sgml-mode --output-format=xml # Extra options to supply to gtkdoc-fixref. Not normally needed. # e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html FIXXREF_OPTIONS = # Used for dependencies. The docs will be rebuilt if any of these change. # e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h # e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c HFILE_GLOB = $(top_srcdir)/liboil/*.h CFILE_GLOB = $(top_srcdir)/liboil/*.c # Header files to ignore when scanning. # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h IGNORE_HFILES = liboilfuncs.h fbmmx.h fbpict.h liboil-stdint.h # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png HTML_IMAGES = # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml content_files = # CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. # Only needed if you are using gtkdoc-scangobj to dynamically query widget # signals and properties. # e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) INCLUDES = GTKDOC_LIBS = @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) @GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) @GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) # We set GPATH here; this gives us semantics for GNU make # which are more like other make's VPATH, when it comes to # whether a source that is a target of one rule is then # searched for in VPATH/GPATH. # GPATH = $(srcdir) TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) # This includes the standard gtk-doc make rules, copied by gtkdocize. # Other files to distribute # e.g. EXTRA_DIST += version.xml.in EXTRA_DIST = $(content_files) $(HTML_IMAGES) $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE).types $(DOC_MODULE)-sections.txt \ $(DOC_MODULE)-overrides.txt DOC_STAMPS = scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ clean-libtool clean-local dist-hook distclean \ distclean-generic distclean-libtool distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic maintainer-clean-local mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-local @ENABLE_GTK_DOC_TRUE@all-local: html-build.stamp #### scan #### @ENABLE_GTK_DOC_TRUE@scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) @ENABLE_GTK_DOC_TRUE@ @echo '*** Scanning header files ***' @ENABLE_GTK_DOC_TRUE@ @-chmod -R u+w $(srcdir) @ENABLE_GTK_DOC_TRUE@ if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \ @ENABLE_GTK_DOC_TRUE@ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ @ENABLE_GTK_DOC_TRUE@ else \ @ENABLE_GTK_DOC_TRUE@ cd $(srcdir) ; \ @ENABLE_GTK_DOC_TRUE@ for i in $(SCANOBJ_FILES) ; do \ @ENABLE_GTK_DOC_TRUE@ test -f $$i || touch $$i ; \ @ENABLE_GTK_DOC_TRUE@ done \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@ cd $(srcdir) && \ @ENABLE_GTK_DOC_TRUE@ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) @ENABLE_GTK_DOC_TRUE@ touch scan-build.stamp @ENABLE_GTK_DOC_TRUE@$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp @ENABLE_GTK_DOC_TRUE@ @true #### templates #### @ENABLE_GTK_DOC_TRUE@tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt @ENABLE_GTK_DOC_TRUE@ @echo '*** Rebuilding template files ***' @ENABLE_GTK_DOC_TRUE@ @-chmod -R u+w $(srcdir) @ENABLE_GTK_DOC_TRUE@ cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) @ENABLE_GTK_DOC_TRUE@ touch tmpl-build.stamp @ENABLE_GTK_DOC_TRUE@tmpl.stamp: tmpl-build.stamp @ENABLE_GTK_DOC_TRUE@ @true #### xml #### @ENABLE_GTK_DOC_TRUE@sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml @ENABLE_GTK_DOC_TRUE@ @echo '*** Building XML ***' @ENABLE_GTK_DOC_TRUE@ @-chmod -R u+w $(srcdir) @ENABLE_GTK_DOC_TRUE@ cd $(srcdir) && \ @ENABLE_GTK_DOC_TRUE@ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml $(MKDB_OPTIONS) @ENABLE_GTK_DOC_TRUE@ touch sgml-build.stamp @ENABLE_GTK_DOC_TRUE@sgml.stamp: sgml-build.stamp @ENABLE_GTK_DOC_TRUE@ @true #### html #### @ENABLE_GTK_DOC_TRUE@html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @ENABLE_GTK_DOC_TRUE@ @echo '*** Building HTML ***' @ENABLE_GTK_DOC_TRUE@ @-chmod -R u+w $(srcdir) @ENABLE_GTK_DOC_TRUE@ rm -rf $(srcdir)/html @ENABLE_GTK_DOC_TRUE@ mkdir $(srcdir)/html @ENABLE_GTK_DOC_TRUE@ cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) @ENABLE_GTK_DOC_TRUE@ test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) @ENABLE_GTK_DOC_TRUE@ @echo '-- Fixing Crossreferences' @ENABLE_GTK_DOC_TRUE@ cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @ENABLE_GTK_DOC_TRUE@ touch html-build.stamp @ENABLE_GTK_DOC_FALSE@all-local: ############## clean-local: rm -f *~ *.bak rm -rf .libs maintainer-clean-local: clean cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt install-data-local: installfiles=`echo $(srcdir)/html/*`; \ if test "$$installfiles" = '$(srcdir)/html/*'; \ then echo '-- Nothing to install' ; \ else \ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ done; \ echo '-- Installing $(srcdir)/html/index.sgml' ; \ $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \ fi uninstall-local: rm -f $(DESTDIR)$(TARGET_DIR)/* # # Require gtk-doc when making dist # @ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" @ENABLE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/tmpl mkdir $(distdir)/xml mkdir $(distdir)/html -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl -cp $(srcdir)/xml/*.xml $(distdir)/xml -cp $(srcdir)/html/* $(distdir)/html .PHONY : dist-hook-local sync: cd html && rsync -a . freedesktop.org:/srv/liboil.freedesktop.org/www/documentation/ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/doc/html/0000777000175000017500000000000011332637400011571 500000000000000liboil-0.3.17/doc/html/liboil-liboilfuncs-conv.html0000644000175000017500000071106711332637400017133 00000000000000 Type Conversion

Type Conversion

Type Conversion — Type conversion

Synopsis

void                oil_clipconv8x8_u8_s16              (uint8_t *d_8x8,
                                                         int dstr,
                                                         const int16_t *s_8x8,
                                                         int sstr);
void                oil_clipconv_s16_f32                (int16_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_s16_f64                (int16_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_s16_s32                (int16_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_s16_u16                (int16_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_s16_u32                (int16_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_s32_f32                (int32_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_s32_f64                (int32_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_s32_u32                (int32_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_s8_f32                 (int8_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_s8_f64                 (int8_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_s8_s16                 (int8_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_s8_s32                 (int8_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_s8_u16                 (int8_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_s8_u32                 (int8_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_s8_u8                  (int8_t *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_u16_f32                (uint16_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_u16_f64                (uint16_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_u16_s16                (uint16_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_u16_s32                (uint16_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_u16_u32                (uint16_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_u32_f32                (uint32_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_u32_f64                (uint32_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_u32_s32                (uint32_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_u8_f32                 (uint8_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_u8_f64                 (uint8_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_u8_s16                 (uint8_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_u8_s32                 (uint8_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_u8_s8                  (uint8_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_u8_u16                 (uint8_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_clipconv_u8_u32                 (uint8_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv8x8_f64_s16                 (double *d_8x8,
                                                         int dstr,
                                                         const int16_t *s_8x8,
                                                         int sstr);
void                oil_conv8x8_s16_f64                 (int16_t *d_8x8,
                                                         int dstr,
                                                         const double *s_8x8,
                                                         int sstr);
void                oil_conv_f32_f64                    (float *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_f32_s16                    (float *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_f32_s32                    (float *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_f32_s8                     (float *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_f32_u16                    (float *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_f32_u32                    (float *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_f32_u8                     (float *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_f64_f32                    (double *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_f64_s16                    (double *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_f64_s32                    (double *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_f64_s8                     (double *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_f64_u16                    (double *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_f64_u32                    (double *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_f64_u8                     (double *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s16_f32                    (int16_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s16_f64                    (int16_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s16_s32                    (int16_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s16_s8                     (int16_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s16_u16                    (int16_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s16_u32                    (int16_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s16_u8                     (int16_t *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s32_f32                    (int32_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s32_f64                    (int32_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s32_s16                    (int32_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s32_s8                     (int32_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s32_u16                    (int32_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s32_u32                    (int32_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s32_u8                     (int32_t *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s8_f32                     (int8_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s8_f64                     (int8_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s8_s16                     (int8_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s8_s32                     (int8_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s8_u16                     (int8_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s8_u32                     (int8_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_s8_u8                      (int8_t *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u16_f32                    (uint16_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u16_f64                    (uint16_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u16_s16                    (uint16_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u16_s32                    (uint16_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u16_s8                     (uint16_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u16_u32                    (uint16_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u16_u8                     (uint16_t *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u32_f32                    (uint32_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u32_f64                    (uint32_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u32_s16                    (uint32_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u32_s32                    (uint32_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u32_s8                     (uint32_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u32_u16                    (uint32_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u32_u8                     (uint32_t *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u8_f32                     (uint8_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u8_f64                     (uint8_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u8_s16                     (uint8_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u8_s32                     (uint8_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u8_s8                      (uint8_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u8_u16                     (uint8_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_conv_u8_u32                     (uint8_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_scaleconv_f32_s16               (float *dest,
                                                         const int16_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_f32_s32               (float *dest,
                                                         const int32_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_f32_s8                (float *dest,
                                                         const int8_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_f32_u16               (float *dest,
                                                         const uint16_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_f32_u32               (float *dest,
                                                         const uint32_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_f32_u8                (float *dest,
                                                         const uint8_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_f64_s16               (double *dest,
                                                         const int16_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_f64_s32               (double *dest,
                                                         const int32_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_f64_s8                (double *dest,
                                                         const int8_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_f64_u16               (double *dest,
                                                         const uint16_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_f64_u32               (double *dest,
                                                         const uint32_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_f64_u8                (double *dest,
                                                         const uint8_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_s16_f32               (int16_t *dest,
                                                         const float *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_s16_f64               (int16_t *dest,
                                                         const double *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_s32_f32               (int32_t *dest,
                                                         const float *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_s32_f64               (int32_t *dest,
                                                         const double *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_s8_f32                (int8_t *dest,
                                                         const float *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_s8_f64                (int8_t *dest,
                                                         const double *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_u16_f32               (uint16_t *dest,
                                                         const float *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_u16_f64               (uint16_t *dest,
                                                         const double *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_u32_f32               (uint32_t *dest,
                                                         const float *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_u32_f64               (uint32_t *dest,
                                                         const double *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_u8_f32                (uint8_t *dest,
                                                         const float *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_scaleconv_u8_f64                (uint8_t *dest,
                                                         const double *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Description

The functions in this section perform type conversion.

The <i>conv</i> functions convert value from the source type to the destination type. Conversion of values outside the destination range is undefined and may vary between implementations.

The <i>clipconv</i> functions convert values from the source type to the destination type. Conversion of values outside the destination range are saturated to the destination range.

The <i>scaleconv</i> functions multiply the source values by a constant factor before converting to the destination type. Conversion of values outside the destination range is undefined and may vary between implementations.

Conversion of values from floating point types to integer types is done using a round-to-nearest policy. Rounding of half-integers is undefined and may vary between implementations.

Details

oil_clipconv8x8_u8_s16 ()

void                oil_clipconv8x8_u8_s16              (uint8_t *d_8x8,
                                                         int dstr,
                                                         const int16_t *s_8x8,
                                                         int sstr);

Converts elements in source array s_8x8 to the destination type, placing the results in d_8x8. Source values outside the destination range are clipped to the destination range.

d_8x8 :

dstr :

s_8x8 :

sstr :


oil_clipconv_s16_f32 ()

void                oil_clipconv_s16_f32                (int16_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_s16_f64 ()

void                oil_clipconv_s16_f64                (int16_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_s16_s32 ()

void                oil_clipconv_s16_s32                (int16_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_s16_u16 ()

void                oil_clipconv_s16_u16                (int16_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_s16_u32 ()

void                oil_clipconv_s16_u32                (int16_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_s32_f32 ()

void                oil_clipconv_s32_f32                (int32_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_s32_f64 ()

void                oil_clipconv_s32_f64                (int32_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_s32_u32 ()

void                oil_clipconv_s32_u32                (int32_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_s8_f32 ()

void                oil_clipconv_s8_f32                 (int8_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_s8_f64 ()

void                oil_clipconv_s8_f64                 (int8_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_s8_s16 ()

void                oil_clipconv_s8_s16                 (int8_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_s8_s32 ()

void                oil_clipconv_s8_s32                 (int8_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_s8_u16 ()

void                oil_clipconv_s8_u16                 (int8_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_s8_u32 ()

void                oil_clipconv_s8_u32                 (int8_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_s8_u8 ()

void                oil_clipconv_s8_u8                  (int8_t *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_u16_f32 ()

void                oil_clipconv_u16_f32                (uint16_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_u16_f64 ()

void                oil_clipconv_u16_f64                (uint16_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_u16_s16 ()

void                oil_clipconv_u16_s16                (uint16_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_u16_s32 ()

void                oil_clipconv_u16_s32                (uint16_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_u16_u32 ()

void                oil_clipconv_u16_u32                (uint16_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_u32_f32 ()

void                oil_clipconv_u32_f32                (uint32_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_u32_f64 ()

void                oil_clipconv_u32_f64                (uint32_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_u32_s32 ()

void                oil_clipconv_u32_s32                (uint32_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_u8_f32 ()

void                oil_clipconv_u8_f32                 (uint8_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_u8_f64 ()

void                oil_clipconv_u8_f64                 (uint8_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_u8_s16 ()

void                oil_clipconv_u8_s16                 (uint8_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_u8_s32 ()

void                oil_clipconv_u8_s32                 (uint8_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_u8_s8 ()

void                oil_clipconv_u8_s8                  (uint8_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_u8_u16 ()

void                oil_clipconv_u8_u16                 (uint8_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_clipconv_u8_u32 ()

void                oil_clipconv_u8_u32                 (uint8_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are clipped to the destination range. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv8x8_f64_s16 ()

void                oil_conv8x8_f64_s16                 (double *d_8x8,
                                                         int dstr,
                                                         const int16_t *s_8x8,
                                                         int sstr);

Converts elements in source array s_8x8 to the destination type, placing the results in d_8x8. The conversion of source values outside the destination range are undefined and implementation dependent.

d_8x8 :

dstr :

s_8x8 :

sstr :


oil_conv8x8_s16_f64 ()

void                oil_conv8x8_s16_f64                 (int16_t *d_8x8,
                                                         int dstr,
                                                         const double *s_8x8,
                                                         int sstr);

Converts elements in source array s_8x8 to the destination type, placing the results in d_8x8.

d_8x8 :

dstr :

s_8x8 :

sstr :


oil_conv_f32_f64 ()

void                oil_conv_f32_f64                    (float *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_f32_s16 ()

void                oil_conv_f32_s16                    (float *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_f32_s32 ()

void                oil_conv_f32_s32                    (float *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_f32_s8 ()

void                oil_conv_f32_s8                     (float *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_f32_u16 ()

void                oil_conv_f32_u16                    (float *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_f32_u32 ()

void                oil_conv_f32_u32                    (float *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_f32_u8 ()

void                oil_conv_f32_u8                     (float *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_f64_f32 ()

void                oil_conv_f64_f32                    (double *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_f64_s16 ()

void                oil_conv_f64_s16                    (double *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_f64_s32 ()

void                oil_conv_f64_s32                    (double *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_f64_s8 ()

void                oil_conv_f64_s8                     (double *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_f64_u16 ()

void                oil_conv_f64_u16                    (double *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_f64_u32 ()

void                oil_conv_f64_u32                    (double *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_f64_u8 ()

void                oil_conv_f64_u8                     (double *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s16_f32 ()

void                oil_conv_s16_f32                    (int16_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s16_f64 ()

void                oil_conv_s16_f64                    (int16_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s16_s32 ()

void                oil_conv_s16_s32                    (int16_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s16_s8 ()

void                oil_conv_s16_s8                     (int16_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s16_u16 ()

void                oil_conv_s16_u16                    (int16_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s16_u32 ()

void                oil_conv_s16_u32                    (int16_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s16_u8 ()

void                oil_conv_s16_u8                     (int16_t *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s32_f32 ()

void                oil_conv_s32_f32                    (int32_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s32_f64 ()

void                oil_conv_s32_f64                    (int32_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s32_s16 ()

void                oil_conv_s32_s16                    (int32_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s32_s8 ()

void                oil_conv_s32_s8                     (int32_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s32_u16 ()

void                oil_conv_s32_u16                    (int32_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s32_u32 ()

void                oil_conv_s32_u32                    (int32_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s32_u8 ()

void                oil_conv_s32_u8                     (int32_t *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s8_f32 ()

void                oil_conv_s8_f32                     (int8_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s8_f64 ()

void                oil_conv_s8_f64                     (int8_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s8_s16 ()

void                oil_conv_s8_s16                     (int8_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s8_s32 ()

void                oil_conv_s8_s32                     (int8_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s8_u16 ()

void                oil_conv_s8_u16                     (int8_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s8_u32 ()

void                oil_conv_s8_u32                     (int8_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_s8_u8 ()

void                oil_conv_s8_u8                      (int8_t *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u16_f32 ()

void                oil_conv_u16_f32                    (uint16_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u16_f64 ()

void                oil_conv_u16_f64                    (uint16_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u16_s16 ()

void                oil_conv_u16_s16                    (uint16_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u16_s32 ()

void                oil_conv_u16_s32                    (uint16_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u16_s8 ()

void                oil_conv_u16_s8                     (uint16_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u16_u32 ()

void                oil_conv_u16_u32                    (uint16_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u16_u8 ()

void                oil_conv_u16_u8                     (uint16_t *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u32_f32 ()

void                oil_conv_u32_f32                    (uint32_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u32_f64 ()

void                oil_conv_u32_f64                    (uint32_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u32_s16 ()

void                oil_conv_u32_s16                    (uint32_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u32_s32 ()

void                oil_conv_u32_s32                    (uint32_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u32_s8 ()

void                oil_conv_u32_s8                     (uint32_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u32_u16 ()

void                oil_conv_u32_u16                    (uint32_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u32_u8 ()

void                oil_conv_u32_u8                     (uint32_t *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u8_f32 ()

void                oil_conv_u8_f32                     (uint8_t *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u8_f64 ()

void                oil_conv_u8_f64                     (uint8_t *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u8_s16 ()

void                oil_conv_u8_s16                     (uint8_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u8_s32 ()

void                oil_conv_u8_s32                     (uint8_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u8_s8 ()

void                oil_conv_u8_s8                      (uint8_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u8_u16 ()

void                oil_conv_u8_u16                     (uint8_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_conv_u8_u32 ()

void                oil_conv_u8_u32                     (uint8_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n);

Converts elements in from the source type to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

dstr :

src :

sstr :

n :


oil_scaleconv_f32_s16 ()

void                oil_scaleconv_f32_s16               (float *dest,
                                                         const int16_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_f32_s32 ()

void                oil_scaleconv_f32_s32               (float *dest,
                                                         const int32_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_f32_s8 ()

void                oil_scaleconv_f32_s8                (float *dest,
                                                         const int8_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_f32_u16 ()

void                oil_scaleconv_f32_u16               (float *dest,
                                                         const uint16_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_f32_u32 ()

void                oil_scaleconv_f32_u32               (float *dest,
                                                         const uint32_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_f32_u8 ()

void                oil_scaleconv_f32_u8                (float *dest,
                                                         const uint8_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_f64_s16 ()

void                oil_scaleconv_f64_s16               (double *dest,
                                                         const int16_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_f64_s32 ()

void                oil_scaleconv_f64_s32               (double *dest,
                                                         const int32_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_f64_s8 ()

void                oil_scaleconv_f64_s8                (double *dest,
                                                         const int8_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_f64_u16 ()

void                oil_scaleconv_f64_u16               (double *dest,
                                                         const uint16_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_f64_u32 ()

void                oil_scaleconv_f64_u32               (double *dest,
                                                         const uint32_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_f64_u8 ()

void                oil_scaleconv_f64_u8                (double *dest,
                                                         const uint8_t *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_s16_f32 ()

void                oil_scaleconv_s16_f32               (int16_t *dest,
                                                         const float *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_s16_f64 ()

void                oil_scaleconv_s16_f64               (int16_t *dest,
                                                         const double *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_s32_f32 ()

void                oil_scaleconv_s32_f32               (int32_t *dest,
                                                         const float *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_s32_f64 ()

void                oil_scaleconv_s32_f64               (int32_t *dest,
                                                         const double *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_s8_f32 ()

void                oil_scaleconv_s8_f32                (int8_t *dest,
                                                         const float *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_s8_f64 ()

void                oil_scaleconv_s8_f64                (int8_t *dest,
                                                         const double *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_u16_f32 ()

void                oil_scaleconv_u16_f32               (uint16_t *dest,
                                                         const float *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_u16_f64 ()

void                oil_scaleconv_u16_f64               (uint16_t *dest,
                                                         const double *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_u32_f32 ()

void                oil_scaleconv_u32_f32               (uint32_t *dest,
                                                         const float *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_u32_f64 ()

void                oil_scaleconv_u32_f64               (uint32_t *dest,
                                                         const double *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_u8_f32 ()

void                oil_scaleconv_u8_f32                (uint8_t *dest,
                                                         const float *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :


oil_scaleconv_u8_f64 ()

void                oil_scaleconv_u8_f64                (uint8_t *dest,
                                                         const double *src,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Multiplies elements in by and adds and then converts the result to the destination type and places the result in . Values outside the destination range are undefined and implementation dependent. See the comments at the beginning of this section.

dest :

src :

n :

# s2_1: # s3_1:

s2_1 :

s3_1 :

liboil-0.3.17/doc/html/liboil-liboiltypes.html0000644000175000017500000003740611332637400016214 00000000000000 liboiltypes

liboiltypes

liboiltypes — Internal Liboil types

Synopsis

enum                OilType;
int                 oil_type_sizeof                     (OilType type);
#define             oil_type_is_floating_point          (type)
const char *        oil_type_name                       (OilType type);
enum                OilArgType;
const char *        oil_arg_type_name                   (OilArgType type);
#define             oil_type_s8
#define             oil_type_u8
#define             oil_type_s16
#define             oil_type_u16
#define             oil_type_s32
#define             oil_type_u32
#define             oil_type_s64
#define             oil_type_u64
#define             oil_type_f32
#define             oil_type_f64
#define             oil_type_min_s8
#define             oil_type_min_u8
#define             oil_type_min_s16
#define             oil_type_min_u16
#define             oil_type_min_s32
#define             oil_type_min_u32
#define             oil_type_max_s8
#define             oil_type_max_u8
#define             oil_type_max_s16
#define             oil_type_max_u16
#define             oil_type_max_s32
#define             oil_type_max_u32

Description

Details

enum OilType

typedef enum {
  OIL_TYPE_UNKNOWN = 0,
  OIL_TYPE_INT,
  OIL_TYPE_s8,
  OIL_TYPE_u8,
  OIL_TYPE_s16,
  OIL_TYPE_u16,
  OIL_TYPE_s32,
  OIL_TYPE_u32,
  OIL_TYPE_s64,
  OIL_TYPE_u64,
  OIL_TYPE_f32,
  OIL_TYPE_f64,
  OIL_TYPE_s8p,
  OIL_TYPE_u8p,
  OIL_TYPE_s16p,
  OIL_TYPE_u16p,
  OIL_TYPE_s32p,
  OIL_TYPE_u32p,
  OIL_TYPE_s64p,
  OIL_TYPE_u64p,
  OIL_TYPE_f32p,
  OIL_TYPE_f64p,
} OilType;

Enumeration containing the data types understood by Liboil.


oil_type_sizeof ()

int                 oil_type_sizeof                     (OilType type);

Looks up the size of the OilType represented by type.

type :

the OilType

Returns :

the size of type

oil_type_is_floating_point()

#define             oil_type_is_floating_point(type)

type :


oil_type_name ()

const char *        oil_type_name                       (OilType type);

Looks up the name of the OilType given by type.

type :

an OilType

Returns :

a string containing the name of the OilType type.

enum OilArgType

typedef enum {
  OIL_ARG_UNKNOWN = 0,
  OIL_ARG_N,
  OIL_ARG_M,
  OIL_ARG_DEST1,
  OIL_ARG_DSTR1,
  OIL_ARG_DEST2,
  OIL_ARG_DSTR2,
  OIL_ARG_DEST3,
  OIL_ARG_DSTR3,
  OIL_ARG_SRC1,
  OIL_ARG_SSTR1,
  OIL_ARG_SRC2,
  OIL_ARG_SSTR2,
  OIL_ARG_SRC3,
  OIL_ARG_SSTR3,
  OIL_ARG_SRC4,
  OIL_ARG_SSTR4,
  OIL_ARG_SRC5,
  OIL_ARG_SSTR5,
  OIL_ARG_INPLACE1,
  OIL_ARG_ISTR1,
  OIL_ARG_INPLACE2,
  OIL_ARG_ISTR2,

  OIL_ARG_LAST
} OilArgType;

Enumeration containing the types of parameter types understood by Liboil.


oil_arg_type_name ()

const char *        oil_arg_type_name                   (OilArgType type);

Looks up the name of the OilArgType specified by type.

type :

an OilArgType

Returns :

a string containing the name

oil_type_s8

#define oil_type_s8 int8_t

Useful for autogenerated code. Do not use otherwise.


oil_type_u8

#define oil_type_u8 uint8_t

Useful for autogenerated code. Do not use otherwise.


oil_type_s16

#define oil_type_s16 int16_t

Useful for autogenerated code. Do not use otherwise.


oil_type_u16

#define oil_type_u16 uint16_t

Useful for autogenerated code. Do not use otherwise.


oil_type_s32

#define oil_type_s32 int32_t

Useful for autogenerated code. Do not use otherwise.


oil_type_u32

#define oil_type_u32 uint32_t

Useful for autogenerated code. Do not use otherwise.


oil_type_s64

#define oil_type_s64 int64_t

Useful for autogenerated code. Do not use otherwise.


oil_type_u64

#define oil_type_u64 uint64_t

Useful for autogenerated code. Do not use otherwise.


oil_type_f32

#define oil_type_f32 float

Useful for autogenerated code. Do not use otherwise.


oil_type_f64

#define oil_type_f64 double

Useful for autogenerated code. Do not use otherwise.


oil_type_min_s8

#define oil_type_min_s8 (-128)

Useful for autogenerated code. Do not use otherwise.


oil_type_min_u8

#define oil_type_min_u8 (0)

Useful for autogenerated code. Do not use otherwise.


oil_type_min_s16

#define oil_type_min_s16 (-32768)

Useful for autogenerated code. Do not use otherwise.


oil_type_min_u16

#define oil_type_min_u16 (0)

Useful for autogenerated code. Do not use otherwise.


oil_type_min_s32

#define oil_type_min_s32 (-2147483647 - 1)

Useful for autogenerated code. Do not use otherwise.


oil_type_min_u32

#define oil_type_min_u32 (0)

Useful for autogenerated code. Do not use otherwise.


oil_type_max_s8

#define oil_type_max_s8 (127)

Useful for autogenerated code. Do not use otherwise.


oil_type_max_u8

#define oil_type_max_u8 (255)

Useful for autogenerated code. Do not use otherwise.


oil_type_max_s16

#define oil_type_max_s16 (32767)

Useful for autogenerated code. Do not use otherwise.


oil_type_max_u16

#define oil_type_max_u16 (65535)

Useful for autogenerated code. Do not use otherwise.


oil_type_max_s32

#define oil_type_max_s32 (2147483647)

Useful for autogenerated code. Do not use otherwise.


oil_type_max_u32

#define oil_type_max_u32 (4294967295U)

Useful for autogenerated code. Do not use otherwise.

liboil-0.3.17/doc/html/liboil-liboildebug.html0000644000175000017500000003211611332637400016127 00000000000000 Debug

Debug

Debug — Printing and formatting debug information

Synopsis

void                (*OilDebugPrintFunc)                (int level,
                                                         const char *file,
                                                         const char *func,
                                                         int line,
                                                         const char *format,
                                                         va_list varargs);
enum                OilDebugLevel;
void                oil_debug_set_print_function        (OilDebugPrintFunc func);
int                 oil_debug_get_level                 (void);
void                oil_debug_set_level                 (int level);
#define             OIL_ERROR                           (...)
#define             OIL_WARNING                         (...)
#define             OIL_INFO                            (...)
#define             OIL_DEBUG                           (...)
#define             OIL_LOG                             (...)
#define             OIL_FUNCTION
#define             OIL_DEBUG_PRINT                     (level, ...)

Description

Details

OilDebugPrintFunc ()

void                (*OilDebugPrintFunc)                (int level,
                                                         const char *file,
                                                         const char *func,
                                                         int line,
                                                         const char *format,
                                                         va_list varargs);

Typedef describing functions that can be registered using oil_debug_set_print_function() so that it is called to print debugging messages.

level :

the debug level

file :

name of the file where the debug message occurs

func :

name of the function where the debug message occurs

line :

line in the file where the debug message occurs

format :

a printf format

varargs :

varargs for the printf format

enum OilDebugLevel

typedef enum {
  OIL_DEBUG_NONE = 0,
  OIL_DEBUG_ERROR,
  OIL_DEBUG_WARNING,
  OIL_DEBUG_INFO,
  OIL_DEBUG_DEBUG,
  OIL_DEBUG_LOG
} OilDebugLevel;

Enumeration describing debug levels in Liboil.


oil_debug_set_print_function ()

void                oil_debug_set_print_function        (OilDebugPrintFunc func);

Sets the function to call when outputting debugging information. A value of NULL for func will restore the default handler, which prints debugging information to stderr.

func :


oil_debug_get_level ()

int                 oil_debug_get_level                 (void);

Gets the current debug level.

Returns :

the current debug level

oil_debug_set_level ()

void                oil_debug_set_level                 (int level);

Sets the current debug level.

level :

the new debug level

OIL_ERROR()

#define OIL_ERROR(...) OIL_DEBUG_PRINT(OIL_DEBUG_ERROR, __VA_ARGS__)

Macro to call OIL_DEBUG_PRINT() with a level of OIL_DEBUG_ERROR.

... :


OIL_WARNING()

#define OIL_WARNING(...) OIL_DEBUG_PRINT(OIL_DEBUG_WARNING, __VA_ARGS__)

Macro to call OIL_DEBUG_PRINT() with a level of OIL_DEBUG_WARNING.

... :


OIL_INFO()

#define OIL_INFO(...) OIL_DEBUG_PRINT(OIL_DEBUG_INFO, __VA_ARGS__)

Macro to call OIL_DEBUG_PRINT() with a level of OIL_DEBUG_INFO.

... :


OIL_DEBUG()

#define OIL_DEBUG(...) OIL_DEBUG_PRINT(OIL_DEBUG_DEBUG, __VA_ARGS__)

Macro to call OIL_DEBUG_PRINT() with a level of OIL_DEBUG_DEBUG.

... :


OIL_LOG()

#define OIL_LOG(...) OIL_DEBUG_PRINT(OIL_DEBUG_LOG, __VA_ARGS__)

Macro to call OIL_DEBUG_PRINT() with a level of OIL_DEBUG_LOG.

... :


OIL_FUNCTION

#define             OIL_FUNCTION

Internal macro that points to __PRETTY_FUNCTION__ or __func__ if the former is not available.


OIL_DEBUG_PRINT()

#define             OIL_DEBUG_PRINT(level, ...)

Macro to call oil_debug_print() with the correct values for the name of the source file, line of source file, and function.

level :

... :

liboil-0.3.17/doc/html/liboil-liboilprototype.html0000644000175000017500000002235311332637400017110 00000000000000 OilPrototype

OilPrototype

OilPrototype — Functions to manipulate prototype information.

Description

Details

OilPrototype

typedef struct {
  int n_params;
  OilParameter *params;
  OilFunctionClass *klass;
} OilPrototype;

An opaque structure describing the C function prototype of an OilFunctionClass.


oil_prototype_from_string ()

OilPrototype *      oil_prototype_from_string           (const char *s);

Converts the string s containing C prototype that follows Liboil parameter naming rules into a OilPrototype. If the string cannot be converted, NULL is returned.

s :

a string

Returns :

the OilPrototype. When it is no longer needed, free the prototype using oil_prototype_free().

oil_prototype_to_string ()

char *              oil_prototype_to_string             (OilPrototype *proto);

Converts a prototype into the corresponding C style declaration.

proto :

the OilPrototype

Returns :

a string that should be freed using free() when it is no longer needed.

oil_prototype_to_arg_string ()

char *              oil_prototype_to_arg_string         (OilPrototype *proto);

Converts a prototype into the corresponding C argument list.

proto :

the OilPrototype

Returns :

a string that should be freed using free() when it is no longer needed.

oil_prototype_free ()

void                oil_prototype_free                  (OilPrototype *proto);

Frees memory associated with proto.

proto :

the OilPrototype

oil_prototype_append_param ()

void                oil_prototype_append_param          (OilPrototype *proto,
                                                         OilParameter *param);

Appends param to the list of parameters contained in proto. The contents of param are copied.

proto :

the OilPrototype

param :

an OilParameter
liboil-0.3.17/doc/html/ch01.html0000644000175000017500000000602011332637400013124 00000000000000 Liboil Stable API

Liboil Stable API

Intialization — Initialization functions
Type Conversion — Type conversion
liboilfuncs-copy
Simple Arithmetic — Aritmetic operations
Simple Arithmetic on Blocks — Aritmetic operations on 8x8 blocks
liboilfuncs-dct
Pixel Operations — Operations on pixels
liboilfuncs-doc

These functions are part of the stable API, and will not change during the lifetime of the 0.3 series.

liboil-0.3.17/doc/html/liboil-liboilmacros.html0000644000175000017500000003435611332637400016335 00000000000000 Macros

Macros

Macros — Macros

Synopsis

#define             oil_min                             (x,y)
#define             oil_max                             (x,y)
#define             oil_divide_255                      (x)
#define             oil_argb                            (a,r,g,b)
#define             oil_argb_noclamp                    (a,r,g,b)
#define             oil_argb_A                          (color)
#define             oil_argb_G                          (color)
#define             oil_argb_B                          (color)
#define             oil_argb_R                          (color)
#define             oil_muldiv_255                      (a,b)
#define             oil_clamp_255                       (x)
#define             OIL_GET                             (ptr, offset, type)
#define             OIL_OFFSET                          (ptr, offset)
#define             OIL_INCREMENT                       (ptr, offset)

Description

Details

oil_min()

#define oil_min(x,y) ((x)<(y)?(x):(y))

Evaluates to the minimum of x and y.

x :

a value

y :

a value

oil_max()

#define oil_max(x,y) ((x)>(y)?(x):(y))

Evaluates to the maximum of x and y.

x :

a value

y :

a value

oil_divide_255()

#define oil_divide_255(x) ((((x)+128) + (((x)+128)>>8))>>8)

Divides x by 255 in a way that is compatible with the pixel operations in Liboil. The number 65025 is 255*255.

Evaluates to x divided by 255.

x :

a value in the range [0,65025]

oil_argb()

#define             oil_argb(a,r,g,b)

Creates a Liboil ARGB value from individual components. Clamps each component to [0,255].

Evaluates to the ARGB value

a :

alpha component

r :

red component

g :

green component

b :

blue component

oil_argb_noclamp()

#define             oil_argb_noclamp(a,r,g,b)

Creates a Liboil ARGB value from individual components. Does not clamp components.

Evaluates to the ARGB value

a :

alpha component

r :

red component

g :

green component

b :

blue component

oil_argb_A()

#define oil_argb_A(color) (((color)>>24)&0xff)

Extracts the alpha component from color.

Evaluates to the alpha component

color :

an ARGB value

oil_argb_G()

#define oil_argb_G(color) (((color)>>8)&0xff)

Extracts the green component from color.

Evaluates to the green component

color :

an ARGB value

oil_argb_B()

#define oil_argb_B(color) (((color)>>0)&0xff)

Extracts the blue component from color.

Evaluates to the blue component

color :

an ARGB value

oil_argb_R()

#define oil_argb_R(color) (((color)>>16)&0xff)

Extracts the red component from color.

Evaluates to the red component

color :

an ARGB value

oil_muldiv_255()

#define oil_muldiv_255(a,b) oil_divide_255((a)*(b))

Multiplies a and b and divides the result by 255 in a way that is compatible with the pixel operations in Liboil.

Evaluates to the result.

a :

a value in the range [0,255]

b :

a value in the range [0,255]

oil_clamp_255()

#define oil_clamp_255(x) oil_max(0,oil_min((x),255))

Clamps x to the range [0,255].

Evaluates to the clamped value.

x :

a value

OIL_GET()

#define OIL_GET(ptr, offset, type) (*(type *)((uint8_t *)(ptr) + (offset)) )

Offsets ptr by offset number of bytes, and dereferences it as type type. Note that the offset is in bytes, and not in the size of the pointer type.

ptr :

offset :

type :


OIL_OFFSET()

#define OIL_OFFSET(ptr, offset) ((void *)((uint8_t *)(ptr) + (offset)) )

Add offset bytes to the pointer ptr.

ptr :

offset :


OIL_INCREMENT()

#define OIL_INCREMENT(ptr, offset) (ptr = (void *)((uint8_t *)ptr + (offset)) )

Increments the pointer ptr by offset number of bytes.

ptr :

offset :

liboil-0.3.17/doc/html/style.css0000644000175000017500000000460111332637400013360 00000000000000.synopsis, .classsynopsis { background: #eeeeee; border: solid 1px #aaaaaa; padding: 0.5em; } .programlisting { background: #eeeeff; border: solid 1px #aaaaff; padding: 0.5em; } .variablelist { padding: 4px; margin-left: 3em; } .variablelist td:first-child { vertical-align: top; } /* this is needed so that the local anchors are displayed below the naviagtion */ @media screen { sup a.footnote { position: relative; top: 0em ! important; } div.refnamediv a[name], div.refsect1 a[name] { position: relative; top: -4.5em; } table.navigation#top { background: #ffeeee; border: solid 1px #ffaaaa; margin-top: 0; margin-bottom: 0; position: fixed; top: 0; left: 0; height: 2em; z-index: 1; } .navigation a { color: #770000; } .navigation a:visited { color: #550000; } td.shortcuts { color: #770000; font-size: 80%; white-space: nowrap; } div.refentry, div.chapter, div.reference, div.part, div.book, div.glossary, div.sect1, div.appendix, div.preface { position: relative; top: 3em; z-index: 0; } div.glossary, div.index { position: relative; top: 2em; z-index: 0; } div.refnamediv { margin-top: 2em; } body { padding-bottom: 20em; } } @media print { table.navigation { visibility: collapse; display: none; } div.titlepage table.navigation { visibility: visible; display: table; background: #ffeeee; border: solid 1px #ffaaaa; margin-top: 0; margin-bottom: 0; top: 0; left: 0; height: 2em; } } .navigation .title { font-size: 200%; } div.gallery-float { float: left; padding: 10px; } div.gallery-float img { border-style: none; } div.gallery-spacer { clear: both; } a { text-decoration: none; } a:hover { text-decoration: underline; color: #FF0000; } div.table table { border-collapse: collapse; border-spacing: 0px; border-style: solid; border-color: #777777; border-width: 1px; } div.table table td, div.table table th { border-style: solid; border-color: #777777; border-width: 1px; padding: 3px; vertical-align: top; } div.table table th { background-color: #eeeeee; } hr { color: #777777; background: #777777; border: 0; height: 1px; clear: both; } .footer { padding-top: 3.5em; color: #777777; text-align: center; font-size: 80%; } liboil-0.3.17/doc/html/liboil.devhelp20000644000175000017500000013474711332637400014432 00000000000000 liboil-0.3.17/doc/html/liboil-liboiljunk.html0000644000175000017500000001266311332637400016015 00000000000000 liboiljunk

liboiljunk

liboiljunk

Synopsis

#define             OIL_OPT_MANGLE                      (a)
#define             OIL_OPT_SUFFIX
#define             OIL_CHECK_PROTOTYPE                 (a)
#define             OIL_OPT_FLAG_MANGLE                 (a)
#define             OIL_NO_CLASSES
#define             NULL

Description

Details

OIL_OPT_MANGLE()

#define OIL_OPT_MANGLE(a) a

Used internally to implement the --enable-alternate-optimizations configure option.

a :


OIL_OPT_SUFFIX

#define OIL_OPT_SUFFIX

Used internally to implement the --enable-alternate-optimizations configure option.


OIL_CHECK_PROTOTYPE()

#define             OIL_CHECK_PROTOTYPE(a)

Macro used internally to implement the --enable-prototype-checking configure option.

a :


OIL_OPT_FLAG_MANGLE()

#define             OIL_OPT_FLAG_MANGLE(a)

Used internally to implement the --enable-alternate-optimizations configure option.

a :


OIL_NO_CLASSES

#define OIL_NO_CLASSES

Used internally to implement the --enable-alternate-optimizations configure option.


NULL

#define NULL ((void *)0)

FIXME: gtk-doc is broken and doesn't know how to ignore this.

liboil-0.3.17/doc/html/left.png0000644000175000017500000000071311332637400013146 00000000000000‰PNG  IHDRàw=øbKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÒ1&¹³[(XIDATxœµ•!OÃPEïÛ*ˆ‰ŠID%~ꊯ˜ÄÕ"pæ'öŘ`sÜ–¥rKf–´‚¤â h—mi—ÇIžz}÷ܯIû¤–.pÚö\“`xä‹ ˆl‡?l·[²,H¬‡¯×k<Ï#Žcþ%\’AUx[S³7–n6ù¾¯år¹ßèõzE‰‡’s’žŒ1³ºö“²æÅj@œ—NL$ݤiª0 ¿5/ð}¿²\E‡Ž¤KIo¥Í“$a0üjÞdF£bŠkIê„‹æAh>ŸW¶lC'?“tk;|/t*I»ÝN«ÕÊZø^`Œy•4ë÷ûšN§r]×® çJÒÌó<«’½À“Út»Ýú€à`±Xàºî1@p´ä€¸d½÷ŽZ')høÖÚK¬ ª$V?%Å]€­+³L’sgUKà"ÿw5â3O·•ÜòIEND®B`‚liboil-0.3.17/doc/html/right.png0000644000175000017500000000073011332637400013330 00000000000000‰PNG  IHDRàw=øbKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÒ2 I%Á=eIDATxœ­”!oÂ@†Ÿ.'**M0$ÄÁ$¿?1~¢vIeEuLlÉ&–Ô4‚ä Í¶B»Ý›œ¹|÷>ï—ûî …$ݶ©oc<”´ÑA©¤×€X’ò Liboil Unstable API

Liboil Unstable API

Intialization — Initialization functions
CPU — Check the capabilities of the current CPU
Debug — Printing and formatting debug information
OilFunctionClass — Functions for manipulating function classes
OilFunctionImpl — Functions for manipulating function implementations.
OilParameter — Functions to manipulate prototype parameter information.
OilProfile — Measuring the length of time needed to execute Liboil functions.
OilPrototype — Functions to manipulate prototype information.
Random Number Generation — Random number generation
OilTest — Test and profile function implementations.
liboiltypes — Internal Liboil types
Macros — Macros
liboiljunk

These functions are part of the unstable API, and may change between releases in the 0.3 series. These functions should not be used by applications. Some of this functionality may be moved to the stable API during the 0.3 series.

liboil-0.3.17/doc/html/liboil-liboilfuncs-dct.html0000644000175000017500000006354511332637400016741 00000000000000 liboilfuncs-dct

liboilfuncs-dct

liboilfuncs-dct

Synopsis

void                oil_dct36_f32                       (float *d_36,
                                                         int dstr,
                                                         const float *s_36,
                                                         int sstr);
void                oil_fdct8_f64                       (double *d_8,
                                                         const double *s_8,
                                                         int dstr,
                                                         int sstr);
void                oil_fdct8x8_f64                     (double *d_8x8,
                                                         int dstr,
                                                         const double *s_8x8,
                                                         int sstr);
void                oil_fdct8x8s_s16                    (int16_t *d_8x8,
                                                         int ds,
                                                         const int16_t *s_8x8,
                                                         int ss);
void                oil_idct8_f64                       (double *d_8,
                                                         int dstr,
                                                         const double *s_8,
                                                         int sstr);
void                oil_idct8x8_f64                     (double *d_8x8,
                                                         int dstr,
                                                         const double *s_8x8,
                                                         int sstr);
void                oil_idct8x8_s16                     (int16_t *d_8x8,
                                                         int dstr,
                                                         const int16_t *s_8x8,
                                                         int sstr);
void                oil_imdct12_f64                     (double *d_12,
                                                         const double *s_6);
void                oil_imdct32_f32                     (float *d_32,
                                                         const float *s_32);
void                oil_imdct36_f64                     (double *d_36,
                                                         const double *s_18);
void                oil_mdct12_f64                      (double *d_6,
                                                         const double *s_12);
void                oil_mdct36_f64                      (double *d_18,
                                                         const double *s_36);
void                oil_idct8theora_s16                 (int16_t *d_8,
                                                         int dstr,
                                                         const int16_t *s_8,
                                                         int sstr);
void                oil_idct8x8lim10_f64                (double *d_8x8,
                                                         int dstr,
                                                         const double *s_8x8,
                                                         int sstr);
void                oil_idct8x8lim10_s16                (int16_t *d_8x8,
                                                         int dstr,
                                                         const int16_t *s_8x8,
                                                         int sstr);
void                oil_idct8x8theora_s16               (int16_t *d_8x8,
                                                         int dstr,
                                                         const int16_t *s_8x8,
                                                         int sstr);

Description

Details

oil_dct36_f32 ()

void                oil_dct36_f32                       (float *d_36,
                                                         int dstr,
                                                         const float *s_36,
                                                         int sstr);

FIXME: This function is broken.

d_36 :

dstr :

s_36 :

sstr :


oil_fdct8_f64 ()

void                oil_fdct8_f64                       (double *d_8,
                                                         const double *s_8,
                                                         int dstr,
                                                         int sstr);

Performs a Forward Discrete Cosine Transform on s_8 and places the result in d_8.

d_8 :

s_8 :

dstr :

sstr :


oil_fdct8x8_f64 ()

void                oil_fdct8x8_f64                     (double *d_8x8,
                                                         int dstr,
                                                         const double *s_8x8,
                                                         int sstr);

Performs a 2-D Forward Discrete Cosine Transform on s_8x8 and places the result in d_8x8.

d_8x8 :

dstr :

s_8x8 :

sstr :


oil_fdct8x8s_s16 ()

void                oil_fdct8x8s_s16                    (int16_t *d_8x8,
                                                         int ds,
                                                         const int16_t *s_8x8,
                                                         int ss);

Performs a 2-D Forward Discrete Cosine Transform on s_8x8 and places the result in d_8x8.

This function uses an alternate scaling used by RTjpeg.

d_8x8 :

ds :

s_8x8 :

ss :


oil_idct8_f64 ()

void                oil_idct8_f64                       (double *d_8,
                                                         int dstr,
                                                         const double *s_8,
                                                         int sstr);

Performs a Inverse Discrete Cosine Transform on s_8 and places the result in d_8.

d_8 :

dstr :

s_8 :

sstr :


oil_idct8x8_f64 ()

void                oil_idct8x8_f64                     (double *d_8x8,
                                                         int dstr,
                                                         const double *s_8x8,
                                                         int sstr);

Performs a 2-D Inverse Discrete Cosine Transform on s_8x8 and places the result in d_8x8.

d_8x8 :

dstr :

s_8x8 :

sstr :


oil_idct8x8_s16 ()

void                oil_idct8x8_s16                     (int16_t *d_8x8,
                                                         int dstr,
                                                         const int16_t *s_8x8,
                                                         int sstr);

Performs a limited 2-D Inverse Discrete Cosine Transform on s_8x8 and places the result in d_8x8.

d_8x8 :

dstr :

s_8x8 :

sstr :


oil_imdct12_f64 ()

void                oil_imdct12_f64                     (double *d_12,
                                                         const double *s_6);

Performs a Inverse Modified Discrete Cosine Transform (IMDCT) on the source array s_6 and places the result in d_12.

d_12 :

s_6 :


oil_imdct32_f32 ()

void                oil_imdct32_f32                     (float *d_32,
                                                         const float *s_32);

Performs a Inverse Modified Discrete Cosine Transform (IMDCT) on the source array s_32 and places the result in d_32.

d_32 :

s_32 :


oil_imdct36_f64 ()

void                oil_imdct36_f64                     (double *d_36,
                                                         const double *s_18);

Performs a Inverse Modified Discrete Cosine Transform (IMDCT) on the source array s_18 and places the result in d_36.

d_36 :

s_18 :


oil_mdct12_f64 ()

void                oil_mdct12_f64                      (double *d_6,
                                                         const double *s_12);

Performs a Modified Discrete Cosine Transform (MDCT) on the source array s_12 and places the result in d_6.

d_6 :

s_12 :


oil_mdct36_f64 ()

void                oil_mdct36_f64                      (double *d_18,
                                                         const double *s_36);

Performs a Modified Discrete Cosine Transform (MDCT) on the source array s_36 and places the result in d_18.

d_18 :

s_36 :


oil_idct8theora_s16 ()

void                oil_idct8theora_s16                 (int16_t *d_8,
                                                         int dstr,
                                                         const int16_t *s_8,
                                                         int sstr);

Performs a Inverse Discrete Cosine Transform on s_8 and places the result in d_8, as defined by the Theora specification.

d_8 :

dstr :

s_8 :

sstr :


oil_idct8x8lim10_f64 ()

void                oil_idct8x8lim10_f64                (double *d_8x8,
                                                         int dstr,
                                                         const double *s_8x8,
                                                         int sstr);

Performs a 2-D Inverse Discrete Cosine Transform on s_8x8 and places the result in d_8x8.

d_8x8 :

dstr :

s_8x8 :

sstr :


oil_idct8x8lim10_s16 ()

void                oil_idct8x8lim10_s16                (int16_t *d_8x8,
                                                         int dstr,
                                                         const int16_t *s_8x8,
                                                         int sstr);

Performs a limited 2-D Inverse Discrete Cosine Transform on s_8x8 and places the result in d_8x8. The source 8x8 block must be non-zero only in the 10 lowest-order components.

d_8x8 :

dstr :

s_8x8 :

sstr :


oil_idct8x8theora_s16 ()

void                oil_idct8x8theora_s16               (int16_t *d_8x8,
                                                         int dstr,
                                                         const int16_t *s_8x8,
                                                         int sstr);

Performs a Inverse Discrete Cosine Transform on s_8x8 and places the result in d_8x8, as defined by the Theora specification.

d_8x8 :

dstr :

s_8x8 :

sstr :

liboil-0.3.17/doc/html/liboil-liboilimpl-unstable.html0000644000175000017500000003517611332637400017626 00000000000000 OilFunctionImpl

OilFunctionImpl

OilFunctionImpl — Functions for manipulating function implementations.

Synopsis

                    OilFunctionImpl;
OilFunctionImpl *   oil_impl_get_by_index               (int i);
int                 oil_impl_is_runnable                (OilFunctionImpl *impl);
enum                OilImplFlag;
#define             OIL_CPU_FLAG_MASK
#define             OIL_DEFINE_IMPL_FULL                (function,klass,flags)
#define             OIL_DEFINE_IMPL                     (function,klass)
#define             OIL_DEFINE_IMPL_REF                 (function,klass)
#define             OIL_DEFINE_IMPL_ASM                 (function,klass)
#define             OIL_DEFINE_IMPL_DEPENDS             (function,klass,...)

Description

Details

OilFunctionImpl

typedef struct {
} OilFunctionImpl;

An opaque structure representing a function implementation.


oil_impl_get_by_index ()

OilFunctionImpl *   oil_impl_get_by_index               (int i);

Returns a pointer to the function implementation with index i.

i :

index

Returns :

a pointer to a function implementation structure

oil_impl_is_runnable ()

int                 oil_impl_is_runnable                (OilFunctionImpl *impl);

Determines whether the function implementation given by impl can be executed by the current CPU.

impl :

an OilFunctionImpl

Returns :

1 if the implementation can be executed, otherwise 0

enum OilImplFlag

typedef enum {
  OIL_IMPL_FLAG_REF = (1<<0),
  OIL_IMPL_FLAG_OPT = (1<<1),
  OIL_IMPL_FLAG_ASM = (1<<2),
  OIL_IMPL_FLAG_DISABLED = (1<<3),
  OIL_IMPL_FLAG_CMOV = (1<<16),
  OIL_IMPL_FLAG_MMX = (1<<17),
  OIL_IMPL_FLAG_SSE = (1<<18),
  OIL_IMPL_FLAG_MMXEXT = (1<<19),
  OIL_IMPL_FLAG_SSE2 = (1<<20),
  OIL_IMPL_FLAG_3DNOW = (1<<21),
  OIL_IMPL_FLAG_3DNOWEXT = (1<<22),
  OIL_IMPL_FLAG_SSE3 = (1<<23),
  OIL_IMPL_FLAG_ALTIVEC = (1<<24),
  OIL_IMPL_FLAG_EDSP = (1<<25),
  OIL_IMPL_FLAG_ARM6 = (1<<26),
  OIL_IMPL_FLAG_VFP = (1<<27),
  OIL_IMPL_FLAG_SSSE3 = (1<<28)
} OilImplFlag;

Implementation flags.

OIL_IMPL_FLAG_REF: is the reference implementation for the class.

OIL_IMPL_FLAG_OPT: was compiled with alternate CFLAGS as specified by --enable-alternate-optimization.

OIL_IMPL_FLAG_ASM: is written in assembly code.

OIL_IMPL_FLAG_DISABLED: is disabled. This can be set either in the source code or during library initialization.

OIL_IMPL_FLAG_CMOV: uses the i386 instruction cmov or its variants.

OIL_IMPL_FLAG_MMX: uses MMX instructions.

OIL_IMPL_FLAG_SSE: uses SSE instructions.

OIL_IMPL_FLAG_MMXEXT: uses AMD's extended MMX instructions. These are a subset of what Intel calls SSE2. If an implementation uses only AMD's extended MMX instructions, it should set this flag, and not OIL_IMPL_FLAG_SSE2.

OIL_IMPL_FLAG_SSE2: uses SSE2 instructions. This flag implies OIL_IMPL_FLAG_SSE and OIL_IMPL_FLAG_MMXEXT.

OIL_IMPL_FLAG_3DNOW: uses 3DNow! instructions.

OIL_IMPL_FLAG_3DNOWEXT: uses extended 3DNow! instructions.

OIL_IMPL_FLAG_SSE3: uses SSE3 instructions. This flag implies OIL_IMPL_FLAG_SSE2.

OIL_IMPL_FLAG_SSSE3: uses SSSE3 instructions. This flag implies OIL_IMPL_FLAG_SSE3.

OIL_IMPL_FLAG_ALTIVEC: uses Altivec instructions.


OIL_CPU_FLAG_MASK

#define OIL_CPU_FLAG_MASK 0xffff0000

Mask describing which bits in OilImplFlag depend on the current CPU.


OIL_DEFINE_IMPL_FULL()

#define             OIL_DEFINE_IMPL_FULL(function,klass,flags)

Defines a OilFunctionImpl structure for the function function and class klass. CPU-dependent flags in flags will indicate that this implementation requires the given CPU flags.

function :

name of function

klass :

name of class to declare (without oil_ prefix)

flags :

implementation flags and CPU requirements

OIL_DEFINE_IMPL()

#define             OIL_DEFINE_IMPL(function,klass)

Shorthand for defining a C implementation. See OIL_DEFINE_IMPL_FULL().

function :

name of function

klass :

name of class to declare (without oil_ prefix)

OIL_DEFINE_IMPL_REF()

#define             OIL_DEFINE_IMPL_REF(function,klass)

Shorthand for defining a reference implementation. See OIL_DEFINE_IMPL_FULL().

function :

name of function

klass :

name of class to declare (without oil_ prefix)

OIL_DEFINE_IMPL_ASM()

#define             OIL_DEFINE_IMPL_ASM(function,klass)

Shorthand for defining an implementation written in inline assembly code. See OIL_DEFINE_IMPL_FULL().

function :

name of function

klass :

name of class to declare (without oil_ prefix)

OIL_DEFINE_IMPL_DEPENDS()

#define             OIL_DEFINE_IMPL_DEPENDS(function,klass,...)

Shorthand for defining an implementation that uses another Liboil function class. This is not currently used. See OIL_DEFINE_IMPL_FULL().

function :

name of function

klass :

name of class to declare (without oil_ prefix)

... :

other classes this implementation uses
liboil-0.3.17/doc/html/liboil-liboilinit-unstable.html0000644000175000017500000001063611332637400017622 00000000000000 Intialization

Intialization

Intialization — Initialization functions

Synopsis

void                oil_init_no_optimize                (void);
void                oil_optimize_all                    (void);
void                oil_optimize                        (const char *class_name);

Description

Details

oil_init_no_optimize ()

void                oil_init_no_optimize                (void);

Initialize liboil similar to oil_init(), but do not run the profiling stage. This function is mainly useful for internal programs.


oil_optimize_all ()

void                oil_optimize_all                    (void);

Optimize all function classes.


oil_optimize ()

void                oil_optimize                        (const char *class_name);

Optimize the function class that has the name specified by class_name.

class_name :

a string
liboil-0.3.17/doc/html/liboil-liboilparameter.html0000644000175000017500000000777411332637400017035 00000000000000 OilParameter

OilParameter

OilParameter — Functions to manipulate prototype parameter information.

Description

Details

OilParameter

typedef struct {
} OilParameter;

An opaque structure representing a single parameter in the function prototype of an OilFunctionClass.


oil_param_get_source_data ()

void *              oil_param_get_source_data           (OilParameter *param);

param :

Returns :

liboil-0.3.17/doc/html/liboil-liboilfuncs-math.html0000644000175000017500000036313011332637400017111 00000000000000 Simple Arithmetic

Simple Arithmetic

Simple Arithmetic — Aritmetic operations

Synopsis

void                oil_abs_f32_f32                     (float *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);
void                oil_abs_f64_f64                     (double *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);
void                oil_abs_u16_s16                     (uint16_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);
void                oil_abs_u32_s32                     (uint32_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);
void                oil_abs_u8_s8                       (uint8_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);
void                oil_average2_u8                     (uint8_t *d,
                                                         int dstr,
                                                         const uint8_t *s1,
                                                         int sstr1,
                                                         const uint8_t *s2,
                                                         int sstr2,
                                                         int n);
void                oil_multsum_f32                     (float *dest,
                                                         const float *src1,
                                                         int sstr1,
                                                         const float *src2,
                                                         int sstr2,
                                                         int n);
void                oil_multsum_f64                     (double *dest,
                                                         const double *src1,
                                                         int sstr1,
                                                         const double *src2,
                                                         int sstr2,
                                                         int n);
void                oil_scalaradd_f32                   (float *d,
                                                         int dstr,
                                                         const float *s1,
                                                         int sstr,
                                                         const float *s2_1,
                                                         int n);
void                oil_scalaradd_f64                   (double *d,
                                                         int dstr,
                                                         const double *s1,
                                                         int sstr,
                                                         const double *s2_1,
                                                         int n);
void                oil_scalaradd_s16                   (int16_t *d,
                                                         int dstr,
                                                         const int16_t *s1,
                                                         int sstr,
                                                         const int16_t *s2_1,
                                                         int n);
void                oil_scalaradd_s32                   (int32_t *d,
                                                         int dstr,
                                                         const int32_t *s1,
                                                         int sstr,
                                                         const int32_t *s2_1,
                                                         int n);
void                oil_scalaradd_s8                    (int8_t *d,
                                                         int dstr,
                                                         const int8_t *s1,
                                                         int sstr,
                                                         const int8_t *s2_1,
                                                         int n);
void                oil_scalaradd_u16                   (uint16_t *d,
                                                         int dstr,
                                                         const uint16_t *s1,
                                                         int sstr,
                                                         const uint16_t *s2_1,
                                                         int n);
void                oil_scalaradd_u32                   (uint32_t *d,
                                                         int dstr,
                                                         const uint32_t *s1,
                                                         int sstr,
                                                         const uint32_t *s2_1,
                                                         int n);
void                oil_scalaradd_u8                    (uint8_t *d,
                                                         int dstr,
                                                         const uint8_t *s1,
                                                         int sstr,
                                                         const uint8_t *s2_1,
                                                         int n);
void                oil_scalarmult_f32                  (float *d,
                                                         int dstr,
                                                         const float *s1,
                                                         int sstr,
                                                         const float *s2_1,
                                                         int n);
void                oil_scalarmult_f64                  (double *d,
                                                         int dstr,
                                                         const double *s1,
                                                         int sstr,
                                                         const double *s2_1,
                                                         int n);
void                oil_scalarmult_s16                  (int16_t *d,
                                                         int dstr,
                                                         const int16_t *s1,
                                                         int sstr,
                                                         const int16_t *s2_1,
                                                         int n);
void                oil_scalarmult_s32                  (int32_t *d,
                                                         int dstr,
                                                         const int32_t *s1,
                                                         int sstr,
                                                         const int32_t *s2_1,
                                                         int n);
void                oil_scalarmult_s8                   (int8_t *d,
                                                         int dstr,
                                                         const int8_t *s1,
                                                         int sstr,
                                                         const int8_t *s2_1,
                                                         int n);
void                oil_scalarmult_u16                  (uint16_t *d,
                                                         int dstr,
                                                         const uint16_t *s1,
                                                         int sstr,
                                                         const uint16_t *s2_1,
                                                         int n);
void                oil_scalarmult_u32                  (uint32_t *d,
                                                         int dstr,
                                                         const uint32_t *s1,
                                                         int sstr,
                                                         const uint32_t *s2_1,
                                                         int n);
void                oil_scalarmult_u8                   (uint8_t *d,
                                                         int dstr,
                                                         const uint8_t *s1,
                                                         int sstr,
                                                         const uint8_t *s2_1,
                                                         int n);
void                oil_vectoradd_f32                   (float *d,
                                                         int dstr,
                                                         const float *s1,
                                                         int sstr1,
                                                         const float *s2,
                                                         int sstr2,
                                                         int n,
                                                         const float *s3_1,
                                                         const float *s4_1);
void                oil_vectoradd_f64                   (double *d,
                                                         int dstr,
                                                         const double *s1,
                                                         int sstr1,
                                                         const double *s2,
                                                         int sstr2,
                                                         int n,
                                                         const double *s3_1,
                                                         const double *s4_1);
void                oil_vectoradd_s16                   (int16_t *d,
                                                         int dstr,
                                                         const int16_t *s1,
                                                         int sstr1,
                                                         const int16_t *s2,
                                                         int sstr2,
                                                         int n,
                                                         const int16_t *s3_1,
                                                         const int16_t *s4_1);
void                oil_vectoradd_s32                   (int32_t *d,
                                                         int dstr,
                                                         const int32_t *s1,
                                                         int sstr1,
                                                         const int32_t *s2,
                                                         int sstr2,
                                                         int n,
                                                         const int32_t *s3_1,
                                                         const int32_t *s4_1);
void                oil_vectoradd_s8                    (int8_t *d,
                                                         int dstr,
                                                         const int8_t *s1,
                                                         int sstr1,
                                                         const int8_t *s2,
                                                         int sstr2,
                                                         int n,
                                                         const int8_t *s3_1,
                                                         const int8_t *s4_1);
void                oil_vectoradd_u16                   (uint16_t *d,
                                                         int dstr,
                                                         const uint16_t *s1,
                                                         int sstr1,
                                                         const uint16_t *s2,
                                                         int sstr2,
                                                         int n,
                                                         const uint16_t *s3_1,
                                                         const uint16_t *s4_1);
void                oil_vectoradd_u32                   (uint32_t *d,
                                                         int dstr,
                                                         const uint32_t *s1,
                                                         int sstr1,
                                                         const uint32_t *s2,
                                                         int sstr2,
                                                         int n,
                                                         const uint32_t *s3_1,
                                                         const uint32_t *s4_1);
void                oil_vectoradd_u8                    (uint8_t *d,
                                                         int dstr,
                                                         const uint8_t *s1,
                                                         int sstr1,
                                                         const uint8_t *s2,
                                                         int sstr2,
                                                         int n,
                                                         const uint8_t *s3_1,
                                                         const uint8_t *s4_1);
void                oil_vectoradd_s_s8                  (int8_t *d,
                                                         int dstr,
                                                         const int8_t *s1,
                                                         int sstr1,
                                                         const int8_t *s2,
                                                         int sstr2,
                                                         int n);
void                oil_vectoradd_s_u8                  (uint8_t *d,
                                                         int dstr,
                                                         const uint8_t *s1,
                                                         int sstr1,
                                                         const uint8_t *s2,
                                                         int sstr2,
                                                         int n);
void                oil_vectoradd_s_s16                 (int16_t *d,
                                                         int dstr,
                                                         const int16_t *s1,
                                                         int sstr1,
                                                         const int16_t *s2,
                                                         int sstr2,
                                                         int n);
void                oil_vectoradd_s_u16                 (uint16_t *d,
                                                         int dstr,
                                                         const uint16_t *s1,
                                                         int sstr1,
                                                         const uint16_t *s2,
                                                         int sstr2,
                                                         int n);
void                oil_vectoradd_s_f32                 (float *d,
                                                         int dstr,
                                                         const float *s1,
                                                         int sstr1,
                                                         const float *s2,
                                                         int sstr2,
                                                         int n);
void                oil_vectoradd_s_f64                 (double *d,
                                                         int dstr,
                                                         const double *s1,
                                                         int sstr1,
                                                         const double *s2,
                                                         int sstr2,
                                                         int n);
void                oil_squaresum_f64                   (double *d,
                                                         const double *s,
                                                         int n);
void                oil_squaresum_shifted_s16           (uint32_t *d,
                                                         const int16_t *s,
                                                         int n);
void                oil_sum_f64                         (double *d_1,
                                                         const double *s,
                                                         int sstr,
                                                         int n);
void                oil_add_f32                         (float *d,
                                                         const float *s1,
                                                         const float *s2,
                                                         int n);
void                oil_divide_f32                      (float *d,
                                                         const float *s1,
                                                         const float *s2,
                                                         int n);
void                oil_floor_f32                       (float *d,
                                                         const float *s,
                                                         int n);
void                oil_inverse_f32                     (float *d,
                                                         const float *s,
                                                         int n);
void                oil_maximum_f32                     (float *d,
                                                         const float *s1,
                                                         const float *s2,
                                                         int n);
void                oil_minimum_f32                     (float *d,
                                                         const float *s1,
                                                         const float *s2,
                                                         int n);
void                oil_multiply_f32                    (float *d,
                                                         const float *s1,
                                                         const float *s2,
                                                         int n);
void                oil_negative_f32                    (float *d,
                                                         const float *s,
                                                         int n);
void                oil_scalaradd_f32_ns                (float *d,
                                                         const float *s1,
                                                         const float *s2_1,
                                                         int n);
void                oil_scalarmultiply_f32_ns           (float *d,
                                                         const float *s1,
                                                         const float *s2_1,
                                                         int n);
void                oil_sign_f32                        (float *d,
                                                         const float *s,
                                                         int n);
void                oil_subtract_f32                    (float *d,
                                                         const float *s1,
                                                         const float *s2,
                                                         int n);

Description

Details

oil_abs_f32_f32 ()

void                oil_abs_f32_f32                     (float *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n);

Calculates the absolute value of each element in the source array and writes it into the destination array.

dest :

destination array

dstr :

stride of destination elements

src :

source array

sstr :

stride of source elements

n :

number of elements in arrays

oil_abs_f64_f64 ()

void                oil_abs_f64_f64                     (double *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n);

Calculates the absolute value of each element in the source array and writes it into the destination array.

dest :

destination array

dstr :

stride of destination elements

src :

source array

sstr :

stride of source elements

n :

number of elements in arrays

oil_abs_u16_s16 ()

void                oil_abs_u16_s16                     (uint16_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n);

Calculates the absolute value of each element in the source array and writes it into the destination array.

dest :

destination array

dstr :

stride of destination elements

src :

source array

sstr :

stride of source elements

n :

number of elements in arrays

oil_abs_u32_s32 ()

void                oil_abs_u32_s32                     (uint32_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n);

Calculates the absolute value of each element in the source array and writes it into the destination array.

dest :

destination array

dstr :

stride of destination elements

src :

source array

sstr :

stride of source elements

n :

number of elements in arrays

oil_abs_u8_s8 ()

void                oil_abs_u8_s8                       (uint8_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n);

Calculates the absolute value of each element in the source array and writes it into the destination array.

dest :

destination array

dstr :

stride of destination elements

src :

source array

sstr :

stride of source elements

n :

number of elements in arrays

oil_average2_u8 ()

void                oil_average2_u8                     (uint8_t *d,
                                                         int dstr,
                                                         const uint8_t *s1,
                                                         int sstr1,
                                                         const uint8_t *s2,
                                                         int sstr2,
                                                         int n);

Averages each element in s1 and s2 and places the result in d.

FIXME: This class is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr1 :

s2 :

sstr2 :

n :


oil_multsum_f32 ()

void                oil_multsum_f32                     (float *dest,
                                                         const float *src1,
                                                         int sstr1,
                                                         const float *src2,
                                                         int sstr2,
                                                         int n);

Multiplies each element in src1 and src2 and sums the results over the entire array, and places the sum into dest.

dest :

src1 :

sstr1 :

src2 :

sstr2 :

n :


oil_multsum_f64 ()

void                oil_multsum_f64                     (double *dest,
                                                         const double *src1,
                                                         int sstr1,
                                                         const double *src2,
                                                         int sstr2,
                                                         int n);

Multiplies each element in src1 and src2 and sums the results over the entire array, and places the sum into dest.

dest :

src1 :

sstr1 :

src2 :

sstr2 :

n :


oil_scalaradd_f32 ()

void                oil_scalaradd_f32                   (float *d,
                                                         int dstr,
                                                         const float *s1,
                                                         int sstr,
                                                         const float *s2_1,
                                                         int n);

Adds the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_scalaradd_f64 ()

void                oil_scalaradd_f64                   (double *d,
                                                         int dstr,
                                                         const double *s1,
                                                         int sstr,
                                                         const double *s2_1,
                                                         int n);

Adds the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_scalaradd_s16 ()

void                oil_scalaradd_s16                   (int16_t *d,
                                                         int dstr,
                                                         const int16_t *s1,
                                                         int sstr,
                                                         const int16_t *s2_1,
                                                         int n);

Adds the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_scalaradd_s32 ()

void                oil_scalaradd_s32                   (int32_t *d,
                                                         int dstr,
                                                         const int32_t *s1,
                                                         int sstr,
                                                         const int32_t *s2_1,
                                                         int n);

Adds the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_scalaradd_s8 ()

void                oil_scalaradd_s8                    (int8_t *d,
                                                         int dstr,
                                                         const int8_t *s1,
                                                         int sstr,
                                                         const int8_t *s2_1,
                                                         int n);

Adds the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_scalaradd_u16 ()

void                oil_scalaradd_u16                   (uint16_t *d,
                                                         int dstr,
                                                         const uint16_t *s1,
                                                         int sstr,
                                                         const uint16_t *s2_1,
                                                         int n);

Adds the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_scalaradd_u32 ()

void                oil_scalaradd_u32                   (uint32_t *d,
                                                         int dstr,
                                                         const uint32_t *s1,
                                                         int sstr,
                                                         const uint32_t *s2_1,
                                                         int n);

Adds the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_scalaradd_u8 ()

void                oil_scalaradd_u8                    (uint8_t *d,
                                                         int dstr,
                                                         const uint8_t *s1,
                                                         int sstr,
                                                         const uint8_t *s2_1,
                                                         int n);

Adds the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_scalarmult_f32 ()

void                oil_scalarmult_f32                  (float *d,
                                                         int dstr,
                                                         const float *s1,
                                                         int sstr,
                                                         const float *s2_1,
                                                         int n);

Multiplies the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_scalarmult_f64 ()

void                oil_scalarmult_f64                  (double *d,
                                                         int dstr,
                                                         const double *s1,
                                                         int sstr,
                                                         const double *s2_1,
                                                         int n);

Multiplies the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_scalarmult_s16 ()

void                oil_scalarmult_s16                  (int16_t *d,
                                                         int dstr,
                                                         const int16_t *s1,
                                                         int sstr,
                                                         const int16_t *s2_1,
                                                         int n);

Multiplies the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_scalarmult_s32 ()

void                oil_scalarmult_s32                  (int32_t *d,
                                                         int dstr,
                                                         const int32_t *s1,
                                                         int sstr,
                                                         const int32_t *s2_1,
                                                         int n);

Multiplies the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_scalarmult_s8 ()

void                oil_scalarmult_s8                   (int8_t *d,
                                                         int dstr,
                                                         const int8_t *s1,
                                                         int sstr,
                                                         const int8_t *s2_1,
                                                         int n);

Multiplies the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_scalarmult_u16 ()

void                oil_scalarmult_u16                  (uint16_t *d,
                                                         int dstr,
                                                         const uint16_t *s1,
                                                         int sstr,
                                                         const uint16_t *s2_1,
                                                         int n);

Multiplies the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_scalarmult_u32 ()

void                oil_scalarmult_u32                  (uint32_t *d,
                                                         int dstr,
                                                         const uint32_t *s1,
                                                         int sstr,
                                                         const uint32_t *s2_1,
                                                         int n);

Multiplies the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_scalarmult_u8 ()

void                oil_scalarmult_u8                   (uint8_t *d,
                                                         int dstr,
                                                         const uint8_t *s1,
                                                         int sstr,
                                                         const uint8_t *s2_1,
                                                         int n);

Multiplies the constant value s2_1 to each value in s1 and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr :

s2_1 :

n :


oil_vectoradd_f32 ()

void                oil_vectoradd_f32                   (float *d,
                                                         int dstr,
                                                         const float *s1,
                                                         int sstr1,
                                                         const float *s2,
                                                         int sstr2,
                                                         int n,
                                                         const float *s3_1,
                                                         const float *s4_1);

Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr1 :

s2 :

sstr2 :

n :

s3_1 :

s4_1 :


oil_vectoradd_f64 ()

void                oil_vectoradd_f64                   (double *d,
                                                         int dstr,
                                                         const double *s1,
                                                         int sstr1,
                                                         const double *s2,
                                                         int sstr2,
                                                         int n,
                                                         const double *s3_1,
                                                         const double *s4_1);

Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr1 :

s2 :

sstr2 :

n :

s3_1 :

s4_1 :


oil_vectoradd_s16 ()

void                oil_vectoradd_s16                   (int16_t *d,
                                                         int dstr,
                                                         const int16_t *s1,
                                                         int sstr1,
                                                         const int16_t *s2,
                                                         int sstr2,
                                                         int n,
                                                         const int16_t *s3_1,
                                                         const int16_t *s4_1);

Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr1 :

s2 :

sstr2 :

n :

s3_1 :

s4_1 :


oil_vectoradd_s32 ()

void                oil_vectoradd_s32                   (int32_t *d,
                                                         int dstr,
                                                         const int32_t *s1,
                                                         int sstr1,
                                                         const int32_t *s2,
                                                         int sstr2,
                                                         int n,
                                                         const int32_t *s3_1,
                                                         const int32_t *s4_1);

Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr1 :

s2 :

sstr2 :

n :

s3_1 :

s4_1 :


oil_vectoradd_s8 ()

void                oil_vectoradd_s8                    (int8_t *d,
                                                         int dstr,
                                                         const int8_t *s1,
                                                         int sstr1,
                                                         const int8_t *s2,
                                                         int sstr2,
                                                         int n,
                                                         const int8_t *s3_1,
                                                         const int8_t *s4_1);

Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr1 :

s2 :

sstr2 :

n :

s3_1 :

s4_1 :


oil_vectoradd_u16 ()

void                oil_vectoradd_u16                   (uint16_t *d,
                                                         int dstr,
                                                         const uint16_t *s1,
                                                         int sstr1,
                                                         const uint16_t *s2,
                                                         int sstr2,
                                                         int n,
                                                         const uint16_t *s3_1,
                                                         const uint16_t *s4_1);

Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr1 :

s2 :

sstr2 :

n :

s3_1 :

s4_1 :


oil_vectoradd_u32 ()

void                oil_vectoradd_u32                   (uint32_t *d,
                                                         int dstr,
                                                         const uint32_t *s1,
                                                         int sstr1,
                                                         const uint32_t *s2,
                                                         int sstr2,
                                                         int n,
                                                         const uint32_t *s3_1,
                                                         const uint32_t *s4_1);

Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr1 :

s2 :

sstr2 :

n :

s3_1 :

s4_1 :


oil_vectoradd_u8 ()

void                oil_vectoradd_u8                    (uint8_t *d,
                                                         int dstr,
                                                         const uint8_t *s1,
                                                         int sstr1,
                                                         const uint8_t *s2,
                                                         int sstr2,
                                                         int n,
                                                         const uint8_t *s3_1,
                                                         const uint8_t *s4_1);

Multiplies the constant s3_1 with each element of s1 and multiplies the constant s4_1 with each element of s2 and adds the two results together and places the final result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr1 :

s2 :

sstr2 :

n :

s3_1 :

s4_1 :


oil_vectoradd_s_s8 ()

void                oil_vectoradd_s_s8                  (int8_t *d,
                                                         int dstr,
                                                         const int8_t *s1,
                                                         int sstr1,
                                                         const int8_t *s2,
                                                         int sstr2,
                                                         int n);

Adds each element of s1 to s2 and clamps the result to the range of the type and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr1 :

s2 :

sstr2 :

n :


oil_vectoradd_s_u8 ()

void                oil_vectoradd_s_u8                  (uint8_t *d,
                                                         int dstr,
                                                         const uint8_t *s1,
                                                         int sstr1,
                                                         const uint8_t *s2,
                                                         int sstr2,
                                                         int n);

Adds each element of s1 to s2 and clamps the result to the range of the type and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr1 :

s2 :

sstr2 :

n :


oil_vectoradd_s_s16 ()

void                oil_vectoradd_s_s16                 (int16_t *d,
                                                         int dstr,
                                                         const int16_t *s1,
                                                         int sstr1,
                                                         const int16_t *s2,
                                                         int sstr2,
                                                         int n);

Adds each element of s1 to s2 and clamps the result to the range of the type and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr1 :

s2 :

sstr2 :

n :


oil_vectoradd_s_u16 ()

void                oil_vectoradd_s_u16                 (uint16_t *d,
                                                         int dstr,
                                                         const uint16_t *s1,
                                                         int sstr1,
                                                         const uint16_t *s2,
                                                         int sstr2,
                                                         int n);

Adds each element of s1 to s2 and clamps the result to the range of the type and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr1 :

s2 :

sstr2 :

n :


oil_vectoradd_s_f32 ()

void                oil_vectoradd_s_f32                 (float *d,
                                                         int dstr,
                                                         const float *s1,
                                                         int sstr1,
                                                         const float *s2,
                                                         int sstr2,
                                                         int n);

Adds each element of s1 to s2 and clamps the result to the range [-1,1] and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr1 :

s2 :

sstr2 :

n :


oil_vectoradd_s_f64 ()

void                oil_vectoradd_s_f64                 (double *d,
                                                         int dstr,
                                                         const double *s1,
                                                         int sstr1,
                                                         const double *s2,
                                                         int sstr2,
                                                         int n);

Adds each element of s1 to s2 and clamps the result to the range [-1,1] and places the result in d.

FIXME: This function is difficult to optimize and will likely be replaced.

d :

dstr :

s1 :

sstr1 :

s2 :

sstr2 :

n :


oil_squaresum_f64 ()

void                oil_squaresum_f64                   (double *d,
                                                         const double *s,
                                                         int n);

Sums the square of each element in s and places the result in dest.

d :

s :

n :


oil_squaresum_shifted_s16 ()

void                oil_squaresum_shifted_s16           (uint32_t *d,
                                                         const int16_t *s,
                                                         int n);

Square each element in s and divide by (1<<15), and sum the results, placing the final result in d.

d :

s :

n :


oil_sum_f64 ()

void                oil_sum_f64                         (double *d_1,
                                                         const double *s,
                                                         int sstr,
                                                         int n);

Sums the elements in the source array and places the result in d.

d_1 :

destination

s :

source array

sstr :

stride of source elements

n :

number of elements

oil_add_f32 ()

void                oil_add_f32                         (float *d,
                                                         const float *s1,
                                                         const float *s2,
                                                         int n);

Adds elements in s2 and s1 and places the result in d.

d :

destination

s1 :

source 1

s2 :

source 2

n :

number of elements

oil_divide_f32 ()

void                oil_divide_f32                      (float *d,
                                                         const float *s1,
                                                         const float *s2,
                                                         int n);

Divides elements in s1 by s2 and places the result in d.

d :

destination

s1 :

source 1

s2 :

source 2

n :

number of elements

oil_floor_f32 ()

void                oil_floor_f32                       (float *d,
                                                         const float *s,
                                                         int n);

Calculates the greatest integer less than or equal to each element in s and places the result in d.

d :

destination

s :

source

n :

number of elements

oil_inverse_f32 ()

void                oil_inverse_f32                     (float *d,
                                                         const float *s,
                                                         int n);

Calculates the multiplicative inverse of each element in s and places the result in d.

d :

destination

s :

source

n :

number of elements

oil_maximum_f32 ()

void                oil_maximum_f32                     (float *d,
                                                         const float *s1,
                                                         const float *s2,
                                                         int n);

Places the greater of s1 and s2 in d.

d :

destination

s1 :

source 1

s2 :

source 2

n :

number of elements

oil_minimum_f32 ()

void                oil_minimum_f32                     (float *d,
                                                         const float *s1,
                                                         const float *s2,
                                                         int n);

Places the lesser of s1 and s2 in d.

d :

destination

s1 :

source 1

s2 :

source 2

n :

number of elements

oil_multiply_f32 ()

void                oil_multiply_f32                    (float *d,
                                                         const float *s1,
                                                         const float *s2,
                                                         int n);

Multiplies elements in s1 and s2 and places the result in d.

d :

destination

s1 :

source 1

s2 :

source 2

n :

number of elements

oil_negative_f32 ()

void                oil_negative_f32                    (float *d,
                                                         const float *s,
                                                         int n);

Negates each element in s and places the result in d.

d :

destination

s :

source

n :

number of elements

oil_scalaradd_f32_ns ()

void                oil_scalaradd_f32_ns                (float *d,
                                                         const float *s1,
                                                         const float *s2_1,
                                                         int n);

Adds the constant value s2_1 to each source element and places the result in d.

d :

destination

s1 :

source

s2_1 :

source

n :

number of elements

oil_scalarmultiply_f32_ns ()

void                oil_scalarmultiply_f32_ns           (float *d,
                                                         const float *s1,
                                                         const float *s2_1,
                                                         int n);

Multiplies the constant value s2_1 and each source element and places the result in d.

d :

destination

s1 :

source

s2_1 :

source

n :

number of elements

oil_sign_f32 ()

void                oil_sign_f32                        (float *d,
                                                         const float *s,
                                                         int n);

Calculates the sign of each element in s and places the result in d.

d :

destination

s :

source

n :

number of elements

oil_subtract_f32 ()

void                oil_subtract_f32                    (float *d,
                                                         const float *s1,
                                                         const float *s2,
                                                         int n);

Subtracts elements in s2 from s1 and places the result in d.

d :

destination

s1 :

source 1

s2 :

source 2

n :

number of elements
liboil-0.3.17/doc/html/liboil-liboilfuncs-pixel.html0000644000175000017500000014017311332637400017301 00000000000000 Pixel Operations

Pixel Operations

Pixel Operations — Operations on pixels

Synopsis

void                oil_argb_paint_u8                   (uint8_t *i_4xn,
                                                         const uint8_t *s1_4,
                                                         const uint8_t *s2_n,
                                                         int n);
void                oil_ayuv2argb_u8                    (uint8_t *d_4xn,
                                                         const uint8_t *s_4xn,
                                                         int n);
void                oil_ayuv2uyvy                       (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         int n);
void                oil_ayuv2yuyv                       (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         int n);
void                oil_ayuv2yvyu                       (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         int n);
void                oil_composite_add_argb              (uint32_t *i_n,
                                                         const uint32_t *s1_n,
                                                         int n);
void                oil_composite_add_argb_const_src    (uint32_t *i_n,
                                                         const uint32_t *s1_1,
                                                         int n);
void                oil_composite_in_argb               (uint32_t *d_n,
                                                         const uint32_t *s1_n,
                                                         const uint8_t *s2_n,
                                                         int n);
void                oil_composite_in_argb_const_mask    (uint32_t *d_n,
                                                         const uint32_t *s1_n,
                                                         const uint8_t *s2_1,
                                                         int n);
void                oil_composite_in_argb_const_src     (uint32_t *d_n,
                                                         const uint32_t *s1_1,
                                                         const uint8_t *s2_n,
                                                         int n);
void                oil_composite_in_over_argb          (uint32_t *i_n,
                                                         const uint32_t *s1_n,
                                                         const uint8_t *s2_n,
                                                         int n);
void                oil_composite_in_over_argb_const_mask
                                                        (uint32_t *i_n,
                                                         const uint32_t *s1_n,
                                                         const uint8_t *s2_1,
                                                         int n);
void                oil_composite_in_over_argb_const_src
                                                        (uint32_t *i_n,
                                                         const uint32_t *s1_1,
                                                         const uint8_t *s2_n,
                                                         int n);
void                oil_composite_over_argb             (uint32_t *i_n,
                                                         const uint32_t *s1_n,
                                                         int n);
void                oil_composite_over_argb_const_src   (uint32_t *i_n,
                                                         const uint32_t *s1_1,
                                                         int n);
void                oil_merge_linear_argb               (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         const uint32_t *s2_n,
                                                         const uint32_t *s3_1,
                                                         int n);
void                oil_resample_linear_argb            (uint32_t *d_n,
                                                         const uint32_t *s_2xn,
                                                         int n,
                                                         uint32_t *i_2);
void                oil_resample_linear_u8              (uint8_t *d_n,
                                                         const uint8_t *s_2xn,
                                                         int n,
                                                         uint32_t *i_2);
void                oil_rgb2bgr                         (uint8_t *d_3xn,
                                                         const uint8_t *s_3xn,
                                                         int n);
void                oil_rgb2rgba                        (uint8_t *d_4xn,
                                                         const uint8_t *s_3xn,
                                                         int n);
void                oil_yuv2rgbx_sub2_u8                (uint8_t *d_4xn,
                                                         const uint8_t *src1,
                                                         const uint8_t *src2,
                                                         const uint8_t *src3,
                                                         int n);
void                oil_yuv2rgbx_sub4_u8                (uint8_t *d_4xn,
                                                         const uint8_t *src1,
                                                         const uint8_t *src2,
                                                         const uint8_t *src3,
                                                         int n);
void                oil_yuv2rgbx_u8                     (uint8_t *d_4xn,
                                                         const uint8_t *src1,
                                                         const uint8_t *src2,
                                                         const uint8_t *src3,
                                                         int n);
void                oil_uyvy2ayuv                       (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         int n);
void                oil_yuyv2ayuv                       (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         int n);
void                oil_yvyu2ayuv                       (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         int n);

Description

Pixels are 4-element arrays of type uint8_t. The elements, in memory order, represent the alpha, red, green, and blue components respectively. The color components are premultiplied with the alpha component. Liboil functions represent pixels as the type uint32_t.

The compositing operators IN, OVER, and ADD are defined the same as cairo.

Details

oil_argb_paint_u8 ()

void                oil_argb_paint_u8                   (uint8_t *i_4xn,
                                                         const uint8_t *s1_4,
                                                         const uint8_t *s2_n,
                                                         int n);

Composites source color onto in-place array according to the alpha array.

Deprecated.

i_4xn :

array

s1_4 :

source color

s2_n :

source alpha array

n :

number of elements

oil_ayuv2argb_u8 ()

void                oil_ayuv2argb_u8                    (uint8_t *d_4xn,
                                                         const uint8_t *s_4xn,
                                                         int n);

Converts AYUV pixels to ARGB pixels. AYUV pixels are in the JPEG colorspace. Note that this function doesn't follow normal liboil pixel conventions.

(This function should be replaced by one that handles other conversion factors.)

d_4xn :

s_4xn :

n :


oil_ayuv2uyvy ()

void                oil_ayuv2uyvy                       (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         int n);

Converts pixels in AYUV format to UYVY. Note that only approximately half of the destination array is written. Alpha values are ignored.

d_n :

s_n :

n:

n :


oil_ayuv2yuyv ()

void                oil_ayuv2yuyv                       (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         int n);

Converts pixels in AYUV format to YUYV. Note that only approximately half of the destination array is written. Alpha values are ignored.

d_n :

s_n :

n:

n :


oil_ayuv2yvyu ()

void                oil_ayuv2yvyu                       (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         int n);

Converts pixels in AYUV format to YVYU. Note that only approximately half of the destination array is written. Alpha values are ignored.

d_n :

s_n :

n:

n :


oil_composite_add_argb ()

void                oil_composite_add_argb              (uint32_t *i_n,
                                                         const uint32_t *s1_n,
                                                         int n);

Performs the compositing operation DEST = SRC ADD DEST.

i_n :

DEST

s1_n :

SRC

n :

number of elements

oil_composite_add_argb_const_src ()

void                oil_composite_add_argb_const_src    (uint32_t *i_n,
                                                         const uint32_t *s1_1,
                                                         int n);

Performs the compositing operation DEST = SRC ADD DEST, for a constant SRC.

i_n :

DEST

s1_1 :

SRC

n :

number of elements

oil_composite_in_argb ()

void                oil_composite_in_argb               (uint32_t *d_n,
                                                         const uint32_t *s1_n,
                                                         const uint8_t *s2_n,
                                                         int n);

Performs the compositing operation DEST = SRC IN MASK.

d_n :

DEST

s1_n :

SRC

s2_n :

MASK

n :

number of elements

oil_composite_in_argb_const_mask ()

void                oil_composite_in_argb_const_mask    (uint32_t *d_n,
                                                         const uint32_t *s1_n,
                                                         const uint8_t *s2_1,
                                                         int n);

Performs the compositing operation DEST = SRC IN MASK, for a constant MASK.

d_n :

DEST

s1_n :

SRC

s2_1 :

MASK

n :

number of elements

oil_composite_in_argb_const_src ()

void                oil_composite_in_argb_const_src     (uint32_t *d_n,
                                                         const uint32_t *s1_1,
                                                         const uint8_t *s2_n,
                                                         int n);

Performs the compositing operation DEST = SRC IN MASK, for a constant SRC.

d_n :

DEST

s1_1 :

SRC

s2_n :

MASK

n :

number of elements

oil_composite_in_over_argb ()

void                oil_composite_in_over_argb          (uint32_t *i_n,
                                                         const uint32_t *s1_n,
                                                         const uint8_t *s2_n,
                                                         int n);

Performs the compositing operation DEST = (SRC IN MASK) OVER DEST.

i_n :

DEST

s1_n :

SRC

s2_n :

MASK

n :

number of elements

oil_composite_in_over_argb_const_mask ()

void                oil_composite_in_over_argb_const_mask
                                                        (uint32_t *i_n,
                                                         const uint32_t *s1_n,
                                                         const uint8_t *s2_1,
                                                         int n);

Performs the compositing operation DEST = (SRC IN MASK) OVER DEST, for a constant MASK.

i_n :

DEST

s1_n :

SRC

s2_1 :

MASK

n :

number of elements

oil_composite_in_over_argb_const_src ()

void                oil_composite_in_over_argb_const_src
                                                        (uint32_t *i_n,
                                                         const uint32_t *s1_1,
                                                         const uint8_t *s2_n,
                                                         int n);

Performs the compositing operation DEST = (SRC IN MASK) OVER DEST, for a constant SRC.

i_n :

DEST

s1_1 :

SRC

s2_n :

MASK

n :

number of elements

oil_composite_over_argb ()

void                oil_composite_over_argb             (uint32_t *i_n,
                                                         const uint32_t *s1_n,
                                                         int n);

Performs the compositing operation DEST = SRC OVER DEST.

i_n :

DEST

s1_n :

SRC

n :

number of elements

oil_composite_over_argb_const_src ()

void                oil_composite_over_argb_const_src   (uint32_t *i_n,
                                                         const uint32_t *s1_1,
                                                         int n);

Performs the compositing operation DEST = SRC OVER DEST, for a constant SRC.

i_n :

DEST

s1_1 :

SRC

n :

number of elements

oil_merge_linear_argb ()

void                oil_merge_linear_argb               (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         const uint32_t *s2_n,
                                                         const uint32_t *s3_1,
                                                         int n);

Linearly interpolate the s_n and s2_n arrays using the scale factor in s3_1. The value s3_1 must be in the range [0, 256] A value of 0 indicates weights of 1.0 and 0.0 for the s_n and s2_n arrays respectively. A value of 256 indicates weights of 0.0 and 1.0 respectively.

This function is not intended for alpha blending; use one of the compositing functions instead.

d_n :

s_n :

s2_n :

s3_1 :

n :


oil_resample_linear_argb ()

void                oil_resample_linear_argb            (uint32_t *d_n,
                                                         const uint32_t *s_2xn,
                                                         int n,
                                                         uint32_t *i_2);

Linearly resamples a row of pixels. FIXME.

d_n :

s_2xn :

n :

i_2 :


oil_resample_linear_u8 ()

void                oil_resample_linear_u8              (uint8_t *d_n,
                                                         const uint8_t *s_2xn,
                                                         int n,
                                                         uint32_t *i_2);

Linearly resamples a row of pixels. FIXME.

d_n :

s_2xn :

n :

i_2 :


oil_rgb2bgr ()

void                oil_rgb2bgr                         (uint8_t *d_3xn,
                                                         const uint8_t *s_3xn,
                                                         int n);

Converts arrays of 24-bit RGB pixels from RGBRGBRGB ordering to BGRBGRBGR ordering (and vice-versa).

d_3xn :

s_3xn :

n :


oil_rgb2rgba ()

void                oil_rgb2rgba                        (uint8_t *d_4xn,
                                                         const uint8_t *s_3xn,
                                                         int n);

Converts arrays of 24-bit RGB pixels in RGBRGBRGB memory order to 32-bit RGBA pixels in RGBARGBA order.

d_4xn :

s_3xn :

n :


oil_yuv2rgbx_sub2_u8 ()

void                oil_yuv2rgbx_sub2_u8                (uint8_t *d_4xn,
                                                         const uint8_t *src1,
                                                         const uint8_t *src2,
                                                         const uint8_t *src3,
                                                         int n);

Converts YUV pixels to RGB pixels. Each YUV component is in a separate source array, and are combined and converted to RGB. The U and V arrays are subsampled by a factor of 2, so only half of each array is used.

This function should be replaced by one that makes sense.

d_4xn :

src1 :

Y component

src2 :

U component

src3 :

V component

n :


oil_yuv2rgbx_sub4_u8 ()

void                oil_yuv2rgbx_sub4_u8                (uint8_t *d_4xn,
                                                         const uint8_t *src1,
                                                         const uint8_t *src2,
                                                         const uint8_t *src3,
                                                         int n);

Converts YUV pixels to RGB pixels. Each YUV component is in a separate source array, and are combined and converted to RGB. The U and V arrays are subsampled by a factor of 4, so only a quarter of each array is used.

This function should be replaced by one that makes sense.

d_4xn :

src1 :

Y component

src2 :

U component

src3 :

V component

n :


oil_yuv2rgbx_u8 ()

void                oil_yuv2rgbx_u8                     (uint8_t *d_4xn,
                                                         const uint8_t *src1,
                                                         const uint8_t *src2,
                                                         const uint8_t *src3,
                                                         int n);

Converts YUV pixels to RGB pixels. Each YUV component is in a separate source array, and are combined and converted to RGB.

This function should be replaced by one that makes sense.

d_4xn :

src1 :

Y component

src2 :

U component

src3 :

V component

n :


oil_uyvy2ayuv ()

void                oil_uyvy2ayuv                       (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         int n);

Converts pixels in UYVY format to AYUV. Note that only approximately half of the source array is used. Alpha values are set to 255.

d_n :

s_n :

n:

n :


oil_yuyv2ayuv ()

void                oil_yuyv2ayuv                       (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         int n);

Converts pixels in YUYV format to AYUV. Note that only approximately half of the source array is used. Alpha values are set to 255.

d_n :

s_n :

n:

n :


oil_yvyu2ayuv ()

void                oil_yvyu2ayuv                       (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         int n);

Converts pixels in YVYU format to AYUV. Note that only approximately half of the source array is used. Alpha values are set to 255.

d_n :

s_n :

n:

n :

liboil-0.3.17/doc/html/liboil-liboilcpu.html0000644000175000017500000001054211332637400015627 00000000000000 CPU

CPU

CPU — Check the capabilities of the current CPU

Synopsis

unsigned int        oil_cpu_get_flags                   (void);
double              oil_cpu_get_ticks_per_second        (void);

Description

Details

oil_cpu_get_flags ()

unsigned int        oil_cpu_get_flags                   (void);

Returns a bitmask containing the available CPU features.

Returns :

the CPU features.

oil_cpu_get_ticks_per_second ()

double              oil_cpu_get_ticks_per_second        (void);

Returns the estimated number of ticks per second. This feature is currently unimplemented.

This function may take several milliseconds or more to execute in order to calculate a good estimate of the number of ticks (as measured by the profiling functions) per second. Note that the number of ticks per second is often dependent on the CPU frequency, which can change dynamically. Thus the value returned by this function may be incorrect as soon as it is returned.

Returns :

a double
liboil-0.3.17/doc/html/liboil-liboilfuncs-copy.html0000644000175000017500000015517711332637400017144 00000000000000 liboilfuncs-copy

liboilfuncs-copy

liboilfuncs-copy

Synopsis

void                oil_compare_u8                      (uint32_t *d_1,
                                                         const uint8_t *s1,
                                                         const uint8_t *s2,
                                                         int n);
void                oil_copy_u8                         (uint8_t *dest,
                                                         const uint8_t *src,
                                                         int n);
void                oil_permute_f32                     (float *dest,
                                                         int dstr,
                                                         const float *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);
void                oil_permute_f64                     (double *dest,
                                                         int dstr,
                                                         const double *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);
void                oil_permute_s16                     (int16_t *dest,
                                                         int dstr,
                                                         const int16_t *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);
void                oil_permute_s32                     (int32_t *dest,
                                                         int dstr,
                                                         const int32_t *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);
void                oil_permute_s8                      (int8_t *dest,
                                                         int dstr,
                                                         const int8_t *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);
void                oil_permute_u16                     (uint16_t *dest,
                                                         int dstr,
                                                         const uint16_t *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);
void                oil_permute_u32                     (uint32_t *dest,
                                                         int dstr,
                                                         const uint32_t *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);
void                oil_permute_u8                      (uint8_t *dest,
                                                         int dstr,
                                                         const uint8_t *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);
void                oil_splat_u32                       (uint32_t *dest,
                                                         int dstr,
                                                         const uint32_t *s1_1,
                                                         int n);
void                oil_splat_u8                        (uint8_t *dest,
                                                         int dstr,
                                                         const uint8_t *s1_1,
                                                         int n);
void                oil_swab_u16                        (uint16_t *d_n,
                                                         const uint16_t *s_n,
                                                         int n);
void                oil_swab_u32                        (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         int n);
void                oil_tablelookup_u8                  (uint8_t *d,
                                                         int ds,
                                                         const uint8_t *s1,
                                                         int ss1,
                                                         const uint8_t *s2_256,
                                                         int ss2,
                                                         int n);
void                oil_testzero_u8                     (uint32_t *d_1,
                                                         const uint8_t *s,
                                                         int n);
void                oil_trans8x8_f64                    (double *d_8x8,
                                                         int ds,
                                                         const double *s_8x8,
                                                         int ss);
void                oil_trans8x8_u16                    (uint16_t *d_8x8,
                                                         int ds,
                                                         const uint16_t *s_8x8,
                                                         int ss);
void                oil_trans8x8_u32                    (uint32_t *d_8x8,
                                                         int ds,
                                                         const uint32_t *s_8x8,
                                                         int ss);
void                oil_trans8x8_u8                     (uint8_t *d_8x8,
                                                         int ds,
                                                         const uint8_t *s_8x8,
                                                         int ss);
void                oil_unzigzag8x8_s16                 (int16_t *d_8x8,
                                                         int ds,
                                                         const int16_t *s_8x8,
                                                         int ss);
void                oil_zigzag8x8_s16                   (int16_t *d_8x8,
                                                         int ds,
                                                         const int16_t *s_8x8,
                                                         int ss);
void                oil_splat_u32_ns                    (uint32_t *dest,
                                                         const uint32_t *s1_1,
                                                         int n);
void                oil_splat_u8_ns                     (uint8_t *dest,
                                                         const uint8_t *s1_1,
                                                         int n);
#define             oil_trans8x8_s16                    (dest, dstr, src, sstr)
#define             oil_memcpy                          (dest,src,n_bytes)

Description

Details

oil_compare_u8 ()

void                oil_compare_u8                      (uint32_t *d_1,
                                                         const uint8_t *s1,
                                                         const uint8_t *s2,
                                                         int n);

Compares two arrays. The index of the first two elements that are unequal is written into dest. If all elements are equal, n is written into dest.

d_1 :

destination array

s1 :

source array

s2 :

source array

n :

number of elements

oil_copy_u8 ()

void                oil_copy_u8                         (uint8_t *dest,
                                                         const uint8_t *src,
                                                         int n);

Copies from source to destination.

dest :

destination array

src :

source array

n :

number of elements

oil_permute_f32 ()

void                oil_permute_f32                     (float *dest,
                                                         int dstr,
                                                         const float *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);

Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n.

dest :

dstr :

src1 :

sstr1 :

src2 :

sstr2 :

n :


oil_permute_f64 ()

void                oil_permute_f64                     (double *dest,
                                                         int dstr,
                                                         const double *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);

Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n.

dest :

dstr :

src1 :

sstr1 :

src2 :

sstr2 :

n :


oil_permute_s16 ()

void                oil_permute_s16                     (int16_t *dest,
                                                         int dstr,
                                                         const int16_t *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);

Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n.

dest :

dstr :

src1 :

sstr1 :

src2 :

sstr2 :

n :


oil_permute_s32 ()

void                oil_permute_s32                     (int32_t *dest,
                                                         int dstr,
                                                         const int32_t *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);

Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n.

dest :

dstr :

src1 :

sstr1 :

src2 :

sstr2 :

n :


oil_permute_s8 ()

void                oil_permute_s8                      (int8_t *dest,
                                                         int dstr,
                                                         const int8_t *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);

Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n.

dest :

dstr :

src1 :

sstr1 :

src2 :

sstr2 :

n :


oil_permute_u16 ()

void                oil_permute_u16                     (uint16_t *dest,
                                                         int dstr,
                                                         const uint16_t *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);

Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n.

dest :

dstr :

src1 :

sstr1 :

src2 :

sstr2 :

n :


oil_permute_u32 ()

void                oil_permute_u32                     (uint32_t *dest,
                                                         int dstr,
                                                         const uint32_t *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);

Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n.

dest :

dstr :

src1 :

sstr1 :

src2 :

sstr2 :

n :


oil_permute_u8 ()

void                oil_permute_u8                      (uint8_t *dest,
                                                         int dstr,
                                                         const uint8_t *src1,
                                                         int sstr1,
                                                         const int32_t *src2,
                                                         int sstr2,
                                                         int n);

Copies elements in src1 to dest, permuting them by src2. That is, dest[i] is set to src1[src2[i]]. Values in src2 must be non-negative and less than n.

dest :

dstr :

src1 :

sstr1 :

src2 :

sstr2 :

n :


oil_splat_u32 ()

void                oil_splat_u32                       (uint32_t *dest,
                                                         int dstr,
                                                         const uint32_t *s1_1,
                                                         int n);

Copies the constant source value s1_1 to each element in dest.

dest :

dstr :

s1_1 :

n :


oil_splat_u8 ()

void                oil_splat_u8                        (uint8_t *dest,
                                                         int dstr,
                                                         const uint8_t *s1_1,
                                                         int n);

Copies the constant source value s1_1 to each element in dest.

dest :

dstr :

s1_1 :

n :


oil_swab_u16 ()

void                oil_swab_u16                        (uint16_t *d_n,
                                                         const uint16_t *s_n,
                                                         int n);

Swaps the endianness of values in the source array and places the results in the destination array. The arguments s_n and d_n may be equal.

d_n :

s_n :

n:

n :


oil_swab_u32 ()

void                oil_swab_u32                        (uint32_t *d_n,
                                                         const uint32_t *s_n,
                                                         int n);

Swaps the endianness of values in the source array and places the results in the destination array. The arguments s_n and d_n may be equal.

d_n :

s_n :

n:

n :


oil_tablelookup_u8 ()

void                oil_tablelookup_u8                  (uint8_t *d,
                                                         int ds,
                                                         const uint8_t *s1,
                                                         int ss1,
                                                         const uint8_t *s2_256,
                                                         int ss2,
                                                         int n);

Looks up each element in s1 using the lookup table in s2_256, and places the table value in d.

d :

ds :

s1 :

ss1 :

s2_256 :

ss2 :

n :


oil_testzero_u8 ()

void                oil_testzero_u8                     (uint32_t *d_1,
                                                         const uint8_t *s,
                                                         int n);

Tests each element in the source array for equality with 0. The index of the first zero element is written into dest. If all elements are non-zero, n is written into dest.

This function is roughly equivalent to strnlen(). One notable difference is that implementations of this function may legally read past the zero byte.

d_1 :

destination array

s :

source array

n :

number of elements

oil_trans8x8_f64 ()

void                oil_trans8x8_f64                    (double *d_8x8,
                                                         int ds,
                                                         const double *s_8x8,
                                                         int ss);

Performs a matrix transpose the 8x8 block represented by s_8x8 and places the result in d_8x8.

d_8x8 :

ds :

s_8x8 :

ss :


oil_trans8x8_u16 ()

void                oil_trans8x8_u16                    (uint16_t *d_8x8,
                                                         int ds,
                                                         const uint16_t *s_8x8,
                                                         int ss);

Performs a matrix transpose the 8x8 block represented by s_8x8 and places the result in d_8x8. Note that this function can also be used for any type of this size.

d_8x8 :

ds :

s_8x8 :

ss :


oil_trans8x8_u32 ()

void                oil_trans8x8_u32                    (uint32_t *d_8x8,
                                                         int ds,
                                                         const uint32_t *s_8x8,
                                                         int ss);

Performs a matrix transpose the 8x8 block represented by s_8x8 and places the result in d_8x8. Note that this function can also be used for any type of this size.

d_8x8 :

ds :

s_8x8 :

ss :


oil_trans8x8_u8 ()

void                oil_trans8x8_u8                     (uint8_t *d_8x8,
                                                         int ds,
                                                         const uint8_t *s_8x8,
                                                         int ss);

Performs a matrix transpose the 8x8 block represented by s_8x8 and places the result in d_8x8. Note that this function can also be used for any type of this size.

d_8x8 :

ds :

s_8x8 :

ss :


oil_unzigzag8x8_s16 ()

void                oil_unzigzag8x8_s16                 (int16_t *d_8x8,
                                                         int ds,
                                                         const int16_t *s_8x8,
                                                         int ss);

Reorders an 8x8 block to reverse the zig-zag reordering of oil_zigzag8x8_s16.

d_8x8 :

ds :

s_8x8 :

ss :


oil_zigzag8x8_s16 ()

void                oil_zigzag8x8_s16                   (int16_t *d_8x8,
                                                         int ds,
                                                         const int16_t *s_8x8,
                                                         int ss);

Reorders an 8x8 block using a zig-zag pattern. The zig-zag pattern is described in the JPEG specification.

FIXME: describe zigzag pattern

d_8x8 :

ds :

s_8x8 :

ss :


oil_splat_u32_ns ()

void                oil_splat_u32_ns                    (uint32_t *dest,
                                                         const uint32_t *s1_1,
                                                         int n);

Copies the constant source value s1_1 to each element in dest.

dest :

s1_1 :

n :


oil_splat_u8_ns ()

void                oil_splat_u8_ns                     (uint8_t *dest,
                                                         const uint8_t *s1_1,
                                                         int n);

Copies the constant source value s1_1 to each element in dest.

dest :

s1_1 :

n :


oil_trans8x8_s16()

#define             oil_trans8x8_s16(dest, dstr, src, sstr)

Macro wrapping trans8x8_u16().

dest :

dstr :

src :

sstr :


oil_memcpy()

#define             oil_memcpy(dest,src,n_bytes)

Macro that uses oil_copy_u8() to provide an implementation of memcpy(). Note that oil_copy_u8() is optimized for short copies, and may be very slow for large copies compared to alternatives, including the system memcpy().

dest :

src :

n_bytes :

liboil-0.3.17/doc/html/liboil-liboilfuncs-doc.html0000644000175000017500000021472511332637400016732 00000000000000 liboilfuncs-doc

liboilfuncs-doc

liboilfuncs-doc

Synopsis

void                oil_clip_f32                        (float *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n,
                                                         const float *s2_1,
                                                         const float *s3_1);
void                oil_clip_f64                        (double *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);
void                oil_clip_s16                        (int16_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n,
                                                         const int16_t *s2_1,
                                                         const int16_t *s3_1);
void                oil_clip_s32                        (int32_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n,
                                                         const int32_t *s2_1,
                                                         const int32_t *s3_1);
void                oil_clip_s8                         (int8_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n,
                                                         const int8_t *s2_1,
                                                         const int8_t *s3_1);
void                oil_clip_u16                        (uint16_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n,
                                                         const uint16_t *s2_1,
                                                         const uint16_t *s3_1);
void                oil_clip_u32                        (uint32_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n,
                                                         const uint32_t *s2_1,
                                                         const uint32_t *s3_1);
void                oil_clip_u8                         (uint8_t *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n,
                                                         const uint8_t *s2_1,
                                                         const uint8_t *s3_1);
void                oil_dequantize8x8_s16               (int16_t *d_8x8,
                                                         int dstr,
                                                         const int16_t *s1_8x8,
                                                         int sstr1,
                                                         const int16_t *s2_8x8,
                                                         int sstr2);
void                oil_diffsquaresum_f64               (double *d_1,
                                                         const double *src1,
                                                         int sstr1,
                                                         const double *src2,
                                                         int sstr2,
                                                         int n);
void                oil_md5                             (uint32_t *i_4,
                                                         const uint32_t *s_16);
void                oil_mix_u8                          (uint8_t *dest,
                                                         const uint8_t *src1,
                                                         const uint8_t *src2,
                                                         const uint8_t *src3,
                                                         int n);
void                oil_null                            (void);
void                oil_scanlinescale2_u8               (uint8_t *d,
                                                         const uint8_t *s,
                                                         int n);
void                oil_sincos_f64                      (double *dest1,
                                                         double *dest2,
                                                         int n,
                                                         const double *s1_1,
                                                         const double *s2_1);
void                oil_utf8_validate                   (int32_t *d_1,
                                                         const uint8_t *s,
                                                         int n);
void                oil_diff8x8_s16_u8                  (int16_t *d_8x8,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         int ss2);
void                oil_diff8x8_average_s16_u8          (int16_t *d_8x8,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         int ss2,
                                                         const uint8_t *s3_8x8,
                                                         int ss3);
void                oil_err_inter8x8_u8_avg             (uint32_t *d_1,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         const uint8_t *s3_8x8,
                                                         int ss2);
void                oil_recon8x8_inter                  (uint8_t *d_8x8,
                                                         int ds,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const int16_t *s2_8x8);
void                oil_err_intra8x8_u8                 (uint32_t *d_1,
                                                         const uint8_t *s1_8x8,
                                                         int ss1);
void                oil_recon8x8_intra                  (uint8_t *d_8x8,
                                                         int ds,
                                                         const int16_t *s_8x8);
void                oil_colsad8x8_u8                    (uint32_t *d_1,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         int ss2);
void                oil_composite_over_u8               (uint8_t *i_n,
                                                         const uint8_t *s1_n,
                                                         int n);
void                oil_diff8x8_const128_s16_u8         (int16_t *d_8x8,
                                                         const uint8_t *s1_8x8,
                                                         int ss1);
void                oil_copy8x8_u8                      (uint8_t *d_8x8,
                                                         int ds,
                                                         const uint8_t *s_8x8,
                                                         int ss);
void                oil_err_inter8x8_u8                 (uint32_t *d_1,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         int ss2);
void                oil_fdct8x8theora                   (const int16_t *s_8x8,
                                                         int16_t *d_8x8);
void                oil_rowsad8x8_u8                    (uint32_t *d_1,
                                                         const uint8_t *s1_8x8,
                                                         const uint8_t *s2_8x8);
void                oil_recon8x8_inter2                 (uint8_t *d_8x8,
                                                         int ds,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         int ss2,
                                                         const int16_t *s3_8x8);
void                oil_composite_add_u8                (uint8_t *i_n,
                                                         const uint8_t *s1_n,
                                                         int n);
void                oil_sad8x8_u8_avg                   (uint32_t *d_1,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         const uint8_t *s3_8x8,
                                                         int ss2);

Description

Details

oil_clip_f32 ()

void                oil_clip_f32                        (float *dest,
                                                         int dstr,
                                                         const float *src,
                                                         int sstr,
                                                         int n,
                                                         const float *s2_1,
                                                         const float *s3_1);

Clips each value in src to the range [s2_1,s3_1] and places the result in dest.

dest :

dstr :

src :

sstr :

n :

s2_1 :

s3_1 :


oil_clip_f64 ()

void                oil_clip_f64                        (double *dest,
                                                         int dstr,
                                                         const double *src,
                                                         int sstr,
                                                         int n,
                                                         const double *s2_1,
                                                         const double *s3_1);

Clips each value in src to the range [s2_1,s3_1] and places the result in dest.

dest :

dstr :

src :

sstr :

n :

s2_1 :

s3_1 :


oil_clip_s16 ()

void                oil_clip_s16                        (int16_t *dest,
                                                         int dstr,
                                                         const int16_t *src,
                                                         int sstr,
                                                         int n,
                                                         const int16_t *s2_1,
                                                         const int16_t *s3_1);

Clips each value in src to the range [s2_1,s3_1] and places the result in dest.

dest :

dstr :

src :

sstr :

n :

s2_1 :

s3_1 :


oil_clip_s32 ()

void                oil_clip_s32                        (int32_t *dest,
                                                         int dstr,
                                                         const int32_t *src,
                                                         int sstr,
                                                         int n,
                                                         const int32_t *s2_1,
                                                         const int32_t *s3_1);

Clips each value in src to the range [s2_1,s3_1] and places the result in dest.

dest :

dstr :

src :

sstr :

n :

s2_1 :

s3_1 :


oil_clip_s8 ()

void                oil_clip_s8                         (int8_t *dest,
                                                         int dstr,
                                                         const int8_t *src,
                                                         int sstr,
                                                         int n,
                                                         const int8_t *s2_1,
                                                         const int8_t *s3_1);

Clips each value in src to the range [s2_1,s3_1] and places the result in dest.

dest :

dstr :

src :

sstr :

n :

s2_1 :

s3_1 :


oil_clip_u16 ()

void                oil_clip_u16                        (uint16_t *dest,
                                                         int dstr,
                                                         const uint16_t *src,
                                                         int sstr,
                                                         int n,
                                                         const uint16_t *s2_1,
                                                         const uint16_t *s3_1);

Clips each value in src to the range [s2_1,s3_1] and places the result in dest.

dest :

dstr :

src :

sstr :

n :

s2_1 :

s3_1 :


oil_clip_u32 ()

void                oil_clip_u32                        (uint32_t *dest,
                                                         int dstr,
                                                         const uint32_t *src,
                                                         int sstr,
                                                         int n,
                                                         const uint32_t *s2_1,
                                                         const uint32_t *s3_1);

Clips each value in src to the range [s2_1,s3_1] and places the result in dest.

dest :

dstr :

src :

sstr :

n :

s2_1 :

s3_1 :


oil_clip_u8 ()

void                oil_clip_u8                         (uint8_t *dest,
                                                         int dstr,
                                                         const uint8_t *src,
                                                         int sstr,
                                                         int n,
                                                         const uint8_t *s2_1,
                                                         const uint8_t *s3_1);

Clips each value in src to the range [s2_1,s3_1] and places the result in dest.

dest :

dstr :

src :

sstr :

n :

s2_1 :

s3_1 :


oil_dequantize8x8_s16 ()

void                oil_dequantize8x8_s16               (int16_t *d_8x8,
                                                         int dstr,
                                                         const int16_t *s1_8x8,
                                                         int sstr1,
                                                         const int16_t *s2_8x8,
                                                         int sstr2);

Multiplies each element in s1_8x8 by the corresponding element in s2_8x8 and places the result in d_8x8.

d_8x8 :

dstr :

s1_8x8 :

sstr1 :

s2_8x8 :

sstr2 :


oil_diffsquaresum_f64 ()

void                oil_diffsquaresum_f64               (double *d_1,
                                                         const double *src1,
                                                         int sstr1,
                                                         const double *src2,
                                                         int sstr2,
                                                         int n);

Calculates the sum of squared differences between src1 and src2 and places the result in d_1.

d_1 :

src1 :

sstr1 :

src2 :

sstr2 :

n :


oil_md5 ()

void                oil_md5                             (uint32_t *i_4,
                                                         const uint32_t *s_16);

Performs an MD5 checksum iteration. The iteration operates on the 64 bytes contained in s_16, and changes the hash contained in i_4. This only implements a portion of the MD5 algorithm. The full MD5 algorithm requires initializing the hash with a specific value and additional handling of bytes at the end of the stream.

See also the md5 example in the Liboil source code.

FIXME: need a reference here

i_4 :

s_16 :


oil_mix_u8 ()

void                oil_mix_u8                          (uint8_t *dest,
                                                         const uint8_t *src1,
                                                         const uint8_t *src2,
                                                         const uint8_t *src3,
                                                         int n);

Performs the compisiting operation DEST = (SRC2 IN MASK) OVER SRC1, except it is done incorrectly, so this function should not be used.

FIXME: This function is broken.

dest :

DEST

src1 :

SRC1

src2 :

SRC2

src3 :

MASK

n :


oil_null ()

void                oil_null                            (void);

Does nothing, and does it fast.

This function is useful for testing the overhead of calling a Liboil function.


oil_scanlinescale2_u8 ()

void                oil_scanlinescale2_u8               (uint8_t *d,
                                                         const uint8_t *s,
                                                         int n);

Upsamples the source array by a factor of two. That is, if the values in s are A,B,C,D,E, the values written to d are A,A,B,B,C,C,D,D,E,E. Note that n is the number of elements written to d, and that half of s is not used.

d :

destination array

s :

source array

n :

number of elements

oil_sincos_f64 ()

void                oil_sincos_f64                      (double *dest1,
                                                         double *dest2,
                                                         int n,
                                                         const double *s1_1,
                                                         const double *s2_1);

Calculates sin(x) and cos(x) and places the results in dest1 and dest2 respectively. Values for x start at s1_1 and are incremented by s2_1 for each destination element.

dest1 :

dest2 :

n :

s1_1 :

s2_1 :


oil_utf8_validate ()

void                oil_utf8_validate                   (int32_t *d_1,
                                                         const uint8_t *s,
                                                         int n);

Checks s for valid UTF-8 characters. If the entire s array represents valid UTF-8 characters, n is written to d_1. Otherwise, the index in the array of the beginning of the first invalid UTF-8 character is written to d_1.

d_1 :

s :

n :


oil_diff8x8_s16_u8 ()

void                oil_diff8x8_s16_u8                  (int16_t *d_8x8,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         int ss2);

Calculates the difference of each value in s1_8x8 and s2_8x8 and places the result in d_8x8. Note that the destination type is larger than the source type.

d_8x8 :

s1_8x8 :

ss1 :

s2_8x8 :

ss2 :


oil_diff8x8_average_s16_u8 ()

void                oil_diff8x8_average_s16_u8          (int16_t *d_8x8,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         int ss2,
                                                         const uint8_t *s3_8x8,
                                                         int ss3);

Calculates the difference of each value in s1_8x8 and the average of s2_8x8 and s3_8x8, and places the result in d_8x8. Note that the destination type is larger than the source type.

d_8x8 :

s1_8x8 :

ss1 :

s2_8x8 :

ss2 :

s3_8x8 :

ss3 :


oil_err_inter8x8_u8_avg ()

void                oil_err_inter8x8_u8_avg             (uint32_t *d_1,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         const uint8_t *s3_8x8,
                                                         int ss2);

Calculates an intermediate 8x8 block where each element is the difference between s1_8x8 and the average of s2_8x8 and s3_8x8. The sum of squares of the difference of each element in the intermediate block and the mean of the intermediate block is placed into d_1. This result is 64 times the variance of the mean of the intermediate block.

FIXME: This function is broken, since the reference function uses ss2 as the stride for both s2_8x8 and s3_8x8.

d_1 :

s1_8x8 :

ss1 :

s2_8x8 :

s3_8x8 :

ss2 :


oil_recon8x8_inter ()

void                oil_recon8x8_inter                  (uint8_t *d_8x8,
                                                         int ds,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const int16_t *s2_8x8);

Adds each element in s1_8x8 and s2_8x8, clamps to the range [0,255], and places the result in the destination array.

d_8x8 :

ds :

s1_8x8 :

ss1 :

s2_8x8 :


oil_err_intra8x8_u8 ()

void                oil_err_intra8x8_u8                 (uint32_t *d_1,
                                                         const uint8_t *s1_8x8,
                                                         int ss1);

Calculates the sum of squared differences from the mean over s1_8x8 and places the result in d_1. This result is 64 times the variance of the mean of s1_8x8.

d_1 :

s1_8x8 :

ss1 :


oil_recon8x8_intra ()

void                oil_recon8x8_intra                  (uint8_t *d_8x8,
                                                         int ds,
                                                         const int16_t *s_8x8);

Adds 128 to each value in the source array, clamps to the range [0,255], and places the result in the destination array.

d_8x8 :

ds :

s_8x8 :


oil_colsad8x8_u8 ()

void                oil_colsad8x8_u8                    (uint32_t *d_1,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         int ss2);

Divides the 8x8 block into 16 1x4 regions, and calculates the sum of absolute differences between s1_8x8 and s2_8x8 for each region. The maximum of the results in each region is placed in d_1.

d_1 :

s1_8x8 :

ss1 :

s2_8x8 :

ss2 :


oil_composite_over_u8 ()

void                oil_composite_over_u8               (uint8_t *i_n,
                                                         const uint8_t *s1_n,
                                                         int n);

Performs the compositing operation DEST = SRC OVER DEST.

i_n :

DEST

s1_n :

SRC

n :

number of elements

oil_diff8x8_const128_s16_u8 ()

void                oil_diff8x8_const128_s16_u8         (int16_t *d_8x8,
                                                         const uint8_t *s1_8x8,
                                                         int ss1);

Subtracts 128 from each value in s1_8x8 and places the result in d_8x8. Note that the destination type is larger than the source type.

d_8x8 :

s1_8x8 :

ss1 :


oil_copy8x8_u8 ()

void                oil_copy8x8_u8                      (uint8_t *d_8x8,
                                                         int ds,
                                                         const uint8_t *s_8x8,
                                                         int ss);

Copies an 8x8 block.

d_8x8 :

ds :

s_8x8 :

ss :


oil_err_inter8x8_u8 ()

void                oil_err_inter8x8_u8                 (uint32_t *d_1,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         int ss2);

Calculates an intermediate 8x8 block where each element is the difference between s1_8x8 and s2_8x8. The sum of squares of the difference of each element in the intermediate block and the mean of the intermediate block is placed into d_1. This result is equal to 64 times the variance of the mean of the intermediate block.

d_1 :

s1_8x8 :

ss1 :

s2_8x8 :

ss2 :


oil_fdct8x8theora ()

void                oil_fdct8x8theora                   (const int16_t *s_8x8,
                                                         int16_t *d_8x8);

Calculates the FDCT transformation of s_8x8 according to the Theora specification and places the result in d_8x8.

Note that the source and destination arrays are reversed compared to normal Liboil order.

s_8x8 :

d_8x8 :


oil_rowsad8x8_u8 ()

void                oil_rowsad8x8_u8                    (uint32_t *d_1,
                                                         const uint8_t *s1_8x8,
                                                         const uint8_t *s2_8x8);

Calculates the sum of absolute differences between s1_8x8 and s1_8s8 for the first 4 elements of the first row, and the sum of absolute differences for the last 4 elements of the first row, and places the maximum of those values in dest.

FIXME: This function is declared incorrectly.

d_1 :

s1_8x8 :

s2_8x8 :


oil_recon8x8_inter2 ()

void                oil_recon8x8_inter2                 (uint8_t *d_8x8,
                                                         int ds,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         int ss2,
                                                         const int16_t *s3_8x8);

Adds each element in s1_8x8 and s2_8x8, divides by 2, and adds to s3_8x8, clamps to the range [0,255], and places the result in the destination array.

d_8x8 :

ds :

s1_8x8 :

ss1 :

s2_8x8 :

ss2 :

s3_8x8 :


oil_composite_add_u8 ()

void                oil_composite_add_u8                (uint8_t *i_n,
                                                         const uint8_t *s1_n,
                                                         int n);

Performs the compositing operation DEST = SRC ADD DEST.

i_n :

DEST

s1_n :

SRC

n :

number of elements

oil_sad8x8_u8_avg ()

void                oil_sad8x8_u8_avg                   (uint32_t *d_1,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         const uint8_t *s3_8x8,
                                                         int ss2);

Calculates the sum of absolute differences between s1_8x8 and the average of s2_8x8 and s3_8x8.

FIXME: This function is broken because the reference function assumes the stride for s3_8x8 is ss2.

d_1 :

s1_8x8 :

ss1 :

s2_8x8 :

s3_8x8 :

ss2 :

liboil-0.3.17/doc/html/liboil-liboilprofile.html0000644000175000017500000002336211332637400016504 00000000000000 OilProfile

OilProfile

OilProfile — Measuring the length of time needed to execute Liboil functions.

Synopsis

                    OilProfile;
#define             OIL_PROFILE_HIST_LENGTH
unsigned long       oil_profile_stamp                   (void);
void                oil_profile_init                    (OilProfile *prof);
void                oil_profile_stop_handle             (OilProfile *prof);
void                oil_profile_get_ave_std             (OilProfile *prof,
                                                         double *ave_p,
                                                         double *std_p);
#define             oil_profile_start                   (x)
#define             oil_profile_stop                    (x)

Description

Details

OilProfile

typedef struct {
} OilProfile;

An opaque structure representing profiling information.


OIL_PROFILE_HIST_LENGTH

#define OIL_PROFILE_HIST_LENGTH 10

Internal definition of the number of histogram entries in OilProfile.


oil_profile_stamp ()

unsigned long       oil_profile_stamp                   (void);

Creates a timestamp based on a CPU-specific high-frequency counter, if available.

Returns :

a timestamp

oil_profile_init ()

void                oil_profile_init                    (OilProfile *prof);

Initializes a profiling structure.

prof :

the OilProfile structure

oil_profile_stop_handle ()

void                oil_profile_stop_handle             (OilProfile *prof);

Handles post-processing of a single profiling run.

FIXME: need more info

prof :

the OilProfile structure

oil_profile_get_ave_std ()

void                oil_profile_get_ave_std             (OilProfile *prof,
                                                         double *ave_p,
                                                         double *std_p);

Calculates the average and standard deviation of a number of profiling runs, and places the results in the locations provided by ave_p and std_p. Either ave_p and std_p may be NULL, in which case the values will not be written.

prof :

the OilProfile structure

ave_p :

pointer to average

std_p :

pointer to standard deviation

oil_profile_start()

#define             oil_profile_start(x)

Starts a profiling run by obtaining a timestamp via oil_profile_stamp() and writing it into x.

x :

a pointer to an OilProfile structure

oil_profile_stop()

#define             oil_profile_stop(x)

Stops a profiling run by obtaining a timestamp via oil_profile_stamp() and writing it into x. It then calls oil_profile_stop_handle() to handle post-processing of the profiling run.

x :

a pointer to an OilProfile structure
liboil-0.3.17/doc/html/liboil.devhelp0000644000175000017500000012121511332637400014332 00000000000000 liboil-0.3.17/doc/html/index.html0000644000175000017500000001125711332637400013510 00000000000000 Liboil Reference Manual

Liboil Stable API
Intialization — Initialization functions
Type Conversion — Type conversion
liboilfuncs-copy
Simple Arithmetic — Aritmetic operations
Simple Arithmetic on Blocks — Aritmetic operations on 8x8 blocks
liboilfuncs-dct
Pixel Operations — Operations on pixels
liboilfuncs-doc
Liboil Unstable API
Intialization — Initialization functions
CPU — Check the capabilities of the current CPU
Debug — Printing and formatting debug information
OilFunctionClass — Functions for manipulating function classes
OilFunctionImpl — Functions for manipulating function implementations.
OilParameter — Functions to manipulate prototype parameter information.
OilProfile — Measuring the length of time needed to execute Liboil functions.
OilPrototype — Functions to manipulate prototype information.
Random Number Generation — Random number generation
OilTest — Test and profile function implementations.
liboiltypes — Internal Liboil types
Macros — Macros
liboiljunk
liboil-0.3.17/doc/html/up.png0000644000175000017500000000062611332637400012643 00000000000000‰PNG  IHDRàw=øbKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÒ2.œE€Ù#IDATxœí“=JÄ@F¿o‰] !+¤œ2…Å[ZÌ<@/á<€¥…XÛ Ú­20v±³ˆÂ…Ïj0»lþvV°ðA`˜ ïÍ ð—t*iùâHÒ­~xR~'IUUÉ9ç#OÁ‘my–eJÓTeY†GvÉ@x¤O#ß;2E>9²|t$DÞ9nnBäíÈjµò‘BRIsIªë:HîŸ8ŽU…œùëùPÖÚN™1fc­sNÎ95Mã§–ɵ¤ ׿ŸØŒ1~¸pEòe$ïIž°€Ç î7nrDòf!;Ã`¨çÝ'äykíÎI’øáû䲤sI_]ÿÇy—‡‘€ÅÀ^^I>O>Á¡ø­§²š?YBIEND®B`‚liboil-0.3.17/doc/html/liboil-liboilclass-unstable.html0000644000175000017500000004355511332637400017772 00000000000000 OilFunctionClass

OilFunctionClass

OilFunctionClass — Functions for manipulating function classes

Synopsis

                    OilFunctionClass;
#define             OIL_DECLARE_CLASS                   (klass)
#define             OIL_DEFINE_CLASS_FULL               (klass, string, test)
#define             OIL_DEFINE_CLASS                    (klass, string)
OilFunctionClass *  oil_class_get_by_index              (int i);
OilFunctionClass *  oil_class_get                       (const char *class_name);
void                oil_class_optimize                  (OilFunctionClass *klass);
int                 oil_class_get_n_classes             (void);
void                oil_class_choose_by_name            (OilFunctionClass *klass,
                                                         const char *name);
void                oil_class_register_impl_by_name     (const char *klass_name,
                                                         OilFunctionImpl *impl);
void                oil_class_register_impl             (OilFunctionClass *klass,
                                                         OilFunctionImpl *impl);
void                oil_class_register_impl_full        (OilFunctionClass *klass,
                                                         void (funcvoid) (),
                                                         const char *name,
                                                         unsigned int flags);

Description

Functions operate on arrays of data. The arrays can be either source arrays (input only), destination arrays (output only), or in-place arrays (both input and output).

The interpretation of a parameter can usually be determined from its name. Parameters for arrays are of the form d1_1xn, where the first character represents the direction (source, destination, or in-place), the second represents the index for that particular direction, and the characters after the underscore indicate the size of the array. In this case, "1xn" represents an array that is 1 by N. Note that the index and the size can both be omitted, giving a default of 1 for the index and 1xn for the size.

Parameters that represent strides are of the form "d1s". The interpretation is similar to above, except that the s indicates a stride parameter.

The exceptions to the above rule are "dest", "src", "dstr", "sstr", etc. These are aliases for "d1", "s1", "d1s", and "s1s", respectively. This form is deprecated and will be removed in the 0.4 series.

Two special parameters are "n" and "m", which determine the size of the arrays in other parameters.

Data arrays are laid out such that rows are separated by the number of bytes given by the corresponding stride. Elements in each row are contiguous. If there is no stride parameter corresponding to an array, the rows of the array are contiguous.

Details

OilFunctionClass

typedef struct {
} OilFunctionClass;

An opaque structure representing a function class.


OIL_DECLARE_CLASS()

#define             OIL_DECLARE_CLASS(klass)

Declares the Liboil function class klass.

klass :

the name of a function class (without the oil_ prefix)

OIL_DEFINE_CLASS_FULL()

#define             OIL_DEFINE_CLASS_FULL(klass, string, test)

Defines a OilFunctionClass structure for klass. Classes defined this way will be automatically at Liboil initialization time.

klass :

name of class to declare (without oil_ prefix)

string :

prototype of class

test :

test function

OIL_DEFINE_CLASS()

#define             OIL_DEFINE_CLASS(klass, string)

Defines a OilFunctionClass structure for klass. Classes defined this way will be automatically at Liboil initialization time.

klass :

name of class to declare (without oil_ prefix)

string :

prototype of class

oil_class_get_by_index ()

OilFunctionClass *  oil_class_get_by_index              (int i);

Returns a pointer to the function class with index i.

i :

index

Returns :

an OilFunctionClass

oil_class_get ()

OilFunctionClass *  oil_class_get                       (const char *class_name);

Returns a pointer to the function class that has the given class name. If no such class is found, NULL is returned.

class_name :

the name of the function class

Returns :

a pointer to a function class

oil_class_optimize ()

void                oil_class_optimize                  (OilFunctionClass *klass);

Tests and profiles each implementation for the given function class. Testing compares the output of running each implementation on random input against the reference implementation for the same input.

klass :

a function class

oil_class_get_n_classes ()

int                 oil_class_get_n_classes             (void);

Returns the number of function classes.

Returns :

the number of function classes

oil_class_choose_by_name ()

void                oil_class_choose_by_name            (OilFunctionClass *klass,
                                                         const char *name);

Sets the chosen implementation for the given function class to the implementation with the given name. If no implementation having the given name is found, the chosen implementation is not changed.

klass :

a function class

name :

the name of an implementation

oil_class_register_impl_by_name ()

void                oil_class_register_impl_by_name     (const char *klass_name,
                                                         OilFunctionImpl *impl);

Adds impl to the list of implementations associated with the function class given by klass_name.

klass_name :

the name of the class

impl :

an implementation

oil_class_register_impl ()

void                oil_class_register_impl             (OilFunctionClass *klass,
                                                         OilFunctionImpl *impl);

Adds impl to the list of implementations associated with the function class given by klass.

klass :

the class

impl :

an implementation

oil_class_register_impl_full ()

void                oil_class_register_impl_full        (OilFunctionClass *klass,
                                                         void (funcvoid) (),
                                                         const char *name,
                                                         unsigned int flags);

Adds func to the list of implementations associated with the function class given by klass.

klass :

the class

func :

the function

name :

name of the function

flags :

CPU flags
liboil-0.3.17/doc/html/liboil-liboilinit.html0000644000175000017500000000623611332637400016010 00000000000000 Intialization

Intialization

Intialization — Initialization functions

Synopsis

void                oil_init                            (void);

Description

Details

oil_init ()

void                oil_init                            (void);

Initialize liboil. This function must be called before any other liboil function is used. oil_init() may be called multiple times.

Since 0.3.0

liboil-0.3.17/doc/html/liboil-liboiltest.html0000644000175000017500000004430011332637400016016 00000000000000 OilTest

OilTest

OilTest — Test and profile function implementations.

Synopsis

                    OilTest;
void                (*OilTestFunction)                  (OilTest *test);
#define             OIL_TEST_HEADER
#define             OIL_TEST_FOOTER
OilTest *           oil_test_new                        (OilFunctionClass *klass);
void                oil_test_init                       (OilTest *test);
void                oil_test_free                       (OilTest *test);
void                oil_test_set_iterations             (OilTest *test,
                                                         int iterations);
void                oil_test_check_ref                  (OilTest *test);
int                 oil_test_check_impl                 (OilTest *test,
                                                         OilFunctionImpl *impl);
void                oil_test_cleanup                    (OilTest *test);
void *              oil_test_get_source_data            (OilTest *test,
                                                         OilArgType arg_type);
int                 oil_test_get_value                  (OilTest *test,
                                                         OilArgType arg_type);
void                oil_test_set_test_footer            (OilTest *test,
                                                         OilParameter *p,
                                                         int test_footer);
void                oil_test_set_test_header            (OilTest *test,
                                                         OilParameter *p,
                                                         int test_header);

Description

Details

OilTest

typedef struct {
} OilTest;

An opaque structure describing how to test an OilFunctionImpl for an OilFunctionClass.


OilTestFunction ()

void                (*OilTestFunction)                  (OilTest *test);

Typedef for functions that initialize special values in source arrays for a particular function class.

test :

the OilTest structure

OIL_TEST_HEADER

#define OIL_TEST_HEADER 256

Default number of bytes that are prepended to the array test area.


OIL_TEST_FOOTER

#define OIL_TEST_FOOTER 256

Default number of bytes that are appended to the array test area.


oil_test_new ()

OilTest *           oil_test_new                        (OilFunctionClass *klass);

Creates a new OilTest for the OilFunctionClass represented by klass.

klass :

an OilFunctionClass

Returns :

the new OilTest

oil_test_init ()

void                oil_test_init                       (OilTest *test);

Intializes test.

FIXME: needs work

test :

the OilTest

oil_test_free ()

void                oil_test_free                       (OilTest *test);

Frees memory associated with test.

test :

the OilTest

oil_test_set_iterations ()

void                oil_test_set_iterations             (OilTest *test,
                                                         int iterations);

Sets the number of iterations of test to iterations.

test :

the OilTest

iterations :

the number of iterations

oil_test_check_ref ()

void                oil_test_check_ref                  (OilTest *test);

Runs the test specified by test on the reference function of the class being tested.

test :

the OilTest

oil_test_check_impl ()

int                 oil_test_check_impl                 (OilTest *test,
                                                         OilFunctionImpl *impl);

Runs the testing procedure described by test on the implementation impl.

test :

the OilTest

impl :

an OilFunctionImpl

Returns :

1 if impl passes the test, 0 if it fails

oil_test_cleanup ()

void                oil_test_cleanup                    (OilTest *test);

Cleans up test.

FIXME: needs work

test :

the OilTest

oil_test_get_source_data ()

void *              oil_test_get_source_data            (OilTest *test,
                                                         OilArgType arg_type);

test :

arg_type :

Returns :


oil_test_get_value ()

int                 oil_test_get_value                  (OilTest *test,
                                                         OilArgType arg_type);

test :

arg_type :

Returns :


oil_test_set_test_footer ()

void                oil_test_set_test_footer            (OilTest *test,
                                                         OilParameter *p,
                                                         int test_footer);

Sets the number of bytes of guard footer for p to test_footer.

test :

the OilTest

p :

the OilParameter to change the footer for

test_footer :

the number of bytes of guard footer

oil_test_set_test_header ()

void                oil_test_set_test_header            (OilTest *test,
                                                         OilParameter *p,
                                                         int test_header);

Sets the number of bytes of guard header for p to test_header.

test :

the OilTest

p :

the OilParameter to change the header for

test_header :

the number of bytes of guard header
liboil-0.3.17/doc/html/liboil-liboilfuncs-math8x8.html0000644000175000017500000003750611332637400017466 00000000000000 Simple Arithmetic on Blocks

Simple Arithmetic on Blocks

Simple Arithmetic on Blocks — Aritmetic operations on 8x8 blocks

Synopsis

void                oil_mult8x8_s16                     (int16_t *d_8x8,
                                                         const int16_t *s1_8x8,
                                                         const int16_t *s2_8x8,
                                                         int ds,
                                                         int ss1,
                                                         int ss2);
void                oil_sad8x8_f64                      (double *d_8x8,
                                                         int ds,
                                                         const double *s1_8x8,
                                                         int ss1,
                                                         const double *s2_8x8,
                                                         int ss2);
void                oil_sad8x8_s16                      (uint32_t *d_8x8,
                                                         int ds,
                                                         const int16_t *s1_8x8,
                                                         int ss1,
                                                         const int16_t *s2_8x8,
                                                         int ss2);
void                oil_sad8x8_f64_2                    (double *d_1,
                                                         const double *s1_8x8,
                                                         int ss1,
                                                         const double *s2_8x8,
                                                         int ss2);
void                oil_sad8x8_s16_2                    (uint32_t *d_1,
                                                         const int16_t *s1_8x8,
                                                         int ss1,
                                                         const int16_t *s2_8x8,
                                                         int ss2);
void                oil_sad8x8_u8                       (uint32_t *d_1,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         int ss2);

Description

Details

oil_mult8x8_s16 ()

void                oil_mult8x8_s16                     (int16_t *d_8x8,
                                                         const int16_t *s1_8x8,
                                                         const int16_t *s2_8x8,
                                                         int ds,
                                                         int ss1,
                                                         int ss2);

Multiplies each element in s1_8x8 and s2_8x8 and places the result in d_8x8.

d_8x8 :

s1_8x8 :

s2_8x8 :

ds :

ss1 :

ss2 :


oil_sad8x8_f64 ()

void                oil_sad8x8_f64                      (double *d_8x8,
                                                         int ds,
                                                         const double *s1_8x8,
                                                         int ss1,
                                                         const double *s2_8x8,
                                                         int ss2);

FIXME: This function is broken and has been replaced by @oil_sad8x8_f64_2() because the destination of this function is an 8x8 block instead of a single value.

d_8x8 :

ds :

s1_8x8 :

ss1 :

s2_8x8 :

ss2 :


oil_sad8x8_s16 ()

void                oil_sad8x8_s16                      (uint32_t *d_8x8,
                                                         int ds,
                                                         const int16_t *s1_8x8,
                                                         int ss1,
                                                         const int16_t *s2_8x8,
                                                         int ss2);

FIXME: This function is broken and has been replaced by @oil_sad8x8_s16_2() because the destination of this function is an 8x8 block instead of a single value.

d_8x8 :

ds :

s1_8x8 :

ss1 :

s2_8x8 :

ss2 :


oil_sad8x8_f64_2 ()

void                oil_sad8x8_f64_2                    (double *d_1,
                                                         const double *s1_8x8,
                                                         int ss1,
                                                         const double *s2_8x8,
                                                         int ss2);

Calculates the sum of absolute differences between elements in s1_8x8 and s2_8x8, and places the result in d_1.

d_1 :

s1_8x8 :

ss1 :

s2_8x8 :

ss2 :


oil_sad8x8_s16_2 ()

void                oil_sad8x8_s16_2                    (uint32_t *d_1,
                                                         const int16_t *s1_8x8,
                                                         int ss1,
                                                         const int16_t *s2_8x8,
                                                         int ss2);

Calculates the sum of absolute differences between elements in s1_8x8 and s2_8x8, and places the result in d_1.

d_1 :

s1_8x8 :

ss1 :

s2_8x8 :

ss2 :


oil_sad8x8_u8 ()

void                oil_sad8x8_u8                       (uint32_t *d_1,
                                                         const uint8_t *s1_8x8,
                                                         int ss1,
                                                         const uint8_t *s2_8x8,
                                                         int ss2);

Calculates the sum of absolute differences between elements in s1_8x8 and s2_8x8, and places the result in d_1.

d_1 :

s1_8x8 :

ss1 :

s2_8x8 :

ss2 :

liboil-0.3.17/doc/html/home.png0000644000175000017500000000121611332637400013143 00000000000000‰PNG  IHDRàw=øbKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÒ1õÚKvIDATxœÕ•±kqÅ?ßrC‡ßàpà ~C„np¼¡CAAJ .B-\'G‡]:Ü “‚ƒCÇ -(ˆ8´à Ô€!…fD°€…çÒ“klbRÛÁoyüxïûîËïwpðIJº<°of_®-@ÒððçRH•´ÏfÖŸtèÂü¤^¯×ÓÚÚš’$Q«ÕÒ|“ôpâ’¶€gív;X^^&Ïs¢(bww—Z­F£ÑÀ9Çææ&Þû3à¶™ Æ’^IRµZUE.0Z]]Uš¦ ÃPY–Mü8óHÒGIÚÙÙÑìììæeŸkqqñÒ€™!ó  $ÛÛÛ¬¯¯3Œn eýþ{-/seeeìÔÃŒãXóóóåO‡Í·$ý8==UÇS™—é½×ÑÑQòRR€¤'ã–9-sÚÛÛ+B^ éC·Û•sîŸÍËÂ+%À°<7³ŸWô˜¿ õâ:™2IEND®B`‚liboil-0.3.17/doc/html/index.sgml0000644000175000017500000013403211332637400013503 00000000000000 liboil-0.3.17/doc/html/liboil-liboilrandom.html0000644000175000017500000005076711332637400016335 00000000000000 Random Number Generation

Random Number Generation

Random Number Generation — Random number generation

Synopsis

#define             oil_rand_s32                        ()
#define             oil_rand_s16                        ()
#define             oil_rand_s8                         ()
#define             oil_rand_u32                        ()
#define             oil_rand_u16                        ()
#define             oil_rand_u8                         ()
#define             oil_rand_s64                        ()
#define             oil_rand_u64                        ()
#define             oil_rand_f32                        ()
#define             oil_rand_f64                        ()
void                oil_random_alpha                    (oil_type_u8 *dest,
                                                         int n);
void                oil_random_argb                     (oil_type_u32 *dest,
                                                         int n);
void                oil_random_f32                      (oil_type_f32 *dest,
                                                         int n);
void                oil_random_f64                      (oil_type_f64 *dest,
                                                         int n);
void                oil_random_s16                      (oil_type_s16 *dest,
                                                         int n);
void                oil_random_s32                      (oil_type_s32 *dest,
                                                         int n);
void                oil_random_s64                      (oil_type_s64 *dest,
                                                         int n);
void                oil_random_s8                       (oil_type_s8 *dest,
                                                         int n);
void                oil_random_u16                      (oil_type_u16 *dest,
                                                         int n);
void                oil_random_u32                      (oil_type_u32 *dest,
                                                         int n);
void                oil_random_u64                      (oil_type_u64 *dest,
                                                         int n);
void                oil_random_u8                       (oil_type_u8 *dest,
                                                         int n);

Description

Details

oil_rand_s32()

#define oil_rand_s32() ((rand()&0xffff)<<16 | (rand()&0xffff))

Evaluates to a random integer in the range [-(1<<31), (1<<31)-1].


oil_rand_s16()

#define oil_rand_s16() ((int16_t)(rand()&0xffff))

Evaluates to a random integer in the range [-(1<<15), (1<<15)-1].


oil_rand_s8()

#define oil_rand_s8() ((int8_t)(rand()&0xffff))

Evaluates to a random integer in the range [-(1<<7), (1<<7)-1].


oil_rand_u32()

#define oil_rand_u32() ((uint32_t)((rand()&0xffff)<<16 | (rand()&0xffff)))

Evaluates to a random integer in the range [0, (1<<32)-1].


oil_rand_u16()

#define oil_rand_u16() ((uint16_t)(rand()&0xffff))

Evaluates to a random integer in the range [0, (1<<16)-1].


oil_rand_u8()

#define oil_rand_u8() ((uint8_t)(rand()&0xffff))

Evaluates to a random integer in the range [0, (1<<8)-1].


oil_rand_s64()

#define oil_rand_s64() ((int64_t)(oil_rand_s32())<<32 | oil_rand_s32())

Evaluates to a random integer in the range [-(1<<63), (1<<63)-1].


oil_rand_u64()

#define oil_rand_u64() ((uint64_t)(oil_rand_u32())<<32 | oil_rand_u32())

Evaluates to a random integer in the range [0, (1<<64)-1].


oil_rand_f32()

#define oil_rand_f32() (rand()/(RAND_MAX+1.0))

Evaluates to a random single-precision floating point number in the range [0, 1.0).


oil_rand_f64()

#define oil_rand_f64() (((rand()/(RAND_MAX+1.0))+rand())/(RAND_MAX+1.0))

Evaluates to a random double-precision floating point number in the range [0, 1.0).


oil_random_alpha ()

void                oil_random_alpha                    (oil_type_u8 *dest,
                                                         int n);

Writes random values in the range [0, 255] to the destination array suitable for alpha values. This is similar to oil_random_u8(), except the values 0 and 255 are strongly favored.

dest :

n :


oil_random_argb ()

void                oil_random_argb                     (oil_type_u32 *dest,
                                                         int n);

Creates valid random RGBA values and places them in the destination array.

dest :

destination array.

n :

number of values to write.

oil_random_f32 ()

void                oil_random_f32                      (oil_type_f32 *dest,
                                                         int n);

Writes random single-precision floating point values in the range [0, 1.0) to the destination array.

dest :

n :


oil_random_f64 ()

void                oil_random_f64                      (oil_type_f64 *dest,
                                                         int n);

Writes random double-precision floating point values in the range [0, 1.0) to the destination array.

dest :

n :


oil_random_s16 ()

void                oil_random_s16                      (oil_type_s16 *dest,
                                                         int n);

Writes random values in the range [-(1<<15), (1<<15)-1] to the destination array.

dest :

n :


oil_random_s32 ()

void                oil_random_s32                      (oil_type_s32 *dest,
                                                         int n);

Writes random values in the range [-(1<<31), (1<<31)-1] to the destination array.

dest :

n :


oil_random_s64 ()

void                oil_random_s64                      (oil_type_s64 *dest,
                                                         int n);

Writes random values in the range [-(1<<63), (1<<63)-1] to the destination array.

dest :

n :


oil_random_s8 ()

void                oil_random_s8                       (oil_type_s8 *dest,
                                                         int n);

Writes random values in the range [-(1<<7), (1<<7)-1] to the destination array.

dest :

n :


oil_random_u16 ()

void                oil_random_u16                      (oil_type_u16 *dest,
                                                         int n);

Writes random values in the range [0, (1<<16)-1] to the destination array.

dest :

n :


oil_random_u32 ()

void                oil_random_u32                      (oil_type_u32 *dest,
                                                         int n);

Writes random values in the range [0, (1<<32)-1] to the destination array.

dest :

n :


oil_random_u64 ()

void                oil_random_u64                      (oil_type_u64 *dest,
                                                         int n);

Writes random values in the range [0, (1<<64)-1] to the destination array.

dest :

n :


oil_random_u8 ()

void                oil_random_u8                       (oil_type_u8 *dest,
                                                         int n);

Writes random values in the range [0, (1<<8)-1] to the destination array.

dest :

n :

liboil-0.3.17/config.sub0000755000175000017500000010224011332627667011774 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2009-04-17' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: liboil-0.3.17/liboil/0000777000175000017500000000000011332637374011344 500000000000000liboil-0.3.17/liboil/liboilprototype.h0000644000175000017500000000440610717203073014664 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_PROTOTYPE_H_ #define _LIBOIL_PROTOTYPE_H_ #include #include #include OIL_BEGIN_DECLS #ifdef OIL_ENABLE_UNSTABLE_API typedef struct _OilPrototype OilPrototype; /** * OilPrototype: * * An opaque structure describing the C function prototype of * an @OilFunctionClass. */ struct _OilPrototype { int n_params; OilParameter *params; OilFunctionClass *klass; }; OilPrototype *oil_prototype_from_string (const char *s); char *oil_prototype_to_string (OilPrototype *proto); char *oil_prototype_to_arg_string (OilPrototype *proto); void oil_prototype_free (OilPrototype *proto); void oil_prototype_append_param (OilPrototype *proto, OilParameter *param); int oil_type_sizeof (OilType type); const char * oil_type_name (OilType type); const char * oil_arg_type_name (OilArgType type); #endif OIL_END_DECLS #endif liboil-0.3.17/liboil/liboilinternal.h0000644000175000017500000000306310717203073014431 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_INTERNAL_H_ #define _LIBOIL_INTERNAL_H_ #include #include #include #include #endif liboil-0.3.17/liboil/build_prototypes.c0000644000175000017500000001226111151567413015030 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include static char * xstrdup (const char *s); void print_header (void); void print_footer (void); int main (int argc, char *argv[]) { OilFunctionClass *klass; OilPrototype *proto; int i; int n; char *string; oil_init_no_optimize (); print_header (); n = oil_class_get_n_classes (); for (i=0;iprototype) { proto = oil_prototype_from_string (klass->prototype); if (proto) { string = oil_prototype_to_string (proto); if (strlen (string) == 0) { free (string); string = xstrdup("void"); } printf ("OIL_EXPORT OilFunctionClass *oil_function_class_ptr_%s;\n", klass->name); printf ("typedef void (*_oil_type_%s)(%s);\n",klass->name,string); printf ("#define oil_%s ((_oil_type_%s)(*(void(**)(void))oil_function_class_ptr_%s))\n", klass->name, klass->name, klass->name); oil_prototype_free (proto); free (string); } else { printf("/* ERROR: could not parse %s(%s) */\n", klass->name, klass->prototype); } } } print_footer (); return 0; } void print_header (void) { printf ("/*\n"); printf (" * LIBOIL - Library of Optimized Inner Loops\n"); printf (" * Copyright (c) 2004 David A. Schleef \n"); printf (" * All rights reserved.\n"); printf (" *\n"); printf (" * Redistribution and use in source and binary forms, with or without\n"); printf (" * modification, are permitted provided that the following conditions\n"); printf (" * are met:\n"); printf (" * 1. Redistributions of source code must retain the above copyright\n"); printf (" * notice, this list of conditions and the following disclaimer.\n"); printf (" * 2. Redistributions in binary form must reproduce the above copyright\n"); printf (" * notice, this list of conditions and the following disclaimer in the\n"); printf (" * documentation and/or other materials provided with the distribution.\n"); printf (" * \n"); printf (" * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n"); printf (" * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n"); printf (" * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n"); printf (" * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,\n"); printf (" * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n"); printf (" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n"); printf (" * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n"); printf (" * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n"); printf (" * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\n"); printf (" * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n"); printf (" * POSSIBILITY OF SUCH DAMAGE.\n"); printf (" */\n"); printf ("\n"); printf ("/* This file is automatically generated. Do not edit. */\n"); printf ("\n"); printf ("#ifndef _LIBOIL_FUNCS_H_\n"); printf ("#define _LIBOIL_FUNCS_H_\n"); printf ("\n"); printf ("#include \n"); printf ("\n"); printf ("#ifdef __cplusplus\n"); printf ("extern \"C\" {\n"); printf ("#endif\n"); printf ("\n"); } void print_footer (void) { printf ("\n"); printf ("#ifdef __cplusplus\n"); printf ("}\n"); printf ("#endif\n"); printf ("\n"); printf ("#endif\n"); printf ("\n"); } static char * xstrdup (const char *s) { int n = strlen(s); char *t; n = strlen(s); t = malloc(n + 1); memcpy (t, s, n); t[n] = 0; return t; } liboil-0.3.17/liboil/liboilcpu-arm.c0000644000175000017500000000727211151570751014165 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include /***** arm *****/ #ifdef __arm__ #if 0 static unsigned long oil_profile_stamp_xscale(void) { unsigned int ts; __asm__ __volatile__ ( " mrc p14, 0, %0, c1, c0, 0 \n" : "=r" (ts)); return ts; } #endif static void oil_cpu_arm_getflags_cpuinfo (char *cpuinfo) { char *cpuinfo_flags; char **flags; char **f; cpuinfo_flags = get_cpuinfo_line(cpuinfo, "Features"); if (cpuinfo_flags == NULL) return; flags = strsplit(cpuinfo_flags); for (f = flags; *f; f++) { if (strcmp (*f, "edsp") == 0) { OIL_DEBUG ("cpu feature %s", *f); oil_cpu_flags |= OIL_IMPL_FLAG_EDSP; } if (strcmp (*f, "vfp") == 0) { OIL_DEBUG ("cpu feature %s", *f); oil_cpu_flags |= OIL_IMPL_FLAG_VFP; } free (*f); } free (flags); free (cpuinfo_flags); } static char * get_proc_cpuinfo (void) { char *cpuinfo; int fd; int n; cpuinfo = malloc(4096); if (cpuinfo == NULL) return NULL; fd = open("/proc/cpuinfo", O_RDONLY); if (fd < 0) { free (cpuinfo); return NULL; } n = read(fd, cpuinfo, 4095); if (n < 0) { free (cpuinfo); close (fd); return NULL; } cpuinfo[n] = 0; close (fd); return cpuinfo; } void oil_cpu_detect_arch(void) { #ifdef __linux__ int arm_implementer = 0; int arm_arch; char *cpuinfo; char *s; cpuinfo = get_proc_cpuinfo(); if (cpuinfo == NULL) return; s = get_cpuinfo_line(cpuinfo, "CPU implementer"); if (s) { arm_implementer = strtoul (s, NULL, 0); free(s); } switch(arm_implementer) { case 0x69: /* Intel */ case 0x41: /* ARM */ /* ARM chips are known to not have timestamping available from * user space */ break; default: break; } s = get_cpuinfo_line(cpuinfo, "CPU architecture"); if (s) { arm_arch = strtoul (s, NULL, 0); if (arm_arch >= 6) oil_cpu_flags |= OIL_IMPL_FLAG_ARM6; free(s); } oil_cpu_arm_getflags_cpuinfo (cpuinfo); free (cpuinfo); #endif } #endif liboil-0.3.17/liboil/liboilprofile.h0000644000175000017500000000562410717203073014262 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_PROFILE_H_ #define _LIBOIL_PROFILE_H_ #include OIL_BEGIN_DECLS #ifdef OIL_ENABLE_UNSTABLE_API /** * OIL_PROFILE_HIST_LENGTH * * Internal definition of the number of histogram entries in #OilProfile. */ #define OIL_PROFILE_HIST_LENGTH 10 typedef struct _OilProfile OilProfile; /** * OilProfile: * * An opaque structure representing profiling information. */ struct _OilProfile { /*< private >*/ unsigned long start; unsigned long stop; unsigned long min; unsigned long last; unsigned long total; int n; int hist_n; unsigned long hist_time[OIL_PROFILE_HIST_LENGTH]; int hist_count[OIL_PROFILE_HIST_LENGTH]; }; unsigned long oil_profile_stamp(void); void oil_profile_init(OilProfile *prof); void oil_profile_stop_handle(OilProfile *prof); void oil_profile_get_ave_std (OilProfile *prof, double *ave_p, double *std_p); /** * oil_profile_start: * @x: a pointer to an OilProfile structure * * Starts a profiling run by obtaining a timestamp via oil_profile_stamp() * and writing it into @x. */ #define oil_profile_start(x) do{ \ (x)->start = oil_profile_stamp(); \ }while(0) /** * oil_profile_stop: * @x: a pointer to an OilProfile structure * * Stops a profiling run by obtaining a timestamp via oil_profile_stamp() * and writing it into @x. It then calls oil_profile_stop_handle() to * handle post-processing of the profiling run. */ #define oil_profile_stop(x) do{ \ (x)->stop = oil_profile_stamp(); \ oil_profile_stop_handle(x); \ }while(0) #endif OIL_END_DECLS #endif liboil-0.3.17/liboil/c/0000777000175000017500000000000011332637374011566 500000000000000liboil-0.3.17/liboil/c/composite.c0000644000175000017500000003036410717203073013645 00000000000000/* * Copyright (c) 2005 * Eric Anholt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #define COMPOSITE_ADD(d,s) oil_clamp_255((d) + (s)) #define COMPOSITE_OVER(d,s,m) ((d) + (s) - oil_muldiv_255((d),(m))) static void composite_in_argb_fast (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { for (; n > 0; n--) { uint32_t src1, src2; uint8_t m = *mask++; /* Split the pixel into two sets of two channels, and multiply by the * mask. */ src1 = *src & 0x00ff00ff; src1 *= m; src1 += 0x00800080; src1 += (src1 >> 8) & 0x00ff00ff; src1 >>= 8; src1 &= 0x00ff00ff; src2 = (*src >> 8) & 0x00ff00ff; src2 *= m; src2 += 0x00800080; src2 += (src2 >> 8) & 0x00ff00ff; src2 &= 0xff00ff00; *dest++ = src1 | src2; src++; } } OIL_DEFINE_IMPL (composite_in_argb_fast, composite_in_argb); static void composite_in_argb_const_src_fast (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { uint32_t src1, src2; src1 = *src & 0x00ff00ff; src2 = (*src >> 8) & 0x00ff00ff; for (; n > 0; n--) { uint32_t temp1, temp2; uint8_t m = *mask++; /* Split the pixel into two sets of two channels, and multiply by the * mask. */ temp1 = src1 * m; temp1 += 0x00800080; temp1 += (temp1 >> 8) & 0x00ff00ff; temp1 >>= 8; temp1 &= 0x00ff00ff; temp2 = src2 * m; temp2 += 0x00800080; temp2 += (temp2 >> 8) & 0x00ff00ff; temp2 &= 0xff00ff00; *dest++ = temp1 | temp2; } } OIL_DEFINE_IMPL (composite_in_argb_const_src_fast, composite_in_argb_const_src); static void composite_in_argb_const_mask_fast (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { uint8_t m = *mask; for (; n > 0; n--) { uint32_t src1, src2; /* Split the pixel into two sets of two channels, and multiply by the * mask. */ src1 = *src & 0x00ff00ff; src1 *= m; src1 += 0x00800080; src1 += (src1 >> 8) & 0x00ff00ff; src1 >>= 8; src1 &= 0x00ff00ff; src2 = (*src >> 8) & 0x00ff00ff; src2 *= m; src2 += 0x00800080; src2 += (src2 >> 8) & 0x00ff00ff; src2 &= 0xff00ff00; *dest++ = src1 | src2; src++; } } OIL_DEFINE_IMPL (composite_in_argb_const_mask_fast, composite_in_argb_const_mask); static void composite_over_argb_fast (uint32_t *dest, const uint32_t *src, int n) { for (; n > 0; n--) { uint32_t d = *dest, s = *src, sa; uint32_t s1, s2, d1, d2; sa = ~s >> 24; s1 = s & 0x00ff00ff; d1 = d & 0x00ff00ff; d1 *= sa; d1 += 0x00800080; d1 += (d1 >> 8) & 0x00ff00ff; d1 >>= 8; d1 &= 0x00ff00ff; d1 += s1; d1 |= 0x01000100 - ((d1 >> 8) & 0x00ff00ff); d1 &= 0x00ff00ff; s2 = (s >> 8) & 0x00ff00ff; d2 = (d >> 8) & 0x00ff00ff; d2 *= sa; d2 += 0x00800080; d2 += (d2 >> 8) & 0x00ff00ff; d2 >>= 8; d2 &= 0x00ff00ff; d2 += s2; d2 |= 0x01000100 - ((d2 >> 8) & 0x00ff00ff); d2 &= 0x00ff00ff; *dest++ = d1 | (d2 << 8); src++; } } OIL_DEFINE_IMPL (composite_over_argb_fast, composite_over_argb); static void composite_over_argb_const_src_fast (uint32_t *dest, const uint32_t *src, int n) { uint32_t s = *src; uint32_t sa, s1, s2; sa = ~s >> 24; s1 = s & 0x00ff00ff; s2 = (s >> 8) & 0x00ff00ff; for (; n > 0; n--) { uint32_t d = *dest; uint32_t d1, d2; d1 = d & 0x00ff00ff; d1 *= sa; d1 += 0x00800080; d1 += (d1 >> 8) & 0x00ff00ff; d1 >>= 8; d1 &= 0x00ff00ff; d1 += s1; d1 |= 0x01000100 - ((d1 >> 8) & 0x00ff00ff); d1 &= 0x00ff00ff; d2 = (d >> 8) & 0x00ff00ff; d2 *= sa; d2 += 0x00800080; d2 += (d2 >> 8) & 0x00ff00ff; d2 >>= 8; d2 &= 0x00ff00ff; d2 += s2; d2 |= 0x01000100 - ((d2 >> 8) & 0x00ff00ff); d2 &= 0x00ff00ff; *dest++ = d1 | (d2 << 8); src++; } } OIL_DEFINE_IMPL (composite_over_argb_const_src_fast, composite_over_argb_const_src); static void composite_add_argb_fast (uint32_t *dest, const uint32_t *src, int n) { for (; n > 0; n--) { uint32_t s = *src++, d = *dest; uint32_t s1, s2, d1, d2; s1 = s & 0x00ff00ff; s2 = (s >> 8) & 0x00ff00ff; d1 = d & 0x00ff00ff; d2 = (d >> 8) & 0x00ff00ff; d1 += s1; d1 |= 0x01000100 - ((d1 >> 8) & 0x00ff00ff); d1 &= 0x00ff00ff; d2 += s2; d2 |= 0x01000100 - ((d2 >> 8) & 0x00ff00ff); d2 &= 0x00ff00ff; *dest++ = d1 | (d2 << 8); } } OIL_DEFINE_IMPL (composite_add_argb_fast, composite_add_argb); static void composite_add_argb_const_src_fast (uint32_t *dest, const uint32_t *src, int n) { uint32_t s1, s2; s1 = *src & 0x00ff00ff; s2 = (*src >> 8) & 0x00ff00ff; for (; n > 0; n--) { uint32_t d = *dest; uint32_t d1, d2; d1 = d & 0x00ff00ff; d2 = (d >> 8) & 0x00ff00ff; d1 += s1; d1 |= 0x01000100 - ((d1 >> 8) & 0x00ff00ff); d1 &= 0x00ff00ff; d2 += s2; d2 |= 0x01000100 - ((d2 >> 8) & 0x00ff00ff); d2 &= 0x00ff00ff; *dest++ = d1 | (d2 << 8); } } OIL_DEFINE_IMPL (composite_add_argb_const_src_fast, composite_add_argb_const_src); static void composite_in_over_argb_fast (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { for (; n > 0; n--) { uint32_t d = *dest, s = *src++; uint32_t s1, s2, d1, d2, sa; uint8_t m = *mask++; s1 = s & 0x00ff00ff; s2 = (s >> 8) & 0x00ff00ff; /* in */ s1 *= m; s1 += 0x00800080; s1 += (s1 >> 8) & 0x00ff00ff; s1 >>= 8; s1 &= 0x00ff00ff; s2 *= m; s2 += 0x00800080; s2 += (s2 >> 8) & 0x00ff00ff; s2 >>= 8; s2 &= 0x00ff00ff; /* over */ sa = (~s2 >> 16) & 0xff; d1 = d & 0x00ff00ff; d1 *= sa; d1 += 0x00800080; d1 += (d1 >> 8) & 0x00ff00ff; d1 >>= 8; d1 &= 0x00ff00ff; d1 += s1; d1 |= 0x01000100 - ((d1 >> 8) & 0x00ff00ff); d1 &= 0x00ff00ff; d2 = (d >> 8) & 0x00ff00ff; d2 *= sa; d2 += 0x00800080; d2 += (d2 >> 8) & 0x00ff00ff; d2 >>= 8; d2 &= 0x00ff00ff; d2 += s2; d2 |= 0x01000100 - ((d2 >> 8) & 0x00ff00ff); d2 &= 0x00ff00ff; *dest++ = d1 | (d2 << 8); } } OIL_DEFINE_IMPL (composite_in_over_argb_fast, composite_in_over_argb); static void composite_in_over_argb_const_src_fast (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { uint32_t s = *src; uint32_t s1, s2; s1 = s & 0x00ff00ff; s2 = (s >> 8) & 0x00ff00ff; for (; n > 0; n--) { uint32_t d = *dest; uint32_t temp1, temp2, d1, d2, sa; uint8_t m = *mask++; /* in */ temp1 = s1 * m; temp1 += 0x00800080; temp1 += (temp1 >> 8) & 0x00ff00ff; temp1 >>= 8; temp1 &= 0x00ff00ff; temp2 = s2 * m; temp2 += 0x00800080; temp2 += (temp2 >> 8) & 0x00ff00ff; temp2 >>= 8; temp2 &= 0x00ff00ff; /* over */ sa = (~temp2 >> 16) & 0xff; d1 = d & 0x00ff00ff; d1 *= sa; d1 += 0x00800080; d1 += (d1 >> 8) & 0x00ff00ff; d1 >>= 8; d1 &= 0x00ff00ff; d1 += temp1; d1 |= 0x01000100 - ((d1 >> 8) & 0x00ff00ff); d1 &= 0x00ff00ff; d2 = (d >> 8) & 0x00ff00ff; d2 *= sa; d2 += 0x00800080; d2 += (d2 >> 8) & 0x00ff00ff; d2 >>= 8; d2 &= 0x00ff00ff; d2 += temp2; d2 |= 0x01000100 - ((d2 >> 8) & 0x00ff00ff); d2 &= 0x00ff00ff; *dest++ = d1 | (d2 << 8); } } OIL_DEFINE_IMPL (composite_in_over_argb_const_src_fast, composite_in_over_argb_const_src); static void composite_in_over_argb_const_mask_fast (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { uint8_t m = *mask; for (; n > 0; n--) { uint32_t d = *dest, s = *src++; uint32_t s1, s2, d1, d2, sa; s1 = s & 0x00ff00ff; s2 = (s >> 8) & 0x00ff00ff; /* in */ s1 *= m; s1 += 0x00800080; s1 += (s1 >> 8) & 0x00ff00ff; s1 >>= 8; s1 &= 0x00ff00ff; s2 *= m; s2 += 0x00800080; s2 += (s2 >> 8) & 0x00ff00ff; s2 >>= 8; s2 &= 0x00ff00ff; /* over */ sa = (~s2 >> 16) & 0xff; d1 = d & 0x00ff00ff; d1 *= sa; d1 += 0x00800080; d1 += (d1 >> 8) & 0x00ff00ff; d1 >>= 8; d1 &= 0x00ff00ff; d1 += s1; d1 |= 0x01000100 - ((d1 >> 8) & 0x00ff00ff); d1 &= 0x00ff00ff; d2 = (d >> 8) & 0x00ff00ff; d2 *= sa; d2 += 0x00800080; d2 += (d2 >> 8) & 0x00ff00ff; d2 >>= 8; d2 &= 0x00ff00ff; d2 += s2; d2 |= 0x01000100 - ((d2 >> 8) & 0x00ff00ff); d2 &= 0x00ff00ff; *dest++ = d1 | (d2 << 8); } } OIL_DEFINE_IMPL (composite_in_over_argb_const_mask_fast, composite_in_over_argb_const_mask); #ifdef HAVE_UNALIGNED_ACCESS static void composite_add_u8_fast (uint8_t *dest, const uint8_t *src, int n) { for (; n > 3; n-= 4) { uint32_t s = *(uint32_t *)src, d = *(uint32_t *)dest; uint32_t s1, s2, d1, d2; s1 = s & 0x00ff00ff; s2 = (s >> 8) & 0x00ff00ff; d1 = d & 0x00ff00ff; d2 = (d >> 8) & 0x00ff00ff; d1 += s1; d1 |= 0x01000100 - ((d1 >> 8) & 0x00ff00ff); d1 &= 0x00ff00ff; d2 += s2; d2 |= 0x01000100 - ((d2 >> 8) & 0x00ff00ff); d2 &= 0x00ff00ff; *(uint32_t *)dest = d1 | (d2 << 8); src += 4; dest += 4; } for (; n > 0; n--) { *dest = COMPOSITE_ADD(*dest, *src); src++; dest++; } } OIL_DEFINE_IMPL (composite_add_u8_fast, composite_add_u8); #endif #ifdef HAVE_UNALIGNED_ACCESS static void composite_add_u8_const_src_fast (uint8_t *dest, const uint8_t *src, int n) { uint32_t s; s = *src | (*src << 16); for (; n > 3; n-= 4) { uint32_t d = *(uint32_t *)dest; uint32_t d1, d2; d1 = d & 0x00ff00ff; d2 = (d >> 8) & 0x00ff00ff; d1 += s; d1 |= 0x01000100 - ((d1 >> 8) & 0x00ff00ff); d1 &= 0x00ff00ff; d2 += s; d2 |= 0x01000100 - ((d2 >> 8) & 0x00ff00ff); d2 &= 0x00ff00ff; *(uint32_t *)dest = d1 | (d2 << 8); dest += 4; } for (; n > 0; n--) { *dest = COMPOSITE_ADD(*dest, *src); dest++; } } OIL_DEFINE_IMPL (composite_add_u8_const_src_fast, composite_add_u8_const_src); #endif #ifdef HAVE_UNALIGNED_ACCESS static void composite_over_u8_fast (uint8_t *dest, const uint8_t *src, int n) { for (; n > 3; n-= 4) { uint32_t d = *(uint32_t *)dest, s = *(uint32_t *)src; uint32_t d1, d2, s1, s2; d1 = d & 0x00ff00ff; d2 = (d >> 8) & 0x00ff00ff; s1 = s & 0x00ff00ff; s2 = (s >> 8) & 0x00ff00ff; d1 = ((d1 & 0xff) * (~s1 & 0xff)) | ((d1 & 0x00ff0000) * (~s1 >> 16 & 0xff)); d1 += 0x00800080; d1 += (d1 >> 8) & 0x00ff00ff; d1 >>= 8; d1 &= 0x00ff00ff; d1 += s1; d1 |= 0x01000100 - ((d1 >> 8) & 0x00ff00ff); d1 &= 0x00ff00ff; d2 = ((d2 & 0xff) * (~s2 & 0xff)) | ((d2 & 0x00ff0000) * (~s2 >> 16 & 0xff)); d2 += 0x00800080; d2 += (d2 >> 8) & 0x00ff00ff; d2 >>= 8; d2 &= 0x00ff00ff; d2 += s2; d2 |= 0x01000100 - ((d2 >> 8) & 0x00ff00ff); d2 &= 0x00ff00ff; *(uint32_t *)dest = d1 | (d2 << 8); dest += 4; src += 4; } for (; n > 0; n--) { *dest = COMPOSITE_OVER(*dest, *src, *src); dest++; src++; } } OIL_DEFINE_IMPL (composite_over_u8_fast, composite_over_u8); #endif liboil-0.3.17/liboil/c/swab.c0000644000175000017500000001022211067011142012557 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #ifdef HAVE_UNISTD_H #include #endif #include static void swab_u16_libc (uint16_t *d, const uint16_t *s, int n) { swab ((void *)s, (void *)d, n*2); } OIL_DEFINE_IMPL (swab_u16_libc, swab_u16); static void swab_u16_ptr (uint16_t *d, const uint16_t *s, int n) { int i; for(i=0;i>8); s++; } } OIL_DEFINE_IMPL (swab_u16_ptr, swab_u16); static void swab_u32_ptr (uint32_t *d, const uint32_t *s, int n) { int i; for(i=0;i>8) | (*s>>24); s++; } } OIL_DEFINE_IMPL (swab_u32_ptr, swab_u32); static void swab_u16_unroll2 (uint16_t *d, const uint16_t *s, int n) { int i; if (n&1) { *d++ = (*s<<8) | (*s>>8); s++; } n>>=1; for(i=0;i>8); s++; *d++ = (*s<<8) | (*s>>8); s++; } } OIL_DEFINE_IMPL (swab_u16_unroll2, swab_u16); static void swab_u16_unroll4 (uint16_t *d, const uint16_t *s, int n) { int i; while (n&3) { *d++ = (*s<<8) | (*s>>8); s++; n--; } n>>=2; for(i=0;i>8); s++; *d++ = (*s<<8) | (*s>>8); s++; *d++ = (*s<<8) | (*s>>8); s++; *d++ = (*s<<8) | (*s>>8); s++; } } OIL_DEFINE_IMPL (swab_u16_unroll4, swab_u16); static void swab_u32_unroll2 (uint32_t *d, const uint32_t *s, int n) { int i; if (n&1) { *d++ = (*s<<24) | ((*s&0x0000ff00)<<8) | ((*s&0x00ff0000)>>8) | (*s>>24); s++; } n>>=1; for(i=0;i>8) | (*s>>24); s++; *d++ = (*s<<24) | ((*s&0x0000ff00)<<8) | ((*s&0x00ff0000)>>8) | (*s>>24); s++; } } OIL_DEFINE_IMPL (swab_u32_unroll2, swab_u32); static void swab_u16_char (uint16_t *d, const uint16_t *s, int n) { int i; uint8_t *bd = (uint8_t *)d; uint8_t *bs = (uint8_t *)s; int x; for(i=0;i>8) | (*s>>24); s++; } } OIL_DEFINE_IMPL (swab_u32_char, swab_u32); #if 0 static void swab_u32_asm (uint32_t *d, uint32_t *s, int n) { asm volatile ("\n" "1:\n" " mov 0(%1), %%eax\n" " bswap %%eax\n" " mov %%eax, 0(%0)\n" " add $4, %0\n" " add $4, %1\n" " decl %2\n" " jne 1b\n" : "+r" (d), "+r" (s), "+r" (n) : : "eax"); } OIL_DEFINE_IMPL (swab_u32_asm, swab_u32); #endif liboil-0.3.17/liboil/c/ag_clamp.c0000644000175000017500000006571410717203073013415 00000000000000/* This file is autogenerated. Do not edit. */ /* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include static void clamp_s8_pointer (oil_type_s8 *dest, oil_type_s8 *src1, int n , oil_type_s8 *low , oil_type_s8 *high ) { while (n) { oil_type_s8 x = *src1; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamp_s8_pointer, clamp_s8); static void clamp_u8_pointer (oil_type_u8 *dest, oil_type_u8 *src1, int n , oil_type_u8 *low , oil_type_u8 *high ) { while (n) { oil_type_u8 x = *src1; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamp_u8_pointer, clamp_u8); static void clamp_s16_pointer (oil_type_s16 *dest, oil_type_s16 *src1, int n , oil_type_s16 *low , oil_type_s16 *high ) { while (n) { oil_type_s16 x = *src1; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamp_s16_pointer, clamp_s16); static void clamp_u16_pointer (oil_type_u16 *dest, oil_type_u16 *src1, int n , oil_type_u16 *low , oil_type_u16 *high ) { while (n) { oil_type_u16 x = *src1; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamp_u16_pointer, clamp_u16); static void clamp_s32_pointer (oil_type_s32 *dest, oil_type_s32 *src1, int n , oil_type_s32 *low , oil_type_s32 *high ) { while (n) { oil_type_s32 x = *src1; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamp_s32_pointer, clamp_s32); static void clamp_u32_pointer (oil_type_u32 *dest, oil_type_u32 *src1, int n , oil_type_u32 *low , oil_type_u32 *high ) { while (n) { oil_type_u32 x = *src1; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamp_u32_pointer, clamp_u32); static void clamp_s8_unroll4 (oil_type_s8 *dest, oil_type_s8 *src, int n , oil_type_s8 *low, oil_type_s8 *high) { oil_type_s8 x; while (n&3) { x = *src; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x < *low) x = *low; if (x > *high) x = *high; dest[0] = x; x = src[1]; if (x < *low) x = *low; if (x > *high) x = *high; dest[1] = x; x = src[2]; if (x < *low) x = *low; if (x > *high) x = *high; dest[2] = x; x = src[3]; if (x < *low) x = *low; if (x > *high) x = *high; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamp_s8_unroll4, clamp_s8); static void clamp_u8_unroll4 (oil_type_u8 *dest, oil_type_u8 *src, int n , oil_type_u8 *low, oil_type_u8 *high) { oil_type_u8 x; while (n&3) { x = *src; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x < *low) x = *low; if (x > *high) x = *high; dest[0] = x; x = src[1]; if (x < *low) x = *low; if (x > *high) x = *high; dest[1] = x; x = src[2]; if (x < *low) x = *low; if (x > *high) x = *high; dest[2] = x; x = src[3]; if (x < *low) x = *low; if (x > *high) x = *high; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamp_u8_unroll4, clamp_u8); static void clamp_s16_unroll4 (oil_type_s16 *dest, oil_type_s16 *src, int n , oil_type_s16 *low, oil_type_s16 *high) { oil_type_s16 x; while (n&3) { x = *src; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x < *low) x = *low; if (x > *high) x = *high; dest[0] = x; x = src[1]; if (x < *low) x = *low; if (x > *high) x = *high; dest[1] = x; x = src[2]; if (x < *low) x = *low; if (x > *high) x = *high; dest[2] = x; x = src[3]; if (x < *low) x = *low; if (x > *high) x = *high; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamp_s16_unroll4, clamp_s16); static void clamp_u16_unroll4 (oil_type_u16 *dest, oil_type_u16 *src, int n , oil_type_u16 *low, oil_type_u16 *high) { oil_type_u16 x; while (n&3) { x = *src; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x < *low) x = *low; if (x > *high) x = *high; dest[0] = x; x = src[1]; if (x < *low) x = *low; if (x > *high) x = *high; dest[1] = x; x = src[2]; if (x < *low) x = *low; if (x > *high) x = *high; dest[2] = x; x = src[3]; if (x < *low) x = *low; if (x > *high) x = *high; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamp_u16_unroll4, clamp_u16); static void clamp_s32_unroll4 (oil_type_s32 *dest, oil_type_s32 *src, int n , oil_type_s32 *low, oil_type_s32 *high) { oil_type_s32 x; while (n&3) { x = *src; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x < *low) x = *low; if (x > *high) x = *high; dest[0] = x; x = src[1]; if (x < *low) x = *low; if (x > *high) x = *high; dest[1] = x; x = src[2]; if (x < *low) x = *low; if (x > *high) x = *high; dest[2] = x; x = src[3]; if (x < *low) x = *low; if (x > *high) x = *high; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamp_s32_unroll4, clamp_s32); static void clamp_u32_unroll4 (oil_type_u32 *dest, oil_type_u32 *src, int n , oil_type_u32 *low, oil_type_u32 *high) { oil_type_u32 x; while (n&3) { x = *src; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x < *low) x = *low; if (x > *high) x = *high; dest[0] = x; x = src[1]; if (x < *low) x = *low; if (x > *high) x = *high; dest[1] = x; x = src[2]; if (x < *low) x = *low; if (x > *high) x = *high; dest[2] = x; x = src[3]; if (x < *low) x = *low; if (x > *high) x = *high; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamp_u32_unroll4, clamp_u32); static void clamp_s8_trick (oil_type_s8 *dest, oil_type_s8 *src, int n , oil_type_s8 *low, oil_type_s8 *high) { int x; while (n&3) { x = *src; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[0] = x; x = src[1]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[1] = x; x = src[2]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[2] = x; x = src[3]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamp_s8_trick, clamp_s8); static void clamp_u8_trick (oil_type_u8 *dest, oil_type_u8 *src, int n , oil_type_u8 *low, oil_type_u8 *high) { int x; while (n&3) { x = *src; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[0] = x; x = src[1]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[1] = x; x = src[2]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[2] = x; x = src[3]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamp_u8_trick, clamp_u8); static void clamp_s16_trick (oil_type_s16 *dest, oil_type_s16 *src, int n , oil_type_s16 *low, oil_type_s16 *high) { int x; while (n&3) { x = *src; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[0] = x; x = src[1]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[1] = x; x = src[2]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[2] = x; x = src[3]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamp_s16_trick, clamp_s16); static void clamp_u16_trick (oil_type_u16 *dest, oil_type_u16 *src, int n , oil_type_u16 *low, oil_type_u16 *high) { int x; while (n&3) { x = *src; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[0] = x; x = src[1]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[1] = x; x = src[2]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[2] = x; x = src[3]; x = x - (((x-*low)>>31)&(x-*low)); x = x + (((*high-x)>>31)&(*high-x)); dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamp_u16_trick, clamp_u16); static void clamphigh_s8_pointer (oil_type_s8 *dest, oil_type_s8 *src1, int n , oil_type_s8 *high ) { while (n) { oil_type_s8 x = *src1; if (x > *high) x = *high; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamphigh_s8_pointer, clamphigh_s8); static void clamphigh_u8_pointer (oil_type_u8 *dest, oil_type_u8 *src1, int n , oil_type_u8 *high ) { while (n) { oil_type_u8 x = *src1; if (x > *high) x = *high; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamphigh_u8_pointer, clamphigh_u8); static void clamphigh_s16_pointer (oil_type_s16 *dest, oil_type_s16 *src1, int n , oil_type_s16 *high ) { while (n) { oil_type_s16 x = *src1; if (x > *high) x = *high; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamphigh_s16_pointer, clamphigh_s16); static void clamphigh_u16_pointer (oil_type_u16 *dest, oil_type_u16 *src1, int n , oil_type_u16 *high ) { while (n) { oil_type_u16 x = *src1; if (x > *high) x = *high; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamphigh_u16_pointer, clamphigh_u16); static void clamphigh_s32_pointer (oil_type_s32 *dest, oil_type_s32 *src1, int n , oil_type_s32 *high ) { while (n) { oil_type_s32 x = *src1; if (x > *high) x = *high; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamphigh_s32_pointer, clamphigh_s32); static void clamphigh_u32_pointer (oil_type_u32 *dest, oil_type_u32 *src1, int n , oil_type_u32 *high ) { while (n) { oil_type_u32 x = *src1; if (x > *high) x = *high; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamphigh_u32_pointer, clamphigh_u32); static void clamphigh_s8_unroll4 (oil_type_s8 *dest, oil_type_s8 *src, int n , oil_type_s8 *high) { oil_type_s8 x; while (n&3) { x = *src; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x > *high) x = *high; dest[0] = x; x = src[1]; if (x > *high) x = *high; dest[1] = x; x = src[2]; if (x > *high) x = *high; dest[2] = x; x = src[3]; if (x > *high) x = *high; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamphigh_s8_unroll4, clamphigh_s8); static void clamphigh_u8_unroll4 (oil_type_u8 *dest, oil_type_u8 *src, int n , oil_type_u8 *high) { oil_type_u8 x; while (n&3) { x = *src; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x > *high) x = *high; dest[0] = x; x = src[1]; if (x > *high) x = *high; dest[1] = x; x = src[2]; if (x > *high) x = *high; dest[2] = x; x = src[3]; if (x > *high) x = *high; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamphigh_u8_unroll4, clamphigh_u8); static void clamphigh_s16_unroll4 (oil_type_s16 *dest, oil_type_s16 *src, int n , oil_type_s16 *high) { oil_type_s16 x; while (n&3) { x = *src; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x > *high) x = *high; dest[0] = x; x = src[1]; if (x > *high) x = *high; dest[1] = x; x = src[2]; if (x > *high) x = *high; dest[2] = x; x = src[3]; if (x > *high) x = *high; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamphigh_s16_unroll4, clamphigh_s16); static void clamphigh_u16_unroll4 (oil_type_u16 *dest, oil_type_u16 *src, int n , oil_type_u16 *high) { oil_type_u16 x; while (n&3) { x = *src; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x > *high) x = *high; dest[0] = x; x = src[1]; if (x > *high) x = *high; dest[1] = x; x = src[2]; if (x > *high) x = *high; dest[2] = x; x = src[3]; if (x > *high) x = *high; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamphigh_u16_unroll4, clamphigh_u16); static void clamphigh_s32_unroll4 (oil_type_s32 *dest, oil_type_s32 *src, int n , oil_type_s32 *high) { oil_type_s32 x; while (n&3) { x = *src; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x > *high) x = *high; dest[0] = x; x = src[1]; if (x > *high) x = *high; dest[1] = x; x = src[2]; if (x > *high) x = *high; dest[2] = x; x = src[3]; if (x > *high) x = *high; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamphigh_s32_unroll4, clamphigh_s32); static void clamphigh_u32_unroll4 (oil_type_u32 *dest, oil_type_u32 *src, int n , oil_type_u32 *high) { oil_type_u32 x; while (n&3) { x = *src; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x > *high) x = *high; dest[0] = x; x = src[1]; if (x > *high) x = *high; dest[1] = x; x = src[2]; if (x > *high) x = *high; dest[2] = x; x = src[3]; if (x > *high) x = *high; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamphigh_u32_unroll4, clamphigh_u32); static void clamphigh_s8_trick (oil_type_s8 *dest, oil_type_s8 *src, int n , oil_type_s8 *high) { int x; while (n&3) { x = *src; x = x + (((*high-x)>>31)&(*high-x)); *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; x = x + (((*high-x)>>31)&(*high-x)); dest[0] = x; x = src[1]; x = x + (((*high-x)>>31)&(*high-x)); dest[1] = x; x = src[2]; x = x + (((*high-x)>>31)&(*high-x)); dest[2] = x; x = src[3]; x = x + (((*high-x)>>31)&(*high-x)); dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamphigh_s8_trick, clamphigh_s8); static void clamphigh_u8_trick (oil_type_u8 *dest, oil_type_u8 *src, int n , oil_type_u8 *high) { int x; while (n&3) { x = *src; x = x + (((*high-x)>>31)&(*high-x)); *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; x = x + (((*high-x)>>31)&(*high-x)); dest[0] = x; x = src[1]; x = x + (((*high-x)>>31)&(*high-x)); dest[1] = x; x = src[2]; x = x + (((*high-x)>>31)&(*high-x)); dest[2] = x; x = src[3]; x = x + (((*high-x)>>31)&(*high-x)); dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamphigh_u8_trick, clamphigh_u8); static void clamphigh_s16_trick (oil_type_s16 *dest, oil_type_s16 *src, int n , oil_type_s16 *high) { int x; while (n&3) { x = *src; x = x + (((*high-x)>>31)&(*high-x)); *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; x = x + (((*high-x)>>31)&(*high-x)); dest[0] = x; x = src[1]; x = x + (((*high-x)>>31)&(*high-x)); dest[1] = x; x = src[2]; x = x + (((*high-x)>>31)&(*high-x)); dest[2] = x; x = src[3]; x = x + (((*high-x)>>31)&(*high-x)); dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamphigh_s16_trick, clamphigh_s16); static void clamphigh_u16_trick (oil_type_u16 *dest, oil_type_u16 *src, int n , oil_type_u16 *high) { int x; while (n&3) { x = *src; x = x + (((*high-x)>>31)&(*high-x)); *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; x = x + (((*high-x)>>31)&(*high-x)); dest[0] = x; x = src[1]; x = x + (((*high-x)>>31)&(*high-x)); dest[1] = x; x = src[2]; x = x + (((*high-x)>>31)&(*high-x)); dest[2] = x; x = src[3]; x = x + (((*high-x)>>31)&(*high-x)); dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamphigh_u16_trick, clamphigh_u16); static void clamplow_s8_pointer (oil_type_s8 *dest, oil_type_s8 *src1, int n , oil_type_s8 *low ) { while (n) { oil_type_s8 x = *src1; if (x < *low) x = *low; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamplow_s8_pointer, clamplow_s8); static void clamplow_u8_pointer (oil_type_u8 *dest, oil_type_u8 *src1, int n , oil_type_u8 *low ) { while (n) { oil_type_u8 x = *src1; if (x < *low) x = *low; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamplow_u8_pointer, clamplow_u8); static void clamplow_s16_pointer (oil_type_s16 *dest, oil_type_s16 *src1, int n , oil_type_s16 *low ) { while (n) { oil_type_s16 x = *src1; if (x < *low) x = *low; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamplow_s16_pointer, clamplow_s16); static void clamplow_u16_pointer (oil_type_u16 *dest, oil_type_u16 *src1, int n , oil_type_u16 *low ) { while (n) { oil_type_u16 x = *src1; if (x < *low) x = *low; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamplow_u16_pointer, clamplow_u16); static void clamplow_s32_pointer (oil_type_s32 *dest, oil_type_s32 *src1, int n , oil_type_s32 *low ) { while (n) { oil_type_s32 x = *src1; if (x < *low) x = *low; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamplow_s32_pointer, clamplow_s32); static void clamplow_u32_pointer (oil_type_u32 *dest, oil_type_u32 *src1, int n , oil_type_u32 *low ) { while (n) { oil_type_u32 x = *src1; if (x < *low) x = *low; *dest = x; dest++; src1++; n--; } } OIL_DEFINE_IMPL (clamplow_u32_pointer, clamplow_u32); static void clamplow_s8_unroll4 (oil_type_s8 *dest, oil_type_s8 *src, int n , oil_type_s8 *low) { oil_type_s8 x; while (n&3) { x = *src; if (x < *low) x = *low; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x < *low) x = *low; dest[0] = x; x = src[1]; if (x < *low) x = *low; dest[1] = x; x = src[2]; if (x < *low) x = *low; dest[2] = x; x = src[3]; if (x < *low) x = *low; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamplow_s8_unroll4, clamplow_s8); static void clamplow_u8_unroll4 (oil_type_u8 *dest, oil_type_u8 *src, int n , oil_type_u8 *low) { oil_type_u8 x; while (n&3) { x = *src; if (x < *low) x = *low; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x < *low) x = *low; dest[0] = x; x = src[1]; if (x < *low) x = *low; dest[1] = x; x = src[2]; if (x < *low) x = *low; dest[2] = x; x = src[3]; if (x < *low) x = *low; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamplow_u8_unroll4, clamplow_u8); static void clamplow_s16_unroll4 (oil_type_s16 *dest, oil_type_s16 *src, int n , oil_type_s16 *low) { oil_type_s16 x; while (n&3) { x = *src; if (x < *low) x = *low; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x < *low) x = *low; dest[0] = x; x = src[1]; if (x < *low) x = *low; dest[1] = x; x = src[2]; if (x < *low) x = *low; dest[2] = x; x = src[3]; if (x < *low) x = *low; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamplow_s16_unroll4, clamplow_s16); static void clamplow_u16_unroll4 (oil_type_u16 *dest, oil_type_u16 *src, int n , oil_type_u16 *low) { oil_type_u16 x; while (n&3) { x = *src; if (x < *low) x = *low; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x < *low) x = *low; dest[0] = x; x = src[1]; if (x < *low) x = *low; dest[1] = x; x = src[2]; if (x < *low) x = *low; dest[2] = x; x = src[3]; if (x < *low) x = *low; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamplow_u16_unroll4, clamplow_u16); static void clamplow_s32_unroll4 (oil_type_s32 *dest, oil_type_s32 *src, int n , oil_type_s32 *low) { oil_type_s32 x; while (n&3) { x = *src; if (x < *low) x = *low; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x < *low) x = *low; dest[0] = x; x = src[1]; if (x < *low) x = *low; dest[1] = x; x = src[2]; if (x < *low) x = *low; dest[2] = x; x = src[3]; if (x < *low) x = *low; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamplow_s32_unroll4, clamplow_s32); static void clamplow_u32_unroll4 (oil_type_u32 *dest, oil_type_u32 *src, int n , oil_type_u32 *low) { oil_type_u32 x; while (n&3) { x = *src; if (x < *low) x = *low; *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; if (x < *low) x = *low; dest[0] = x; x = src[1]; if (x < *low) x = *low; dest[1] = x; x = src[2]; if (x < *low) x = *low; dest[2] = x; x = src[3]; if (x < *low) x = *low; dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamplow_u32_unroll4, clamplow_u32); static void clamplow_s8_trick (oil_type_s8 *dest, oil_type_s8 *src, int n , oil_type_s8 *low) { int x; while (n&3) { x = *src; x = x - (((x-*low)>>31)&(x-*low)); *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; x = x - (((x-*low)>>31)&(x-*low)); dest[0] = x; x = src[1]; x = x - (((x-*low)>>31)&(x-*low)); dest[1] = x; x = src[2]; x = x - (((x-*low)>>31)&(x-*low)); dest[2] = x; x = src[3]; x = x - (((x-*low)>>31)&(x-*low)); dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamplow_s8_trick, clamplow_s8); static void clamplow_u8_trick (oil_type_u8 *dest, oil_type_u8 *src, int n , oil_type_u8 *low) { int x; while (n&3) { x = *src; x = x - (((x-*low)>>31)&(x-*low)); *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; x = x - (((x-*low)>>31)&(x-*low)); dest[0] = x; x = src[1]; x = x - (((x-*low)>>31)&(x-*low)); dest[1] = x; x = src[2]; x = x - (((x-*low)>>31)&(x-*low)); dest[2] = x; x = src[3]; x = x - (((x-*low)>>31)&(x-*low)); dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamplow_u8_trick, clamplow_u8); static void clamplow_s16_trick (oil_type_s16 *dest, oil_type_s16 *src, int n , oil_type_s16 *low) { int x; while (n&3) { x = *src; x = x - (((x-*low)>>31)&(x-*low)); *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; x = x - (((x-*low)>>31)&(x-*low)); dest[0] = x; x = src[1]; x = x - (((x-*low)>>31)&(x-*low)); dest[1] = x; x = src[2]; x = x - (((x-*low)>>31)&(x-*low)); dest[2] = x; x = src[3]; x = x - (((x-*low)>>31)&(x-*low)); dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamplow_s16_trick, clamplow_s16); static void clamplow_u16_trick (oil_type_u16 *dest, oil_type_u16 *src, int n , oil_type_u16 *low) { int x; while (n&3) { x = *src; x = x - (((x-*low)>>31)&(x-*low)); *dest = x; dest++; src++; n--; } n >>= 2; while (n) { x = src[0]; x = x - (((x-*low)>>31)&(x-*low)); dest[0] = x; x = src[1]; x = x - (((x-*low)>>31)&(x-*low)); dest[1] = x; x = src[2]; x = x - (((x-*low)>>31)&(x-*low)); dest[2] = x; x = src[3]; x = x - (((x-*low)>>31)&(x-*low)); dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (clamplow_u16_trick, clamplow_u16); liboil-0.3.17/liboil/c/Makefile.am0000644000175000017500000000100211067011142013507 00000000000000 if USE_ALT_OPT opt_libs = lib_c_opt1.la else opt_libs = endif EXTRA_DIST = generate_clamp.pl noinst_LTLIBRARIES = lib_c.la $(opt_libs) c_sources = \ ag_clamp.c \ composite.c \ copy.c \ swab.c \ wavelet.c lib_c_la_SOURCES = \ $(c_sources) lib_c_la_LIBADD = \ $(opt_libs) lib_c_la_CFLAGS = $(LIBOIL_CFLAGS) lib_c_opt1_la_SOURCES = $(c_sources) lib_c_opt1_la_CFLAGS = $(LIBOIL_CFLAGS) \ $(LIBOIL_OPT_CFLAGS) ag_clamp.c: generate_clamp.pl $(srcdir)/generate_clamp.pl >ag_clamp.c liboil-0.3.17/liboil/c/wavelet.c0000644000175000017500000000104510727102053013301 00000000000000 #include #include void multiply_and_acc_6xn_s16_u8_c (int16_t *i1, int is1, int16_t *s1, int ss1, uint8_t *s2, int ss2, int n) { int j; for(j=0;j * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include EOF ; sub clamp_pointer { my $kernel = shift; my $type = shift; my $low = 1; my $high = 1; ($kernel eq "clamphigh") and $low = 0; ($kernel eq "clamplow") and $high = 0; print < *high) x = *high;\n"); print <>= 2; while (n) { x = src[0]; $clamp dest[0] = x; x = src[1]; $clamp dest[1] = x; x = src[2]; $clamp dest[2] = x; x = src[3]; $clamp dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (${kernel}_${type}_unroll4, ${kernel}_${type}); EOF ; } sub clamp_trick { my $kernel = shift; my $type = shift; my $low = 1; my $high = 1; ($kernel eq "clamphigh") and $low = 0; ($kernel eq "clamplow") and $high = 0; $proto = ""; $low and $proto .= ", oil_type_${type} *low"; $high and $proto .= ", oil_type_${type} *high"; $clamp = ""; $low and $clamp .= " x = x - (((x-*low)>>31)&(x-*low));\n"; $high and $clamp .= " x = x + (((*high-x)>>31)&(*high-x));\n"; print <>= 2; while (n) { x = src[0]; $clamp dest[0] = x; x = src[1]; $clamp dest[1] = x; x = src[2]; $clamp dest[2] = x; x = src[3]; $clamp dest[3] = x; dest+=4; src+=4; n--; } } OIL_DEFINE_IMPL (${kernel}_${type}_trick, ${kernel}_${type}); EOF ; } clamp_pointer("clamp", "s8"); clamp_pointer("clamp", "u8"); clamp_pointer("clamp", "s16"); clamp_pointer("clamp", "u16"); clamp_pointer("clamp", "s32"); clamp_pointer("clamp", "u32"); clamp_unroll4("clamp", "s8"); clamp_unroll4("clamp", "u8"); clamp_unroll4("clamp", "s16"); clamp_unroll4("clamp", "u16"); clamp_unroll4("clamp", "s32"); clamp_unroll4("clamp", "u32"); clamp_trick("clamp", "s8"); clamp_trick("clamp", "u8"); clamp_trick("clamp", "s16"); clamp_trick("clamp", "u16"); clamp_pointer("clamphigh", "s8"); clamp_pointer("clamphigh", "u8"); clamp_pointer("clamphigh", "s16"); clamp_pointer("clamphigh", "u16"); clamp_pointer("clamphigh", "s32"); clamp_pointer("clamphigh", "u32"); clamp_unroll4("clamphigh", "s8"); clamp_unroll4("clamphigh", "u8"); clamp_unroll4("clamphigh", "s16"); clamp_unroll4("clamphigh", "u16"); clamp_unroll4("clamphigh", "s32"); clamp_unroll4("clamphigh", "u32"); clamp_trick("clamphigh", "s8"); clamp_trick("clamphigh", "u8"); clamp_trick("clamphigh", "s16"); clamp_trick("clamphigh", "u16"); clamp_pointer("clamplow", "s8"); clamp_pointer("clamplow", "u8"); clamp_pointer("clamplow", "s16"); clamp_pointer("clamplow", "u16"); clamp_pointer("clamplow", "s32"); clamp_pointer("clamplow", "u32"); clamp_unroll4("clamplow", "s8"); clamp_unroll4("clamplow", "u8"); clamp_unroll4("clamplow", "s16"); clamp_unroll4("clamplow", "u16"); clamp_unroll4("clamplow", "s32"); clamp_unroll4("clamplow", "u32"); clamp_trick("clamplow", "s8"); clamp_trick("clamplow", "u8"); clamp_trick("clamplow", "s16"); clamp_trick("clamplow", "u16"); exit 0; liboil-0.3.17/liboil/c/Makefile.in0000644000175000017500000006472011332627671013557 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = liboil/c DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @USE_ALT_OPT_TRUE@am__DEPENDENCIES_1 = lib_c_opt1.la lib_c_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__objects_1 = lib_c_la-ag_clamp.lo lib_c_la-composite.lo \ lib_c_la-copy.lo lib_c_la-swab.lo lib_c_la-wavelet.lo am_lib_c_la_OBJECTS = $(am__objects_1) lib_c_la_OBJECTS = $(am_lib_c_la_OBJECTS) lib_c_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(lib_c_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ lib_c_opt1_la_LIBADD = am__objects_2 = lib_c_opt1_la-ag_clamp.lo lib_c_opt1_la-composite.lo \ lib_c_opt1_la-copy.lo lib_c_opt1_la-swab.lo \ lib_c_opt1_la-wavelet.lo am_lib_c_opt1_la_OBJECTS = $(am__objects_2) lib_c_opt1_la_OBJECTS = $(am_lib_c_opt1_la_OBJECTS) lib_c_opt1_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(lib_c_opt1_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_ALT_OPT_TRUE@am_lib_c_opt1_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(lib_c_la_SOURCES) $(lib_c_opt1_la_SOURCES) DIST_SOURCES = $(lib_c_la_SOURCES) $(lib_c_opt1_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @USE_ALT_OPT_FALSE@opt_libs = @USE_ALT_OPT_TRUE@opt_libs = lib_c_opt1.la EXTRA_DIST = generate_clamp.pl noinst_LTLIBRARIES = lib_c.la $(opt_libs) c_sources = \ ag_clamp.c \ composite.c \ copy.c \ swab.c \ wavelet.c lib_c_la_SOURCES = \ $(c_sources) lib_c_la_LIBADD = \ $(opt_libs) lib_c_la_CFLAGS = $(LIBOIL_CFLAGS) lib_c_opt1_la_SOURCES = $(c_sources) lib_c_opt1_la_CFLAGS = $(LIBOIL_CFLAGS) \ $(LIBOIL_OPT_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/c/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/c/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done lib_c.la: $(lib_c_la_OBJECTS) $(lib_c_la_DEPENDENCIES) $(lib_c_la_LINK) $(lib_c_la_OBJECTS) $(lib_c_la_LIBADD) $(LIBS) lib_c_opt1.la: $(lib_c_opt1_la_OBJECTS) $(lib_c_opt1_la_DEPENDENCIES) $(lib_c_opt1_la_LINK) $(am_lib_c_opt1_la_rpath) $(lib_c_opt1_la_OBJECTS) $(lib_c_opt1_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_c_la-ag_clamp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_c_la-composite.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_c_la-copy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_c_la-swab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_c_la-wavelet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_c_opt1_la-ag_clamp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_c_opt1_la-composite.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_c_opt1_la-copy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_c_opt1_la-swab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib_c_opt1_la-wavelet.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< lib_c_la-ag_clamp.lo: ag_clamp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_la_CFLAGS) $(CFLAGS) -MT lib_c_la-ag_clamp.lo -MD -MP -MF $(DEPDIR)/lib_c_la-ag_clamp.Tpo -c -o lib_c_la-ag_clamp.lo `test -f 'ag_clamp.c' || echo '$(srcdir)/'`ag_clamp.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lib_c_la-ag_clamp.Tpo $(DEPDIR)/lib_c_la-ag_clamp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ag_clamp.c' object='lib_c_la-ag_clamp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_la_CFLAGS) $(CFLAGS) -c -o lib_c_la-ag_clamp.lo `test -f 'ag_clamp.c' || echo '$(srcdir)/'`ag_clamp.c lib_c_la-composite.lo: composite.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_la_CFLAGS) $(CFLAGS) -MT lib_c_la-composite.lo -MD -MP -MF $(DEPDIR)/lib_c_la-composite.Tpo -c -o lib_c_la-composite.lo `test -f 'composite.c' || echo '$(srcdir)/'`composite.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lib_c_la-composite.Tpo $(DEPDIR)/lib_c_la-composite.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='composite.c' object='lib_c_la-composite.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_la_CFLAGS) $(CFLAGS) -c -o lib_c_la-composite.lo `test -f 'composite.c' || echo '$(srcdir)/'`composite.c lib_c_la-copy.lo: copy.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_la_CFLAGS) $(CFLAGS) -MT lib_c_la-copy.lo -MD -MP -MF $(DEPDIR)/lib_c_la-copy.Tpo -c -o lib_c_la-copy.lo `test -f 'copy.c' || echo '$(srcdir)/'`copy.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lib_c_la-copy.Tpo $(DEPDIR)/lib_c_la-copy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy.c' object='lib_c_la-copy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_la_CFLAGS) $(CFLAGS) -c -o lib_c_la-copy.lo `test -f 'copy.c' || echo '$(srcdir)/'`copy.c lib_c_la-swab.lo: swab.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_la_CFLAGS) $(CFLAGS) -MT lib_c_la-swab.lo -MD -MP -MF $(DEPDIR)/lib_c_la-swab.Tpo -c -o lib_c_la-swab.lo `test -f 'swab.c' || echo '$(srcdir)/'`swab.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lib_c_la-swab.Tpo $(DEPDIR)/lib_c_la-swab.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='swab.c' object='lib_c_la-swab.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_la_CFLAGS) $(CFLAGS) -c -o lib_c_la-swab.lo `test -f 'swab.c' || echo '$(srcdir)/'`swab.c lib_c_la-wavelet.lo: wavelet.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_la_CFLAGS) $(CFLAGS) -MT lib_c_la-wavelet.lo -MD -MP -MF $(DEPDIR)/lib_c_la-wavelet.Tpo -c -o lib_c_la-wavelet.lo `test -f 'wavelet.c' || echo '$(srcdir)/'`wavelet.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lib_c_la-wavelet.Tpo $(DEPDIR)/lib_c_la-wavelet.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wavelet.c' object='lib_c_la-wavelet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_la_CFLAGS) $(CFLAGS) -c -o lib_c_la-wavelet.lo `test -f 'wavelet.c' || echo '$(srcdir)/'`wavelet.c lib_c_opt1_la-ag_clamp.lo: ag_clamp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_opt1_la_CFLAGS) $(CFLAGS) -MT lib_c_opt1_la-ag_clamp.lo -MD -MP -MF $(DEPDIR)/lib_c_opt1_la-ag_clamp.Tpo -c -o lib_c_opt1_la-ag_clamp.lo `test -f 'ag_clamp.c' || echo '$(srcdir)/'`ag_clamp.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lib_c_opt1_la-ag_clamp.Tpo $(DEPDIR)/lib_c_opt1_la-ag_clamp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ag_clamp.c' object='lib_c_opt1_la-ag_clamp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_opt1_la_CFLAGS) $(CFLAGS) -c -o lib_c_opt1_la-ag_clamp.lo `test -f 'ag_clamp.c' || echo '$(srcdir)/'`ag_clamp.c lib_c_opt1_la-composite.lo: composite.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_opt1_la_CFLAGS) $(CFLAGS) -MT lib_c_opt1_la-composite.lo -MD -MP -MF $(DEPDIR)/lib_c_opt1_la-composite.Tpo -c -o lib_c_opt1_la-composite.lo `test -f 'composite.c' || echo '$(srcdir)/'`composite.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lib_c_opt1_la-composite.Tpo $(DEPDIR)/lib_c_opt1_la-composite.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='composite.c' object='lib_c_opt1_la-composite.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_opt1_la_CFLAGS) $(CFLAGS) -c -o lib_c_opt1_la-composite.lo `test -f 'composite.c' || echo '$(srcdir)/'`composite.c lib_c_opt1_la-copy.lo: copy.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_opt1_la_CFLAGS) $(CFLAGS) -MT lib_c_opt1_la-copy.lo -MD -MP -MF $(DEPDIR)/lib_c_opt1_la-copy.Tpo -c -o lib_c_opt1_la-copy.lo `test -f 'copy.c' || echo '$(srcdir)/'`copy.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lib_c_opt1_la-copy.Tpo $(DEPDIR)/lib_c_opt1_la-copy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy.c' object='lib_c_opt1_la-copy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_opt1_la_CFLAGS) $(CFLAGS) -c -o lib_c_opt1_la-copy.lo `test -f 'copy.c' || echo '$(srcdir)/'`copy.c lib_c_opt1_la-swab.lo: swab.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_opt1_la_CFLAGS) $(CFLAGS) -MT lib_c_opt1_la-swab.lo -MD -MP -MF $(DEPDIR)/lib_c_opt1_la-swab.Tpo -c -o lib_c_opt1_la-swab.lo `test -f 'swab.c' || echo '$(srcdir)/'`swab.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lib_c_opt1_la-swab.Tpo $(DEPDIR)/lib_c_opt1_la-swab.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='swab.c' object='lib_c_opt1_la-swab.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_opt1_la_CFLAGS) $(CFLAGS) -c -o lib_c_opt1_la-swab.lo `test -f 'swab.c' || echo '$(srcdir)/'`swab.c lib_c_opt1_la-wavelet.lo: wavelet.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_opt1_la_CFLAGS) $(CFLAGS) -MT lib_c_opt1_la-wavelet.lo -MD -MP -MF $(DEPDIR)/lib_c_opt1_la-wavelet.Tpo -c -o lib_c_opt1_la-wavelet.lo `test -f 'wavelet.c' || echo '$(srcdir)/'`wavelet.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lib_c_opt1_la-wavelet.Tpo $(DEPDIR)/lib_c_opt1_la-wavelet.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wavelet.c' object='lib_c_opt1_la-wavelet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_c_opt1_la_CFLAGS) $(CFLAGS) -c -o lib_c_opt1_la-wavelet.lo `test -f 'wavelet.c' || echo '$(srcdir)/'`wavelet.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am ag_clamp.c: generate_clamp.pl $(srcdir)/generate_clamp.pl >ag_clamp.c # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/c/copy.c0000644000175000017500000000543411067011142012606 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #ifdef HAVE_UNISTD_H #include #endif static void testzero_u8_1 (uint32_t *dest, uint8_t *src1, int n) { uint8_t *s = src1; while(n>0 && (((unsigned long)s)&0x3)) { if (*s == 0) { goto foundzero; } s++; n--; } while (n>3) { uint32_t x; x = *(uint32_t *)s; if ((x ^ (x - 0x01010101))& 0x80808080) { int i; /* there's either a 0x00 or 0x80 byte */ for(i=0;i<4;i++){ if (s[i] == 0) { s += i; goto foundzero; } } } s += 4; n -= 4; } while(n>0) { if (*s == 0) { goto foundzero; } s++; n--; } dest[0] = n; foundzero: dest[0] = s - src1; } OIL_DEFINE_IMPL (testzero_u8_1, testzero_u8); #ifdef HAVE_UNALIGNED_ACCESS static void testzero_u8_2 (uint32_t *dest, uint8_t *src1, int n) { int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_TEST_H_ #define _LIBOIL_TEST_H_ #include #include #include #include OIL_BEGIN_DECLS #ifdef OIL_ENABLE_UNSTABLE_API /** * OilTest: * * An opaque structure describing how to test an OilFunctionImpl * for an OilFunctionClass. */ struct _OilTest { /*< private >*/ OilFunctionClass *klass; OilFunctionImpl *impl; OilPrototype *proto; OilParameter params[OIL_ARG_LAST]; OilProfile prof; int iterations; int n; int m; int inited; int tested_ref; double sum_abs_diff; int n_points; double profile_ave; double profile_std; double tolerance; }; /** * OilTestFunction: * @test: the @OilTest structure * * Typedef for functions that initialize special values * in source arrays for a particular function class. */ //typedef void (*OilTestFunction) (OilTest *test); /** * OIL_TEST_HEADER: * * Default number of bytes that are prepended to the array test area. */ #define OIL_TEST_HEADER 256 /** * OIL_TEST_FOOTER: * * Default number of bytes that are appended to the array test area. */ #define OIL_TEST_FOOTER 256 OilTest *oil_test_new (OilFunctionClass *klass); void oil_test_free (OilTest *test); void oil_test_set_iterations (OilTest *test, int iterations); void oil_test_check_ref (OilTest *test); int oil_test_check_impl (OilTest *test, OilFunctionImpl *impl); void oil_test_cleanup (OilTest *test); void oil_test_init (OilTest *test); void oil_test_set_test_header (OilTest *test, OilParameter *p, int test_header); void oil_test_set_test_footer (OilTest *test, OilParameter *p, int test_footer); void _oil_test_marshal_function (void *func, unsigned long *args, int n_args, unsigned int pointer_mask, OilProfile *prof); void *oil_test_get_source_data (OilTest *test, OilArgType arg_type); int oil_test_get_arg_pre_n (OilTest *test, OilArgType arg_type); int oil_test_get_arg_post_n (OilTest *test, OilArgType arg_type); int oil_test_get_arg_stride (OilTest *test, OilArgType arg_type); int oil_test_get_value (OilTest *test, OilArgType arg_type); #endif OIL_END_DECLS #endif liboil-0.3.17/liboil/ref/0000777000175000017500000000000011332637376012122 500000000000000liboil-0.3.17/liboil/ref/mult8x8_s16.c0000644000175000017500000000417610717203073014221 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_mult8x8_s16: * @d_8x8: * @s1_8x8: * @s2_8x8: * @ds: * @ss1: * @ss2: * * Multiplies each element in @s1_8x8 and @s2_8x8 and places the result * in @d_8x8. */ OIL_DEFINE_CLASS (mult8x8_s16, "int16_t *d_8x8, int16_t *s1_8x8, int16_t *s2_8x8, int ds, int ss1, int ss2"); static void mult8x8_s16_ref(int16_t *dest, int16_t *src1, int16_t *src2, int dstr, int sstr1, int sstr2) { int i,j; for(i=0;i<8;i++){ for(j=0;j<8;j++){ OIL_GET(dest,dstr*i+2*j, int16_t) = OIL_GET(src1,sstr1*i+2*j, int16_t) * OIL_GET(src2,sstr2*i+2*j, int16_t); } } } OIL_DEFINE_IMPL_REF (mult8x8_s16_ref, mult8x8_s16); liboil-0.3.17/liboil/ref/copy8x8.c0000644000175000017500000000353610717203073013520 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include /** * oil_copy8x8_u8: * @d_8x8: * @ds: * @s_8x8: * @ss: * * Copies an 8x8 block. */ OIL_DEFINE_CLASS (copy8x8_u8, "uint8_t *d_8x8, int ds, uint8_t *s_8x8, int ss"); static void copy8x8_u8_ref (uint8_t *d1, int ds, uint8_t *s1, int ss) { int i,j; for (i=0;i<8;i++){ for (j=0;j<8;j++){ d1[j] = s1[j]; } d1 += ds; s1 += ss; } } OIL_DEFINE_IMPL_REF (copy8x8_u8_ref, copy8x8_u8); liboil-0.3.17/liboil/ref/composite.c0000644000175000017500000003176310717203073014203 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #define COMPOSITE_OVER(d,s,m) ((d) + (s) - oil_muldiv_255((d),(m))) #define COMPOSITE_ADD(d,s) oil_clamp_255((d) + (s)) #define COMPOSITE_IN(s,m) oil_muldiv_255((s),(m)) /** * SECTION:liboilfuncs-pixel * @title: Pixel Operations * @short_description: Operations on pixels * * Pixels are 4-element arrays of type uint8_t. The elements, in * memory order, represent the alpha, red, green, and blue * components respectively. The color components are premultiplied * with the alpha component. Liboil functions represent pixels * as the type uint32_t. * * The compositing operators IN, OVER, and ADD are defined the same * as cairo. * */ static void handle_param (OilParameter *p) { int n; if (p->src_data) { if (p->type == OIL_TYPE_u32p) { uint32_t *ptr; ptr = (uint32_t *)oil_param_get_source_data (p); n = p->post_n; oil_random_argb (ptr, n); } if (p->type == OIL_TYPE_u8p) { uint8_t *ptr; ptr = (uint8_t *)oil_param_get_source_data (p); n = p->post_n; oil_random_alpha (ptr, n); } } } static void composite_test (OilTest *test) { handle_param(&test->params[OIL_ARG_SRC1]); handle_param(&test->params[OIL_ARG_SRC2]); handle_param(&test->params[OIL_ARG_INPLACE1]); } /** * oil_composite_in_argb: * @d_n: DEST * @s1_n: SRC * @s2_n: MASK * @n: number of elements * * Performs the compositing operation DEST = SRC IN MASK. */ OIL_DEFINE_CLASS_FULL (composite_in_argb, "uint32_t *d_n, uint32_t *s1_n, uint8_t *s2_n, int n", composite_test); /** * oil_composite_in_argb_const_src: * @d_n: DEST * @s1_1: SRC * @s2_n: MASK * @n: number of elements * * Performs the compositing operation DEST = SRC IN MASK, for a constant * SRC. */ OIL_DEFINE_CLASS_FULL (composite_in_argb_const_src, "uint32_t *d_n, uint32_t *s1_1, uint8_t *s2_n, int n", composite_test); /** * oil_composite_in_argb_const_mask: * @d_n: DEST * @s1_n: SRC * @s2_1: MASK * @n: number of elements * * Performs the compositing operation DEST = SRC IN MASK, for a constant * MASK. */ OIL_DEFINE_CLASS_FULL (composite_in_argb_const_mask, "uint32_t *d_n, uint32_t *s1_n, uint8_t *s2_1, int n", composite_test); /** * oil_composite_over_argb: * @i_n: DEST * @s1_n: SRC * @n: number of elements * * Performs the compositing operation DEST = SRC OVER DEST. */ OIL_DEFINE_CLASS_FULL (composite_over_argb, "uint32_t *i_n, uint32_t *s1_n, int n", composite_test); /** * oil_composite_over_argb_const_src: * @i_n: DEST * @s1_1: SRC * @n: number of elements * * Performs the compositing operation DEST = SRC OVER DEST, for a * constant SRC. */ OIL_DEFINE_CLASS_FULL (composite_over_argb_const_src, "uint32_t *i_n, uint32_t *s1_1, int n", composite_test); /** * oil_composite_add_argb: * @i_n: DEST * @s1_n: SRC * @n: number of elements * * Performs the compositing operation DEST = SRC ADD DEST. */ OIL_DEFINE_CLASS_FULL (composite_add_argb, "uint32_t *i_n, uint32_t *s1_n, int n", composite_test); /** * oil_composite_add_argb_const_src: * @i_n: DEST * @s1_1: SRC * @n: number of elements * * Performs the compositing operation DEST = SRC ADD DEST, for a * constant SRC. */ OIL_DEFINE_CLASS_FULL (composite_add_argb_const_src, "uint32_t *i_n, uint32_t *s1_1, int n", composite_test); /** * oil_composite_in_over_argb: * @i_n: DEST * @s1_n: SRC * @s2_n: MASK * @n: number of elements * * Performs the compositing operation DEST = (SRC IN MASK) OVER DEST. */ OIL_DEFINE_CLASS_FULL (composite_in_over_argb, "uint32_t *i_n, uint32_t *s1_n, uint8_t *s2_n, int n", composite_test); /** * oil_composite_in_over_argb_const_src: * @i_n: DEST * @s1_1: SRC * @s2_n: MASK * @n: number of elements * * Performs the compositing operation DEST = (SRC IN MASK) OVER DEST, * for a constant SRC. */ OIL_DEFINE_CLASS_FULL (composite_in_over_argb_const_src, "uint32_t *i_n, uint32_t *s1_1, uint8_t *s2_n, int n", composite_test); /** * oil_composite_in_over_argb_const_mask: * @i_n: DEST * @s1_n: SRC * @s2_1: MASK * @n: number of elements * * Performs the compositing operation DEST = (SRC IN MASK) OVER DEST, * for a constant MASK. */ OIL_DEFINE_CLASS_FULL (composite_in_over_argb_const_mask, "uint32_t *i_n, uint32_t *s1_n, uint8_t *s2_1, int n", composite_test); /** * oil_composite_over_u8: * @i_n: DEST * @s1_n: SRC * @n: number of elements * * Performs the compositing operation DEST = SRC OVER DEST. */ OIL_DEFINE_CLASS_FULL (composite_over_u8, "uint8_t *i_n, uint8_t *s1_n, int n", composite_test); /** * oil_composite_add_u8: * @i_n: DEST * @s1_n: SRC * @n: number of elements * * Performs the compositing operation DEST = SRC ADD DEST. */ OIL_DEFINE_CLASS_FULL (composite_add_u8, "uint8_t *i_n, uint8_t *s1_n, int n", composite_test); /** * oil_composite_add_u8_const_src: * @i_n: DEST * @s1_1: SRC * @n: number of elements * * Performs the compositing operation DEST = SRC ADD DEST. */ OIL_DEFINE_CLASS_FULL (composite_add_u8_const_src, "uint8_t *i_n, uint8_t *s1_1, int n", composite_test); static void composite_in_argb_ref (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { int i; for(i=0;i #include #include static void mas_test (OilTest *test) { int16_t *data; int i; int n; data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC1); for(i=0;in;i++){ //data[i] = oil_rand_s16()>>1; data[i] = 0; } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC2); for(i=0;in;i++){ data[i] = oil_rand_s16() >> 4; } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC3); n = oil_test_get_arg_post_n (test, OIL_ARG_SRC3); if (n == 2) { data[0] = 1; data[1] = 1; data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC4); data[0] = 1; data[1] = 1; } else { for(i=0;i>4)/n; } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC4); data[0] = (1<<11); data[1] = 12; } } static void mas2_across_test (OilTest *test) { int16_t *data; int i; int n; data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC1); for(i=0;in;i++){ //data[i] = oil_rand_s16()>>1; data[i] = 0; } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC2); for(i=0;in;i++){ data[i] = oil_rand_s16()>>4; } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC3); for(i=0;in;i++){ data[i] = oil_rand_s16()>>4; } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC4); n = oil_test_get_arg_post_n (test, OIL_ARG_SRC4); for(i=0;i>4)/n; } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC5); data[0] = (1<<11); data[1] = 12; } static void mas48_across_test (OilTest *test) { int16_t *data; int stride; int i; int j; int n; int m; int sum; data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC1); for(i=0;in;i++){ //data[i] = oil_rand_s16()>>1; data[i] = 0; } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC2); m = oil_test_get_arg_post_n (test, OIL_ARG_SRC2); stride = oil_test_get_arg_stride (test, OIL_ARG_SRC2); for(j=0;jn;i++){ data[i] = oil_rand_s16()>>12; } data = OIL_OFFSET(data, stride); } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC3); n = oil_test_get_arg_post_n (test, OIL_ARG_SRC3); sum = 0; #if 0 if (n==8) { for(i=0;i<8;i++){ data[i] = 1; } } else { data[0] = -1; data[1] = 9; data[2] = 9; data[3] = -1; } #endif for(i=0;i>8)/n; sum += data[i]; } data[i] = 128 - sum; data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC4); data[0] = (1<<6); data[1] = 7; #if 0 data[0] = (1<<(4-1)); data[1] = 4; #endif } static void mas10_u8_test (OilTest *test) { static const int taps[] = { 3, -11, 25, -56, 167, 167, -56, 25, -11, 3 }; int16_t *data; int i; data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC2); for(i=0;i<10;i++){ data[i] = taps[i]; } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC3); data[0] = 128; data[1] = 8; } static void mas10_u8_l15_test (OilTest *test) { static const int taps[] = { 0, -1, 3, -7, 21, 21, -7, 3, -1, 0 }; int16_t *data; int i; data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC2); for(i=0;i<10;i++){ data[i] = taps[i]; } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC3); data[0] = 32; data[1] = 6; } static void mas8_u8_test (OilTest *test) { static const int taps[] = { -1, 3, -7, 21, 21, -7, 3, -1 }; int16_t *data; int i; #if 0 int n; data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC1); n = oil_test_get_arg_post_n (test, OIL_ARG_SRC1); for(i=0;i>= s4_2[1]; d1[i] = s1[i] + x; } } OIL_DEFINE_IMPL_REF (mas2_add_s16_ref, mas2_add_s16); void mas4_add_s16_ref(int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_4, int16_t *s4_2, int n) { int i; int x; for(i=0;i>= s4_2[1]; d1[i] = s1[i] + x; } } OIL_DEFINE_IMPL_REF (mas4_add_s16_ref, mas4_add_s16); void mas8_add_s16_ref(int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_8, int16_t *s4_2, int n) { int i; int j; int x; for(i=0;i>= s4_2[1]; d1[i] = s1[i] + x; } } OIL_DEFINE_IMPL_REF (mas8_add_s16_ref, mas8_add_s16); void mas2_across_add_s16_ref (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4_2, int16_t *s5_2, int n) { int i; int x; for(i=0;i>= s5_2[1]; d[i] = s1[i] + x; } } OIL_DEFINE_IMPL_REF (mas2_across_add_s16_ref, mas2_across_add_s16); void mas4_across_add_s16_ref (int16_t *d, int16_t *s1, int16_t *s2_nx4, int sstr2, int16_t *s3_4, int16_t *s4_2, int n) { int i; int j; int x; for(i=0;i>= s4_2[1]; d[i] = s1[i] + x; } } OIL_DEFINE_IMPL_REF (mas4_across_add_s16_ref, mas4_across_add_s16); void mas8_across_add_s16_ref (int16_t *d, int16_t *s1, int16_t *s2_nx8, int sstr2, int16_t *s3_8, int16_t *s4_2, int n) { int i; int j; int x; for(i=0;i>= s4_2[1]; d[i] = s1[i] + x; } } OIL_DEFINE_IMPL_REF (mas8_across_add_s16_ref, mas8_across_add_s16); void mas10_u8_ref (uint8_t *d, const uint8_t *s1_np9, const int16_t *s2_10, const int16_t *s3_2, int n) { int i; int j; int x; for(i=0;i>s3_2[1],0,255); } } OIL_DEFINE_IMPL_REF (mas10_u8_ref, mas10_u8); void mas10_u8_l15_ref (uint8_t *d, const uint8_t *s1_np9, const int16_t *s2_10, const int16_t *s3_2, int n) { mas10_u8_ref (d, s1_np9, s2_10, s3_2, n); } OIL_DEFINE_IMPL_REF (mas10_u8_l15_ref, mas10_u8_l15); void mas10_u8_sym_l15_ref (uint8_t *d, const uint8_t *s1_np9, const int16_t *s2_10, const int16_t *s3_2, int n) { mas10_u8_ref (d, s1_np9, s2_10, s3_2, n); } OIL_DEFINE_IMPL_REF (mas10_u8_sym_l15_ref, mas10_u8_sym_l15); void mas8_u8_ref (uint8_t *d, const uint8_t *s1_np7, const int16_t *s2_8, const int16_t *s3_2, int n) { int i; int j; int x; for(i=0;i>s3_2[1],0,255); } } OIL_DEFINE_IMPL_REF (mas8_u8_ref, mas8_u8); void mas8_u8_l15_ref (uint8_t *d, const uint8_t *s1_np7, const int16_t *s2_8, const int16_t *s3_2, int n) { mas8_u8_ref (d, s1_np7, s2_8, s3_2, n); } OIL_DEFINE_IMPL_REF (mas8_u8_l15_ref, mas8_u8_l15); void mas8_u8_sym_l15_ref (uint8_t *d, const uint8_t *s1_np7, const int16_t *s2_8, const int16_t *s3_2, int n) { mas8_u8_ref (d, s1_np7, s2_8, s3_2, n); } OIL_DEFINE_IMPL_REF (mas8_u8_sym_l15_ref, mas8_u8_sym_l15); void mas8_across_u8_ref (uint8_t *d, uint8_t *s1_nx8, int sstr1, int16_t *s2_8, int16_t *s3_2, int n) { int i; int j; int x; for(i=0;i>= s3_2[1]; d[i] = CLAMP(x,0,255); } } OIL_DEFINE_IMPL_REF (mas8_across_u8_ref, mas8_across_u8); static void mas12_addc_rshift_decim2_u8_ref (uint8_t *dest, const uint8_t *src, const int16_t *taps, const int16_t *offsetshift, int n) { int i; int j; int x; for(i=0;i> offsetshift[1],0,255); } } OIL_DEFINE_IMPL_REF (mas12_addc_rshift_decim2_u8_ref, mas12_addc_rshift_decim2_u8); #if 0 void mas12across_addc_rshift_u8_ref (uint8_t *dest, uint8_t **src, const int16_t *taps, const int16_t *offsetshift, int n) { int i; int j; int x; for(i=0;i> offsetshift[1],0,255); } } OIL_DEFINE_IMPL_REF (mas12across_addc_rshift_u8_ref, mas12across_addc_rshift_u8); #endif static void mas8_addc_rshift_decim2_u8_ref (uint8_t *dest, const uint8_t *src, const int16_t *taps, const int16_t *offsetshift, int n) { int i; int j; int x; for(i=0;i> offsetshift[1],0,255); } } OIL_DEFINE_IMPL_REF (mas8_addc_rshift_decim2_u8_ref, mas8_addc_rshift_decim2_u8); liboil-0.3.17/liboil/ref/swab.c0000644000175000017500000000467410717203073013136 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_swab_u16: * @d_n: * @s_n: * n: * * Swaps the endianness of values in the source array and places the * results in the destination array. The arguments @s_n and @d_n may * be equal. */ OIL_DEFINE_CLASS (swab_u16, "uint16_t *d_n, uint16_t *s_n, int n"); /** * oil_swab_u32: * @d_n: * @s_n: * n: * * Swaps the endianness of values in the source array and places the * results in the destination array. The arguments @s_n and @d_n may * be equal. */ OIL_DEFINE_CLASS (swab_u32, "uint32_t *d_n, uint32_t *s_n, int n"); static void swab_u16_ref (uint16_t *d, uint16_t *s, int n) { int i; for(i=0;i>8); } } OIL_DEFINE_IMPL_REF (swab_u16_ref, swab_u16); static void swab_u32_ref (uint32_t *d, uint32_t *s, int n) { int i; for(i=0;i>8) | (s[i]>>24); } } OIL_DEFINE_IMPL_REF (swab_u32_ref, swab_u32); liboil-0.3.17/liboil/ref/rgb.c0000644000175000017500000000577110717203073012753 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include /** * oil_rgb2bgr: * @d_3xn: * @s_3xn: * @n: * * Converts arrays of 24-bit RGB pixels from RGBRGBRGB ordering to * BGRBGRBGR ordering (and vice-versa). */ OIL_DEFINE_CLASS (rgb2bgr, "uint8_t *d_3xn, uint8_t* s_3xn, int n"); /** * oil_rgb2rgba: * @d_4xn: * @s_3xn: * @n: * * Converts arrays of 24-bit RGB pixels in RGBRGBRGB memory order * to 32-bit RGBA pixels in RGBARGBA order. */ OIL_DEFINE_CLASS (rgb2rgba, "uint8_t *d_4xn, uint8_t* s_3xn, int n"); /** * oil_rgb565_to_argb: * @d: * @s: * @n: * * Converts arrays of 16-bit RGB565 pixels to 32-bit ARGB pixels. */ OIL_DEFINE_CLASS (rgb565_to_argb, "uint32_t *d, uint16_t* s, int n"); static void rgb2bgr_ref (uint8_t *dest, const uint8_t* src, int n) { int i; uint8_t tmp; for (i = 0; i < n; i++) { tmp = src[2]; dest[1] = src[1]; dest[2] = src[0]; dest[0] = tmp; dest += 3; src += 3; } } OIL_DEFINE_IMPL_REF (rgb2bgr_ref, rgb2bgr); static void rgb2rgba_ref (uint8_t *dest, const uint8_t* src, int n) { int i; for (i = 0; i < n; i++) { dest[0] = src[0]; dest[1] = src[1]; dest[2] = src[2]; dest[3] = 0xFF; dest += 4; src += 3; } } OIL_DEFINE_IMPL_REF (rgb2rgba_ref, rgb2rgba); void rgb565_to_argb_ref (uint32_t *d, uint16_t* s, int n) { int i; int r,g,b; for (i = 0; i < n; i++) { r = (s[i] >> 8) & 0xf8; g = (s[i] >> 3) & 0xfc; b = (s[i] << 3) & 0xf8; d[i] = oil_argb(255, r | (r>>5), g | (g>>6), b | (b>>5)); } } OIL_DEFINE_IMPL_REF (rgb565_to_argb_ref, rgb565_to_argb); liboil-0.3.17/liboil/ref/argb_paint.c0000644000175000017500000000444310717203073014302 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include OIL_DEFINE_CLASS (argb_paint_u8, "uint8_t *i_4xn, uint8_t *s1_4, uint8_t *s2_n, int n"); #define div255(x) (((x + 128) + ((x + 128)>>8))>>8) #define blend(x,y,a) div255((x)*(a) + (y)*(255-(a))) /** * oil_argb_paint_u8: * @i_4xn: array * @s1_4: source color * @s2_n: source alpha array * @n: number of elements * * Composites source color onto in-place array according to the alpha * array. * * Deprecated. */ static void argb_paint_u8_ref (uint8_t *dest, const uint8_t *color, const uint8_t *alpha, int n) { int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #define MULTSUM_DEFINE_REF(type) \ static void multsum_ ## type ## _ref( \ oil_type_ ## type *dest, \ oil_type_ ## type *src1, int sstr1, \ oil_type_ ## type *src2, int sstr2, \ int n) \ { \ int i; \ double sum = 0; \ double errsum = 0; \ for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_sum_s16: * @d_1: destination * @s: source array * @n: number of elements * * Sums the elements in the source array and places the result in * @d. */ OIL_DEFINE_CLASS (sum_s16, "int16_t *d_1, int16_t *s, int n"); static void sum_s16_ref (int16_t *dest, int16_t *src, int n) { int16_t sum = 0; int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_mix_u8: * @dest: DEST * @src1: SRC1 * @src2: SRC2 * @src3: MASK * @n: * * Performs the compisiting operation DEST = (SRC2 IN MASK) OVER SRC1, * except it is done incorrectly, so this function should not be used. * * FIXME: This function is broken. */ OIL_DEFINE_CLASS (mix_u8, "uint8_t *dest, uint8_t *src1, uint8_t *src2, uint8_t *src3, int n"); static void mix_u8_ref(uint8_t *dest, uint8_t *src1, uint8_t *src2, uint8_t *scale, int n) { int i; for(i=0;i>8; } } OIL_DEFINE_IMPL_REF (mix_u8_ref, mix_u8); liboil-0.3.17/liboil/ref/trans8x8.c0000644000175000017500000000610410717203073013667 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #define TRANS8x8_DEFINE_REF(type) \ static void trans8x8_ ## type ## _ref ( \ oil_type_ ## type *dest, int dstr, \ oil_type_ ## type *src, int sstr) \ { \ int i,j; \ for(i=0;i<8;i++){ \ for(j=0;j<8;j++){ \ OIL_GET(dest,dstr*i+j*sizeof(oil_type_ ## type),oil_type_ ## type) = \ OIL_GET(src,sstr*j+i*sizeof(oil_type_ ## type),oil_type_ ## type); \ } \ } \ } \ OIL_DEFINE_CLASS (trans8x8_ ## type, "oil_type_" #type " *d_8x8, int ds, " \ "oil_type_" #type " *s_8x8, int ss"); \ OIL_DEFINE_IMPL_REF (trans8x8_ ## type ## _ref, trans8x8_ ## type) TRANS8x8_DEFINE_REF(u8); TRANS8x8_DEFINE_REF(u16); TRANS8x8_DEFINE_REF(u32); TRANS8x8_DEFINE_REF(f64); /** * oil_trans8x8_u8: * @d_8x8: * @ds: * @s_8x8: * @ss: * * Performs a matrix transpose the 8x8 block represented by @s_8x8 * and places the * result in @d_8x8. Note that this function can also be used for * any type of this size. */ /** * oil_trans8x8_u16: * @d_8x8: * @ds: * @s_8x8: * @ss: * * Performs a matrix transpose the 8x8 block represented by @s_8x8 * and places the * result in @d_8x8. Note that this function can also be used for * any type of this size. */ /** * oil_trans8x8_u32: * @d_8x8: * @ds: * @s_8x8: * @ss: * * Performs a matrix transpose the 8x8 block represented by @s_8x8 * and places the * result in @d_8x8. Note that this function can also be used for * any type of this size. */ /** * oil_trans8x8_f64: * @d_8x8: * @ds: * @s_8x8: * @ss: * * Performs a matrix transpose the 8x8 block represented by @s_8x8 * and places the * result in @d_8x8. */ liboil-0.3.17/liboil/ref/squaresum_f32.c0000644000175000017500000000377711066763263014716 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_squaresum_f32: * @d: * @s: * @n: * * Sums the square of each element in @s and places the result in * @dest. */ OIL_DEFINE_CLASS (squaresum_f32, "float *d, float *s, int n"); static void squaresum_f32_ref(float *dest, float *src, int n) { double sum2 = 0; double errsum = 0; double tmp; double x; int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include /** * oil_sincos_f64: * @dest1: * @dest2: * @n: * @s1_1: * @s2_1: * * Calculates sin(x) and cos(x) and places the results in @dest1 and * @dest2 respectively. Values for x start at @s1_1 and are incremented * by @s2_1 for each destination element. */ OIL_DEFINE_CLASS (sincos_f64, "double *dest1, double *dest2, int n, double *s1_1, double *s2_1"); static void sincos_f64_ref (double *dest_sin, double *dest_cos, int n, double *offset, double *interval) { int i; double x; for(i=0;i #include #define CLAMP_DEFINE_REF(type) \ static void clamp_ ## type ## _ref ( \ oil_type_ ## type *dest, \ const oil_type_ ## type *src, \ int n, \ const oil_type_ ## type *min, \ const oil_type_ ## type *max) \ { \ int i; \ oil_type_ ## type x; \ for (i = 0; i < n; i++) { \ x = src[i]; \ if (x < *min) \ x = *min; \ if (x > *max) \ x = *max; \ dest[i] = x; \ } \ } \ static void clamp_ ## type ## _test (OilTest *test) \ { \ oil_type_ ## type *lo = (oil_type_ ## type *) \ (test->params[OIL_ARG_SRC2].src_data + \ test->params[OIL_ARG_SRC2].test_header); \ oil_type_ ## type *hi = (oil_type_ ## type *) \ (test->params[OIL_ARG_SRC3].src_data + \ test->params[OIL_ARG_SRC3].test_header); \ if (*lo > *hi) { \ oil_type_ ## type tmp; \ tmp = *lo; \ *lo = *hi; \ *hi = tmp; \ } \ } \ OIL_DEFINE_CLASS_FULL(clamp_ ## type, \ "oil_type_" #type " *dest, " \ "oil_type_" #type " *src, " \ "int n, " \ "oil_type_" #type " *s2_1, " \ "oil_type_" #type " *s3_1", \ clamp_ ## type ## _test); \ OIL_DEFINE_IMPL_REF(clamp_ ## type ## _ref, clamp_ ## type) CLAMP_DEFINE_REF (s8); CLAMP_DEFINE_REF (u8); CLAMP_DEFINE_REF (s16); CLAMP_DEFINE_REF (u16); CLAMP_DEFINE_REF (s32); CLAMP_DEFINE_REF (u32); CLAMP_DEFINE_REF (f32); CLAMP_DEFINE_REF (f64); /** * oil_clamp_s8: * @dest: * @src: * @n: * @s2_1: * @s3_1: * * Clamps each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ /** * oil_clamp_u8: * @dest: * @src: * @n: * @s2_1: * @s3_1: * * Clamps each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ /** * oil_clamp_s16: * @dest: * @src: * @n: * @s2_1: * @s3_1: * * Clamps each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ /** * oil_clamp_u16: * @dest: * @src: * @n: * @s2_1: * @s3_1: * * Clamps each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ /** * oil_clamp_s32: * @dest: * @src: * @n: * @s2_1: * @s3_1: * * Clamps each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ /** * oil_clamp_u32: * @dest: * @src: * @n: * @s2_1: * @s3_1: * * Clamps each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ /** * oil_clamp_f32: * @dest: * @src: * @n: * @s2_1: * @s3_1: * * Clamps each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ /** * oil_clamp_f64: * @dest: * @src: * @n: * @s2_1: * @s3_1: * * Clamps each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ #define CLAMPLOW_DEFINE_REF(type) \ static void clamplow_ ## type ## _ref ( \ oil_type_ ## type *dest, \ const oil_type_ ## type *src, \ int n, \ const oil_type_ ## type *min) \ { \ int i; \ oil_type_ ## type x; \ for (i = 0; i < n; i++) { \ x = src[i]; \ if (x < *min) \ x = *min; \ dest[i] = x; \ } \ } \ OIL_DEFINE_CLASS(clamplow_ ## type, \ "oil_type_" #type " *dest, " \ "oil_type_" #type " *src, " \ "int n, " \ "oil_type_" #type " *s2_1"); \ OIL_DEFINE_IMPL_REF(clamplow_ ## type ## _ref, clamplow_ ## type) CLAMPLOW_DEFINE_REF (s8); CLAMPLOW_DEFINE_REF (u8); CLAMPLOW_DEFINE_REF (s16); CLAMPLOW_DEFINE_REF (u16); CLAMPLOW_DEFINE_REF (s32); CLAMPLOW_DEFINE_REF (u32); CLAMPLOW_DEFINE_REF (f32); CLAMPLOW_DEFINE_REF (f64); /** * oil_clamplow_s8: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to a lower bound of @s2_1 and places the result in * @dest. */ /** * oil_clamplow_u8: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to a lower bound of @s2_1 and places the result in * @dest. */ /** * oil_clamplow_s16: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to a lower bound of @s2_1 and places the result in * @dest. */ /** * oil_clamplow_u16: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to a lower bound of @s2_1 and places the result in * @dest. */ /** * oil_clamplow_s32: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to a lower bound of @s2_1 and places the result in * @dest. */ /** * oil_clamplow_u32: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to a lower bound of @s2_1 and places the result in * @dest. */ /** * oil_clamplow_f32: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to a lower bound of @s2_1 and places the result in * @dest. */ /** * oil_clamplow_f64: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to a lower bound of @s2_1 and places the result in * @dest. */ #define CLAMPHIGH_DEFINE_REF(type) \ static void clamphigh_ ## type ## _ref ( \ oil_type_ ## type *dest, \ const oil_type_ ## type *src, \ int n, \ const oil_type_ ## type *max) \ { \ int i; \ oil_type_ ## type x; \ for (i = 0; i < n; i++) { \ x = src[i]; \ if (x > *max) \ x = *max; \ dest[i] = x; \ } \ } \ OIL_DEFINE_CLASS(clamphigh_ ## type, \ "oil_type_" #type " *dest, " \ "oil_type_" #type " *src, " \ "int n, " \ "oil_type_" #type " *s2_1"); \ OIL_DEFINE_IMPL_REF(clamphigh_ ## type ## _ref, clamphigh_ ## type) CLAMPHIGH_DEFINE_REF (s8); CLAMPHIGH_DEFINE_REF (u8); CLAMPHIGH_DEFINE_REF (s16); CLAMPHIGH_DEFINE_REF (u16); CLAMPHIGH_DEFINE_REF (s32); CLAMPHIGH_DEFINE_REF (u32); CLAMPHIGH_DEFINE_REF (f32); CLAMPHIGH_DEFINE_REF (f64); /** * oil_clamphigh_s8: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to an upper bound of @s2_1 and places the result in * @dest. */ /** * oil_clamphigh_u8: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to an upper bound of @s2_1 and places the result in * @dest. */ /** * oil_clamphigh_s16: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to an upper bound of @s2_1 and places the result in * @dest. */ /** * oil_clamphigh_u16: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to an upper bound of @s2_1 and places the result in * @dest. */ /** * oil_clamphigh_s32: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to an upper bound of @s2_1 and places the result in * @dest. */ /** * oil_clamphigh_u32: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to an upper bound of @s2_1 and places the result in * @dest. */ /** * oil_clamphigh_f32: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to an upper bound of @s2_1 and places the result in * @dest. */ /** * oil_clamphigh_f64: * @dest: * @src: * @n: * @s2_1: * * Clamps each value in @src to an upper bound of @s2_1 and places the result in * @dest. */ liboil-0.3.17/liboil/ref/Makefile.am0000644000175000017500000000146311332406374014066 00000000000000 if USE_ALT_OPT opt_libs = libref_opt1.la else opt_libs = endif noinst_LTLIBRARIES = libref.la $(opt_libs) c_sources = \ addc.c \ argb_paint.c \ ayuv2argb.c \ clamp.c \ composite.c \ convert.c \ copy.c \ copy8x8.c \ diff8x8.c \ diffsquaresum_f64.c \ diffsquaresum_f32.c \ error8x8.c \ mas.c \ math.c \ mix_u8.c \ mt19937ar.c \ mult8x8_s16.c \ multsum.c \ recon8x8.c \ resample.c \ rgb.c \ rowcolsad8x8.c \ sad8x8.c \ sad8x8_broken.c \ sad8x8avg.c \ sincos_f64.c \ splat.c \ squaresum_f32.c \ squaresum_f64.c \ sum.c \ sum_f64.c \ swab.c \ trans8x8.c \ yuv.c \ wavelet.c libref_la_SOURCES = \ $(c_sources) libref_la_LIBADD = \ $(opt_libs) libref_la_CFLAGS = $(LIBOIL_CFLAGS) libref_opt1_la_SOURCES = $(c_sources) libref_opt1_la_CFLAGS = $(LIBOIL_CFLAGS) \ $(LIBOIL_OPT_CFLAGS) liboil-0.3.17/liboil/ref/splat.c0000644000175000017500000000662210717203073013320 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2001,2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include /** * oil_splat_u8: * @dest: * @dstr: * @s1_1: * @n: * * Copies the constant source value @s1_1 to each element in @dest. */ OIL_DEFINE_CLASS(splat_u8,"uint8_t *dest, int dstr, uint8_t *s1_1, int n"); /** * oil_splat_u32: * @dest: * @dstr: * @s1_1: * @n: * * Copies the constant source value @s1_1 to each element in @dest. */ OIL_DEFINE_CLASS(splat_u32,"uint32_t *dest, int dstr, uint32_t *s1_1, int n"); /** * oil_splat_u8_ns: * @dest: * @s1_1: * @n: * * Copies the constant source value @s1_1 to each element in @dest. */ OIL_DEFINE_CLASS(splat_u8_ns,"uint8_t *dest, uint8_t *s1_1, int n"); /** * oil_splat_u16_ns: * @dest: * @s1_1: * @n: * * Copies the constant source value @s1_1 to each element in @dest. */ OIL_DEFINE_CLASS(splat_u16_ns,"uint16_t *dest, uint16_t *s1_1, int n"); /** * oil_splat_u32_ns: * @dest: * @s1_1: * @n: * * Copies the constant source value @s1_1 to each element in @dest. */ OIL_DEFINE_CLASS(splat_u32_ns,"uint32_t *dest, uint32_t *s1_1, int n"); static void splat_u8_ref (uint8_t *dest, int dstr, uint8_t *param, int n) { int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_diffsquaresum_f64: * @d_1: * @src1: * @sstr1: * @src2: * @sstr2: * @n: * * Calculates the sum of squared differences between @src1 and @src2 * and places the result in @d_1. */ OIL_DEFINE_CLASS (diffsquaresum_f64, "double *d_1, double *src1, int sstr1, double *src2, int sstr2, int n"); static void diffsquaresum_f64_ref(double *dest, double *src1, int sstr1, double *src2, int sstr2, int n) { double sum = 0; double errsum = 0; double tmp; double x; int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_sad8x8_u8: * @d_1: * @s1_8x8: * @ss1: * @s2_8x8: * @ss2: * * Calculates the sum of absolute differences between elements in @s1_8x8 * and @s2_8x8, and places the result in @d_1. */ OIL_DEFINE_CLASS (sad8x8_u8, "uint32_t *d_1, uint8_t *s1_8x8, int ss1, uint8_t *s2_8x8, int ss2"); /** * oil_sad8x8_s16_2: * @d_1: * @s1_8x8: * @ss1: * @s2_8x8: * @ss2: * * Calculates the sum of absolute differences between elements in @s1_8x8 * and @s2_8x8, and places the result in @d_1. */ OIL_DEFINE_CLASS (sad8x8_s16_2, "uint32_t *d_1, int16_t *s1_8x8, int ss1, int16_t *s2_8x8, int ss2"); /** * oil_sad8x8_f64_2: * @d_1: * @s1_8x8: * @ss1: * @s2_8x8: * @ss2: * * Calculates the sum of absolute differences between elements in @s1_8x8 * and @s2_8x8, and places the result in @d_1. */ OIL_DEFINE_CLASS (sad8x8_f64_2, "double *d_1, double *s1_8x8, int ss1, double *s2_8x8, int ss2"); /** * oil_sad8x8_8xn_u8: * @d_1: * @s1_8x8: * @ss1: * @s2_8xnp7: * @ss2: * @n: * * Calculates the sum of absolute differences between elements in @s1_8x8 * and the 8x8 block of array elements starting at row i in @s2_8x8, and * places the result in @d_n. */ OIL_DEFINE_CLASS (sad8x8_8xn_u8, "uint32_t *d_n, uint8_t *s1_8x8, int ss1, uint8_t *s2_8xnp7, int ss2, int n"); /** * oil_sad12x12_u8: * @d_1: * @s1_12x12: * @ss1: * @s2_12x12: * @ss2: * * Calculates the sum of absolute differences between elements in @s1_12x12 * and @s2_12x12, and places the result in @d_1. */ OIL_DEFINE_CLASS (sad12x12_u8, "uint32_t *d_1, uint8_t *s1_12x12, int ss1, uint8_t *s2_12x12, int ss2"); /** * oil_sad12x12_12xn_u8: * @d_1: * @s1_12x12: * @ss1: * @s2_12xnp11: * @ss2: * @n: * * Calculates the sum of absolute differences between elements in @s1_12x12 * and the 12x12 block of array elements starting at row i in @s2_12x12, and * places the result in @d_n. */ OIL_DEFINE_CLASS (sad12x12_12xn_u8, "uint32_t *d_n, uint8_t *s1_12x12, int ss1, uint8_t *s2_12xnp11, int ss2, int n"); /** * oil_sad16x16_u8: * @d_1: * @s1_16x16: * @ss1: * @s2_16x16: * @ss2: * * Calculates the sum of absolute differences between elements in @s1_16x16 * and @s2_16x16, and places the result in @d_1. */ OIL_DEFINE_CLASS (sad16x16_u8, "uint32_t *d_1, uint8_t *s1_16x16, int ss1, uint8_t *s2_16x16, int ss2"); /** * oil_sad16x16_16xn_u8: * @d_1: * @s1_16x16: * @ss1: * @s2_16xnp15: * @ss2: * @n: * * Calculates the sum of absolute differences between elements in @s1_16x16 * and the 16x16 block of array elements starting at row i in @s2_16x16, and * places the result in @d_n. */ OIL_DEFINE_CLASS (sad16x16_16xn_u8, "uint32_t *d_n, uint8_t *s1_16x16, int ss1, uint8_t *s2_16xnp15, int ss2, int n"); static void sad8x8_f64_2_ref (double *dest, double *src1, int sstr1, double *src2, int sstr2) { int i, j; double sum; sum = 0; for (i = 0; i < 8; i++) { for (j = 0; j < 8; j++) { sum += fabs (OIL_GET (src1, sstr1 * i + j * sizeof (double), double) - OIL_GET (src2, sstr2 * i + j * sizeof (double), double)); } } *dest = sum; } OIL_DEFINE_IMPL_REF (sad8x8_f64_2_ref, sad8x8_f64_2); static void sad8x8_s16_2_ref (uint32_t * dest, int16_t * src1, int sstr1, int16_t * src2, int sstr2) { int i, j; int d; uint32_t sum; sum = 0; for (i = 0; i < 8; i++) { for (j = 0; j < 8; j++) { d = ((int) OIL_GET (src1, sstr1 * i + j * sizeof (int16_t), int16_t)) - ((int) OIL_GET (src2, sstr2 * i + j * sizeof (int16_t), int16_t)); sum += (d < 0) ? -d : d; } } *dest = sum; } OIL_DEFINE_IMPL_REF (sad8x8_s16_2_ref, sad8x8_s16_2); static void sad8x8_u8_ref (uint32_t * dest, uint8_t * src1, int sstr1, uint8_t * src2, int sstr2) { int i, j; int d; uint32_t sum; sum = 0; for (i = 0; i < 8; i++) { for (j = 0; j < 8; j++) { d = ((int) OIL_GET (src1, sstr1 * i + j * sizeof (uint8_t), uint8_t)) - ((int) OIL_GET (src2, sstr2 * i + j * sizeof (uint8_t), uint8_t)); sum += (d < 0) ? -d : d; } } *dest = sum; } OIL_DEFINE_IMPL_REF (sad8x8_u8_ref, sad8x8_u8); static void sad8x8_8xn_u8_ref (uint32_t * dest, uint8_t * src1, int sstr1, uint8_t * src2, int sstr2, int n) { int i, j, k; int d; uint32_t sum; for (i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include /** * SECTION:liboilfuncs-conv * @title: Type Conversion * @short_description: Type conversion * * The functions in this section perform type conversion. * * The convert functions convert value from the source type to * the destination type. Conversion of values outside the * destination range are saturated to the destination range. * * The scaleconv functions multiply the source values by a * constant factor before converting to the destination type. Conversion * of values outside the destination range are clamped to the * destination range. * * Conversion of values from floating point types to integer types * is done using a round-to-nearest policy. Rounding of half-integers * is undefined and may vary between implementations. */ static void convert_float_test (OilTest *test) { int i; int n; double min = 0; double max = 1; void *data = oil_test_get_source_data (test, OIL_ARG_SRC1); n = test->params[OIL_ARG_SRC1].post_n; switch(test->params[OIL_ARG_DEST1].type) { case OIL_TYPE_s8p: min = oil_type_min_s8; max = oil_type_max_s8; break; case OIL_TYPE_u8p: min = oil_type_min_u8; max = oil_type_max_u8; break; case OIL_TYPE_s16p: min = oil_type_min_s16; max = oil_type_max_s16; break; case OIL_TYPE_u16p: min = oil_type_min_u16; max = oil_type_max_u16; break; case OIL_TYPE_s32p: min = oil_type_min_s32; max = oil_type_max_s32; break; case OIL_TYPE_u32p: min = oil_type_min_u32; max = oil_type_max_u32; break; default: break; } switch (test->params[OIL_ARG_SRC1].type) { case OIL_TYPE_f32p: for(i=0;ioil_type_max_ ## desttype) x=oil_type_max_ ## desttype; \ dest[i] = x; \ } \ } \ OIL_DEFINE_CLASS(convert_ ## desttype ## _ ## srctype, \ "oil_type_" #desttype " *dest, " \ "oil_type_" #srctype " *src, " \ "int n"); \ OIL_DEFINE_IMPL_REF(convert_ ## desttype ## _ ## srctype ## _ref, \ convert_ ## desttype ## _ ## srctype) #define CONVERT_DEFINE_UPPER_REF(desttype,srctype) \ static void convert_ ## desttype ## _ ## srctype ## _ref ( \ oil_type_ ## desttype *dest, \ oil_type_ ## srctype *src, \ int n) \ { \ int i; \ oil_type_ ## srctype x; \ for(i=0;ioil_type_max_ ## desttype) x=oil_type_max_ ## desttype; \ dest[i] = x; \ } \ } \ OIL_DEFINE_CLASS(convert_ ## desttype ## _ ## srctype, \ "oil_type_" #desttype " *dest, " \ "oil_type_" #srctype " *src, " \ "int n"); \ OIL_DEFINE_IMPL_REF(convert_ ## desttype ## _ ## srctype ## _ref, \ convert_ ## desttype ## _ ## srctype) #define CONVERT_DEFINE_LOWER_REF(desttype,srctype) \ static void convert_ ## desttype ## _ ## srctype ## _ref ( \ oil_type_ ## desttype *dest, \ oil_type_ ## srctype *src, \ int n) \ { \ int i; \ oil_type_ ## srctype x; \ for(i=0;ioil_type_max_ ## desttype) x=oil_type_max_ ## desttype; \ dest[i] = x; \ } \ } \ OIL_DEFINE_CLASS_FULL(convert_ ## desttype ## _ ## srctype, \ "oil_type_" #desttype " *dest, " \ "oil_type_" #srctype " *src, " \ "int n", convert_float_test); \ OIL_DEFINE_IMPL_REF(convert_ ## desttype ## _ ## srctype ## _ref, \ convert_ ## desttype ## _ ## srctype) /* no clip */ CONVERT_DEFINE_NONE_REF(s16,s8); CONVERT_DEFINE_NONE_REF(s16,u8); CONVERT_DEFINE_NONE_REF(s32,s8); CONVERT_DEFINE_NONE_REF(s32,u8); CONVERT_DEFINE_NONE_REF(s32,s16); CONVERT_DEFINE_NONE_REF(s32,u16); CONVERT_DEFINE_NONE_REF(u16,u8); CONVERT_DEFINE_NONE_REF(u32,u8); CONVERT_DEFINE_NONE_REF(u32,u16); /* clip upper */ CONVERT_DEFINE_UPPER_REF(s8,u8); CONVERT_DEFINE_UPPER_REF(s8,u16); CONVERT_DEFINE_UPPER_REF(s8,u32); CONVERT_DEFINE_UPPER_REF(u8,u32); CONVERT_DEFINE_UPPER_REF(u8,u16); CONVERT_DEFINE_UPPER_REF(s16,u16); CONVERT_DEFINE_UPPER_REF(s16,u32); CONVERT_DEFINE_UPPER_REF(s32,u32); CONVERT_DEFINE_UPPER_REF(u16,u32); /* clip both */ CONVERT_DEFINE_BOTH_REF(s8,s16); CONVERT_DEFINE_BOTH_REF(s8,s32); CONVERT_DEFINE_BOTH_REF(u8,s16); CONVERT_DEFINE_BOTH_REF(u8,s32); CONVERT_DEFINE_BOTH_REF(s16,s32); CONVERT_DEFINE_BOTH_REF(u16,s32); /* clip lower */ CONVERT_DEFINE_LOWER_REF(u8,s8); CONVERT_DEFINE_LOWER_REF(u16,s16); CONVERT_DEFINE_LOWER_REF(u32,s32); /* clip both, float */ CONVERT_DEFINE_FLOAT_REF(s8,f32); CONVERT_DEFINE_FLOAT_REF(s8,f64); CONVERT_DEFINE_FLOAT_REF(u8,f32); CONVERT_DEFINE_FLOAT_REF(u8,f64); CONVERT_DEFINE_FLOAT_REF(s16,f32); CONVERT_DEFINE_FLOAT_REF(s16,f64); CONVERT_DEFINE_FLOAT_REF(u16,f32); CONVERT_DEFINE_FLOAT_REF(u16,f64); CONVERT_DEFINE_FLOAT_REF(s32,f64); CONVERT_DEFINE_FLOAT_REF(u32,f64); /** * oil_convert_f32_f64: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_f32_s16: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_f32_s32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_f32_s8: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_f32_u16: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_f32_u32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_f32_u8: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_f64_f32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_f64_s16: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_f64_s32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_f64_s8: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_f64_u16: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_f64_u32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_f64_u8: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s16_f32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s16_f64: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s16_s32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s16_s8: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s16_u16: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s16_u32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s16_u8: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s32_f32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s32_f64: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s32_s16: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s32_s8: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s32_u16: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s32_u32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s32_u8: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s8_f32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s8_f64: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s8_s16: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s8_s32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s8_u16: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s8_u32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_s8_u8: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u16_f32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u16_f64: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u16_s16: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u16_s32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u16_s8: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u16_u32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u16_u8: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u32_f32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u32_f64: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u32_s16: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u32_s32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u32_s8: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u32_u16: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u32_u8: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u8_f32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u8_f64: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u8_s16: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u8_s32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u8_s8: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u8_u16: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ /** * oil_convert_u8_u32: * @dest: * @src: * @n: * * Converts elements in from the source type * to the destination type and places the result in . * Values outside the destination range are undefined * and implementation dependent. * See the comments at the beginning of this section. */ liboil-0.3.17/liboil/ref/wavelet.c0000644000175000017500000006363111067011142013640 00000000000000 #include #include #include static void wavelet_test (OilTest *test) { int16_t *data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC1); int i; for(i=0;in;i++){ data[i] = oil_rand_u8(); } } static void rshift_test (OilTest *test) { int16_t *data; int i; data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC1); for(i=0;in;i++){ data[i] = oil_rand_s16()>>1; } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC2); data[0] = (1<<3); data[1] = 4; } static void lshift_test (OilTest *test) { int16_t *data; data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC2); data[0] = 12; } static void combine2_test (OilTest *test) { int16_t *data; data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC3); data[0] = 1; data[1] = 1; data[2] = 1; data[3] = 1; } static void combine4_test (OilTest *test) { int16_t *data; data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC5); data[0] = 4; data[1] = 4; data[2] = 4; data[3] = 4; data[4] = 8; data[5] = 4; } static void add2_test (OilTest *test) { int16_t *data; int i; data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC1); for(i=0;in;i++){ data[i] = oil_rand_s16()>>4; } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC2); for(i=0;in;i++){ data[i] = oil_rand_s16()>>4; } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC3); for(i=0;in;i++){ data[i] = oil_rand_s16()>>4; } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC4); data[0] = 1; data[1] = 1; } OIL_DEFINE_CLASS_FULL (deinterleave, "int16_t *d_2xn, int16_t *s_2xn, int n", wavelet_test); OIL_DEFINE_CLASS (deinterleave2_s16, "int16_t *d1_n, int16_t *d2_n, int16_t *s_2xn, int n"); OIL_DEFINE_CLASS_FULL (interleave, "int16_t *d_2xn, int16_t *s_2xn, int n", wavelet_test); OIL_DEFINE_CLASS (interleave2_s16, "int16_t *d_2xn, int16_t *s1_n, int16_t *s2_n, int n"); OIL_DEFINE_CLASS_FULL (synth_daub97, "int16_t *d_2xn, int16_t *s_2xn, int n", wavelet_test); OIL_DEFINE_CLASS_FULL (split_daub97, "int16_t *d_2xn, int16_t *s_2xn, int n", wavelet_test); OIL_DEFINE_CLASS_FULL (split_approx97, "int16_t *d_2xn, int16_t *s_2xn, int n", wavelet_test); OIL_DEFINE_CLASS_FULL (synth_approx97, "int16_t *d_2xn, int16_t *s_2xn, int n", wavelet_test); OIL_DEFINE_CLASS_FULL (split_53, "int16_t *d_2xn, int16_t *s_2xn, int n", wavelet_test); OIL_DEFINE_CLASS_FULL (synth_53, "int16_t *d_2xn, int16_t *s_2xn, int n", wavelet_test); OIL_DEFINE_CLASS_FULL (split_135, "int16_t *d_2xn, int16_t *s_2xn, int n", wavelet_test); OIL_DEFINE_CLASS_FULL (synth_135, "int16_t *d_2xn, int16_t *s_2xn, int n", wavelet_test); OIL_DEFINE_CLASS_FULL (add_const_rshift_s16, "int16_t *d1, int16_t *s1, int16_t *s2_2, int n", rshift_test); OIL_DEFINE_CLASS_FULL (lshift_s16, "int16_t *d1, int16_t *s1, int16_t *s2_1, int n", lshift_test); OIL_DEFINE_CLASS (multiply_and_add_s16, "int16_t *d, int16_t *src1, int16_t *src2, int16_t *src3, int n"); OIL_DEFINE_CLASS (multiply_and_add_s16_u8, "int16_t *d, int16_t *src1, int16_t *src2, uint8_t *src3, int n"); OIL_DEFINE_CLASS (multiply_and_acc_6xn_s16_u8, "int16_t *i1_6xn, int is1, " "int16_t *s1_6xn, int ss1, uint8_t *s2_6xn, int ss2, int n"); OIL_DEFINE_CLASS (multiply_and_acc_8xn_s16_u8, "int16_t *i1_8xn, int is1, " "int16_t *s1_8xn, int ss1, uint8_t *s2_8xn, int ss2, int n"); OIL_DEFINE_CLASS (multiply_and_acc_12xn_s16_u8, "int16_t *i1_12xn, int is1, " "int16_t *s1_12xn, int ss1, uint8_t *s2_12xn, int ss2, int n"); OIL_DEFINE_CLASS (multiply_and_acc_16xn_s16_u8, "int16_t *i1_16xn, int is1, " "int16_t *s1_16xn, int ss1, uint8_t *s2_16xn, int ss2, int n"); OIL_DEFINE_CLASS (multiply_and_acc_24xn_s16_u8, "int16_t *i1_24xn, int is1, " "int16_t *s1_24xn, int ss1, uint8_t *s2_24xn, int ss2, int n"); OIL_DEFINE_CLASS_FULL (combine2_8xn_u8, "uint8_t *d_8xn, int ds1, " "uint8_t *s1_8xn, int ss1, uint8_t *s2_8xn, int ss2, int16_t *s3_4, int n", combine2_test); OIL_DEFINE_CLASS_FULL (combine2_12xn_u8, "uint8_t *d_12xn, int ds1, " "uint8_t *s1_12xn, int ss1, uint8_t *s2_12xn, int ss2, int16_t *s3_4, int n", combine2_test); OIL_DEFINE_CLASS_FULL (combine2_16xn_u8, "uint8_t *d_16xn, int ds1, " "uint8_t *s1_16xn, int ss1, uint8_t *s2_16xn, int ss2, int16_t *s3_4, int n", combine2_test); OIL_DEFINE_CLASS_FULL (combine4_8xn_u8, "uint8_t *d_8xn, int ds1, " "uint8_t *s1_8xn, int ss1, uint8_t *s2_8xn, int ss2, uint8_t *s3_8xn, " "int ss3, uint8_t *s4_8xn, int ss4, int16_t *s5_6, int n", combine4_test); OIL_DEFINE_CLASS_FULL (combine4_12xn_u8, "uint8_t *d_12xn, int ds1, " "uint8_t *s1_12xn, int ss1, uint8_t *s2_12xn, int ss2, uint8_t *s3_12xn, " "int ss3, uint8_t *s4_12xn, int ss4, int16_t *s5_6, int n", combine4_test); OIL_DEFINE_CLASS_FULL (combine4_16xn_u8, "uint8_t *d_16xn, int ds1, " "uint8_t *s1_16xn, int ss1, uint8_t *s2_16xn, int ss2, uint8_t *s3_16xn, " "int ss3, uint8_t *s4_16xn, int ss4, int16_t *s5_6, int n", combine4_test); OIL_DEFINE_CLASS_FULL (combine4_32xn_u8, "uint8_t *d_32xn, int ds1, " "uint8_t *s1_16xn, int ss1, uint8_t *s2_32xn, int ss2, uint8_t *s3_32xn, " "int ss3, uint8_t *s4_32xn, int ss4, int16_t *s5_6, int n", combine4_test); OIL_DEFINE_CLASS_FULL (add2_rshift_add_s16, "int16_t *d, int16_t *s1, " "int16_t *s2, int16_t *s3, int16_t *s4_2, int n", add2_test); OIL_DEFINE_CLASS_FULL (add2_rshift_sub_s16, "int16_t *d, int16_t *s1, " "int16_t *s2, int16_t *s3, int16_t *s4_2, int n", add2_test); OIL_DEFINE_CLASS (avg2_8xn_u8, "uint8_t *d_8xn, int ds1, " "uint8_t *s1_8xn, int ss1, uint8_t *s2_8xn, int ss2, int n"); OIL_DEFINE_CLASS (avg2_12xn_u8, "uint8_t *d_12xn, int ds1, " "uint8_t *s1_12xn, int ss1, uint8_t *s2_12xn, int ss2, int n"); OIL_DEFINE_CLASS (avg2_16xn_u8, "uint8_t *d_16xn, int ds1, " "uint8_t *s1_16xn, int ss1, uint8_t *s2_16xn, int ss2, int n"); OIL_DEFINE_CLASS (avg2_32xn_u8, "uint8_t *d_32xn, int ds1, " "uint8_t *s1_32xn, int ss1, uint8_t *s2_32xn, int ss2, int n"); void deinterleave_ref (int16_t *d_2xn, int16_t *s_2xn, int n) { int i; for(i=0;i> 11); for(i=2;i> 12); } for(i=1;i> 12); } d_2xn[n*2-1] = s_2xn[n*2-1] - ((3616 * d_2xn[n*2-2]) >> 11); /* update */ d_2xn[0] += (217 * d_2xn[1]) >> 11; for(i=2;i> 12; } for(i=1;i> 12; } d_2xn[n*2-1] += (6497 * d_2xn[n*2-2]) >> 11; } OIL_DEFINE_IMPL_REF (synth_daub97_ref, synth_daub97); void split_daub97_ref (int16_t *d_2xn, int16_t *s_2xn, int n) { int i; if (n==0) return; /* predict */ for(i=1;i> 12); } d_2xn[n*2-1] = s_2xn[n*2-1] - ((6497 * s_2xn[n*2-2]) >> 11); d_2xn[0] = s_2xn[0] - ((217 * d_2xn[1]) >> 11); for(i=2;i> 12); } /* update */ for(i=1;i> 12; } d_2xn[n*2-1] += (3616 * d_2xn[n*2-2]) >> 11; d_2xn[0] += (1817 * d_2xn[1]) >> 11; for(i=2;i> 12; } } OIL_DEFINE_IMPL_REF (split_daub97_ref, split_daub97); void split_approx97_ref (int16_t *d_2xn, int16_t *s_2xn, int n) { int i; if (n==0) return; if (n==1) { d_2xn[1] = s_2xn[1] - s_2xn[0]; d_2xn[0] = s_2xn[0] + (d_2xn[1] >> 1); } else if (n==2) { /* predict */ d_2xn[1] = s_2xn[1] - ((9*(s_2xn[0] + s_2xn[2]) - (s_2xn[2] + s_2xn[2])) >> 4); d_2xn[3] = s_2xn[3] - ((9*s_2xn[2] - s_2xn[0]) >> 3); /* update */ d_2xn[0] = s_2xn[0] + (d_2xn[1] >> 1); d_2xn[2] = s_2xn[2] + ((d_2xn[1] + d_2xn[3]) >> 2); } else { /* predict */ d_2xn[1] = s_2xn[1] - ((9*(s_2xn[0] + s_2xn[2]) - (s_2xn[2] + s_2xn[4])) >> 4); for(i=3;i> 4); } d_2xn[n*2-3] = s_2xn[n*2-3] - ((9*(s_2xn[n*2-4] + s_2xn[n*2-2]) - (s_2xn[n*2-6] + s_2xn[n*2-2])) >> 4); d_2xn[n*2-1] = s_2xn[n*2-1] - ((9*s_2xn[n*2-2] - s_2xn[n*2-4]) >> 3); /* update */ d_2xn[0] = s_2xn[0] + (d_2xn[1] >> 1); for(i=2;i> 2); } } } OIL_DEFINE_IMPL_REF (split_approx97_ref, split_approx97); void synth_approx97_ref (int16_t *d_2xn, int16_t *s_2xn, int n) { int i; if (n==0) return; if (n==1) { d_2xn[0] = s_2xn[0] - (s_2xn[1] >> 1); d_2xn[1] = s_2xn[1] + d_2xn[0]; } else if (n==2) { /* predict */ d_2xn[0] = s_2xn[0] - (s_2xn[1] >> 1); d_2xn[2] = s_2xn[2] - ((s_2xn[1] + s_2xn[3]) >> 2); /* update */ d_2xn[1] = s_2xn[1] + ((9*(d_2xn[0] + d_2xn[2]) - (d_2xn[2] + d_2xn[2])) >> 4); d_2xn[3] = s_2xn[3] + ((9*d_2xn[2] - d_2xn[0]) >> 3); } else { /* predict */ d_2xn[0] = s_2xn[0] - (s_2xn[1] >> 1); for(i=2;i> 2); } /* update */ d_2xn[1] = s_2xn[1] + ((9*(d_2xn[0] + d_2xn[2]) - (d_2xn[2] + d_2xn[4])) >> 4); for(i=3;i> 4); } d_2xn[n*2-3] = s_2xn[n*2-3] + ((9*(d_2xn[n*2-4] + d_2xn[n*2-2]) - (d_2xn[n*2-6] + d_2xn[n*2-2])) >> 4); d_2xn[n*2-1] = s_2xn[n*2-1] + ((9*d_2xn[n*2-2] - d_2xn[n*2-4]) >> 3); } } OIL_DEFINE_IMPL_REF (synth_approx97_ref, synth_approx97); void split_53_ref (int16_t *d_2xn, int16_t *s_2xn, int n) { int i; if (n==0) return; if (n == 1) { d_2xn[1] = s_2xn[1] - s_2xn[0]; d_2xn[0] = s_2xn[0] + (d_2xn[1] >> 1); } else { d_2xn[1] = s_2xn[1] - ((s_2xn[0] + s_2xn[2]) >> 1); d_2xn[0] = s_2xn[0] + (d_2xn[1] >> 1); for(i=2;i> 1); d_2xn[i] = s_2xn[i] + ((d_2xn[i-1] + d_2xn[i+1]) >> 2); } d_2xn[n*2-1] = s_2xn[n*2-1] - s_2xn[n*2-2]; d_2xn[n*2-2] = s_2xn[n*2-2] + ((d_2xn[n*2-3] + d_2xn[n*2-1]) >> 2); } } OIL_DEFINE_IMPL_REF (split_53_ref, split_53); void synth_53_ref (int16_t *d_2xn, int16_t *s_2xn, int n) { int i; if (n==0) return; if (n == 1) { d_2xn[0] = s_2xn[0] - (s_2xn[1] >> 1); d_2xn[1] = s_2xn[1] + d_2xn[0]; } else { d_2xn[0] = s_2xn[0] - (s_2xn[1] >> 1); for(i=2;i> 2); d_2xn[i-1] = s_2xn[i-1] + ((d_2xn[i] + d_2xn[i-2]) >> 1); } d_2xn[n*2-2] = s_2xn[n*2-2] - ((s_2xn[n*2-3] + s_2xn[n*2-1]) >> 2); d_2xn[n*2-3] = s_2xn[n*2-3] + ((d_2xn[n*2-2] + d_2xn[n*2-4]) >> 1); d_2xn[n*2-1] = s_2xn[n*2-1] + d_2xn[n*2-2]; } } OIL_DEFINE_IMPL_REF (synth_53_ref, synth_53); void split_135_ref (int16_t *d_2xn, int16_t *s_2xn, int n) { int i; if (n==0) return; if (n==1) { d_2xn[1] = s_2xn[1] - (s_2xn[0]); d_2xn[0] = s_2xn[0] + (d_2xn[1]>>1); } else if (n==2) { /* predict */ d_2xn[1] = s_2xn[1] - ((9*(s_2xn[0] + s_2xn[2]) - (s_2xn[2] + s_2xn[2])) >> 4); d_2xn[3] = s_2xn[3] - ((9*s_2xn[2] - s_2xn[0]) >> 3); /* update */ d_2xn[0] = s_2xn[0] + ((9*d_2xn[1] - d_2xn[3]) >> 4); d_2xn[2] = s_2xn[2] + ((9*(d_2xn[1] + d_2xn[3]) - (d_2xn[1] + d_2xn[1])) >> 5); } else { /* predict */ d_2xn[1] = s_2xn[1] - ((9*(s_2xn[0] + s_2xn[2]) - (s_2xn[2] + s_2xn[4])) >> 4); for(i=3;i> 4); } d_2xn[n*2-3] = s_2xn[n*2-3] - ((9*(s_2xn[n*2-4] + s_2xn[n*2-2]) - (s_2xn[n*2-6] + s_2xn[n*2-2])) >> 4); d_2xn[n*2-1] = s_2xn[n*2-1] - ((9*s_2xn[n*2-2] - s_2xn[n*2-4]) >> 3); /* update */ d_2xn[0] = s_2xn[0] + ((9*d_2xn[1] - d_2xn[3]) >> 4); d_2xn[2] = s_2xn[2] + ((9*(d_2xn[1] + d_2xn[3]) - (d_2xn[1] + d_2xn[5])) >> 5); for(i=4;i> 5); } d_2xn[n*2-2] = s_2xn[n*2-2] + ((9*(d_2xn[n*2-3] + d_2xn[n*2-1]) - (d_2xn[n*2-5] + d_2xn[n*2-1])) >> 5); } } OIL_DEFINE_IMPL_REF (split_135_ref, split_135); void synth_135_ref (int16_t *d_2xn, int16_t *s_2xn, int n) { int i; if (n==0) return; if (n==1) { d_2xn[0] = s_2xn[0] - (s_2xn[1]>>1); d_2xn[1] = s_2xn[1] + (d_2xn[0]); } else if (n==2) { /* predict */ d_2xn[0] = s_2xn[0] - ((9*s_2xn[1] - s_2xn[3]) >> 4); d_2xn[2] = s_2xn[2] - ((9*(s_2xn[1] + s_2xn[3]) - (s_2xn[1] + s_2xn[1])) >> 5); /* update */ d_2xn[1] = s_2xn[1] + ((9*(d_2xn[0] + d_2xn[2]) - (d_2xn[2] + d_2xn[2])) >> 4); d_2xn[3] = s_2xn[3] + ((9*d_2xn[2] - d_2xn[0]) >> 3); } else { /* predict */ d_2xn[0] = s_2xn[0] - ((9*s_2xn[1] - s_2xn[3]) >> 4); d_2xn[2] = s_2xn[2] - ((9*(s_2xn[1] + s_2xn[3]) - (s_2xn[1] + s_2xn[5])) >> 5); for(i=4;i> 5); } d_2xn[n*2-2] = s_2xn[n*2-2] - ((9*(s_2xn[n*2-3] + s_2xn[n*2-1]) - (s_2xn[n*2-5] + s_2xn[n*2-1])) >> 5); /* update */ d_2xn[1] = s_2xn[1] + ((9*(d_2xn[0] + d_2xn[2]) - (d_2xn[2] + d_2xn[4])) >> 4); for(i=3;i> 4); } d_2xn[n*2-3] = s_2xn[n*2-3] + ((9*(d_2xn[n*2-4] + d_2xn[n*2-2]) - (d_2xn[n*2-6] + d_2xn[n*2-2])) >> 4); d_2xn[n*2-1] = s_2xn[n*2-1] + ((9*d_2xn[n*2-2] - d_2xn[n*2-4]) >> 3); } } OIL_DEFINE_IMPL_REF (synth_135_ref, synth_135); static void lift_test (OilTest *test) { int16_t *data; int i; data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC1); for(i=0;in;i++){ data[i] = oil_rand_u8(); } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC2); for(i=0;in;i++){ data[i] = oil_rand_u8(); } data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC3); for(i=0;in;i++){ data[i] = oil_rand_u8(); } } OIL_DEFINE_CLASS_FULL (lift_add_shift1, "int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n", lift_test); OIL_DEFINE_CLASS_FULL (lift_sub_shift1, "int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n", lift_test); OIL_DEFINE_CLASS_FULL (lift_add_shift2, "int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n", lift_test); OIL_DEFINE_CLASS_FULL (lift_sub_shift2, "int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n", lift_test); OIL_DEFINE_CLASS_FULL (lift_add_mult_shift12, "int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4_1, int n", lift_test); OIL_DEFINE_CLASS_FULL (lift_sub_mult_shift12, "int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4_1, int n", lift_test); OIL_DEFINE_CLASS_FULL (lift_add_135, "int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4, int16_t *s5, int n", lift_test); OIL_DEFINE_CLASS_FULL (lift_sub_135, "int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4, int16_t *s5, int n", lift_test); void lift_add_shift1_ref (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n) { int i; for(i=0;i>1); } } OIL_DEFINE_IMPL_REF (lift_add_shift1_ref, lift_add_shift1); void lift_sub_shift1_ref (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n) { int i; for(i=0;i>1); } } OIL_DEFINE_IMPL_REF (lift_sub_shift1_ref, lift_sub_shift1); void lift_add_shift2_ref (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n) { int i; for(i=0;i>2); } } OIL_DEFINE_IMPL_REF (lift_add_shift2_ref, lift_add_shift2); void lift_sub_shift2_ref (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n) { int i; for(i=0;i>2); } } OIL_DEFINE_IMPL_REF (lift_sub_shift2_ref, lift_sub_shift2); void lift_add_mult_shift12_ref (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4, int n) { int i; for(i=0;i>12); } } OIL_DEFINE_IMPL_REF (lift_add_mult_shift12_ref, lift_add_mult_shift12); void lift_sub_mult_shift12_ref (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4, int n) { int i; for(i=0;i>12); } } OIL_DEFINE_IMPL_REF (lift_sub_mult_shift12_ref, lift_sub_mult_shift12); void lift_add_135_ref (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4, int16_t *s5, int n) { int i; for(i=0;i> 4); } } OIL_DEFINE_IMPL_REF (lift_add_135_ref, lift_add_135); void lift_sub_135_ref (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4, int16_t *s5, int n) { int i; for(i=0;i> 4); } } OIL_DEFINE_IMPL_REF (lift_sub_135_ref, lift_sub_135); void add_const_rshift_s16_ref(int16_t *d1, int16_t *s1, int16_t *s3_2, int n) { int i; for(i=0;i>s3_2[1]; } } OIL_DEFINE_IMPL_REF (add_const_rshift_s16_ref, add_const_rshift_s16); void lshift_s16_ref(int16_t *d1, int16_t *s1, int16_t *s3_1, int n) { int i; for(i=0;i> s5_6[5]; } s1 += ss1; s2 += ss2; s3 += ss3; s4 += ss4; d += ds1; } } OIL_DEFINE_IMPL_REF (combine4_8xn_u8_ref, combine4_8xn_u8); void combine4_12xn_u8_ref (uint8_t *d, int ds1, uint8_t *s1, int ss1, uint8_t *s2, int ss2, uint8_t *s3, int ss3, uint8_t *s4, int ss4, int16_t *s5_6, int n) { int i; int j; for(j=0;j> s5_6[5]; } s1 += ss1; s2 += ss2; s3 += ss3; s4 += ss4; d += ds1; } } OIL_DEFINE_IMPL_REF (combine4_12xn_u8_ref, combine4_12xn_u8); void combine4_16xn_u8_ref (uint8_t *d, int ds1, uint8_t *s1, int ss1, uint8_t *s2, int ss2, uint8_t *s3, int ss3, uint8_t *s4, int ss4, int16_t *s5_6, int n) { int i; int j; for(j=0;j> s5_6[5]; } s1 += ss1; s2 += ss2; s3 += ss3; s4 += ss4; d += ds1; } } OIL_DEFINE_IMPL_REF (combine4_16xn_u8_ref, combine4_16xn_u8); void combine4_32xn_u8_ref (uint8_t *d, int ds1, uint8_t *s1, int ss1, uint8_t *s2, int ss2, uint8_t *s3, int ss3, uint8_t *s4, int ss4, int16_t *s5_6, int n) { int i; int j; for(j=0;j> s5_6[5]; } s1 += ss1; s2 += ss2; s3 += ss3; s4 += ss4; d += ds1; } } OIL_DEFINE_IMPL_REF (combine4_32xn_u8_ref, combine4_32xn_u8); void combine2_8xn_u8_ref (uint8_t *d, int ds1, uint8_t *s1, int ss1, uint8_t *s2, int ss2, int16_t *s3_4, int n) { int i; int j; for(j=0;j> s3_4[3]; } s1 += ss1; s2 += ss2; d += ds1; } } OIL_DEFINE_IMPL_REF (combine2_8xn_u8_ref, combine2_8xn_u8); void combine2_12xn_u8_ref (uint8_t *d, int ds1, uint8_t *s1, int ss1, uint8_t *s2, int ss2, int16_t *s3_4, int n) { int i; int j; for(j=0;j> s3_4[3]; } s1 += ss1; s2 += ss2; d += ds1; } } OIL_DEFINE_IMPL_REF (combine2_12xn_u8_ref, combine2_12xn_u8); void combine2_16xn_u8_ref (uint8_t *d, int ds1, uint8_t *s1, int ss1, uint8_t *s2, int ss2, int16_t *s3_4, int n) { int i; int j; for(j=0;j> s3_4[3]; } s1 += ss1; s2 += ss2; d += ds1; } } OIL_DEFINE_IMPL_REF (combine2_16xn_u8_ref, combine2_16xn_u8); void add2_rshift_add_s16_ref (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4_2, int n) { int i; for(i=0;i>s4_2[1]); } } OIL_DEFINE_IMPL_REF (add2_rshift_add_s16_ref, add2_rshift_add_s16); void add2_rshift_sub_s16_ref (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4_2, int n) { int i; for(i=0;i>s4_2[1]); } } OIL_DEFINE_IMPL_REF (add2_rshift_sub_s16_ref, add2_rshift_sub_s16); void avg2_8xn_u8_ref (uint8_t *d, int ds1, uint8_t *s1, int ss1, uint8_t *s2, int ss2, int n) { int i; int j; for(j=0;j>1; } s1 += ss1; s2 += ss2; d += ds1; } } OIL_DEFINE_IMPL_REF (avg2_8xn_u8_ref, avg2_8xn_u8); void avg2_12xn_u8_ref (uint8_t *d, int ds1, uint8_t *s1, int ss1, uint8_t *s2, int ss2, int n) { int i; int j; for(j=0;j>1; } s1 += ss1; s2 += ss2; d += ds1; } } OIL_DEFINE_IMPL_REF (avg2_12xn_u8_ref, avg2_12xn_u8); void avg2_16xn_u8_ref (uint8_t *d, int ds1, uint8_t *s1, int ss1, uint8_t *s2, int ss2, int n) { int i; int j; for(j=0;j>1; } s1 += ss1; s2 += ss2; d += ds1; } } OIL_DEFINE_IMPL_REF (avg2_16xn_u8_ref, avg2_16xn_u8); void avg2_32xn_u8_ref (uint8_t *d, int ds1, uint8_t *s1, int ss1, uint8_t *s2, int ss2, int n) { int i; int j; for(j=0;j>1; } s1 += ss1; s2 += ss2; d += ds1; } } OIL_DEFINE_IMPL_REF (avg2_32xn_u8_ref, avg2_32xn_u8); liboil-0.3.17/liboil/ref/resample.c0000644000175000017500000001310110717203073013773 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include /** * oil_resample_linear_u8: * @d_n: * @s_2xn: * @n: * @i_2: * * Linearly resamples a row of pixels. FIXME. */ static void resample_linear_u8_test (OilTest *test) { uint32_t *in = (uint32_t *) oil_test_get_source_data (test, OIL_ARG_INPLACE1); in[0] = 0; in[1] = 65536; } OIL_DEFINE_CLASS_FULL (resample_linear_u8, "uint8_t *d_n, uint8_t *s_2xn, int n, uint32_t *i_2", resample_linear_u8_test); /** * oil_resample_linear_argb: * @d_n: * @s_2xn: * @n: * @i_2: * * Linearly resamples a row of pixels. FIXME. */ static void resample_linear_argb_test (OilTest *test) { uint32_t *in = (uint32_t *) oil_test_get_source_data (test, OIL_ARG_INPLACE1); in[0] = 0; in[1] = 65536; } OIL_DEFINE_CLASS_FULL (resample_linear_argb, "uint32_t *d_n, uint32_t *s_2xn, int n, uint32_t *i_2", resample_linear_argb_test); static void resample_linear_u8_ref (uint8_t *dest, uint8_t *src, int n, uint32_t *in) { int acc = in[0]; int increment = in[1]; int i; int j; int x; for(i=0;i>16; x = (acc&0xffff)>>8; dest[i] = (src[j]*(256-x) + src[j+1]*x) >> 8; acc += increment; } in[0] = acc; } OIL_DEFINE_IMPL_REF (resample_linear_u8_ref, resample_linear_u8); static void resample_linear_argb_ref (uint32_t *d, uint32_t *s, int n, uint32_t *in) { uint8_t *src = (uint8_t *)s; uint8_t *dest = (uint8_t *)d; int acc = in[0]; int increment = in[1]; int i; int j; int x; for(i=0;i>16; x = (acc&0xffff)>>8; dest[4*i+0] = (src[4*j+0]*(256-x) + src[4*j+4]*x) >> 8; dest[4*i+1] = (src[4*j+1]*(256-x) + src[4*j+5]*x) >> 8; dest[4*i+2] = (src[4*j+2]*(256-x) + src[4*j+6]*x) >> 8; dest[4*i+3] = (src[4*j+3]*(256-x) + src[4*j+7]*x) >> 8; acc += increment; } in[0] = acc; } OIL_DEFINE_IMPL_REF (resample_linear_argb_ref, resample_linear_argb); static void merge_linear_test (OilTest *test) { uint32_t *src3 = (uint32_t *) oil_test_get_source_data (test, OIL_ARG_SRC3); do { src3[0] = oil_rand_u16() & 0x1ff; } while (src3[0] > 256); } OIL_DEFINE_CLASS_FULL (merge_linear_argb, "uint32_t *d_n, uint32_t *s_n, uint32_t *s2_n, uint32_t *s3_1, int n", merge_linear_test); OIL_DEFINE_CLASS_FULL (merge_linear_u8, "uint8_t *d_n, uint8_t *s_n, uint8_t *s2_n, uint32_t *s3_1, int n", merge_linear_test); /** * oil_merge_linear_argb: * @d_n: * @s_n: * @s2_n: * @s3_1: * @n: * * Linearly interpolate the @s_n and @s2_n arrays using the scale * factor in @s3_1. The value @s3_1 must be in the range [0, 256] * A value of 0 indicates weights of 1.0 and 0.0 for * the s_n and s2_n arrays respectively. A value of 256 indicates * weights of 0.0 and 1.0 respectively. * * This function is not intended for alpha blending; use one of the * compositing functions instead. */ static void merge_linear_argb_ref (uint32_t *d, uint32_t *s1, uint32_t *s2, uint32_t *src3, int n) { uint8_t *src1 = (uint8_t *)s1; uint8_t *src2 = (uint8_t *)s2; uint8_t *dest = (uint8_t *)d; int i; int x = src3[0]; for(i=0;i> 8; dest[4*i+1] = (src1[4*i+1]*(256-x) + src2[4*i+1]*x) >> 8; dest[4*i+2] = (src1[4*i+2]*(256-x) + src2[4*i+2]*x) >> 8; dest[4*i+3] = (src1[4*i+3]*(256-x) + src2[4*i+3]*x) >> 8; } } OIL_DEFINE_IMPL_REF (merge_linear_argb_ref, merge_linear_argb); /** * oil_merge_linear_u8: * @d_n: * @s_n: * @s2_n: * @s3_1: * @n: * * Linearly interpolate the @s_n and @s2_n arrays using the scale * factor in @s3_1. The value @s3_1 must be in the range [0, 255]. * The value translates into weights of 1.0-(value/256.0) and * (value/256.0) for the s_n and s2_n arrays respectively. * * This function is not intended for alpha blending; use one of the * compositing functions instead. */ static void merge_linear_u8_ref (uint8_t *dest, uint8_t *src1, uint8_t *src2, uint32_t *src3, int n) { int i; int x = src3[0]; for(i=0;i> 8; } } OIL_DEFINE_IMPL_REF (merge_linear_u8_ref, merge_linear_u8); liboil-0.3.17/liboil/ref/sad8x8_broken.c0000644000175000017500000000600210717203073014644 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_sad8x8_s16: * @d_8x8: * @ds: * @s1_8x8: * @ss1: * @s2_8x8: * @ss2: * * FIXME: This function is broken and has been replaced by * @oil_sad8x8_s16_2() because the destination of this function * is an 8x8 block instead of a single value. */ OIL_DEFINE_CLASS (sad8x8_s16, "uint32_t *d_8x8, int ds, int16_t *s1_8x8, int ss1, int16_t *s2_8x8, int ss2"); /** * oil_sad8x8_f64: * @d_8x8: * @ds: * @s1_8x8: * @ss1: * @s2_8x8: * @ss2: * * FIXME: This function is broken and has been replaced by * @oil_sad8x8_f64_2() because the destination of this function * is an 8x8 block instead of a single value. */ OIL_DEFINE_CLASS (sad8x8_f64, "double *d_8x8, int ds, double *s1_8x8, int ss1, double *s2_8x8, int ss2"); static void sad8x8_f64_ref(double *dest, int dstr, double *src1, int sstr1, double *src2, int sstr2) { int i,j; double sum; sum = 0; for(i=0;i<8;i++){ for(j=0;j<8;j++){ sum += fabs(OIL_GET(src1,sstr1*i+j*sizeof(double), double) - OIL_GET(src2,sstr2*i+j*sizeof(double), double)); } } *dest = sum; } OIL_DEFINE_IMPL_REF(sad8x8_f64_ref, sad8x8_f64); static void sad8x8_s16_ref(uint32_t *dest, int dstr, int16_t *src1, int sstr1, int16_t *src2, int sstr2) { int i,j; int d; uint32_t sum; sum = 0; for(i=0;i<8;i++){ for(j=0;j<8;j++){ d = ((int)OIL_GET(src1,sstr1*i+j*sizeof(int16_t), int16_t)) - ((int)OIL_GET(src2,sstr2*i+j*sizeof(int16_t), int16_t)); sum += (d<0) ? -d : d; } } *dest = sum; } OIL_DEFINE_IMPL_REF(sad8x8_s16_ref, sad8x8_s16); liboil-0.3.17/liboil/ref/mt19937ar.c0000644000175000017500000001017110717203073013547 00000000000000/* A C-program for MT19937, with initialization improved 2002/1/26. Coded by Takuji Nishimura and Makoto Matsumoto. Before using, initialize the state by using init_genrand(seed) or init_by_array(init_key, key_length). Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Any feedback is very welcome. http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space) */ #ifdef HAVE_CONFIG_H #include #endif #include /* Period parameters */ #define N 624 #define M 397 #define MATRIX_A 0x9908b0dfUL /* constant vector a */ #define UPPER_MASK 0x80000000UL /* most significant w-r bits */ #define LOWER_MASK 0x7fffffffUL /* least significant r bits */ OIL_DEFINE_CLASS(mt19937, "uint32_t *d_624, uint32_t *i_624"); #if 0 OIL_DEFINE_CLASS(mt19937x8, "uint32_t *d_624x8, uint32_t *i_624x8"); #endif /* mag01[x] = x * MATRIX_A for x=0,1 */ static const uint32_t mag01[2]={0x0UL, MATRIX_A}; static void mt19937_ref (uint32_t *d, uint32_t *mt) { uint32_t y; int kk; for (kk=0;kk> 1) ^ mag01[y & 0x1UL]; } for (;kk> 1) ^ mag01[y & 0x1UL]; } y = (mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK); mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1UL]; for(kk=0;kk> 11); y ^= (y << 7) & 0x9d2c5680UL; y ^= (y << 15) & 0xefc60000UL; y ^= (y >> 18); d[kk] = y; } } OIL_DEFINE_IMPL_REF (mt19937_ref, mt19937); #if 0 /* There's no point in doing this in parallel, since the above class * is handled by MMX quite well */ static void mt19937x8_ref (uint32_t *d, uint32_t *mt) { uint32_t y; int kk; int i; for(i=0;i<8;i++){ for (kk=0;kk> 1) ^ mag01[y & 0x1UL]; } for (;kk> 1) ^ mag01[y & 0x1UL]; } y = (mt[(N-1)*8+i]&UPPER_MASK)|(mt[0*8+i]&LOWER_MASK); mt[(N-1)*8+i] = mt[(M-1)*8+i] ^ (y >> 1) ^ mag01[y & 0x1UL]; for(kk=0;kk> 11); y ^= (y << 7) & 0x9d2c5680UL; y ^= (y << 15) & 0xefc60000UL; y ^= (y >> 18); d[kk*8 + i] = y; } } } OIL_DEFINE_IMPL_REF (mt19937x8_ref, mt19937x8); #endif liboil-0.3.17/liboil/ref/addc.c0000644000175000017500000000210110726374600013061 00000000000000 #include #include #include static void shift_test (OilTest *test) { int16_t *data; int i; int n; if (0) { data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC1); n = oil_test_get_arg_post_n (test, OIL_ARG_SRC1); for(i=0;i>s2_2[1]; } } OIL_DEFINE_IMPL_REF (addc_rshift_s16_ref, addc_rshift_s16); void addc_s16_ref (int16_t *d1, uint16_t *s1, int16_t *s2_1, int n) { int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include /** * oil_diff8x8_s16_u8: * @d_8x8: * @s1_8x8: * @ss1: * @s2_8x8: * @ss2: * * Calculates the difference of each value in @s1_8x8 and @s2_8x8 * and places the result in @d_8x8. Note that the destination type * is larger than the source type. */ OIL_DEFINE_CLASS (diff8x8_s16_u8, "int16_t *d_8x8, uint8_t *s1_8x8, int ss1, uint8_t *s2_8x8, int ss2"); /** * oil_diff8x8_const128_s16_u8: * @d_8x8: * @s1_8x8: * @ss1: * * Subtracts 128 from each value in @s1_8x8 * and places the result in @d_8x8. Note that the destination type * is larger than the source type. */ OIL_DEFINE_CLASS (diff8x8_const128_s16_u8, "int16_t *d_8x8, uint8_t *s1_8x8, int ss1"); /** * oil_diff8x8_average_s16_u8: * @d_8x8: * @s1_8x8: * @ss1: * @s2_8x8: * @ss2: * @s3_8x8: * @ss3: * * Calculates the difference of each value in @s1_8x8 and the * average of @s2_8x8 and @s3_8x8, * and places the result in @d_8x8. Note that the destination type * is larger than the source type. */ OIL_DEFINE_CLASS (diff8x8_average_s16_u8, "int16_t *d_8x8, uint8_t *s1_8x8, int ss1, uint8_t *s2_8x8, int ss2, uint8_t *s3_8x8, int ss3"); static void diff8x8_s16_u8_ref (int16_t *dest, uint8_t *src1, int ss1, uint8_t *src2, int ss2) { int i; /* For each block row */ for (i=0;i<8;i++ ){ dest[0] = ((int16_t)src1[0]) - ((int16_t)src2[0]); dest[1] = ((int16_t)src1[1]) - ((int16_t)src2[1]); dest[2] = ((int16_t)src1[2]) - ((int16_t)src2[2]); dest[3] = ((int16_t)src1[3]) - ((int16_t)src2[3]); dest[4] = ((int16_t)src1[4]) - ((int16_t)src2[4]); dest[5] = ((int16_t)src1[5]) - ((int16_t)src2[5]); dest[6] = ((int16_t)src1[6]) - ((int16_t)src2[6]); dest[7] = ((int16_t)src1[7]) - ((int16_t)src2[7]); /* Start next row */ src1 += ss1; src2 += ss2; dest += 8; } } OIL_DEFINE_IMPL_REF (diff8x8_s16_u8_ref, diff8x8_s16_u8); static void diff8x8_const128_s16_u8_ref (int16_t *dest, uint8_t *src1, int ss1) { int i; /* For each block row */ for (i=0;i<8;i++ ){ dest[0] = ((int16_t)src1[0]) - 128; dest[1] = ((int16_t)src1[1]) - 128; dest[2] = ((int16_t)src1[2]) - 128; dest[3] = ((int16_t)src1[3]) - 128; dest[4] = ((int16_t)src1[4]) - 128; dest[5] = ((int16_t)src1[5]) - 128; dest[6] = ((int16_t)src1[6]) - 128; dest[7] = ((int16_t)src1[7]) - 128; /* Start next row */ src1 += ss1; dest += 8; } } OIL_DEFINE_IMPL_REF (diff8x8_const128_s16_u8_ref, diff8x8_const128_s16_u8); static void diff8x8_average_s16_u8_ref (int16_t *dest, uint8_t *src1, int ss1, uint8_t *src2, int ss2, uint8_t *src3, int ss3) { int i; /* For each block row */ for (i=0;i<8;i++ ){ dest[0] = ((int16_t)src1[0]) - ((((int16_t)src2[0]) + ((int16_t)src3[0])) / 2); dest[1] = ((int16_t)src1[1]) - ((((int16_t)src2[1]) + ((int16_t)src3[1])) / 2); dest[2] = ((int16_t)src1[2]) - ((((int16_t)src2[2]) + ((int16_t)src3[2])) / 2); dest[3] = ((int16_t)src1[3]) - ((((int16_t)src2[3]) + ((int16_t)src3[3])) / 2); dest[4] = ((int16_t)src1[4]) - ((((int16_t)src2[4]) + ((int16_t)src3[4])) / 2); dest[5] = ((int16_t)src1[5]) - ((((int16_t)src2[5]) + ((int16_t)src3[5])) / 2); dest[6] = ((int16_t)src1[6]) - ((((int16_t)src2[6]) + ((int16_t)src3[6])) / 2); dest[7] = ((int16_t)src1[7]) - ((((int16_t)src2[7]) + ((int16_t)src3[7])) / 2); /* Start next row */ src1 += ss1; src2 += ss2; src3 += ss3; dest += 8; } } OIL_DEFINE_IMPL_REF (diff8x8_average_s16_u8_ref, diff8x8_average_s16_u8); liboil-0.3.17/liboil/ref/sum_f64.c0000644000175000017500000000425510717203073013460 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_sum_f64: * @d_1: destination * @s: source array * @sstr: stride of source elements * @n: number of elements * * Sums the elements in the source array and places the result in * @d. */ OIL_DEFINE_CLASS (sum_f64, "double *d_1, double *s, int sstr, int n"); //OIL_DEFINE_CLASS (sum_f64_i10, "double *dest, double *src, int sstr, int n"); static void sum_f64_ref (double *dest, double *src, int sstr, int n) { double sum = 0; double errsum = 0; double tmp; int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_squaresum_f64: * @d: * @s: * @n: * * Sums the square of each element in @s and places the result in * @dest. */ OIL_DEFINE_CLASS (squaresum_f64, "double *d, double *s, int n"); static void squaresum_f64_ref(double *dest, double *src, int n) { double sum2 = 0; double errsum = 0; double tmp; double x; int i; for(i=0;i> 15; sum2 += x; } *dest = sum2; } OIL_DEFINE_IMPL_REF (squaresum_shifted_s16_ref, squaresum_shifted_s16); liboil-0.3.17/liboil/ref/diffsquaresum_f32.c0000644000175000017500000000436111067011142015514 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_diffsquaresum_f32: * @d_1: * @src1: * @sstr1: * @src2: * @sstr2: * @n: * * Calculates the sum of squared differences between @src1 and @src2 * and places the result in @d_1. */ OIL_DEFINE_CLASS (diffsquaresum_f32, "float *d_1, float *src1, int sstr1, float *src2, int sstr2, int n"); static void diffsquaresum_f32_ref(float *dest, float *src1, int sstr1, float *src2, int sstr2, int n) { double sum = 0; double errsum = 0; double tmp; double x; int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #define AYUV(a,y,u,v) (((a)<<24) | ((y)<<16) | ((u)<<8) | (v)) #define AYUV_A(color) (((color)>>24)&0xff) #define AYUV_Y(color) (((color)>>16)&0xff) #define AYUV_U(color) (((color)>>8)&0xff) #define AYUV_V(color) (((color)>>0)&0xff) /** * oil_yuyv2ayuv: * @d_n: * @s_n: * n: * * Converts pixels in YUYV format to AYUV. Note that only approximately * half of the source array is used. Alpha values are set to 255. */ OIL_DEFINE_CLASS (yuyv2ayuv, "uint32_t *d_n, uint32_t *s_n, int n"); /** * oil_yvyu2ayuv: * @d_n: * @s_n: * n: * * Converts pixels in YVYU format to AYUV. Note that only approximately * half of the source array is used. Alpha values are set to 255. */ OIL_DEFINE_CLASS (yvyu2ayuv, "uint32_t *d_n, uint32_t *s_n, int n"); /** * oil_uyvy2ayuv: * @d_n: * @s_n: * n: * * Converts pixels in UYVY format to AYUV. Note that only approximately * half of the source array is used. Alpha values are set to 255. */ OIL_DEFINE_CLASS (uyvy2ayuv, "uint32_t *d_n, uint32_t *s_n, int n"); /** * oil_ayuv2yuyv: * @d_n: * @s_n: * n: * * Converts pixels in AYUV format to YUYV. Note that only approximately * half of the destination array is written. Alpha values are ignored. */ OIL_DEFINE_CLASS (ayuv2yuyv, "uint32_t *d_n, uint32_t *s_n, int n"); /** * oil_ayuv2yvyu: * @d_n: * @s_n: * n: * * Converts pixels in AYUV format to YVYU. Note that only approximately * half of the destination array is written. Alpha values are ignored. */ OIL_DEFINE_CLASS (ayuv2yvyu, "uint32_t *d_n, uint32_t *s_n, int n"); /** * oil_ayuv2uyvy: * @d_n: * @s_n: * n: * * Converts pixels in AYUV format to UYVY. Note that only approximately * half of the destination array is written. Alpha values are ignored. */ OIL_DEFINE_CLASS (ayuv2uyvy, "uint32_t *d_n, uint32_t *s_n, int n"); /** * oil_packyuyv: * @d: * @s1_nx2: * @s2: * @s3: * n: * * Packs pixels in separate Y, U, and V arrays to YUYV. */ OIL_DEFINE_CLASS (packyuyv, "uint32_t *d, uint8_t *s1_nx2, uint8_t *s2, uint8_t *s3, int n"); /** * oil_unpackyuyv: * @d1_nx2: * @d2: * @d3: * @s: * n: * * Unpacks YUYV pixels into separate Y, U, and V arrays; */ OIL_DEFINE_CLASS (unpackyuyv, "uint8_t *d1_nx2, uint8_t *d2, uint8_t *d3, uint32_t *s int n"); static void yuyv2ayuv_ref (uint32_t *dest, uint32_t *s, int n) { uint8_t *src = (uint8_t *)s; int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include /** * SECTION:liboilfuncs-math * @title: Simple Arithmetic * @short_description: Aritmetic operations * */ /** * SECTION:liboilfuncs-math8x8 * @title: Simple Arithmetic on Blocks * @short_description: Aritmetic operations on 8x8 blocks * */ /** * oil_add_s16: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Adds elements in @s2 and @s1 and places the result in @d. */ OIL_DEFINE_CLASS (add_s16, "int16_t *d, int16_t *src1, int16_t *src2, int n"); /** * oil_subtract_s16: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Subtracts elements in @s2 from @s1 and places the result in @d. */ OIL_DEFINE_CLASS (subtract_s16, "int16_t *d, int16_t *src1, int16_t *src2, int n"); /** * oil_add_s16_u8: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Adds elements in @s2 and @s1 and places the result in @d. */ OIL_DEFINE_CLASS (add_s16_u8, "int16_t *d, int16_t *src1, uint8_t *src2, int n"); /** * oil_subtract_s16_u8: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Subtracts elements in @s2 from @s1 and places the result in @d. */ OIL_DEFINE_CLASS (subtract_s16_u8, "int16_t *d, int16_t *src1, uint8_t *src2, int n"); /** * oil_add_f32: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Adds elements in @s2 and @s1 and places the result in @d. */ OIL_DEFINE_CLASS (add_f32, "float *d, float *s1, float *s2, int n"); /** * oil_add_f64: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Adds elements in @s2 and @s1 and places the result in @d. */ OIL_DEFINE_CLASS (add_f64, "double *d, double *s1, double *s2, int n"); /** * oil_subtract_f32: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Subtracts elements in @s2 from @s1 and places the result in @d. */ OIL_DEFINE_CLASS (subtract_f32, "float *d, float *s1, float *s2, int n"); /** * oil_subtract_f64: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Subtracts elements in @s2 from @s1 and places the result in @d. */ OIL_DEFINE_CLASS (subtract_f64, "double *d, double *s1, double *s2, int n"); /** * oil_multiply_f32: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Multiplies elements in @s1 and @s2 and places the result in @d. */ OIL_DEFINE_CLASS (multiply_f32, "float *d, float *s1, float *s2, int n"); /** * oil_multiply_f64: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Multiplies elements in @s1 and @s2 and places the result in @d. */ OIL_DEFINE_CLASS (multiply_f64, "double *d, double *s1, double *s2, int n"); /** * oil_divide_f32: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Divides elements in @s1 by @s2 and places the result in @d. */ OIL_DEFINE_CLASS (divide_f32, "float *d, float *s1, float *s2, int n"); /** * oil_divide_f64: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Divides elements in @s1 by @s2 and places the result in @d. */ OIL_DEFINE_CLASS (divide_f64, "double *d, double *s1, double *s2, int n"); /** * oil_minimum_f32: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Places the lesser of @s1 and @s2 in @d. */ OIL_DEFINE_CLASS (minimum_f32, "float *d, float *s1, float *s2, int n"); /** * oil_minimum_f64: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Places the lesser of @s1 and @s2 in @d. */ OIL_DEFINE_CLASS (minimum_f64, "float *d, float *s1, float *s2, int n"); /** * oil_maximum_f32: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Places the greater of @s1 and @s2 in @d. */ OIL_DEFINE_CLASS (maximum_f32, "float *d, float *s1, float *s2, int n"); /** * oil_maximum_f64: * @d: destination * @s1: source 1 * @s2: source 2 * @n: number of elements * * Places the greater of @s1 and @s2 in @d. */ OIL_DEFINE_CLASS (maximum_f64, "float *d, float *s1, float *s2, int n"); /** * oil_negative_f32: * @d: destination * @s: source * @n: number of elements * * Negates each element in @s and places the result in @d. */ OIL_DEFINE_CLASS (negative_f32, "float *d, float *s, int n"); /** * oil_inverse_f32: * @d: destination * @s: source * @n: number of elements * * Calculates the multiplicative inverse of each element in @s and * places the result in @d. */ OIL_DEFINE_CLASS (inverse_f32, "float *d, float *s, int n"); /** * oil_sign_f32: * @d: destination * @s: source * @n: number of elements * * Calculates the sign of each element in @s and * places the result in @d. */ OIL_DEFINE_CLASS (sign_f32, "float *d, float *s, int n"); /** * oil_floor_f32: * @d: destination * @s: source * @n: number of elements * * Calculates the greatest integer less than or equal to each element * in @s and places the result in @d. */ OIL_DEFINE_CLASS (floor_f32, "float *d, float *s, int n"); /** * oil_scalaradd_f32_ns: * @d: destination * @s1: source * @s2_1: source * @n: number of elements * * Adds the constant value @s2_1 to each source element and places * the result in @d. */ OIL_DEFINE_CLASS (scalaradd_f32_ns, "float *d, float *s1, float *s2_1, int n"); /** * oil_scalarmultiply_f32_ns: * @d: destination * @s1: source * @s2_1: source * @n: number of elements * * Multiplies the constant value @s2_1 and each source element and places * the result in @d. */ OIL_DEFINE_CLASS (scalarmultiply_f32_ns, "float *d, float *s1, float *s2_1, int n"); /** * oil_scalarmultiply_f64_ns: * @d: destination * @s1: source * @s2_1: source * @n: number of elements * * Multiplies the constant value @s2_1 and each source element and places * the result in @d. */ OIL_DEFINE_CLASS (scalarmultiply_f64_ns, "double *d, double *s1, double *s2_1, int n"); static void add_s16_ref (int16_t *d, int16_t *src1, int16_t *src2, int n) { int i; for(i=0;i src2[i]) ? src1[i] : src2[i]; } } OIL_DEFINE_IMPL_REF (maximum_f32_ref, maximum_f32); static void minimum_f64_ref (float *dest, float *src1, float *src2, int n) { int i; for(i=0;i src2[i]) ? src1[i] : src2[i]; } } OIL_DEFINE_IMPL_REF (maximum_f64_ref, maximum_f64); static void negative_f32_ref (float *dest, float *src1, int n) { int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include /** * oil_err_intra8x8_u8: * @d_1: * @s1_8x8: * @ss1: * * Calculates the sum of squared differences from the mean over * @s1_8x8 and places the result in @d_1. This result is 64 times * the variance of the mean of @s1_8x8. */ OIL_DEFINE_CLASS (err_intra8x8_u8, "uint32_t *d_1, uint8_t *s1_8x8, int ss1"); /** * oil_err_inter8x8_u8: * @d_1: * @s1_8x8: * @ss1: * @s2_8x8: * @ss2: * * Calculates an intermediate 8x8 block where each element is the * difference between @s1_8x8 and @s2_8x8. * The sum of squares of the difference of each element in the * intermediate block and the mean of the intermediate block is * placed into @d_1. This result is * equal to 64 times the variance of the mean of the intermediate block. */ OIL_DEFINE_CLASS (err_inter8x8_u8, "uint32_t *d_1, uint8_t *s1_8x8, int ss1, uint8_t *s2_8x8, int ss2"); /** * oil_err_inter8x8_u8_avg: * @d_1: * @s1_8x8: * @ss1: * @s2_8x8: * @s3_8x8: * @ss2: * * Calculates an intermediate 8x8 block where each element is the * difference between @s1_8x8 and the average of @s2_8x8 and @s3_8x8. * The sum of squares of the difference of each element in the * intermediate block and the mean of the intermediate block is * placed into @d_1. * This result is 64 times the variance of the mean of the intermediate * block. * * FIXME: This function is broken, since the reference function uses * @ss2 as the stride for both @s2_8x8 and @s3_8x8. */ OIL_DEFINE_CLASS (err_inter8x8_u8_avg, "uint32_t *d_1, uint8_t *s1_8x8, int ss1, uint8_t *s2_8x8, uint8_t *s3_8x8, int ss2"); #define DSP_OP_AVG(a,b) ((((int)(a)) + ((int)(b)))/2) #define DSP_OP_DIFF(a,b) (((int)(a)) - ((int)(b))) static void err_intra8x8_u8_ref (uint32_t *dest, uint8_t *src1, int ss1) { uint32_t i; uint32_t xsum=0; uint32_t xxsum=0; for (i=8; i; i--) { /* Examine alternate pixel locations. */ xsum += src1[0]; xxsum += src1[0]*src1[0]; xsum += src1[1]; xxsum += src1[1]*src1[1]; xsum += src1[2]; xxsum += src1[2]*src1[2]; xsum += src1[3]; xxsum += src1[3]*src1[3]; xsum += src1[4]; xxsum += src1[4]*src1[4]; xsum += src1[5]; xxsum += src1[5]*src1[5]; xsum += src1[6]; xxsum += src1[6]*src1[6]; xsum += src1[7]; xxsum += src1[7]*src1[7]; /* Step to next row of block. */ src1 += ss1; } /* Compute population variance as mis-match metric. */ *dest = (((xxsum<<6) - xsum*xsum )); } OIL_DEFINE_IMPL_REF (err_intra8x8_u8_ref, err_intra8x8_u8); static void err_inter8x8_u8_ref (uint32_t *dest, uint8_t *src1, int ss1, uint8_t *src2, int ss2) { uint32_t i; uint32_t xsum=0; uint32_t xxsum=0; int32_t diff; for (i=8; i; i--) { diff = DSP_OP_DIFF (src1[0], src2[0]); xsum += diff; xxsum += diff*diff; diff = DSP_OP_DIFF (src1[1], src2[1]); xsum += diff; xxsum += diff*diff; diff = DSP_OP_DIFF (src1[2], src2[2]); xsum += diff; xxsum += diff*diff; diff = DSP_OP_DIFF (src1[3], src2[3]); xsum += diff; xxsum += diff*diff; diff = DSP_OP_DIFF (src1[4], src2[4]); xsum += diff; xxsum += diff*diff; diff = DSP_OP_DIFF (src1[5], src2[5]); xsum += diff; xxsum += diff*diff; diff = DSP_OP_DIFF (src1[6], src2[6]); xsum += diff; xxsum += diff*diff; diff = DSP_OP_DIFF (src1[7], src2[7]); xsum += diff; xxsum += diff*diff; /* Step to next row of block. */ src1 += ss1; src2 += ss2; } /* Compute and return population variance as mis-match metric. */ *dest = (((xxsum<<6) - xsum*xsum)); } OIL_DEFINE_IMPL_REF (err_inter8x8_u8_ref, err_inter8x8_u8); static void err_inter8x8_u8_avg_ref (uint32_t *dest, uint8_t *src1, int ss1, uint8_t *src2, uint8_t *src3, int ss2) { uint32_t i; uint32_t xsum=0; uint32_t xxsum=0; int32_t diff; for (i=8; i; i--) { diff = DSP_OP_DIFF(src1[0], DSP_OP_AVG (src2[0], src3[0])); xsum += diff; xxsum += diff*diff; diff = DSP_OP_DIFF(src1[1], DSP_OP_AVG (src2[1], src3[1])); xsum += diff; xxsum += diff*diff; diff = DSP_OP_DIFF(src1[2], DSP_OP_AVG (src2[2], src3[2])); xsum += diff; xxsum += diff*diff; diff = DSP_OP_DIFF(src1[3], DSP_OP_AVG (src2[3], src3[3])); xsum += diff; xxsum += diff*diff; diff = DSP_OP_DIFF(src1[4], DSP_OP_AVG (src2[4], src3[4])); xsum += diff; xxsum += diff*diff; diff = DSP_OP_DIFF(src1[5], DSP_OP_AVG (src2[5], src3[5])); xsum += diff; xxsum += diff*diff; diff = DSP_OP_DIFF(src1[6], DSP_OP_AVG (src2[6], src3[6])); xsum += diff; xxsum += diff*diff; diff = DSP_OP_DIFF(src1[7], DSP_OP_AVG (src2[7], src3[7])); xsum += diff; xxsum += diff*diff; /* Step to next row of block. */ src1 += ss1; src2 += ss2; src3 += ss2; } /* Compute and return population variance as mis-match metric. */ *dest = (((xxsum<<6) - xsum*xsum)); } OIL_DEFINE_IMPL_REF (err_inter8x8_u8_avg_ref, err_inter8x8_u8_avg); liboil-0.3.17/liboil/ref/sad8x8avg.c0000644000175000017500000000547110717203073014013 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #define ABS(x) ((x)>0 ? (x) : -(x)) /** * oil_sad8x8_u8_avg: * @d_1: * @s1_8x8: * @ss1: * @s2_8x8: * @s3_8x8: * @ss2: * * Calculates the sum of absolute differences between @s1_8x8 and * the average of @s2_8x8 and @s3_8x8. * * FIXME: This function is broken because the reference function assumes * the stride for @s3_8x8 is @ss2. */ OIL_DEFINE_CLASS (sad8x8_u8_avg, "uint32_t *d_1, uint8_t *s1_8x8, int ss1, uint8_t *s2_8x8, uint8_t *s3_8x8, int ss2"); static void sad8x8_u8_avg_ref (uint32_t *dest, uint8_t *src1, int ss1, uint8_t *src2, uint8_t *src3, int ss2) { int i; uint32_t diff = 0; for (i=0; i<8;i++){ diff += ABS(((int)src1[0]) - (((int)src2[0] + (int)src3[0]) / 2)); diff += ABS(((int)src1[1]) - (((int)src2[1] + (int)src3[1]) / 2)); diff += ABS(((int)src1[2]) - (((int)src2[2] + (int)src3[2]) / 2)); diff += ABS(((int)src1[3]) - (((int)src2[3] + (int)src3[3]) / 2)); diff += ABS(((int)src1[4]) - (((int)src2[4] + (int)src3[4]) / 2)); diff += ABS(((int)src1[5]) - (((int)src2[5] + (int)src3[5]) / 2)); diff += ABS(((int)src1[6]) - (((int)src2[6] + (int)src3[6]) / 2)); diff += ABS(((int)src1[7]) - (((int)src2[7] + (int)src3[7]) / 2)); /* Step to next row of block. */ src1 += ss1; src2 += ss2; src3 += ss2; } *dest = diff; } OIL_DEFINE_IMPL_REF (sad8x8_u8_avg_ref, sad8x8_u8_avg); liboil-0.3.17/liboil/ref/rowcolsad8x8.c0000644000175000017500000001045210717203073014536 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #define ABS(x) ((x)>0 ? (x) : -(x)) #define DSP_OP_ABS_DIFF(a,b) ABS((((int)(a)) - ((int)(b)))) /** * oil_rowsad8x8_u8: * @d_1: * @s1_8x8: * @s2_8x8: * * Calculates the sum of absolute differences between @s1_8x8 and @s1_8s8 * for the first 4 elements of the first row, and the sum of absolute * differences for the last 4 elements of the first row, and places the * maximum of those values in @dest. * * FIXME: This function is declared incorrectly. */ OIL_DEFINE_CLASS (rowsad8x8_u8, "uint32_t *d_1, uint8_t *s1_8x8, uint8_t *s2_8x8"); /** * oil_colsad8x8_u8: * @d_1: * @s1_8x8: * @s2_8x8: * * Divides the 8x8 block into 16 1x4 regions, and calculates the * sum of absolute differences between @s1_8x8 and @s2_8x8 for * each region. The maximum of the results in each region is * placed in @d_1. */ OIL_DEFINE_CLASS (colsad8x8_u8, "uint32_t *d_1, uint8_t *s1_8x8, int ss1, uint8_t *s2_8x8, int ss2"); static void rowsad8x8_u8_ref (uint32_t *dest, uint8_t *src1, uint8_t *src2) { uint32_t SadValue; uint32_t SadValue1; SadValue = DSP_OP_ABS_DIFF (src1[0], src2[0]) + DSP_OP_ABS_DIFF (src1[1], src2[1]) + DSP_OP_ABS_DIFF (src1[2], src2[2]) + DSP_OP_ABS_DIFF (src1[3], src2[3]); SadValue1 = DSP_OP_ABS_DIFF (src1[4], src2[4]) + DSP_OP_ABS_DIFF (src1[5], src2[5]) + DSP_OP_ABS_DIFF (src1[6], src2[6]) + DSP_OP_ABS_DIFF (src1[7], src2[7]); *dest = (SadValue > SadValue1) ? SadValue : SadValue1; } OIL_DEFINE_IMPL_REF (rowsad8x8_u8_ref, rowsad8x8_u8); static void colsad8x8_u8_ref (uint32_t *dest, uint8_t *src1, int ss1, uint8_t *src2, int ss2) { uint32_t SadValue[8] = {0,0,0,0,0,0,0,0}; uint32_t SadValue2[8] = {0,0,0,0,0,0,0,0}; uint32_t MaxSad = 0; uint32_t i; for ( i = 0; i < 4; i++ ){ SadValue[0] += ABS(src1[0] - src2[0]); SadValue[1] += ABS(src1[1] - src2[1]); SadValue[2] += ABS(src1[2] - src2[2]); SadValue[3] += ABS(src1[3] - src2[3]); SadValue[4] += ABS(src1[4] - src2[4]); SadValue[5] += ABS(src1[5] - src2[5]); SadValue[6] += ABS(src1[6] - src2[6]); SadValue[7] += ABS(src1[7] - src2[7]); src1 += ss1; src2 += ss2; } for ( i = 0; i < 4; i++ ){ SadValue2[0] += ABS(src1[0] - src2[0]); SadValue2[1] += ABS(src1[1] - src2[1]); SadValue2[2] += ABS(src1[2] - src2[2]); SadValue2[3] += ABS(src1[3] - src2[3]); SadValue2[4] += ABS(src1[4] - src2[4]); SadValue2[5] += ABS(src1[5] - src2[5]); SadValue2[6] += ABS(src1[6] - src2[6]); SadValue2[7] += ABS(src1[7] - src2[7]); src1 += ss1; src2 += ss2; } for ( i = 0; i < 8; i++ ){ if ( SadValue[i] > MaxSad ) MaxSad = SadValue[i]; if ( SadValue2[i] > MaxSad ) MaxSad = SadValue2[i]; } *dest = MaxSad; } OIL_DEFINE_IMPL_REF (colsad8x8_u8_ref, colsad8x8_u8); liboil-0.3.17/liboil/ref/Makefile.in0000644000175000017500000026701011332627673014110 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = liboil/ref DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @USE_ALT_OPT_TRUE@am__DEPENDENCIES_1 = libref_opt1.la libref_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__objects_1 = libref_la-addc.lo libref_la-argb_paint.lo \ libref_la-ayuv2argb.lo libref_la-clamp.lo \ libref_la-composite.lo libref_la-convert.lo libref_la-copy.lo \ libref_la-copy8x8.lo libref_la-diff8x8.lo \ libref_la-diffsquaresum_f64.lo libref_la-diffsquaresum_f32.lo \ libref_la-error8x8.lo libref_la-mas.lo libref_la-math.lo \ libref_la-mix_u8.lo libref_la-mt19937ar.lo \ libref_la-mult8x8_s16.lo libref_la-multsum.lo \ libref_la-recon8x8.lo libref_la-resample.lo libref_la-rgb.lo \ libref_la-rowcolsad8x8.lo libref_la-sad8x8.lo \ libref_la-sad8x8_broken.lo libref_la-sad8x8avg.lo \ libref_la-sincos_f64.lo libref_la-splat.lo \ libref_la-squaresum_f32.lo libref_la-squaresum_f64.lo \ libref_la-sum.lo libref_la-sum_f64.lo libref_la-swab.lo \ libref_la-trans8x8.lo libref_la-yuv.lo libref_la-wavelet.lo am_libref_la_OBJECTS = $(am__objects_1) libref_la_OBJECTS = $(am_libref_la_OBJECTS) libref_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libref_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ libref_opt1_la_LIBADD = am__objects_2 = libref_opt1_la-addc.lo libref_opt1_la-argb_paint.lo \ libref_opt1_la-ayuv2argb.lo libref_opt1_la-clamp.lo \ libref_opt1_la-composite.lo libref_opt1_la-convert.lo \ libref_opt1_la-copy.lo libref_opt1_la-copy8x8.lo \ libref_opt1_la-diff8x8.lo libref_opt1_la-diffsquaresum_f64.lo \ libref_opt1_la-diffsquaresum_f32.lo libref_opt1_la-error8x8.lo \ libref_opt1_la-mas.lo libref_opt1_la-math.lo \ libref_opt1_la-mix_u8.lo libref_opt1_la-mt19937ar.lo \ libref_opt1_la-mult8x8_s16.lo libref_opt1_la-multsum.lo \ libref_opt1_la-recon8x8.lo libref_opt1_la-resample.lo \ libref_opt1_la-rgb.lo libref_opt1_la-rowcolsad8x8.lo \ libref_opt1_la-sad8x8.lo libref_opt1_la-sad8x8_broken.lo \ libref_opt1_la-sad8x8avg.lo libref_opt1_la-sincos_f64.lo \ libref_opt1_la-splat.lo libref_opt1_la-squaresum_f32.lo \ libref_opt1_la-squaresum_f64.lo libref_opt1_la-sum.lo \ libref_opt1_la-sum_f64.lo libref_opt1_la-swab.lo \ libref_opt1_la-trans8x8.lo libref_opt1_la-yuv.lo \ libref_opt1_la-wavelet.lo am_libref_opt1_la_OBJECTS = $(am__objects_2) libref_opt1_la_OBJECTS = $(am_libref_opt1_la_OBJECTS) libref_opt1_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libref_opt1_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_ALT_OPT_TRUE@am_libref_opt1_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libref_la_SOURCES) $(libref_opt1_la_SOURCES) DIST_SOURCES = $(libref_la_SOURCES) $(libref_opt1_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @USE_ALT_OPT_FALSE@opt_libs = @USE_ALT_OPT_TRUE@opt_libs = libref_opt1.la noinst_LTLIBRARIES = libref.la $(opt_libs) c_sources = \ addc.c \ argb_paint.c \ ayuv2argb.c \ clamp.c \ composite.c \ convert.c \ copy.c \ copy8x8.c \ diff8x8.c \ diffsquaresum_f64.c \ diffsquaresum_f32.c \ error8x8.c \ mas.c \ math.c \ mix_u8.c \ mt19937ar.c \ mult8x8_s16.c \ multsum.c \ recon8x8.c \ resample.c \ rgb.c \ rowcolsad8x8.c \ sad8x8.c \ sad8x8_broken.c \ sad8x8avg.c \ sincos_f64.c \ splat.c \ squaresum_f32.c \ squaresum_f64.c \ sum.c \ sum_f64.c \ swab.c \ trans8x8.c \ yuv.c \ wavelet.c libref_la_SOURCES = \ $(c_sources) libref_la_LIBADD = \ $(opt_libs) libref_la_CFLAGS = $(LIBOIL_CFLAGS) libref_opt1_la_SOURCES = $(c_sources) libref_opt1_la_CFLAGS = $(LIBOIL_CFLAGS) \ $(LIBOIL_OPT_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/ref/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/ref/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libref.la: $(libref_la_OBJECTS) $(libref_la_DEPENDENCIES) $(libref_la_LINK) $(libref_la_OBJECTS) $(libref_la_LIBADD) $(LIBS) libref_opt1.la: $(libref_opt1_la_OBJECTS) $(libref_opt1_la_DEPENDENCIES) $(libref_opt1_la_LINK) $(am_libref_opt1_la_rpath) $(libref_opt1_la_OBJECTS) $(libref_opt1_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-addc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-argb_paint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-ayuv2argb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-clamp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-composite.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-convert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-copy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-copy8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-diff8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-diffsquaresum_f32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-diffsquaresum_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-error8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-mas.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-math.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-mix_u8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-mt19937ar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-mult8x8_s16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-multsum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-recon8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-resample.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-rgb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-rowcolsad8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-sad8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-sad8x8_broken.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-sad8x8avg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-sincos_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-splat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-squaresum_f32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-squaresum_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-sum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-sum_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-swab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-trans8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-wavelet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_la-yuv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-addc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-argb_paint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-ayuv2argb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-clamp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-composite.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-convert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-copy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-copy8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-diff8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-diffsquaresum_f32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-diffsquaresum_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-error8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-mas.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-math.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-mix_u8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-mt19937ar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-mult8x8_s16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-multsum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-recon8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-resample.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-rgb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-rowcolsad8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-sad8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-sad8x8_broken.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-sad8x8avg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-sincos_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-splat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-squaresum_f32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-squaresum_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-sum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-sum_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-swab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-trans8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-wavelet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libref_opt1_la-yuv.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libref_la-addc.lo: addc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-addc.lo -MD -MP -MF $(DEPDIR)/libref_la-addc.Tpo -c -o libref_la-addc.lo `test -f 'addc.c' || echo '$(srcdir)/'`addc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-addc.Tpo $(DEPDIR)/libref_la-addc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='addc.c' object='libref_la-addc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-addc.lo `test -f 'addc.c' || echo '$(srcdir)/'`addc.c libref_la-argb_paint.lo: argb_paint.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-argb_paint.lo -MD -MP -MF $(DEPDIR)/libref_la-argb_paint.Tpo -c -o libref_la-argb_paint.lo `test -f 'argb_paint.c' || echo '$(srcdir)/'`argb_paint.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-argb_paint.Tpo $(DEPDIR)/libref_la-argb_paint.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='argb_paint.c' object='libref_la-argb_paint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-argb_paint.lo `test -f 'argb_paint.c' || echo '$(srcdir)/'`argb_paint.c libref_la-ayuv2argb.lo: ayuv2argb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-ayuv2argb.lo -MD -MP -MF $(DEPDIR)/libref_la-ayuv2argb.Tpo -c -o libref_la-ayuv2argb.lo `test -f 'ayuv2argb.c' || echo '$(srcdir)/'`ayuv2argb.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-ayuv2argb.Tpo $(DEPDIR)/libref_la-ayuv2argb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ayuv2argb.c' object='libref_la-ayuv2argb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-ayuv2argb.lo `test -f 'ayuv2argb.c' || echo '$(srcdir)/'`ayuv2argb.c libref_la-clamp.lo: clamp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-clamp.lo -MD -MP -MF $(DEPDIR)/libref_la-clamp.Tpo -c -o libref_la-clamp.lo `test -f 'clamp.c' || echo '$(srcdir)/'`clamp.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-clamp.Tpo $(DEPDIR)/libref_la-clamp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clamp.c' object='libref_la-clamp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-clamp.lo `test -f 'clamp.c' || echo '$(srcdir)/'`clamp.c libref_la-composite.lo: composite.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-composite.lo -MD -MP -MF $(DEPDIR)/libref_la-composite.Tpo -c -o libref_la-composite.lo `test -f 'composite.c' || echo '$(srcdir)/'`composite.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-composite.Tpo $(DEPDIR)/libref_la-composite.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='composite.c' object='libref_la-composite.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-composite.lo `test -f 'composite.c' || echo '$(srcdir)/'`composite.c libref_la-convert.lo: convert.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-convert.lo -MD -MP -MF $(DEPDIR)/libref_la-convert.Tpo -c -o libref_la-convert.lo `test -f 'convert.c' || echo '$(srcdir)/'`convert.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-convert.Tpo $(DEPDIR)/libref_la-convert.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='convert.c' object='libref_la-convert.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-convert.lo `test -f 'convert.c' || echo '$(srcdir)/'`convert.c libref_la-copy.lo: copy.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-copy.lo -MD -MP -MF $(DEPDIR)/libref_la-copy.Tpo -c -o libref_la-copy.lo `test -f 'copy.c' || echo '$(srcdir)/'`copy.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-copy.Tpo $(DEPDIR)/libref_la-copy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy.c' object='libref_la-copy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-copy.lo `test -f 'copy.c' || echo '$(srcdir)/'`copy.c libref_la-copy8x8.lo: copy8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-copy8x8.lo -MD -MP -MF $(DEPDIR)/libref_la-copy8x8.Tpo -c -o libref_la-copy8x8.lo `test -f 'copy8x8.c' || echo '$(srcdir)/'`copy8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-copy8x8.Tpo $(DEPDIR)/libref_la-copy8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy8x8.c' object='libref_la-copy8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-copy8x8.lo `test -f 'copy8x8.c' || echo '$(srcdir)/'`copy8x8.c libref_la-diff8x8.lo: diff8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-diff8x8.lo -MD -MP -MF $(DEPDIR)/libref_la-diff8x8.Tpo -c -o libref_la-diff8x8.lo `test -f 'diff8x8.c' || echo '$(srcdir)/'`diff8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-diff8x8.Tpo $(DEPDIR)/libref_la-diff8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='diff8x8.c' object='libref_la-diff8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-diff8x8.lo `test -f 'diff8x8.c' || echo '$(srcdir)/'`diff8x8.c libref_la-diffsquaresum_f64.lo: diffsquaresum_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-diffsquaresum_f64.lo -MD -MP -MF $(DEPDIR)/libref_la-diffsquaresum_f64.Tpo -c -o libref_la-diffsquaresum_f64.lo `test -f 'diffsquaresum_f64.c' || echo '$(srcdir)/'`diffsquaresum_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-diffsquaresum_f64.Tpo $(DEPDIR)/libref_la-diffsquaresum_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='diffsquaresum_f64.c' object='libref_la-diffsquaresum_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-diffsquaresum_f64.lo `test -f 'diffsquaresum_f64.c' || echo '$(srcdir)/'`diffsquaresum_f64.c libref_la-diffsquaresum_f32.lo: diffsquaresum_f32.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-diffsquaresum_f32.lo -MD -MP -MF $(DEPDIR)/libref_la-diffsquaresum_f32.Tpo -c -o libref_la-diffsquaresum_f32.lo `test -f 'diffsquaresum_f32.c' || echo '$(srcdir)/'`diffsquaresum_f32.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-diffsquaresum_f32.Tpo $(DEPDIR)/libref_la-diffsquaresum_f32.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='diffsquaresum_f32.c' object='libref_la-diffsquaresum_f32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-diffsquaresum_f32.lo `test -f 'diffsquaresum_f32.c' || echo '$(srcdir)/'`diffsquaresum_f32.c libref_la-error8x8.lo: error8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-error8x8.lo -MD -MP -MF $(DEPDIR)/libref_la-error8x8.Tpo -c -o libref_la-error8x8.lo `test -f 'error8x8.c' || echo '$(srcdir)/'`error8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-error8x8.Tpo $(DEPDIR)/libref_la-error8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='error8x8.c' object='libref_la-error8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-error8x8.lo `test -f 'error8x8.c' || echo '$(srcdir)/'`error8x8.c libref_la-mas.lo: mas.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-mas.lo -MD -MP -MF $(DEPDIR)/libref_la-mas.Tpo -c -o libref_la-mas.lo `test -f 'mas.c' || echo '$(srcdir)/'`mas.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-mas.Tpo $(DEPDIR)/libref_la-mas.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mas.c' object='libref_la-mas.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-mas.lo `test -f 'mas.c' || echo '$(srcdir)/'`mas.c libref_la-math.lo: math.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-math.lo -MD -MP -MF $(DEPDIR)/libref_la-math.Tpo -c -o libref_la-math.lo `test -f 'math.c' || echo '$(srcdir)/'`math.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-math.Tpo $(DEPDIR)/libref_la-math.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='math.c' object='libref_la-math.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-math.lo `test -f 'math.c' || echo '$(srcdir)/'`math.c libref_la-mix_u8.lo: mix_u8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-mix_u8.lo -MD -MP -MF $(DEPDIR)/libref_la-mix_u8.Tpo -c -o libref_la-mix_u8.lo `test -f 'mix_u8.c' || echo '$(srcdir)/'`mix_u8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-mix_u8.Tpo $(DEPDIR)/libref_la-mix_u8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mix_u8.c' object='libref_la-mix_u8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-mix_u8.lo `test -f 'mix_u8.c' || echo '$(srcdir)/'`mix_u8.c libref_la-mt19937ar.lo: mt19937ar.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-mt19937ar.lo -MD -MP -MF $(DEPDIR)/libref_la-mt19937ar.Tpo -c -o libref_la-mt19937ar.lo `test -f 'mt19937ar.c' || echo '$(srcdir)/'`mt19937ar.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-mt19937ar.Tpo $(DEPDIR)/libref_la-mt19937ar.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mt19937ar.c' object='libref_la-mt19937ar.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-mt19937ar.lo `test -f 'mt19937ar.c' || echo '$(srcdir)/'`mt19937ar.c libref_la-mult8x8_s16.lo: mult8x8_s16.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-mult8x8_s16.lo -MD -MP -MF $(DEPDIR)/libref_la-mult8x8_s16.Tpo -c -o libref_la-mult8x8_s16.lo `test -f 'mult8x8_s16.c' || echo '$(srcdir)/'`mult8x8_s16.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-mult8x8_s16.Tpo $(DEPDIR)/libref_la-mult8x8_s16.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mult8x8_s16.c' object='libref_la-mult8x8_s16.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-mult8x8_s16.lo `test -f 'mult8x8_s16.c' || echo '$(srcdir)/'`mult8x8_s16.c libref_la-multsum.lo: multsum.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-multsum.lo -MD -MP -MF $(DEPDIR)/libref_la-multsum.Tpo -c -o libref_la-multsum.lo `test -f 'multsum.c' || echo '$(srcdir)/'`multsum.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-multsum.Tpo $(DEPDIR)/libref_la-multsum.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='multsum.c' object='libref_la-multsum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-multsum.lo `test -f 'multsum.c' || echo '$(srcdir)/'`multsum.c libref_la-recon8x8.lo: recon8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-recon8x8.lo -MD -MP -MF $(DEPDIR)/libref_la-recon8x8.Tpo -c -o libref_la-recon8x8.lo `test -f 'recon8x8.c' || echo '$(srcdir)/'`recon8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-recon8x8.Tpo $(DEPDIR)/libref_la-recon8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='recon8x8.c' object='libref_la-recon8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-recon8x8.lo `test -f 'recon8x8.c' || echo '$(srcdir)/'`recon8x8.c libref_la-resample.lo: resample.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-resample.lo -MD -MP -MF $(DEPDIR)/libref_la-resample.Tpo -c -o libref_la-resample.lo `test -f 'resample.c' || echo '$(srcdir)/'`resample.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-resample.Tpo $(DEPDIR)/libref_la-resample.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resample.c' object='libref_la-resample.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-resample.lo `test -f 'resample.c' || echo '$(srcdir)/'`resample.c libref_la-rgb.lo: rgb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-rgb.lo -MD -MP -MF $(DEPDIR)/libref_la-rgb.Tpo -c -o libref_la-rgb.lo `test -f 'rgb.c' || echo '$(srcdir)/'`rgb.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-rgb.Tpo $(DEPDIR)/libref_la-rgb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rgb.c' object='libref_la-rgb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-rgb.lo `test -f 'rgb.c' || echo '$(srcdir)/'`rgb.c libref_la-rowcolsad8x8.lo: rowcolsad8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-rowcolsad8x8.lo -MD -MP -MF $(DEPDIR)/libref_la-rowcolsad8x8.Tpo -c -o libref_la-rowcolsad8x8.lo `test -f 'rowcolsad8x8.c' || echo '$(srcdir)/'`rowcolsad8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-rowcolsad8x8.Tpo $(DEPDIR)/libref_la-rowcolsad8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rowcolsad8x8.c' object='libref_la-rowcolsad8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-rowcolsad8x8.lo `test -f 'rowcolsad8x8.c' || echo '$(srcdir)/'`rowcolsad8x8.c libref_la-sad8x8.lo: sad8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-sad8x8.lo -MD -MP -MF $(DEPDIR)/libref_la-sad8x8.Tpo -c -o libref_la-sad8x8.lo `test -f 'sad8x8.c' || echo '$(srcdir)/'`sad8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-sad8x8.Tpo $(DEPDIR)/libref_la-sad8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sad8x8.c' object='libref_la-sad8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-sad8x8.lo `test -f 'sad8x8.c' || echo '$(srcdir)/'`sad8x8.c libref_la-sad8x8_broken.lo: sad8x8_broken.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-sad8x8_broken.lo -MD -MP -MF $(DEPDIR)/libref_la-sad8x8_broken.Tpo -c -o libref_la-sad8x8_broken.lo `test -f 'sad8x8_broken.c' || echo '$(srcdir)/'`sad8x8_broken.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-sad8x8_broken.Tpo $(DEPDIR)/libref_la-sad8x8_broken.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sad8x8_broken.c' object='libref_la-sad8x8_broken.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-sad8x8_broken.lo `test -f 'sad8x8_broken.c' || echo '$(srcdir)/'`sad8x8_broken.c libref_la-sad8x8avg.lo: sad8x8avg.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-sad8x8avg.lo -MD -MP -MF $(DEPDIR)/libref_la-sad8x8avg.Tpo -c -o libref_la-sad8x8avg.lo `test -f 'sad8x8avg.c' || echo '$(srcdir)/'`sad8x8avg.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-sad8x8avg.Tpo $(DEPDIR)/libref_la-sad8x8avg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sad8x8avg.c' object='libref_la-sad8x8avg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-sad8x8avg.lo `test -f 'sad8x8avg.c' || echo '$(srcdir)/'`sad8x8avg.c libref_la-sincos_f64.lo: sincos_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-sincos_f64.lo -MD -MP -MF $(DEPDIR)/libref_la-sincos_f64.Tpo -c -o libref_la-sincos_f64.lo `test -f 'sincos_f64.c' || echo '$(srcdir)/'`sincos_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-sincos_f64.Tpo $(DEPDIR)/libref_la-sincos_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sincos_f64.c' object='libref_la-sincos_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-sincos_f64.lo `test -f 'sincos_f64.c' || echo '$(srcdir)/'`sincos_f64.c libref_la-splat.lo: splat.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-splat.lo -MD -MP -MF $(DEPDIR)/libref_la-splat.Tpo -c -o libref_la-splat.lo `test -f 'splat.c' || echo '$(srcdir)/'`splat.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-splat.Tpo $(DEPDIR)/libref_la-splat.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='splat.c' object='libref_la-splat.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-splat.lo `test -f 'splat.c' || echo '$(srcdir)/'`splat.c libref_la-squaresum_f32.lo: squaresum_f32.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-squaresum_f32.lo -MD -MP -MF $(DEPDIR)/libref_la-squaresum_f32.Tpo -c -o libref_la-squaresum_f32.lo `test -f 'squaresum_f32.c' || echo '$(srcdir)/'`squaresum_f32.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-squaresum_f32.Tpo $(DEPDIR)/libref_la-squaresum_f32.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='squaresum_f32.c' object='libref_la-squaresum_f32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-squaresum_f32.lo `test -f 'squaresum_f32.c' || echo '$(srcdir)/'`squaresum_f32.c libref_la-squaresum_f64.lo: squaresum_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-squaresum_f64.lo -MD -MP -MF $(DEPDIR)/libref_la-squaresum_f64.Tpo -c -o libref_la-squaresum_f64.lo `test -f 'squaresum_f64.c' || echo '$(srcdir)/'`squaresum_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-squaresum_f64.Tpo $(DEPDIR)/libref_la-squaresum_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='squaresum_f64.c' object='libref_la-squaresum_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-squaresum_f64.lo `test -f 'squaresum_f64.c' || echo '$(srcdir)/'`squaresum_f64.c libref_la-sum.lo: sum.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-sum.lo -MD -MP -MF $(DEPDIR)/libref_la-sum.Tpo -c -o libref_la-sum.lo `test -f 'sum.c' || echo '$(srcdir)/'`sum.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-sum.Tpo $(DEPDIR)/libref_la-sum.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sum.c' object='libref_la-sum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-sum.lo `test -f 'sum.c' || echo '$(srcdir)/'`sum.c libref_la-sum_f64.lo: sum_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-sum_f64.lo -MD -MP -MF $(DEPDIR)/libref_la-sum_f64.Tpo -c -o libref_la-sum_f64.lo `test -f 'sum_f64.c' || echo '$(srcdir)/'`sum_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-sum_f64.Tpo $(DEPDIR)/libref_la-sum_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sum_f64.c' object='libref_la-sum_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-sum_f64.lo `test -f 'sum_f64.c' || echo '$(srcdir)/'`sum_f64.c libref_la-swab.lo: swab.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-swab.lo -MD -MP -MF $(DEPDIR)/libref_la-swab.Tpo -c -o libref_la-swab.lo `test -f 'swab.c' || echo '$(srcdir)/'`swab.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-swab.Tpo $(DEPDIR)/libref_la-swab.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='swab.c' object='libref_la-swab.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-swab.lo `test -f 'swab.c' || echo '$(srcdir)/'`swab.c libref_la-trans8x8.lo: trans8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-trans8x8.lo -MD -MP -MF $(DEPDIR)/libref_la-trans8x8.Tpo -c -o libref_la-trans8x8.lo `test -f 'trans8x8.c' || echo '$(srcdir)/'`trans8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-trans8x8.Tpo $(DEPDIR)/libref_la-trans8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trans8x8.c' object='libref_la-trans8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-trans8x8.lo `test -f 'trans8x8.c' || echo '$(srcdir)/'`trans8x8.c libref_la-yuv.lo: yuv.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-yuv.lo -MD -MP -MF $(DEPDIR)/libref_la-yuv.Tpo -c -o libref_la-yuv.lo `test -f 'yuv.c' || echo '$(srcdir)/'`yuv.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-yuv.Tpo $(DEPDIR)/libref_la-yuv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='yuv.c' object='libref_la-yuv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-yuv.lo `test -f 'yuv.c' || echo '$(srcdir)/'`yuv.c libref_la-wavelet.lo: wavelet.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -MT libref_la-wavelet.lo -MD -MP -MF $(DEPDIR)/libref_la-wavelet.Tpo -c -o libref_la-wavelet.lo `test -f 'wavelet.c' || echo '$(srcdir)/'`wavelet.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_la-wavelet.Tpo $(DEPDIR)/libref_la-wavelet.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wavelet.c' object='libref_la-wavelet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_la_CFLAGS) $(CFLAGS) -c -o libref_la-wavelet.lo `test -f 'wavelet.c' || echo '$(srcdir)/'`wavelet.c libref_opt1_la-addc.lo: addc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-addc.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-addc.Tpo -c -o libref_opt1_la-addc.lo `test -f 'addc.c' || echo '$(srcdir)/'`addc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-addc.Tpo $(DEPDIR)/libref_opt1_la-addc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='addc.c' object='libref_opt1_la-addc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-addc.lo `test -f 'addc.c' || echo '$(srcdir)/'`addc.c libref_opt1_la-argb_paint.lo: argb_paint.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-argb_paint.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-argb_paint.Tpo -c -o libref_opt1_la-argb_paint.lo `test -f 'argb_paint.c' || echo '$(srcdir)/'`argb_paint.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-argb_paint.Tpo $(DEPDIR)/libref_opt1_la-argb_paint.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='argb_paint.c' object='libref_opt1_la-argb_paint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-argb_paint.lo `test -f 'argb_paint.c' || echo '$(srcdir)/'`argb_paint.c libref_opt1_la-ayuv2argb.lo: ayuv2argb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-ayuv2argb.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-ayuv2argb.Tpo -c -o libref_opt1_la-ayuv2argb.lo `test -f 'ayuv2argb.c' || echo '$(srcdir)/'`ayuv2argb.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-ayuv2argb.Tpo $(DEPDIR)/libref_opt1_la-ayuv2argb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ayuv2argb.c' object='libref_opt1_la-ayuv2argb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-ayuv2argb.lo `test -f 'ayuv2argb.c' || echo '$(srcdir)/'`ayuv2argb.c libref_opt1_la-clamp.lo: clamp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-clamp.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-clamp.Tpo -c -o libref_opt1_la-clamp.lo `test -f 'clamp.c' || echo '$(srcdir)/'`clamp.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-clamp.Tpo $(DEPDIR)/libref_opt1_la-clamp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clamp.c' object='libref_opt1_la-clamp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-clamp.lo `test -f 'clamp.c' || echo '$(srcdir)/'`clamp.c libref_opt1_la-composite.lo: composite.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-composite.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-composite.Tpo -c -o libref_opt1_la-composite.lo `test -f 'composite.c' || echo '$(srcdir)/'`composite.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-composite.Tpo $(DEPDIR)/libref_opt1_la-composite.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='composite.c' object='libref_opt1_la-composite.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-composite.lo `test -f 'composite.c' || echo '$(srcdir)/'`composite.c libref_opt1_la-convert.lo: convert.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-convert.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-convert.Tpo -c -o libref_opt1_la-convert.lo `test -f 'convert.c' || echo '$(srcdir)/'`convert.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-convert.Tpo $(DEPDIR)/libref_opt1_la-convert.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='convert.c' object='libref_opt1_la-convert.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-convert.lo `test -f 'convert.c' || echo '$(srcdir)/'`convert.c libref_opt1_la-copy.lo: copy.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-copy.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-copy.Tpo -c -o libref_opt1_la-copy.lo `test -f 'copy.c' || echo '$(srcdir)/'`copy.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-copy.Tpo $(DEPDIR)/libref_opt1_la-copy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy.c' object='libref_opt1_la-copy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-copy.lo `test -f 'copy.c' || echo '$(srcdir)/'`copy.c libref_opt1_la-copy8x8.lo: copy8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-copy8x8.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-copy8x8.Tpo -c -o libref_opt1_la-copy8x8.lo `test -f 'copy8x8.c' || echo '$(srcdir)/'`copy8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-copy8x8.Tpo $(DEPDIR)/libref_opt1_la-copy8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy8x8.c' object='libref_opt1_la-copy8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-copy8x8.lo `test -f 'copy8x8.c' || echo '$(srcdir)/'`copy8x8.c libref_opt1_la-diff8x8.lo: diff8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-diff8x8.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-diff8x8.Tpo -c -o libref_opt1_la-diff8x8.lo `test -f 'diff8x8.c' || echo '$(srcdir)/'`diff8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-diff8x8.Tpo $(DEPDIR)/libref_opt1_la-diff8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='diff8x8.c' object='libref_opt1_la-diff8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-diff8x8.lo `test -f 'diff8x8.c' || echo '$(srcdir)/'`diff8x8.c libref_opt1_la-diffsquaresum_f64.lo: diffsquaresum_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-diffsquaresum_f64.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-diffsquaresum_f64.Tpo -c -o libref_opt1_la-diffsquaresum_f64.lo `test -f 'diffsquaresum_f64.c' || echo '$(srcdir)/'`diffsquaresum_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-diffsquaresum_f64.Tpo $(DEPDIR)/libref_opt1_la-diffsquaresum_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='diffsquaresum_f64.c' object='libref_opt1_la-diffsquaresum_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-diffsquaresum_f64.lo `test -f 'diffsquaresum_f64.c' || echo '$(srcdir)/'`diffsquaresum_f64.c libref_opt1_la-diffsquaresum_f32.lo: diffsquaresum_f32.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-diffsquaresum_f32.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-diffsquaresum_f32.Tpo -c -o libref_opt1_la-diffsquaresum_f32.lo `test -f 'diffsquaresum_f32.c' || echo '$(srcdir)/'`diffsquaresum_f32.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-diffsquaresum_f32.Tpo $(DEPDIR)/libref_opt1_la-diffsquaresum_f32.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='diffsquaresum_f32.c' object='libref_opt1_la-diffsquaresum_f32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-diffsquaresum_f32.lo `test -f 'diffsquaresum_f32.c' || echo '$(srcdir)/'`diffsquaresum_f32.c libref_opt1_la-error8x8.lo: error8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-error8x8.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-error8x8.Tpo -c -o libref_opt1_la-error8x8.lo `test -f 'error8x8.c' || echo '$(srcdir)/'`error8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-error8x8.Tpo $(DEPDIR)/libref_opt1_la-error8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='error8x8.c' object='libref_opt1_la-error8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-error8x8.lo `test -f 'error8x8.c' || echo '$(srcdir)/'`error8x8.c libref_opt1_la-mas.lo: mas.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-mas.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-mas.Tpo -c -o libref_opt1_la-mas.lo `test -f 'mas.c' || echo '$(srcdir)/'`mas.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-mas.Tpo $(DEPDIR)/libref_opt1_la-mas.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mas.c' object='libref_opt1_la-mas.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-mas.lo `test -f 'mas.c' || echo '$(srcdir)/'`mas.c libref_opt1_la-math.lo: math.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-math.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-math.Tpo -c -o libref_opt1_la-math.lo `test -f 'math.c' || echo '$(srcdir)/'`math.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-math.Tpo $(DEPDIR)/libref_opt1_la-math.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='math.c' object='libref_opt1_la-math.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-math.lo `test -f 'math.c' || echo '$(srcdir)/'`math.c libref_opt1_la-mix_u8.lo: mix_u8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-mix_u8.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-mix_u8.Tpo -c -o libref_opt1_la-mix_u8.lo `test -f 'mix_u8.c' || echo '$(srcdir)/'`mix_u8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-mix_u8.Tpo $(DEPDIR)/libref_opt1_la-mix_u8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mix_u8.c' object='libref_opt1_la-mix_u8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-mix_u8.lo `test -f 'mix_u8.c' || echo '$(srcdir)/'`mix_u8.c libref_opt1_la-mt19937ar.lo: mt19937ar.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-mt19937ar.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-mt19937ar.Tpo -c -o libref_opt1_la-mt19937ar.lo `test -f 'mt19937ar.c' || echo '$(srcdir)/'`mt19937ar.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-mt19937ar.Tpo $(DEPDIR)/libref_opt1_la-mt19937ar.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mt19937ar.c' object='libref_opt1_la-mt19937ar.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-mt19937ar.lo `test -f 'mt19937ar.c' || echo '$(srcdir)/'`mt19937ar.c libref_opt1_la-mult8x8_s16.lo: mult8x8_s16.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-mult8x8_s16.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-mult8x8_s16.Tpo -c -o libref_opt1_la-mult8x8_s16.lo `test -f 'mult8x8_s16.c' || echo '$(srcdir)/'`mult8x8_s16.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-mult8x8_s16.Tpo $(DEPDIR)/libref_opt1_la-mult8x8_s16.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mult8x8_s16.c' object='libref_opt1_la-mult8x8_s16.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-mult8x8_s16.lo `test -f 'mult8x8_s16.c' || echo '$(srcdir)/'`mult8x8_s16.c libref_opt1_la-multsum.lo: multsum.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-multsum.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-multsum.Tpo -c -o libref_opt1_la-multsum.lo `test -f 'multsum.c' || echo '$(srcdir)/'`multsum.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-multsum.Tpo $(DEPDIR)/libref_opt1_la-multsum.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='multsum.c' object='libref_opt1_la-multsum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-multsum.lo `test -f 'multsum.c' || echo '$(srcdir)/'`multsum.c libref_opt1_la-recon8x8.lo: recon8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-recon8x8.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-recon8x8.Tpo -c -o libref_opt1_la-recon8x8.lo `test -f 'recon8x8.c' || echo '$(srcdir)/'`recon8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-recon8x8.Tpo $(DEPDIR)/libref_opt1_la-recon8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='recon8x8.c' object='libref_opt1_la-recon8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-recon8x8.lo `test -f 'recon8x8.c' || echo '$(srcdir)/'`recon8x8.c libref_opt1_la-resample.lo: resample.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-resample.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-resample.Tpo -c -o libref_opt1_la-resample.lo `test -f 'resample.c' || echo '$(srcdir)/'`resample.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-resample.Tpo $(DEPDIR)/libref_opt1_la-resample.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resample.c' object='libref_opt1_la-resample.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-resample.lo `test -f 'resample.c' || echo '$(srcdir)/'`resample.c libref_opt1_la-rgb.lo: rgb.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-rgb.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-rgb.Tpo -c -o libref_opt1_la-rgb.lo `test -f 'rgb.c' || echo '$(srcdir)/'`rgb.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-rgb.Tpo $(DEPDIR)/libref_opt1_la-rgb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rgb.c' object='libref_opt1_la-rgb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-rgb.lo `test -f 'rgb.c' || echo '$(srcdir)/'`rgb.c libref_opt1_la-rowcolsad8x8.lo: rowcolsad8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-rowcolsad8x8.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-rowcolsad8x8.Tpo -c -o libref_opt1_la-rowcolsad8x8.lo `test -f 'rowcolsad8x8.c' || echo '$(srcdir)/'`rowcolsad8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-rowcolsad8x8.Tpo $(DEPDIR)/libref_opt1_la-rowcolsad8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rowcolsad8x8.c' object='libref_opt1_la-rowcolsad8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-rowcolsad8x8.lo `test -f 'rowcolsad8x8.c' || echo '$(srcdir)/'`rowcolsad8x8.c libref_opt1_la-sad8x8.lo: sad8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-sad8x8.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-sad8x8.Tpo -c -o libref_opt1_la-sad8x8.lo `test -f 'sad8x8.c' || echo '$(srcdir)/'`sad8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-sad8x8.Tpo $(DEPDIR)/libref_opt1_la-sad8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sad8x8.c' object='libref_opt1_la-sad8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-sad8x8.lo `test -f 'sad8x8.c' || echo '$(srcdir)/'`sad8x8.c libref_opt1_la-sad8x8_broken.lo: sad8x8_broken.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-sad8x8_broken.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-sad8x8_broken.Tpo -c -o libref_opt1_la-sad8x8_broken.lo `test -f 'sad8x8_broken.c' || echo '$(srcdir)/'`sad8x8_broken.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-sad8x8_broken.Tpo $(DEPDIR)/libref_opt1_la-sad8x8_broken.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sad8x8_broken.c' object='libref_opt1_la-sad8x8_broken.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-sad8x8_broken.lo `test -f 'sad8x8_broken.c' || echo '$(srcdir)/'`sad8x8_broken.c libref_opt1_la-sad8x8avg.lo: sad8x8avg.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-sad8x8avg.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-sad8x8avg.Tpo -c -o libref_opt1_la-sad8x8avg.lo `test -f 'sad8x8avg.c' || echo '$(srcdir)/'`sad8x8avg.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-sad8x8avg.Tpo $(DEPDIR)/libref_opt1_la-sad8x8avg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sad8x8avg.c' object='libref_opt1_la-sad8x8avg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-sad8x8avg.lo `test -f 'sad8x8avg.c' || echo '$(srcdir)/'`sad8x8avg.c libref_opt1_la-sincos_f64.lo: sincos_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-sincos_f64.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-sincos_f64.Tpo -c -o libref_opt1_la-sincos_f64.lo `test -f 'sincos_f64.c' || echo '$(srcdir)/'`sincos_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-sincos_f64.Tpo $(DEPDIR)/libref_opt1_la-sincos_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sincos_f64.c' object='libref_opt1_la-sincos_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-sincos_f64.lo `test -f 'sincos_f64.c' || echo '$(srcdir)/'`sincos_f64.c libref_opt1_la-splat.lo: splat.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-splat.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-splat.Tpo -c -o libref_opt1_la-splat.lo `test -f 'splat.c' || echo '$(srcdir)/'`splat.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-splat.Tpo $(DEPDIR)/libref_opt1_la-splat.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='splat.c' object='libref_opt1_la-splat.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-splat.lo `test -f 'splat.c' || echo '$(srcdir)/'`splat.c libref_opt1_la-squaresum_f32.lo: squaresum_f32.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-squaresum_f32.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-squaresum_f32.Tpo -c -o libref_opt1_la-squaresum_f32.lo `test -f 'squaresum_f32.c' || echo '$(srcdir)/'`squaresum_f32.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-squaresum_f32.Tpo $(DEPDIR)/libref_opt1_la-squaresum_f32.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='squaresum_f32.c' object='libref_opt1_la-squaresum_f32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-squaresum_f32.lo `test -f 'squaresum_f32.c' || echo '$(srcdir)/'`squaresum_f32.c libref_opt1_la-squaresum_f64.lo: squaresum_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-squaresum_f64.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-squaresum_f64.Tpo -c -o libref_opt1_la-squaresum_f64.lo `test -f 'squaresum_f64.c' || echo '$(srcdir)/'`squaresum_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-squaresum_f64.Tpo $(DEPDIR)/libref_opt1_la-squaresum_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='squaresum_f64.c' object='libref_opt1_la-squaresum_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-squaresum_f64.lo `test -f 'squaresum_f64.c' || echo '$(srcdir)/'`squaresum_f64.c libref_opt1_la-sum.lo: sum.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-sum.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-sum.Tpo -c -o libref_opt1_la-sum.lo `test -f 'sum.c' || echo '$(srcdir)/'`sum.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-sum.Tpo $(DEPDIR)/libref_opt1_la-sum.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sum.c' object='libref_opt1_la-sum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-sum.lo `test -f 'sum.c' || echo '$(srcdir)/'`sum.c libref_opt1_la-sum_f64.lo: sum_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-sum_f64.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-sum_f64.Tpo -c -o libref_opt1_la-sum_f64.lo `test -f 'sum_f64.c' || echo '$(srcdir)/'`sum_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-sum_f64.Tpo $(DEPDIR)/libref_opt1_la-sum_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sum_f64.c' object='libref_opt1_la-sum_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-sum_f64.lo `test -f 'sum_f64.c' || echo '$(srcdir)/'`sum_f64.c libref_opt1_la-swab.lo: swab.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-swab.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-swab.Tpo -c -o libref_opt1_la-swab.lo `test -f 'swab.c' || echo '$(srcdir)/'`swab.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-swab.Tpo $(DEPDIR)/libref_opt1_la-swab.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='swab.c' object='libref_opt1_la-swab.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-swab.lo `test -f 'swab.c' || echo '$(srcdir)/'`swab.c libref_opt1_la-trans8x8.lo: trans8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-trans8x8.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-trans8x8.Tpo -c -o libref_opt1_la-trans8x8.lo `test -f 'trans8x8.c' || echo '$(srcdir)/'`trans8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-trans8x8.Tpo $(DEPDIR)/libref_opt1_la-trans8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trans8x8.c' object='libref_opt1_la-trans8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-trans8x8.lo `test -f 'trans8x8.c' || echo '$(srcdir)/'`trans8x8.c libref_opt1_la-yuv.lo: yuv.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-yuv.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-yuv.Tpo -c -o libref_opt1_la-yuv.lo `test -f 'yuv.c' || echo '$(srcdir)/'`yuv.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-yuv.Tpo $(DEPDIR)/libref_opt1_la-yuv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='yuv.c' object='libref_opt1_la-yuv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-yuv.lo `test -f 'yuv.c' || echo '$(srcdir)/'`yuv.c libref_opt1_la-wavelet.lo: wavelet.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -MT libref_opt1_la-wavelet.lo -MD -MP -MF $(DEPDIR)/libref_opt1_la-wavelet.Tpo -c -o libref_opt1_la-wavelet.lo `test -f 'wavelet.c' || echo '$(srcdir)/'`wavelet.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libref_opt1_la-wavelet.Tpo $(DEPDIR)/libref_opt1_la-wavelet.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wavelet.c' object='libref_opt1_la-wavelet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libref_opt1_la_CFLAGS) $(CFLAGS) -c -o libref_opt1_la-wavelet.lo `test -f 'wavelet.c' || echo '$(srcdir)/'`wavelet.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/ref/recon8x8.c0000644000175000017500000001120010717203073013637 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_recon8x8_intra: * @d_8x8: * @ds: * @s_8x8: * * Adds 128 to each value in the source array, clamps to the range [0,255], * and places the result in the destination array. */ OIL_DEFINE_CLASS (recon8x8_intra, "uint8_t *d_8x8, int ds, int16_t *s_8x8"); /** * oil_recon8x8_inter: * @d_8x8: * @ds: * @s1_8x8: * @ss1: * @s2_8x8: * * Adds each element in @s1_8x8 and @s2_8x8, clamps to the range [0,255], * and places the result in the destination array. */ OIL_DEFINE_CLASS (recon8x8_inter, "uint8_t *d_8x8, int ds, uint8_t *s1_8x8, int ss1, int16_t *s2_8x8"); /** * oil_recon8x8_inter2: * @d_8x8: * @ds: * @s1_8x8: * @ss1: * @s2_8x8: * @ss2: * @s3_8x8: * * Adds each element in @s1_8x8 and @s2_8x8, divides by 2, and adds * to @s3_8x8, clamps to the range [0,255], and places the result in * the destination array. */ OIL_DEFINE_CLASS (recon8x8_inter2, "uint8_t *d_8x8, int ds, uint8_t *s1_8x8, int ss1, uint8_t *s2_8x8, int ss2, int16_t *s3_8x8"); static void recon8x8_intra_ref (uint8_t *dest, int ds, int16_t *change) { uint32_t i; for (i = 8; i; i--){ dest[0] = oil_clamp_255(change[0] + 128); dest[1] = oil_clamp_255(change[1] + 128); dest[2] = oil_clamp_255(change[2] + 128); dest[3] = oil_clamp_255(change[3] + 128); dest[4] = oil_clamp_255(change[4] + 128); dest[5] = oil_clamp_255(change[5] + 128); dest[6] = oil_clamp_255(change[6] + 128); dest[7] = oil_clamp_255(change[7] + 128); dest += ds; change += 8; } } OIL_DEFINE_IMPL_REF (recon8x8_intra_ref, recon8x8_intra); static void recon8x8_inter_ref (uint8_t *dest, int ds, uint8_t *src, int ss, int16_t *change, int dss) { uint32_t i; for (i = 8; i; i--){ dest[0] = oil_clamp_255(src[0] + change[0]); dest[1] = oil_clamp_255(src[1] + change[1]); dest[2] = oil_clamp_255(src[2] + change[2]); dest[3] = oil_clamp_255(src[3] + change[3]); dest[4] = oil_clamp_255(src[4] + change[4]); dest[5] = oil_clamp_255(src[5] + change[5]); dest[6] = oil_clamp_255(src[6] + change[6]); dest[7] = oil_clamp_255(src[7] + change[7]); change += 8; dest += ds; src += ss; } } OIL_DEFINE_IMPL_REF (recon8x8_inter_ref, recon8x8_inter); static void recon8x8_inter2_ref (uint8_t *dest, int ds, uint8_t *s1, int ss1, uint8_t *s2, int ss2, int16_t *change) { uint32_t i; for (i = 8; i; i--){ dest[0] = oil_clamp_255((((int16_t)s1[0] + (int16_t)s2[0]) >> 1) + change[0]); dest[1] = oil_clamp_255((((int16_t)s1[1] + (int16_t)s2[1]) >> 1) + change[1]); dest[2] = oil_clamp_255((((int16_t)s1[2] + (int16_t)s2[2]) >> 1) + change[2]); dest[3] = oil_clamp_255((((int16_t)s1[3] + (int16_t)s2[3]) >> 1) + change[3]); dest[4] = oil_clamp_255((((int16_t)s1[4] + (int16_t)s2[4]) >> 1) + change[4]); dest[5] = oil_clamp_255((((int16_t)s1[5] + (int16_t)s2[5]) >> 1) + change[5]); dest[6] = oil_clamp_255((((int16_t)s1[6] + (int16_t)s2[6]) >> 1) + change[6]); dest[7] = oil_clamp_255((((int16_t)s1[7] + (int16_t)s2[7]) >> 1) + change[7]); change += 8; dest += ds; s1 += ss1; s2 += ss2; } } OIL_DEFINE_IMPL_REF (recon8x8_inter2_ref, recon8x8_inter2); liboil-0.3.17/liboil/ref/ayuv2argb.c0000644000175000017500000001170510717203073014075 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include /** * oil_ayuv2argb_u8: * @d_4xn: * @s_4xn: * @n: * * Converts AYUV pixels to ARGB pixels. AYUV pixels are in the * JPEG colorspace. Note that this function doesn't follow normal * liboil pixel conventions. * * (This function should be replaced by one that handles other * conversion factors.) */ OIL_DEFINE_CLASS (ayuv2argb_u8, "uint8_t *d_4xn, uint8_t *s_4xn, int n"); #define clamp(x,a,b) clamp_lower(clamp_upper(x,b),a) #define clamp_lower(x,a) ((xb)?(b):(x)) /* from the JFIF spec */ #define YUV_TO_R(y,u,v) clamp((y) + 1.402*((v)-128.0),0,255) #define YUV_TO_G(y,u,v) clamp((y) - 0.34414*((u)-128.0) - 0.71414*((v)-128.0),0,255) #define YUV_TO_B(y,u,v) clamp((y) + 1.772*((u)-128.0),0,255) #define muldiv256(x,y) (((x)*(y) + 128)>>8) #define YUV_TO_R_INT8(y,u,v) clamp((y) + muldiv256(359,(v)-128),0,255) #define YUV_TO_G_INT8(y,u,v) clamp((y) + muldiv256(-88,(u)-128) + muldiv256(-183,(v)-128),0,255) #define YUV_TO_B_INT8(y,u,v) clamp((y) + muldiv256(454,(u)-128),0,255) #define muldiv65536(x,y) (((x)*(y) + 32768)>>16) #define YUV_TO_R_INT16(y,u,v) clamp((y) + muldiv65536(91881,(v)-128),0,255) #define YUV_TO_G_INT16(y,u,v) clamp((y) - muldiv65536(22554,(u)-128) - muldiv65536(46802,(v)-128),0,255) #define YUV_TO_B_INT16(y,u,v) clamp((y) + muldiv65536(116130,(u)-128),0,255) #define SHIFT 6 #define MULT (1<<6) #define X(x) ((int)((x)*(1<<(SHIFT+8)) + 0.5)) static int16_t jfif_matrix[][4] = { { 0, 0, -8192, -8192 }, { 16384, 0, 0, 0 }, { 0, 16384, 16384, 16384 }, { 0, 0, -5638, 29032 }, { 0, 22970, -11700, 0 }, { 0, 0, 0, 0 } }; static void colorspace_argb_test (OilTest *test) { int16_t *data = oil_test_get_source_data (test, OIL_ARG_SRC2); memcpy (data, jfif_matrix, 4*2*6); } OIL_DEFINE_CLASS_FULL (colorspace_argb, "uint32_t *d, uint32_t *s, int16_t *s2_24, int n", colorspace_argb_test); static void colorspace_argb_ref (uint32_t *dest, const uint32_t *src, const int16_t *matrix, int n) { int i; for(i=0;i>16) da = (MUL(sa,matrix[1*4+0]) + MUL(sr,matrix[2*4+0]) + MUL(sg,matrix[3*4+0]) + MUL(sb,matrix[4*4+0]) + matrix[5*4+0] + 8)>>(2*SHIFT - 8); dr = (MUL(sa,matrix[1*4+1]) + MUL(sr,matrix[2*4+1]) + MUL(sg,matrix[3*4+1]) + MUL(sb,matrix[4*4+1]) + matrix[5*4+1] + 8)>>(2*SHIFT - 8); dg = (MUL(sa,matrix[1*4+2]) + MUL(sr,matrix[2*4+2]) + MUL(sg,matrix[3*4+2]) + MUL(sb,matrix[4*4+2]) + matrix[5*4+2] + 8)>>(2*SHIFT - 8); db = (MUL(sa,matrix[1*4+3]) + MUL(sr,matrix[2*4+3]) + MUL(sg,matrix[3*4+3]) + MUL(sb,matrix[4*4+3]) + matrix[5*4+3] + 8)>>(2*SHIFT - 8); dest[i] = oil_argb(da, dr, dg, db); } } OIL_DEFINE_IMPL_REF (colorspace_argb_ref, colorspace_argb); static void ayuv2argb_u8_ref (uint8_t *argb, const uint8_t *ayuv, int n) { int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include /** * SECTION:liboilfuncs-copy: * @title: Copying * @short_description: Functions for copying data * */ /** * oil_copy_u8: * @dest: destination array * @src: source array * @n: number of elements * * Copies from source to destination. */ OIL_DEFINE_CLASS (copy_u8, "uint8_t *dest, uint8_t *src, int n"); static void copy_u8_ref (uint8_t *dest, uint8_t *src, int n) { int i; for(i=0;i #include #include void deinterleave2_asm (int16_t *d1, int16_t *d2, int16_t *s_2xn, int n) { if (n == 0) return; while (n&1) { d1[0] = s_2xn[0]; d2[0] = s_2xn[1]; d1++; d2++; s_2xn+=2; n--; } asm volatile ("\n" " sub $2, %%rcx\n" "1:\n" " movw (%1,%%rcx,4), %%ax\n" " movw %%ax, (%0,%%rcx,2)\n" " movw 2(%1,%%rcx,4), %%ax\n" " movw %%ax, (%2,%%rcx,2)\n" " movw 4(%1,%%rcx,4), %%ax\n" " movw %%ax, 2(%0,%%rcx,2)\n" " movw 6(%1,%%rcx,4), %%ax\n" " movw %%ax, 2(%2,%%rcx,2)\n" " sub $2, %%rcx\n" " jge 1b\n" : "+r" (d1), "+r" (s_2xn), "+r" (d2), "+c" (n) : : "rax"); } OIL_DEFINE_IMPL (deinterleave2_asm, deinterleave2_s16); void deinterleave2_mmx (int16_t *d1, int16_t *d2, int16_t *s_2xn, int n) { while (n&3) { d1[0] = s_2xn[0]; d2[0] = s_2xn[1]; d1++; d2++; s_2xn+=2; n--; } if (n==0) return; asm volatile ("\n" " xor %%rcx, %%rcx\n" "1:\n" " movq (%1,%%rcx,4), %%mm0\n" " movq 8(%1,%%rcx,4), %%mm1\n" " pslld $16, %%mm0\n" " pslld $16, %%mm1\n" " psrad $16, %%mm0\n" " psrad $16, %%mm1\n" " packssdw %%mm1, %%mm0\n" " movq %%mm0, (%0,%%rcx,2)\n" " movq (%1,%%rcx,4), %%mm0\n" " movq 8(%1,%%rcx,4), %%mm1\n" " psrad $16, %%mm0\n" " psrad $16, %%mm1\n" " packssdw %%mm1, %%mm0\n" " movq %%mm0, (%2,%%rcx,2)\n" " add $4, %%rcx\n" " cmp %3, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d1), "+r" (s_2xn), "+r" (d2) : "m" (n) : "rcx"); } OIL_DEFINE_IMPL_FULL (deinterleave2_mmx, deinterleave2_s16, OIL_IMPL_FLAG_MMX); void deinterleave2_mmx_2 (int16_t *d1, int16_t *d2, int16_t *s_2xn, int n) { while (n&3) { d1[0] = s_2xn[0]; d2[0] = s_2xn[1]; d1++; d2++; s_2xn+=2; n--; } if (n==0) return; asm volatile ("\n" " xor %%rcx, %%rcx\n" "1:\n" " pshufw $0xd8, (%1,%%rcx,4), %%mm0\n" " movd %%mm0, (%0,%%rcx,2)\n" " pshufw $0x8d, (%1,%%rcx,4), %%mm0\n" " movd %%mm0, (%2,%%rcx,2)\n" " add $2, %%rcx\n" " cmp %3, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d1), "+r" (s_2xn), "+r" (d2) : "r" (n) : "rcx"); } OIL_DEFINE_IMPL_FULL (deinterleave2_mmx_2, deinterleave2_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void deinterleave2_mmx_3 (int16_t *d1, int16_t *d2, int16_t *s_2xn, int n) { while (n&3) { d1[0] = s_2xn[0]; d2[0] = s_2xn[1]; d1++; d2++; s_2xn+=2; n--; } if (n==0) return; asm volatile ("\n" " xor %%rcx, %%rcx\n" "1:\n" " movq (%1,%%rcx,4), %%mm1\n" " movq (%1,%%rcx,4), %%mm2\n" " movq 8(%1,%%rcx,4), %%mm0\n" " punpcklwd %%mm0, %%mm1\n" " punpckhwd %%mm0, %%mm2\n" " movq %%mm1, %%mm0\n" " punpcklwd %%mm2, %%mm0\n" " punpckhwd %%mm2, %%mm1\n" " movq %%mm0, (%0,%%rcx,2)\n" " movq %%mm1, (%2,%%rcx,2)\n" " add $4, %%rcx\n" " cmp %3, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d1), "+r" (s_2xn), "+r" (d2) : "r" (n) : "rcx"); } OIL_DEFINE_IMPL_FULL (deinterleave2_mmx_3, deinterleave2_s16, OIL_IMPL_FLAG_MMX); void deinterleave2_mmx_4 (int16_t *d1, int16_t *d2, int16_t *s_2xn, int n) { while (n&7) { d1[0] = s_2xn[0]; d2[0] = s_2xn[1]; d1++; d2++; s_2xn+=2; n--; } if (n==0) return; asm volatile ("\n" " xor %%rcx, %%rcx\n" "1:\n" " movq (%1,%%rcx,4), %%mm1\n" " movq %%mm1, %%mm2\n" " movq 8(%1,%%rcx,4), %%mm0\n" " movq 16(%1,%%rcx,4), %%mm5\n" " punpcklwd %%mm0, %%mm1\n" " movq %%mm5, %%mm6\n" " punpckhwd %%mm0, %%mm2\n" " movq 24(%1,%%rcx,4), %%mm4\n" " movq %%mm1, %%mm0\n" " punpcklwd %%mm4, %%mm5\n" " punpcklwd %%mm2, %%mm0\n" " punpckhwd %%mm4, %%mm6\n" " punpckhwd %%mm2, %%mm1\n" " movq %%mm5, %%mm4\n" " movq %%mm0, (%0,%%rcx,2)\n" " punpcklwd %%mm6, %%mm4\n" " movq %%mm1, (%2,%%rcx,2)\n" " punpckhwd %%mm6, %%mm5\n" " movq %%mm4, 8(%0,%%rcx,2)\n" " movq %%mm5, 8(%2,%%rcx,2)\n" " add $8, %%rcx\n" " cmp %3, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d1), "+r" (s_2xn), "+r" (d2) : "r" (n) : "rcx"); } OIL_DEFINE_IMPL_FULL (deinterleave2_mmx_4, deinterleave2_s16, OIL_IMPL_FLAG_MMX); void lift_add_mult_shift12_i386_mmx (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4, int n) { uint32_t val = *s4; while (n&3) { d[0] = s1[0] + ((s4[0]*(s2[0] + s3[0]))>>12); d++; s1++; s2++; s3++; n--; } if (n==0) return; val = ((*(uint16_t *)s4)<<16) | (*(uint16_t *)s4); n>>=2; asm volatile ("\n" " mov %5, %%ecx\n" " movd %%ecx, %%mm7\n" " punpcklwd %%mm7, %%mm7\n" "1:\n" " movq 0(%2), %%mm0\n" " paddsw 0(%3), %%mm0\n" " movq %%mm0, %%mm1\n" " pmullw %%mm7, %%mm0\n" " pmulhw %%mm7, %%mm1\n" " psrlw $12, %%mm0\n" " psllw $4, %%mm1\n" " por %%mm1, %%mm0\n" " paddsw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " add $8, %3\n" " decl %4\n" " jne 1b\n" " emms\n" : "+r" (d), "+r" (s1), "+r" (s2), "+r" (s3), "+r" (n) : "r" (val) : "ecx"); } OIL_DEFINE_IMPL (lift_add_mult_shift12_i386_mmx, lift_add_mult_shift12); void interleave2_mmx (int16_t *d_2xn, int16_t *s1, int16_t *s2, int n) { while (n&3) { d_2xn[0] = s1[0]; d_2xn[1] = s2[0]; s1++; s2++; d_2xn+=2; n--; } if (n==0) return; asm volatile ("\n" " xor %%rcx, %%rcx\n" "1:\n" " movq (%1,%%rcx,2), %%mm0\n" " movq (%2,%%rcx,2), %%mm1\n" " movq %%mm0, %%mm2\n" " punpckhwd %%mm1, %%mm0\n" " punpcklwd %%mm1, %%mm2\n" " movq %%mm2, (%0,%%rcx,4)\n" " movq %%mm0, 8(%0,%%rcx,4)\n" " add $4, %%rcx\n" " cmp %3, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d_2xn), "+r" (s1), "+r" (s2) : "r" (n) : "rcx"); } OIL_DEFINE_IMPL_FULL (interleave2_mmx, interleave2_s16, OIL_IMPL_FLAG_MMX); void lift_add_shift1_mmx (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n) { while (n&3) { d[0] = s1[0] + ((s2[0] + s3[0])>>1); d++; s1++; s2++; s3++; n--; } if (n==0) return; asm volatile ("\n" " xor %%rcx, %%rcx\n" "1:\n" " movq (%2,%%rcx,2), %%mm1\n" " movq (%3,%%rcx,2), %%mm2\n" " paddw %%mm2, %%mm1\n" " psraw $1, %%mm1\n" " paddw (%1,%%rcx,2), %%mm1\n" " movq %%mm1, (%0,%%rcx,2)\n" " add $4, %%rcx\n" " cmp %4, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d), "+r" (s1), "+r" (s2), "+r" (s3) : "r" (n) : "rcx"); } OIL_DEFINE_IMPL_FULL (lift_add_shift1_mmx, lift_add_shift1, OIL_IMPL_FLAG_MMX); void lift_sub_shift1_mmx (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n) { while (n&3) { d[0] = s1[0] - ((s2[0] + s3[0])>>1); d++; s1++; s2++; s3++; n--; } if (n==0) return; asm volatile ("\n" " xor %%rcx, %%rcx\n" "1:\n" " movq (%2,%%rcx,2), %%mm1\n" " movq (%3,%%rcx,2), %%mm2\n" " movq (%1,%%rcx,2), %%mm0\n" " paddw %%mm2, %%mm1\n" " psraw $1, %%mm1\n" " psubw %%mm1, %%mm0\n" " movq %%mm0, (%0,%%rcx,2)\n" " add $4, %%rcx\n" " cmp %4, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d), "+r" (s1), "+r" (s2), "+r" (s3) : "r" (n) : "ecx"); } OIL_DEFINE_IMPL_FULL (lift_sub_shift1_mmx, lift_sub_shift1, OIL_IMPL_FLAG_MMX); void lift_add_shift2_mmx (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n) { while (n&3) { d[0] = s1[0] + ((s2[0] + s3[0])>>2); d++; s1++; s2++; s3++; n--; } if (n==0) return; asm volatile ("\n" " xor %%rcx, %%rcx\n" "1:\n" " movq (%2,%%rcx,2), %%mm1\n" " movq (%3,%%rcx,2), %%mm2\n" " paddw %%mm2, %%mm1\n" " psraw $2, %%mm1\n" " paddw (%1,%%rcx,2), %%mm1\n" " movq %%mm1, (%0,%%rcx,2)\n" " add $4, %%rcx\n" " cmp %4, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d), "+r" (s1), "+r" (s2), "+r" (s3) : "r" (n) : "rcx"); } OIL_DEFINE_IMPL_FULL (lift_add_shift2_mmx, lift_add_shift2, OIL_IMPL_FLAG_MMX); void lift_sub_shift2_mmx (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n) { while (n&3) { d[0] = s1[0] - ((s2[0] + s3[0])>>2); d++; s1++; s2++; s3++; n--; } if (n==0) return; asm volatile ("\n" " xor %%rcx, %%rcx\n" "1:\n" " movq (%2,%%rcx,2), %%mm1\n" " movq (%3,%%rcx,2), %%mm2\n" " movq (%1,%%rcx,2), %%mm0\n" " paddw %%mm2, %%mm1\n" " psraw $2, %%mm1\n" " psubw %%mm1, %%mm0\n" " movq %%mm0, (%0,%%rcx,2)\n" " add $4, %%rcx\n" " cmp %4, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d), "+r" (s1), "+r" (s2), "+r" (s3) : "r" (n) : "rcx"); } OIL_DEFINE_IMPL_FULL (lift_sub_shift2_mmx, lift_sub_shift2, OIL_IMPL_FLAG_MMX); #if 0 #ifdef ENABLE_BROKEN_IMPLS void synth_53_mmx (int16_t *d_2xn, int16_t *s_2xn, int n) { int i; if (n==0) return; if (n == 1) { d_2xn[0] = s_2xn[0] - (s_2xn[1] >> 1); d_2xn[1] = s_2xn[1] + d_2xn[0]; } else { int i; d_2xn[0] = s_2xn[0] - (s_2xn[1] >> 1); if (n > 6) { n-=5; asm volatile ("\n" " xor %%ecx, %%ecx\n" " movw 2(%1), %%ecx\n" " movd %%ecx, %%mm7\n" " movw 0(%0), %%ecx\n" " movd %%ecx, %%mm6\n" " movw 0(%1), %%ecx\n" " movd %%ecx, %%mm5\n" " xor %%ecx, %%ecx\n" "1:\n" " movq 4(%1,%%ecx,4), %%mm1\n" // mm1 = s5 s4 s3 s2 " movq %%mm1, %%mm2\n" // mm2 = s5 s4 s3 s2 " movq 12(%1,%%ecx,4), %%mm0\n" // mm0 = s9 s8 s7 s6 " punpcklwd %%mm0, %%mm1\n" // mm1 = s7 s3 s6 s2 " punpckhwd %%mm0, %%mm2\n" // mm2 = s9 s5 s8 s4 " movq %%mm1, %%mm0\n" // mm0 = s7 s3 s6 s2 " punpcklwd %%mm2, %%mm0\n" // mm0 = s8 s6 s4 s2 " punpckhwd %%mm2, %%mm1\n" // mm1 = s9 s7 s5 s3 //" movq %%mm0, %%mm3\n" // mm0 = s8 s6 s4 s2 " movq %%mm1, %%mm2\n" // mm2 = s9 s7 s5 s3 " psllq $16, %%mm2\n" // mm2 = s7 s5 s3 00 " por %%mm7, %%mm2\n" // mm2 = s7 s5 s3 s1 " movq %%mm2, %%mm4\n" // mm4 = s7 s5 s3 s1 " paddw %%mm1, %%mm2\n" // mm2 = s9+s7 ... " psraw $2, %%mm2\n" // mm2 = (s9+s7)>>2 ... " movq %%mm1, %%mm7\n" // mm7 = s9 s7 s5 s3 " psrlq $48, %%mm7\n" // mm7 = 00 00 00 s9 " psubw %%mm2, %%mm0\n" // mm0 = d8 d6 d4 d2 " movq %%mm0, %%mm1\n" // mm1 = d8 d6 d4 d2 " movq %%mm0, %%mm3\n" // mm1 = d8 d6 d4 d2 " psllq $16, %%mm0\n" // mm0 = d6 d4 d2 00 " por %%mm6, %%mm0\n" // mm0 = d6 d4 d2 d0 " psrlq $48, %%mm1\n" // mm1 = 00 00 00 d8 " movq %%mm1, %%mm6\n" // mm6 = 00 00 00 d8 " movq %%mm0, %%mm1\n" " paddw %%mm3, %%mm1\n" // mm0 = d8+d6 ... " psraw $1, %%mm1\n" // mm1 = (d8+d6)>>1 ... " paddw %%mm4, %%mm1\n" // mm1 = d7 d5 d3 d1 " movq %%mm1, %%mm2\n" " movq %%mm0, %%mm1\n" " punpcklwd %%mm2, %%mm0\n" " punpckhwd %%mm2, %%mm1\n" " movq %%mm0, (%0, %%ecx, 4)\n" " movq %%mm1, 8(%0, %%ecx, 4)\n" " add $4, %%ecx\n" " cmp %3, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d_2xn), "+r" (s_2xn), "+ecx" (i) : "m" (n)); i*=2; n+=5; d_2xn[i] = s_2xn[i] - ((s_2xn[i-1] + s_2xn[i+1]) >> 2); i+=2; } else { i = 2; } for(;i> 2); d_2xn[i-1] = s_2xn[i-1] + ((d_2xn[i] + d_2xn[i-2]) >> 1); } d_2xn[n*2-2] = s_2xn[n*2-2] - ((s_2xn[n*2-3] + s_2xn[n*2-1]) >> 2); d_2xn[n*2-3] = s_2xn[n*2-3] + ((d_2xn[n*2-2] + d_2xn[n*2-4]) >> 1); d_2xn[n*2-1] = s_2xn[n*2-1] + d_2xn[n*2-2]; } } OIL_DEFINE_IMPL_FULL (synth_53_mmx, synth_53, OIL_IMPL_FLAG_MMX); #endif #endif void mas2_add_s16_mmx (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { int shift = s4_2[1]; while (n&3) { int x; x = s4_2[0] + s2[0]*s3_2[0] + s2[1]*s3_2[1]; x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; n--; } if (n==0) return; n>>=2; asm volatile ("\n" " movzwl 0(%0), %%ecx\n" " movd %%ecx, %%mm7\n" " pshufw $0x00, %%mm7, %%mm7\n" " movzwl 2(%0), %%ecx\n" " movd %%ecx, %%mm6\n" " pshufw $0x00, %%mm6, %%mm6\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm5\n" " pshufw $0x44, %%mm5, %%mm5\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" // mm0 = s0, s1, s2, s3 " movq 0(%2), %%mm1\n" // mm1 = s0, s1, s2, s3 " pmullw %%mm7, %%mm0\n" // mm0 = lo(s0*a0), lo(s1*a0), ... " pmulhw %%mm7, %%mm1\n" // mm1 = hi(s0*a0), hi(s1*a0), ... " movq %%mm0, %%mm2\n" // mm2 = lo(s0*a0), lo(s1*a0), ... " punpcklwd %%mm1, %%mm0\n" // mm0 = s0*a0, s1*a0 " punpckhwd %%mm1, %%mm2\n" // mm2 = s2*a0, s3*a0 " movq %%mm2, %%mm1\n" // mm1 = s2*a0, s3*a0 " movq 2(%2), %%mm2\n" " movq 2(%2), %%mm3\n" " pmullw %%mm6, %%mm2\n" " pmulhw %%mm6, %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" // mm2 = s1*a1, s2*a1 " punpckhwd %%mm3, %%mm4\n" // mm4 = s3*a1, s4*a1 " movq %%mm4, %%mm3\n" // mm3 = s3*a1, s4*a1 " paddd %%mm3, %%mm1\n" // mm1 = s2*a0 + s3*a1, ... " paddd %%mm2, %%mm0\n" // mm0 = s0*a0 + s1*a1, ... " paddd %%mm5, %%mm1\n" // mm1 = s2*a0 + s3*a1 + offset, ... " paddd %%mm5, %%mm0\n" // mm0 = s0*a0 + s1*a1 + offset, ... " movd %4, %%mm4\n" " psrad %%mm4, %%mm1\n" // mm1 = (s2*a0 + s3*a1 + offset)>>shift, ... " psrad %%mm4, %%mm0\n" // mm0 = (s0*a0 + s1*a1 + offset)>>shift, ... " packssdw %%mm1, %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : "r" (shift) ); } OIL_DEFINE_IMPL_FULL (mas2_add_s16_mmx, mas2_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void mas4_add_s16_mmx (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_4, int16_t *s4_2, int n) { int shift = s4_2[1]; //int m; //m = n&3; #if 1 while (n&3) { int x; int i; x = s4_2[0]; for(i=0;i<4;i++){ x += s2[i]*s3_4[i]; } x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; n--; } #endif if (n==0) return; n>>=2; asm volatile ("\n" " movq 0(%0), %%mm7\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm5\n" " pshufw $0x44, %%mm5, %%mm5\n" :: "r" (s3_4), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" // mm0 = s0, s1, s2, s3 " movq 0(%2), %%mm1\n" // mm1 = s0, s1, s2, s3 " pshufw $0x00, %%mm7, %%mm6\n" " pmullw %%mm6, %%mm0\n" // mm0 = lo(s0*a0), lo(s1*a0), ... " pmulhw %%mm6, %%mm1\n" // mm1 = hi(s0*a0), hi(s1*a0), ... " movq %%mm0, %%mm2\n" // mm2 = lo(s0*a0), lo(s1*a0), ... " punpcklwd %%mm1, %%mm0\n" // mm0 = s0*a0, s1*a0 " punpckhwd %%mm1, %%mm2\n" // mm2 = s2*a0, s3*a0 " movq %%mm2, %%mm1\n" // mm1 = s2*a0, s3*a0 " movq 2(%2), %%mm2\n" " movq 2(%2), %%mm3\n" " pshufw $0x55, %%mm7, %%mm6\n" " pmullw %%mm6, %%mm2\n" " pmulhw %%mm6, %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" // mm2 = s1*a1, s2*a1 " punpckhwd %%mm3, %%mm4\n" // mm4 = s3*a1, s4*a1 " movq %%mm4, %%mm3\n" // mm3 = s3*a1, s4*a1 " paddd %%mm3, %%mm1\n" // mm1 = s2*a0 + s3*a1, ... " paddd %%mm2, %%mm0\n" // mm0 = s0*a0 + s1*a1, ... " movq 4(%2), %%mm2\n" " movq 4(%2), %%mm3\n" " pshufw $0xaa, %%mm7, %%mm6\n" " pmullw %%mm6, %%mm2\n" " pmulhw %%mm6, %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " movq %%mm4, %%mm3\n" " paddd %%mm3, %%mm1\n" " paddd %%mm2, %%mm0\n" " movq 6(%2), %%mm2\n" " movq 6(%2), %%mm3\n" " pshufw $0xff, %%mm7, %%mm6\n" " pmullw %%mm6, %%mm2\n" " pmulhw %%mm6, %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " movq %%mm4, %%mm3\n" " paddd %%mm3, %%mm1\n" " paddd %%mm2, %%mm0\n" " paddd %%mm5, %%mm1\n" " paddd %%mm5, %%mm0\n" " movd %4, %%mm4\n" " psrad %%mm4, %%mm1\n" " psrad %%mm4, %%mm0\n" " packssdw %%mm1, %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : "r" (shift) ); #if 0 while (m) { int x; int i; x = s4_2[0]; for(i=0;i<4;i++){ x += s2[i]*s3_4[i]; } x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; m--; } #endif } OIL_DEFINE_IMPL_FULL (mas4_add_s16_mmx, mas4_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #if 0 /* This only does 16-bit intermediates, whereas the ref specifies 32-bit */ void mas2_add_s16_mmx (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { while (n&3) { int x; x = s4_2[0] + s2[0]*s3_2[0] + s2[1]*s3_2[1]; x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; n--; } if (n==0) return; n>>=2; asm volatile ("\n" " movzwl 0(%0), %%ecx\n" " movd %%ecx, %%mm7\n" " pshufw $0x00, %%mm7, %%mm7\n" " movzwl 2(%0), %%ecx\n" " movd %%ecx, %%mm6\n" " pshufw $0x00, %%mm6, %%mm6\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm5\n" " pshufw $0x00, %%mm5, %%mm5\n" " movzwl 2(%1), %%ecx\n" " movd %%ecx, %%mm4\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " pmullw %%mm7, %%mm0\n" " movq 2(%2), %%mm1\n" " pmullw %%mm6, %%mm1\n" " paddw %%mm1, %%mm0\n" " paddw %%mm5, %%mm0\n" " psraw %%mm4, %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (mas2_add_s16_mmx, mas2_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #endif #if 0 /* This only does 16-bit intermediates, whereas the ref specifies 32-bit */ void mas4_add_s16_mmx (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { while (n&3) { int x; x = s4_2[0] + s2[0]*s3_2[0] + s2[1]*s3_2[1] + s2[2]*s3_2[2] + s2[2]*s3_2[2]; x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; n--; } if (n==0) return; n>>=2; asm volatile ("\n" " movzwl 0(%0), %%ecx\n" " movd %%ecx, %%mm7\n" " pshufw $0x00, %%mm7, %%mm7\n" " movzwl 2(%0), %%ecx\n" " movd %%ecx, %%mm6\n" " pshufw $0x00, %%mm6, %%mm6\n" " movzwl 2(%0), %%ecx\n" " movd %%ecx, %%mm5\n" " pshufw $0x00, %%mm5, %%mm5\n" " movzwl 2(%0), %%ecx\n" " movd %%ecx, %%mm4\n" " pshufw $0x00, %%mm4, %%mm4\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm3\n" " pshufw $0x00, %%mm3, %%mm3\n" " movzwl 2(%1), %%ecx\n" " movd %%ecx, %%mm2\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " pmullw %%mm7, %%mm0\n" " movq 2(%2), %%mm1\n" " pmullw %%mm6, %%mm1\n" " paddw %%mm1, %%mm0\n" " movq 4(%2), %%mm1\n" " pmullw %%mm5, %%mm1\n" " paddw %%mm1, %%mm0\n" " movq 6(%2), %%mm1\n" " pmullw %%mm4, %%mm1\n" " paddw %%mm1, %%mm0\n" " paddw %%mm3, %%mm0\n" " psraw %%mm2, %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (mas4_add_s16_mmx, mas4_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #endif #if 0 /* This only does 16-bit intermediates, whereas the ref specifies 32-bit */ void mas8_add_s16_mmx (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { while (n&3) { int x; int i; x = s4_2[0]; for(i=0;i<8;i++){ x += s2[i]*s3_2[i]; } x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; n--; } if (n==0) return; n>>=2; asm volatile ("\n" " movq 0(%0), %%mm6\n" " movq 8(%0), %%mm7\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm3\n" " pshufw $0x00, %%mm3, %%mm3\n" " pxor %%mm4, %%mm4\n" " movzwl 2(%1), %%ecx\n" " movd %%ecx, %%mm4\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " pshufw $0x00, %%mm6, %%mm1\n" " movq 0(%2), %%mm0\n" " pmullw %%mm1, %%mm0\n" " pshufw $0x55, %%mm6, %%mm2\n" " movq 2(%2), %%mm1\n" " pmullw %%mm2, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0xaa, %%mm6, %%mm2\n" " movq 4(%2), %%mm1\n" " pmullw %%mm2, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0xff, %%mm6, %%mm2\n" " movq 6(%2), %%mm1\n" " pmullw %%mm2, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0x00, %%mm7, %%mm2\n" " movq 8(%2), %%mm1\n" " pmullw %%mm2, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0x55, %%mm7, %%mm2\n" " movq 10(%2), %%mm1\n" " pmullw %%mm2, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0xaa, %%mm7, %%mm2\n" " movq 12(%2), %%mm1\n" " pmullw %%mm2, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0xff, %%mm7, %%mm2\n" " movq 14(%2), %%mm1\n" " pmullw %%mm2, %%mm1\n" " paddw %%mm1, %%mm0\n" " paddw %%mm3, %%mm0\n" " psraw %%mm4, %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (mas8_add_s16_mmx, mas8_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #endif void mas4_add_s16_pmaddwd (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { if (n==0) return; asm volatile ("\n" " movq 0(%0), %%mm6\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm3\n" " movzwl 2(%1), %%ecx\n" " movd %%ecx, %%mm4\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " pmaddwd %%mm6, %%mm0\n" " pshufw $0xee, %%mm0, %%mm1\n" " paddd %%mm1, %%mm0\n" " paddd %%mm3, %%mm0\n" " psrad %%mm4, %%mm0\n" " movd %%mm0, %%eax\n" " addw 0(%1), %%ax\n" " movw %%ax, 0(%0)\n" " add $2, %0\n" " add $2, %1\n" " add $2, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : : "eax" ); } OIL_DEFINE_IMPL_FULL (mas4_add_s16_pmaddwd, mas4_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void mas8_add_s16_pmaddwd (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { if (n==0) return; asm volatile ("\n" " movq 0(%0), %%mm6\n" " movq 8(%0), %%mm7\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm3\n" " movzwl 2(%1), %%ecx\n" " movd %%ecx, %%mm4\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " pmaddwd %%mm6, %%mm0\n" " movq 8(%2), %%mm1\n" " pmaddwd %%mm7, %%mm1\n" " paddd %%mm1, %%mm0\n" " pshufw $0xee, %%mm0, %%mm1\n" " paddd %%mm1, %%mm0\n" " paddd %%mm3, %%mm0\n" " psrad %%mm4, %%mm0\n" " movd %%mm0, %%eax\n" " addw 0(%1), %%ax\n" " movw %%ax, 0(%0)\n" " add $2, %0\n" " add $2, %1\n" " add $2, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : : "eax" ); } OIL_DEFINE_IMPL_FULL (mas8_add_s16_pmaddwd, mas8_add_s16, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); #if 0 void mas8_add_s16_pmaddwd2 (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { while (n&3) { int x; int i; x = s4_2[0]; for(i=0;i<8;i++){ x += s2[i]*s3_2[i]; } x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; n--; } if (n==0) return; n>>=2; asm volatile ("\n" " movq 0(%0), %%mm6\n" " movq 8(%0), %%mm7\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm5\n" " pshufw $0x00, %%mm5, %%mm5\n" " pxor %%mm4, %%mm4\n" " movzwl 2(%1), %%ecx\n" " movd %%ecx, %%mm4\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " pmaddwd %%mm6, %%mm0\n" " movq 8(%2), %%mm1\n" " pmaddwd %%mm7, %%mm1\n" " paddd %%mm1, %%mm0\n" " pshufw $0xee, %%mm0, %%mm1\n" " paddw %%mm1, %%mm0\n" " movq 2(%2), %%mm2\n" " pmaddwd %%mm6, %%mm2\n" " movq 10(%2), %%mm3\n" " pmaddwd %%mm7, %%mm3\n" " paddd %%mm3, %%mm2\n" " pshufw $0xee, %%mm2, %%mm3\n" " paddw %%mm3, %%mm2\n" " pextrw $0, %%mm2, %%eax\n" " pinsrw $1, %%eax, %%mm0\n" " movq 4(%2), %%mm2\n" " pmaddwd %%mm6, %%mm2\n" " movq 12(%2), %%mm3\n" " pmaddwd %%mm7, %%mm3\n" " paddd %%mm3, %%mm2\n" " pshufw $0xee, %%mm2, %%mm3\n" " paddw %%mm3, %%mm2\n" " pextrw $0, %%mm2, %%eax\n" " pinsrw $2, %%eax, %%mm0\n" " movq 6(%2), %%mm2\n" " pmaddwd %%mm6, %%mm2\n" " movq 14(%2), %%mm3\n" " pmaddwd %%mm7, %%mm3\n" " paddd %%mm3, %%mm2\n" " pshufw $0xee, %%mm2, %%mm3\n" " paddw %%mm3, %%mm2\n" " pextrw $0, %%mm2, %%eax\n" " pinsrw $3, %%eax, %%mm0\n" " paddw %%mm5, %%mm0\n" " psraw %%mm4, %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : : "eax" ); } OIL_DEFINE_IMPL_FULL (mas8_add_s16_pmaddwd2, mas8_add_s16, OIL_IMPL_FLAG_SSE); #endif #if 0 /* This only does 16-bit intermediates, whereas the ref specifies 32-bit */ void mas8_add_s16_sse2 (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { asm volatile ("\n" " movq 0(%0), %%mm6\n" " movq 8(%0), %%mm7\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm3\n" " pshufw $0x00, %%mm3, %%mm3\n" " pxor %%mm4, %%mm4\n" " movzwl 2(%1), %%ecx\n" " movd %%ecx, %%mm4\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " pmullw %%mm6, %%mm0\n" " movq 8(%2), %%mm1\n" " pmullw %%mm7, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0xee, %%mm0, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0x01, %%mm0, %%mm1\n" " paddw %%mm1, %%mm0\n" " paddw %%mm3, %%mm0\n" " psraw %%mm4, %%mm0\n" " movd %%mm0, %%eax\n" " addw 0(%1), %%ax\n" " movw %%ax, 0(%0)\n" " add $2, %0\n" " add $2, %1\n" " add $2, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : : "eax" ); } OIL_DEFINE_IMPL_FULL (mas8_add_s16_sse2, mas8_add_s16, OIL_IMPL_FLAG_SSE); #endif void mas2_across_add_s16_mmx (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4_2, int16_t *s5_2, int n) { int shift = s5_2[1]; while (n&3) { int x; x = s5_2[0] + s2[0]*s4_2[0] + s3[0]*s4_2[1]; x >>= s5_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; s3++; n--; } if (n==0) return; n>>=2; if (n==0) return; asm volatile ("\n" " movzwl 0(%0), %%ecx\n" " movd %%ecx, %%mm7\n" " pshufw $0x00, %%mm7, %%mm7\n" " movzwl 2(%0), %%ecx\n" " movd %%ecx, %%mm6\n" " pshufw $0x00, %%mm6, %%mm6\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm5\n" " pshufw $0x44, %%mm5, %%mm5\n" :: "r" (s4_2), "r" (s5_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" // mm0 = s0, s1, s2, s3 " movq 0(%2), %%mm1\n" // mm1 = s0, s1, s2, s3 " pmullw %%mm7, %%mm0\n" // mm0 = lo(s0*a0), lo(s1*a0), ... " pmulhw %%mm7, %%mm1\n" // mm1 = hi(s0*a0), hi(s1*a0), ... " movq %%mm0, %%mm2\n" // mm2 = lo(s0*a0), lo(s1*a0), ... " punpcklwd %%mm1, %%mm0\n" // mm0 = s0*a0, s1*a0 " punpckhwd %%mm1, %%mm2\n" // mm2 = s2*a0, s3*a0 " movq %%mm2, %%mm1\n" // mm1 = s2*a0, s3*a0 " movq 0(%3), %%mm2\n" " movq 0(%3), %%mm3\n" " pmullw %%mm6, %%mm2\n" " pmulhw %%mm6, %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" // mm2 = s1*a1, s2*a1 " punpckhwd %%mm3, %%mm4\n" // mm4 = s3*a1, s4*a1 " movq %%mm4, %%mm3\n" // mm3 = s3*a1, s4*a1 " paddd %%mm3, %%mm1\n" // mm1 = s2*a0 + s3*a1, ... " paddd %%mm2, %%mm0\n" // mm0 = s0*a0 + s1*a1, ... " paddd %%mm5, %%mm1\n" // mm1 = s2*a0 + s3*a1 + offset, ... " paddd %%mm5, %%mm0\n" // mm0 = s0*a0 + s1*a1 + offset, ... " movd %5, %%mm4\n" " psrad %%mm4, %%mm1\n" // mm1 = (s2*a0 + s3*a1 + offset)>>shift, ... " psrad %%mm4, %%mm0\n" // mm0 = (s0*a0 + s1*a1 + offset)>>shift, ... " packssdw %%mm1, %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " add $8, %3\n" " decl %4\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (s3), "+m" (n) : "r" (shift) ); } OIL_DEFINE_IMPL_FULL (mas2_across_add_s16_mmx, mas2_across_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void add_const_rshift_s16_mmx(int16_t *d1, int16_t *s1, int16_t *s2_2, int n) { while(n&3) { d1[0] = (s1[0] + s2_2[0])>>s2_2[1]; d1++; s1++; n--; } n>>=2; if (n==0) return; asm volatile ("\n" " movzwl 0(%2), %%ecx\n" " movd %%ecx, %%mm7\n" " pshufw $0x00, %%mm7, %%mm7\n" " movzwl 2(%2), %%ecx\n" " movd %%ecx, %%mm6\n" "1:\n" " movq 0(%1), %%mm0\n" " paddsw %%mm7, %%mm0\n" " psraw %%mm6, %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2_2), "+r" (n) : : "ecx" ); } OIL_DEFINE_IMPL_FULL (add_const_rshift_s16_mmx, add_const_rshift_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void multiply_and_add_s16_mmx(int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3, int n) { while(n&3) { d1[0] = s1[0] + s2[0]*s3[0]; d1++; s1++; s2++; s3++; n--; } n>>=2; if (n==0) return; asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " pmullw 0(%3), %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " add $8, %3\n" " decl %4\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (s3), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (multiply_and_add_s16_mmx, multiply_and_add_s16, OIL_IMPL_FLAG_MMX); void multiply_and_add_s16_u8_mmx(int16_t *d1, int16_t *s1, int16_t *s2, uint8_t *s3, int n) { while(n&3) { d1[0] = s1[0] + s2[0]*s3[0]; d1++; s1++; s2++; s3++; n--; } n>>=2; if (n==0) return; asm volatile ("\n" " pxor %%mm7, %%mm7\n" "1:\n" " movq 0(%3), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pmullw 0(%2), %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " add $4, %3\n" " decl %4\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (s3), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (multiply_and_add_s16_u8_mmx, multiply_and_add_s16_u8, OIL_IMPL_FLAG_MMX); void multiply_and_add_s16_u8_mmx_2(int16_t *d1, int16_t *s1, int16_t *s2, uint8_t *s3, int n) { while(n&7) { d1[0] = s1[0] + s2[0]*s3[0]; d1++; s1++; s2++; s3++; n--; } n>>=3; if (n==0) return; asm volatile ("\n" " pxor %%mm7, %%mm7\n" "1:\n" " movd 0(%3), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " movd 4(%3), %%mm1\n" " pmullw 0(%2), %%mm0\n" " punpcklbw %%mm7, %%mm1\n" " paddw 0(%1), %%mm0\n" " pmullw 8(%2), %%mm1\n" " movq %%mm0, 0(%0)\n" " paddw 8(%1), %%mm1\n" " movq %%mm1, 8(%0)\n" " add $16, %0\n" " add $16, %1\n" " add $16, %2\n" " add $8, %3\n" " decl %4\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (s3), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (multiply_and_add_s16_u8_mmx_2, multiply_and_add_s16_u8, OIL_IMPL_FLAG_MMX); void multiply_and_acc_12xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1, int ss1, uint8_t *s2, int ss2, int n) { if (n==0) return; __asm__ __volatile__ ("\n" " pxor %%mm7, %%mm7\n" "1:\n" " movd 0(%2), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pmullw 0(%1), %%mm0\n" " paddw 0(%0), %%mm0\n" " movq %%mm0, 0(%0)\n" " movd 4(%2), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " pmullw 8(%1), %%mm1\n" " paddw 8(%0), %%mm1\n" " movq %%mm1, 8(%0)\n" " movd 8(%2), %%mm2\n" " punpcklbw %%mm7, %%mm2\n" " pmullw 16(%1), %%mm2\n" " paddw 16(%0), %%mm2\n" " movq %%mm2, 16(%0)\n" " add %4, %0\n" " add %5, %1\n" " add %6, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (i1), "+r" (s1), "+r" (s2), "+r" (n) : "r" ((long)is1), "r" ((long)ss1), "r" ((long)ss2) ); } OIL_DEFINE_IMPL_FULL (multiply_and_acc_12xn_s16_u8_mmx, multiply_and_acc_12xn_s16_u8, OIL_IMPL_FLAG_MMX); #ifdef ENABLE_BROKEN_IMPLS void mas4_across_add_s16_mmx (int16_t *d, int16_t *s1, int16_t *s2_nx4, int sstr2, int16_t *s3_4, int16_t *s4_2, int n) { int16_t *s2_nx4_off; while (n&3) { int x; int j; x = s4_2[0]; for(j=0;j<4;j++){ x += OIL_GET(s2_nx4, j*sstr2, int16_t)*s3_4[j]; } x >>= s4_2[1]; d[0] = s1[0] + x; n--; d++; s1++; s2_nx4++; } if (n==0) return; s2_nx4_off = OIL_OFFSET(s2_nx4, 3*sstr2); n >>= 2; __asm__ __volatile__ ("\n" " movq 0(%[s3_4]), %%mm0\n" " pshufw $0x55, %%mm0, %%mm1\n" " pshufw $0xaa, %%mm0, %%mm2\n" " pshufw $0xff, %%mm0, %%mm3\n" " pshufw $0x00, %%mm0, %%mm0\n" " movzwl 0(%[s4_2]), %%ecx\n" " movd %%ecx, %%mm7\n" " pshufw $0x00, %%mm7, %%mm7\n" " movzwl 2(%[s4_2]), %%ecx\n" " movd %%ecx, %%mm6\n" : : [s3_4] "r" (s3_4), [s4_2] "r" (s4_2) : "ecx" ); __asm__ __volatile__ ("\n" "1:\n" " movq 0(%[s2_nx4]), %%mm4\n" " pmullw %%mm0, %%mm4\n" " movq (%[s2_nx4],%[sstr]), %%mm5\n" " pmullw %%mm1, %%mm5\n" " paddsw %%mm5,%%mm4\n" " movq (%[s2_nx4],%[sstr],2), %%mm5\n" " pmullw %%mm2, %%mm5\n" " paddsw %%mm5,%%mm4\n" " movq (%[s2_nx4_off]), %%mm5\n" " pmullw %%mm3, %%mm5\n" " paddsw %%mm5,%%mm4\n" " paddsw %%mm7, %%mm4\n" " psraw %%mm6, %%mm4\n" " paddsw (%[s1]),%%mm4\n" " movq %%mm4, 0(%[d])\n" " add $8, %[s2_nx4]\n" " add $8, %[s2_nx4_off]\n" " add $8, %[s1]\n" " add $8, %[d]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [s2_nx4] "+r" (s2_nx4), [d] "+r" (d), [s2_nx4_off] "+r" (s2_nx4_off), [n] "+m" (n), [s1] "+r" (s1) : [sstr] "r" (sstr2) ); } OIL_DEFINE_IMPL_FULL (mas4_across_add_s16_mmx, mas4_across_add_s16, OIL_IMPL_FLAG_MMX); #endif void mas4_across_add_s16_mmx (int16_t *d, int16_t *s1, int16_t *s2_nx4, int sstr2, int16_t *s3_4, int16_t *s4_2, int n) { int16_t *s2_nx4_off; while (n&3) { int x; int j; x = s4_2[0]; for(j=0;j<4;j++){ x += OIL_GET(s2_nx4, j*sstr2, int16_t)*s3_4[j]; } x >>= s4_2[1]; d[0] = s1[0] + x; n--; d++; s1++; s2_nx4++; } if (n==0) return; s2_nx4_off = OIL_OFFSET(s2_nx4, 3*sstr2); n >>= 2; __asm__ __volatile__ ("\n" " movq 0(%[s3_4]), %%mm0\n" " pxor %%mm5, %%mm5\n" " movd 0(%[s4_2]), %%mm5\n" : : [s3_4] "r" (s3_4), [s4_2] "r" (s4_2) ); __asm__ __volatile__ ("\n" "1:\n" " pshufw $0x00, %%mm0, %%mm6\n" " pmullw 0(%[s2_nx4]), %%mm6\n" " pshufw $0x00, %%mm0, %%mm3\n" " pmulhw 0(%[s2_nx4]), %%mm3\n" " movq %%mm6, %%mm7\n" " punpcklwd %%mm3, %%mm6\n" " punpckhwd %%mm3, %%mm7\n" " pshufw $0x55, %%mm0, %%mm2\n" " pmullw 0(%[s2_nx4],%[sstr]), %%mm2\n" " pshufw $0x55, %%mm0, %%mm3\n" " pmulhw 0(%[s2_nx4],%[sstr]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " pshufw $0xaa, %%mm0, %%mm2\n" " pmullw 0(%[s2_nx4],%[sstr],2), %%mm2\n" " pshufw $0xaa, %%mm0, %%mm3\n" " pmulhw 0(%[s2_nx4],%[sstr],2), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " pshufw $0xff, %%mm0, %%mm2\n" " pmullw 0(%[s2_nx4_off]), %%mm2\n" " pshufw $0xff, %%mm0, %%mm3\n" " pmulhw 0(%[s2_nx4_off]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " pshufw $0xcc, %%mm5, %%mm1\n" " paddd %%mm1, %%mm6\n" " paddd %%mm1, %%mm7\n" " pshufw $0xfd, %%mm5, %%mm1\n" " psrad %%mm1, %%mm6\n" " psrad %%mm1, %%mm7\n" " packssdw %%mm7, %%mm6\n" " paddsw (%[s1]),%%mm6\n" " movq %%mm6, 0(%[d])\n" " add $8, %[s2_nx4]\n" " add $8, %[s2_nx4_off]\n" " add $8, %[s1]\n" " add $8, %[d]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [s2_nx4] "+r" (s2_nx4), [d] "+r" (d), [s2_nx4_off] "+r" (s2_nx4_off), [n] "+m" (n), [s1] "+r" (s1) : [sstr] "r" ((long)(sstr2)) ); } OIL_DEFINE_IMPL_FULL (mas4_across_add_s16_mmx, mas4_across_add_s16, OIL_IMPL_FLAG_MMX); void mas8_across_add_s16_mmx (int16_t *d, int16_t *s1, int16_t *s2_nx8, int sstr2, int16_t *s3_8, int16_t *s4_2, int n) { int16_t *s2_nx8_off; void *tmp = NULL; while (n&3) { int x; int j; x = s4_2[0]; for(j=0;j<8;j++){ x += OIL_GET(s2_nx8, j*sstr2, int16_t)*s3_8[j]; } x >>= s4_2[1]; d[0] = s1[0] + x; n--; d++; s1++; s2_nx8++; } if (n==0) return; s2_nx8_off = OIL_OFFSET(s2_nx8, 7*sstr2); n >>= 2; __asm__ __volatile__ ("\n" " movq 0(%[s3_8]), %%mm0\n" " pxor %%mm5, %%mm5\n" " movd 0(%[s4_2]), %%mm5\n" : : [s3_8] "r" (s3_8), [s4_2] "r" (s4_2) ); __asm__ __volatile__ ("\n" "1:\n" " mov %[s2_nx8], %[tmp]\n" " movq 0(%[s3_8]), %%mm0\n" " pshufw $0x00, %%mm0, %%mm6\n" " pmullw 0(%[tmp]), %%mm6\n" " pshufw $0x00, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm6, %%mm7\n" " punpcklwd %%mm3, %%mm6\n" " punpckhwd %%mm3, %%mm7\n" " add %[sstr], %[tmp]\n" " pshufw $0x55, %%mm0, %%mm2\n" " pmullw 0(%[tmp]), %%mm2\n" " pshufw $0x55, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " add %[sstr], %[tmp]\n" " pshufw $0xaa, %%mm0, %%mm2\n" " pmullw 0(%[tmp]), %%mm2\n" " pshufw $0xaa, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " add %[sstr], %[tmp]\n" " pshufw $0xff, %%mm0, %%mm2\n" " pmullw 0(%[tmp]), %%mm2\n" " pshufw $0xff, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " movq 8(%[s3_8]), %%mm0\n" " add %[sstr], %[tmp]\n" " pshufw $0x00, %%mm0, %%mm2\n" " pmullw 0(%[tmp]), %%mm2\n" " pshufw $0x00, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " add %[sstr], %[tmp]\n" " pshufw $0x55, %%mm0, %%mm2\n" " pmullw 0(%[tmp]), %%mm2\n" " pshufw $0x55, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " add %[sstr], %[tmp]\n" " pshufw $0xaa, %%mm0, %%mm2\n" " pmullw 0(%[tmp]), %%mm2\n" " pshufw $0xaa, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " add %[sstr], %[tmp]\n" " pshufw $0xff, %%mm0, %%mm2\n" " pmullw 0(%[tmp]), %%mm2\n" " pshufw $0xff, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " pshufw $0xcc, %%mm5, %%mm1\n" " paddd %%mm1, %%mm6\n" " paddd %%mm1, %%mm7\n" " pshufw $0xfd, %%mm5, %%mm1\n" " psrad %%mm1, %%mm6\n" " psrad %%mm1, %%mm7\n" " packssdw %%mm7, %%mm6\n" " paddsw (%[s1]),%%mm6\n" " movq %%mm6, 0(%[d])\n" " add $8, %[s2_nx8]\n" " add $8, %[s1]\n" " add $8, %[d]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [s2_nx8] "+r" (s2_nx8), [tmp] "+r" (tmp), [s3_8] "+r" (s3_8), [d] "+r" (d), [n] "+m" (n), [s1] "+r" ((long)(s1)) : [sstr] "r" ((long)(sstr2)) ); } OIL_DEFINE_IMPL_FULL (mas8_across_add_s16_mmx, mas8_across_add_s16, OIL_IMPL_FLAG_MMX); void lshift_s16_mmx(int16_t *d1, int16_t *s1, int16_t *s3_1, int n) { while (n&3) { d1[0] = s1[0]<>= 2; if (n == 0) return; __asm__ __volatile__ ("\n" " movzwl 0(%[s3_1]), %%ecx\n" " movd %%ecx, %%mm1\n" "1:\n" " movq 0(%[s1]), %%mm0\n" " psllw %%mm1, %%mm0\n" " movq %%mm0, 0(%[d1])\n" " add $8, %[d1]\n" " add $8, %[s1]\n" " decl %[n]\n" " jnz 1b\n" " emms" : [d1] "+r" (d1), [s1] "+r" (s1), [n] "+r" (n) : [s3_1] "r" (s3_1) : "ecx"); } OIL_DEFINE_IMPL_FULL (lshift_s16_mmx, lshift_s16, OIL_IMPL_FLAG_MMX); void lshift_s16_mmx_2(int16_t *d1, int16_t *s1, int16_t *s3_1, int n) { while (n&7) { d1[0] = s1[0]<>= 3; if (n == 0) return; __asm__ __volatile__ ("\n" " movzwl 0(%[s3_1]), %%ecx\n" " movd %%ecx, %%mm1\n" "1:\n" " movq 0(%[s1]), %%mm0\n" " psllw %%mm1, %%mm0\n" " movq %%mm0, 0(%[d1])\n" " movq 8(%[s1]), %%mm0\n" " psllw %%mm1, %%mm0\n" " movq %%mm0, 8(%[d1])\n" " add $16, %[d1]\n" " add $16, %[s1]\n" " decl %[n]\n" " jnz 1b\n" " emms" : [d1] "+r" (d1), [s1] "+r" (s1), [n] "+r" (n) : [s3_1] "r" (s3_1) : "ecx"); } OIL_DEFINE_IMPL_FULL (lshift_s16_mmx_2, lshift_s16, OIL_IMPL_FLAG_MMX); liboil-0.3.17/liboil/amd64/Makefile.in0000644000175000017500000004015711332627671014246 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = liboil/amd64 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libamd64_la_LIBADD = am_libamd64_la_OBJECTS = libamd64_la-wavelet.lo libamd64_la_OBJECTS = $(am_libamd64_la_OBJECTS) libamd64_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libamd64_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libamd64_la_SOURCES) DIST_SOURCES = $(libamd64_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libamd64.la libamd64_la_SOURCES = \ wavelet.c libamd64_la_CFLAGS = $(LIBOIL_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/amd64/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/amd64/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libamd64.la: $(libamd64_la_OBJECTS) $(libamd64_la_DEPENDENCIES) $(libamd64_la_LINK) $(libamd64_la_OBJECTS) $(libamd64_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamd64_la-wavelet.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libamd64_la-wavelet.lo: wavelet.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamd64_la_CFLAGS) $(CFLAGS) -MT libamd64_la-wavelet.lo -MD -MP -MF $(DEPDIR)/libamd64_la-wavelet.Tpo -c -o libamd64_la-wavelet.lo `test -f 'wavelet.c' || echo '$(srcdir)/'`wavelet.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libamd64_la-wavelet.Tpo $(DEPDIR)/libamd64_la-wavelet.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wavelet.c' object='libamd64_la-wavelet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamd64_la_CFLAGS) $(CFLAGS) -c -o libamd64_la-wavelet.lo `test -f 'wavelet.c' || echo '$(srcdir)/'`wavelet.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/liboilrandom.h0000644000175000017500000000732010717203073014075 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004,2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_RANDOM_H_ #define _LIBOIL_RANDOM_H_ #include #include #include OIL_BEGIN_DECLS #ifdef OIL_ENABLE_UNSTABLE_API void oil_random_s32(oil_type_s32 *dest, int n); void oil_random_s64 (oil_type_s64 *dest, int n); void oil_random_s16 (oil_type_s16 *dest, int n); void oil_random_s8 (oil_type_s8 *dest, int n); void oil_random_u32 (oil_type_u32 *dest, int n); void oil_random_u64 (oil_type_u64 *dest, int n); void oil_random_u16 (oil_type_u16 *dest, int n); void oil_random_u8 (oil_type_u8 *dest, int n); void oil_random_f64 (oil_type_f64 *dest, int n); void oil_random_f32 (oil_type_f32 *dest, int n); void oil_random_argb (oil_type_u32 *dest, int n); void oil_random_alpha (oil_type_u8 *dest, int n); /** * oil_rand_s32: * * Evaluates to a random integer in the range [-(1<<31), (1<<31)-1]. */ #define oil_rand_s32() ((rand()&0xffff)<<16 | (rand()&0xffff)) /** * oil_rand_s64: * * Evaluates to a random integer in the range [-(1<<63), (1<<63)-1]. */ #define oil_rand_s64() ((int64_t)(oil_rand_s32())<<32 | oil_rand_s32()) /** * oil_rand_s16: * * Evaluates to a random integer in the range [-(1<<15), (1<<15)-1]. */ #define oil_rand_s16() ((int16_t)(rand()&0xffff)) /** * oil_rand_s8: * * Evaluates to a random integer in the range [-(1<<7), (1<<7)-1]. */ #define oil_rand_s8() ((int8_t)(rand()&0xffff)) /** * oil_rand_u32: * * Evaluates to a random integer in the range [0, (1<<32)-1]. */ #define oil_rand_u32() ((uint32_t)((rand()&0xffff)<<16 | (rand()&0xffff))) /** * oil_rand_u64: * * Evaluates to a random integer in the range [0, (1<<64)-1]. */ #define oil_rand_u64() ((uint64_t)(oil_rand_u32())<<32 | oil_rand_u32()) /** * oil_rand_u16: * * Evaluates to a random integer in the range [0, (1<<16)-1]. */ #define oil_rand_u16() ((uint16_t)(rand()&0xffff)) /** * oil_rand_u8: * * Evaluates to a random integer in the range [0, (1<<8)-1]. */ #define oil_rand_u8() ((uint8_t)(rand()&0xffff)) /** * oil_rand_f64: * * Evaluates to a random double-precision floating point number * in the range [0, 1.0). */ #define oil_rand_f64() (((rand()/(RAND_MAX+1.0))+rand())/(RAND_MAX+1.0)) /** * oil_rand_f32: * * Evaluates to a random single-precision floating point number * in the range [0, 1.0). */ #define oil_rand_f32() (rand()/(RAND_MAX+1.0)) #endif OIL_END_DECLS #endif liboil-0.3.17/liboil/liboilgcc.h0000644000175000017500000000366010717203073013354 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_GCC_H_ #define _LIBOIL_GCC_H_ #ifndef __GNUC__ #error liboilgcc.h should only be included if the compiler is GCC #endif #include OIL_BEGIN_DECLS #ifdef OIL_ENABLE_UNSTABLE_API typedef int8_t vec_s8 __attribute__ ((mode(V8QI))); typedef uint8_t vec_u8 __attribute__ ((mode(V8QI))); typedef int16_t vec_s16 __attribute__ ((mode(V4HI))); typedef uint16_t vec_u16 __attribute__ ((mode(V4HI))); typedef int32_t vec_s32 __attribute__ ((mode(V2SI))); typedef uint32_t vec_u32 __attribute__ ((mode(V2SI))); #endif OIL_END_DECLS #endif liboil-0.3.17/liboil/i386/0000777000175000017500000000000011332637375012036 500000000000000liboil-0.3.17/liboil/i386/splat_i386.c0000644000175000017500000000426010717203073014002 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include OIL_DECLARE_CLASS(splat_u32_ns); static void splat_u32_ns_i386_mmx (uint32_t *dest, uint32_t *src, int n) { while(n&0x7) { *dest++ = *src; n--; } if (n) asm volatile ( " mov $0, %%eax\n" " movq (%1), %%mm0\n" " punpckldq (%1), %%mm0\n" "1:\n" " movntq %%mm0, (%0,%%eax)\n" " movntq %%mm0, 8(%0,%%eax)\n" " movntq %%mm0, 16(%0,%%eax)\n" " movntq %%mm0, 24(%0,%%eax)\n" " add $32, %%eax\n" " decl %%ecx\n" " jne 1b\n" " sfence\n" " emms\n" : "+r" (dest), "+r" (src) : "c" (n/8) : "eax"); } OIL_DEFINE_IMPL_FULL (splat_u32_ns_i386_mmx, splat_u32_ns, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); liboil-0.3.17/liboil/i386/conv_sse.c0000644000175000017500000000550710717203073013732 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include /* suboptimal */ static void conv_f64_s32_sse(double *dst, int dst_stride, int32_t *src, int src_stride, int n) { int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #define F1(x, y, z) (z ^ (x & (y ^ z))) #define F2(x, y, z) F1(z, x, y) #define F3(x, y, z) (x ^ y ^ z) #define F4(x, y, z) (y ^ (x | ~z)) #define MD5STEP(f,w,x,y,z,in,s) \ (w += f(x,y,z) + in, w = (w<>(32-s)) + x) static void md5_asm1(uint32_t *state, uint32_t *src) { struct { void *state; void *src; void *ebp; void *ebx; }tmp; tmp.state = state; tmp.src = src; __asm__ __volatile__ ( " mov %%ebp, 0x8(%%eax)\n" " mov %%ebx, 0xc(%%eax)\n" " mov %%eax, %%ebp\n" " mov (%%ebp), %%esi\n" " mov (%%esi), %%eax\n" " mov 0x4(%%esi), %%ebx\n" " mov 0x8(%%esi), %%ecx\n" " mov 0xc(%%esi), %%edx\n" " mov 0x4(%%ebp), %%esi\n" #define STEP1(r1,r2,r3,r4,offset,constant,rotate) \ " mov %%e" #r4 "x, %%edi\n" \ " xor %%e" #r3 "x, %%edi\n" \ " and %%e" #r2 "x, %%edi\n" \ " xor %%e" #r4 "x, %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " add (" #offset "* 4)(%%esi), %%e" #r1 "x\n" \ " add $" #constant ", %%e" #r1 "x\n" \ " rol $" #rotate ", %%e" #r1 "x\n" \ " add %%e" #r2 "x, %%e" #r1 "x\n" STEP1 (a, b, c, d, 0, 0xd76aa478, 7) STEP1 (d, a, b, c, 1, 0xe8c7b756, 12) STEP1 (c, d, a, b, 2, 0x242070db, 17) STEP1 (b, c, d, a, 3, 0xc1bdceee, 22) STEP1 (a, b, c, d, 4, 0xf57c0faf, 7) STEP1 (d, a, b, c, 5, 0x4787c62a, 12) STEP1 (c, d, a, b, 6, 0xa8304613, 17) STEP1 (b, c, d, a, 7, 0xfd469501, 22) STEP1 (a, b, c, d, 8, 0x698098d8, 7) STEP1 (d, a, b, c, 9, 0x8b44f7af, 12) STEP1 (c, d, a, b, 10, 0xffff5bb1, 17) STEP1 (b, c, d, a, 11, 0x895cd7be, 22) STEP1 (a, b, c, d, 12, 0x6b901122, 7) STEP1 (d, a, b, c, 13, 0xfd987193, 12) STEP1 (c, d, a, b, 14, 0xa679438e, 17) STEP1 (b, c, d, a, 15, 0x49b40821, 22) #define STEP2(r1,r2,r3,r4,offset,constant,rotate) \ " mov %%e" #r3 "x, %%edi\n" \ " xor %%e" #r2 "x, %%edi\n" \ " and %%e" #r4 "x, %%edi\n" \ " xor %%e" #r3 "x, %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " add (" #offset "*4)(%%esi), %%e" #r1 "x\n" \ " add $" #constant ", %%e" #r1 "x\n" \ " rol $" #rotate ", %%e" #r1 "x\n" \ " add %%e" #r2 "x, %%e" #r1 "x\n" STEP2(a, b, c, d, 1, 0xf61e2562, 5) STEP2(d, a, b, c, 6, 0xc040b340, 9) STEP2(c, d, a, b, 11, 0x265e5a51, 14) STEP2(b, c, d, a, 0, 0xe9b6c7aa, 20) STEP2(a, b, c, d, 5, 0xd62f105d, 5) STEP2(d, a, b, c, 10, 0x02441453, 9) STEP2(c, d, a, b, 15, 0xd8a1e681, 14) STEP2(b, c, d, a, 4, 0xe7d3fbc8, 20) STEP2(a, b, c, d, 9, 0x21e1cde6, 5) STEP2(d, a, b, c, 14, 0xc33707d6, 9) STEP2(c, d, a, b, 3, 0xf4d50d87, 14) STEP2(b, c, d, a, 8, 0x455a14ed, 20) STEP2(a, b, c, d, 13, 0xa9e3e905, 5) STEP2(d, a, b, c, 2, 0xfcefa3f8, 9) STEP2(c, d, a, b, 7, 0x676f02d9, 14) STEP2(b, c, d, a, 12, 0x8d2a4c8a, 20) #define STEP3(r1,r2,r3,r4,offset,constant,rotate) \ " mov %%e" #r4 "x, %%edi\n" \ " xor %%e" #r3 "x, %%edi\n" \ " xor %%e" #r2 "x, %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " add (" #offset "*4)(%%esi), %%e" #r1 "x\n" \ " add $" #constant ", %%e" #r1 "x\n" \ " rol $" #rotate ", %%e" #r1 "x\n" \ " add %%e" #r2 "x, %%e" #r1 "x\n" STEP3 (a, b, c, d, 5, 0xfffa3942, 4) STEP3 (d, a, b, c, 8, 0x8771f681, 11) STEP3 (c, d, a, b, 11, 0x6d9d6122, 16) STEP3 (b, c, d, a, 14, 0xfde5380c, 23) STEP3 (a, b, c, d, 1, 0xa4beea44, 4) STEP3 (d, a, b, c, 4, 0x4bdecfa9, 11) STEP3 (c, d, a, b, 7, 0xf6bb4b60, 16) STEP3 (b, c, d, a, 10, 0xbebfbc70, 23) STEP3 (a, b, c, d, 13, 0x289b7ec6, 4) STEP3 (d, a, b, c, 0, 0xeaa127fa, 11) STEP3 (c, d, a, b, 3, 0xd4ef3085, 16) STEP3 (b, c, d, a, 6, 0x04881d05, 23) STEP3 (a, b, c, d, 9, 0xd9d4d039, 4) STEP3 (d, a, b, c, 12, 0xe6db99e5, 11) STEP3 (c, d, a, b, 15, 0x1fa27cf8, 16) STEP3 (b, c, d, a, 2, 0xc4ac5665, 23) #define STEP4(r1,r2,r3,r4,offset,constant,rotate) \ " mov %%e" #r4 "x, %%edi\n" \ " not %%edi\n" \ " or %%e" #r2 "x, %%edi\n" \ " xor %%e" #r3 "x, %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " add (" #offset "*4)(%%esi), %%e" #r1 "x\n" \ " add $" #constant ", %%e" #r1 "x\n" \ " rol $" #rotate ", %%e" #r1 "x\n" \ " add %%e" #r2 "x, %%e" #r1 "x\n" STEP4 (a, b, c, d, 0, 0xf4292244, 6) STEP4 (d, a, b, c, 7, 0x432aff97, 10) STEP4 (c, d, a, b, 14, 0xab9423a7, 15) STEP4 (b, c, d, a, 5, 0xfc93a039, 21) STEP4 (a, b, c, d, 12, 0x655b59c3, 6) STEP4 (d, a, b, c, 3, 0x8f0ccc92, 10) STEP4 (c, d, a, b, 10, 0xffeff47d, 15) STEP4 (b, c, d, a, 1, 0x85845dd1, 21) STEP4 (a, b, c, d, 8, 0x6fa87e4f, 6) STEP4 (d, a, b, c, 15, 0xfe2ce6e0, 10) STEP4 (c, d, a, b, 6, 0xa3014314, 15) STEP4 (b, c, d, a, 13, 0x4e0811a1, 21) STEP4 (a, b, c, d, 4, 0xf7537e82, 6) STEP4 (d, a, b, c, 11, 0xbd3af235, 10) STEP4 (c, d, a, b, 2, 0x2ad7d2bb, 15) STEP4 (b, c, d, a, 9, 0xeb86d391, 21) " mov (%%ebp), %%edi\n" " add %%eax, 0x0(%%edi)\n" " add %%ebx, 0x4(%%edi)\n" " add %%ecx, 0x8(%%edi)\n" " add %%edx, 0xc(%%edi)\n" " mov 0xc(%%ebp), %%ebx\n" " mov 0x8(%%ebp), %%ebp\n" : : "a" (&tmp) : "esi", "ecx", "edx", "edi", "memory"); } #undef STEP1 #undef STEP2 #undef STEP3 #undef STEP4 OIL_DEFINE_IMPL (md5_asm1, md5); static void md5_asm2(uint32_t *state, uint32_t *src) { struct { void *state; void *src; void *ebp; void *ebx; }tmp; tmp.state = state; tmp.src = src; asm ( " mov %%ebp, 0x8(%%eax)\n" " mov %%ebx, 0xc(%%eax)\n" " mov %%eax, %%ebp\n" " mov (%%ebp), %%esi\n" " mov (%%esi), %%eax\n" " mov 0x4(%%esi), %%ebx\n" " mov 0x8(%%esi), %%ecx\n" " mov 0xc(%%esi), %%edx\n" " mov 0x4(%%ebp), %%esi\n" #define STEP1(r1,r2,r3,r4,offset,constant,rotate) \ " mov %%e" #r4 "x, %%edi\n" \ " xor %%e" #r3 "x, %%edi\n" \ " and %%e" #r2 "x, %%edi\n" \ " xor %%e" #r4 "x, %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " mov (" #offset "* 4)(%%esi), %%edi\n" \ " add $" #constant ", %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " rol $" #rotate ", %%e" #r1 "x\n" \ " add %%e" #r2 "x, %%e" #r1 "x\n" STEP1 (a, b, c, d, 0, 0xd76aa478, 7) STEP1 (d, a, b, c, 1, 0xe8c7b756, 12) STEP1 (c, d, a, b, 2, 0x242070db, 17) STEP1 (b, c, d, a, 3, 0xc1bdceee, 22) STEP1 (a, b, c, d, 4, 0xf57c0faf, 7) STEP1 (d, a, b, c, 5, 0x4787c62a, 12) STEP1 (c, d, a, b, 6, 0xa8304613, 17) STEP1 (b, c, d, a, 7, 0xfd469501, 22) STEP1 (a, b, c, d, 8, 0x698098d8, 7) STEP1 (d, a, b, c, 9, 0x8b44f7af, 12) STEP1 (c, d, a, b, 10, 0xffff5bb1, 17) STEP1 (b, c, d, a, 11, 0x895cd7be, 22) STEP1 (a, b, c, d, 12, 0x6b901122, 7) STEP1 (d, a, b, c, 13, 0xfd987193, 12) STEP1 (c, d, a, b, 14, 0xa679438e, 17) STEP1 (b, c, d, a, 15, 0x49b40821, 22) #define STEP2(r1,r2,r3,r4,offset,constant,rotate) \ " mov %%e" #r3 "x, %%edi\n" \ " xor %%e" #r2 "x, %%edi\n" \ " and %%e" #r4 "x, %%edi\n" \ " xor %%e" #r3 "x, %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " mov (" #offset "* 4)(%%esi), %%edi\n" \ " add $" #constant ", %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " rol $" #rotate ", %%e" #r1 "x\n" \ " add %%e" #r2 "x, %%e" #r1 "x\n" STEP2(a, b, c, d, 1, 0xf61e2562, 5) STEP2(d, a, b, c, 6, 0xc040b340, 9) STEP2(c, d, a, b, 11, 0x265e5a51, 14) STEP2(b, c, d, a, 0, 0xe9b6c7aa, 20) STEP2(a, b, c, d, 5, 0xd62f105d, 5) STEP2(d, a, b, c, 10, 0x02441453, 9) STEP2(c, d, a, b, 15, 0xd8a1e681, 14) STEP2(b, c, d, a, 4, 0xe7d3fbc8, 20) STEP2(a, b, c, d, 9, 0x21e1cde6, 5) STEP2(d, a, b, c, 14, 0xc33707d6, 9) STEP2(c, d, a, b, 3, 0xf4d50d87, 14) STEP2(b, c, d, a, 8, 0x455a14ed, 20) STEP2(a, b, c, d, 13, 0xa9e3e905, 5) STEP2(d, a, b, c, 2, 0xfcefa3f8, 9) STEP2(c, d, a, b, 7, 0x676f02d9, 14) STEP2(b, c, d, a, 12, 0x8d2a4c8a, 20) #define STEP3(r1,r2,r3,r4,offset,constant,rotate) \ " mov %%e" #r4 "x, %%edi\n" \ " xor %%e" #r3 "x, %%edi\n" \ " xor %%e" #r2 "x, %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " mov (" #offset "* 4)(%%esi), %%edi\n" \ " add $" #constant ", %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " rol $" #rotate ", %%e" #r1 "x\n" \ " add %%e" #r2 "x, %%e" #r1 "x\n" STEP3 (a, b, c, d, 5, 0xfffa3942, 4) STEP3 (d, a, b, c, 8, 0x8771f681, 11) STEP3 (c, d, a, b, 11, 0x6d9d6122, 16) STEP3 (b, c, d, a, 14, 0xfde5380c, 23) STEP3 (a, b, c, d, 1, 0xa4beea44, 4) STEP3 (d, a, b, c, 4, 0x4bdecfa9, 11) STEP3 (c, d, a, b, 7, 0xf6bb4b60, 16) STEP3 (b, c, d, a, 10, 0xbebfbc70, 23) STEP3 (a, b, c, d, 13, 0x289b7ec6, 4) STEP3 (d, a, b, c, 0, 0xeaa127fa, 11) STEP3 (c, d, a, b, 3, 0xd4ef3085, 16) STEP3 (b, c, d, a, 6, 0x04881d05, 23) STEP3 (a, b, c, d, 9, 0xd9d4d039, 4) STEP3 (d, a, b, c, 12, 0xe6db99e5, 11) STEP3 (c, d, a, b, 15, 0x1fa27cf8, 16) STEP3 (b, c, d, a, 2, 0xc4ac5665, 23) #define STEP4(r1,r2,r3,r4,offset,constant,rotate) \ " mov %%e" #r4 "x, %%edi\n" \ " not %%edi\n" \ " or %%e" #r2 "x, %%edi\n" \ " xor %%e" #r3 "x, %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " mov (" #offset "* 4)(%%esi), %%edi\n" \ " add $" #constant ", %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " rol $" #rotate ", %%e" #r1 "x\n" \ " add %%e" #r2 "x, %%e" #r1 "x\n" STEP4 (a, b, c, d, 0, 0xf4292244, 6) STEP4 (d, a, b, c, 7, 0x432aff97, 10) STEP4 (c, d, a, b, 14, 0xab9423a7, 15) STEP4 (b, c, d, a, 5, 0xfc93a039, 21) STEP4 (a, b, c, d, 12, 0x655b59c3, 6) STEP4 (d, a, b, c, 3, 0x8f0ccc92, 10) STEP4 (c, d, a, b, 10, 0xffeff47d, 15) STEP4 (b, c, d, a, 1, 0x85845dd1, 21) STEP4 (a, b, c, d, 8, 0x6fa87e4f, 6) STEP4 (d, a, b, c, 15, 0xfe2ce6e0, 10) STEP4 (c, d, a, b, 6, 0xa3014314, 15) STEP4 (b, c, d, a, 13, 0x4e0811a1, 21) STEP4 (a, b, c, d, 4, 0xf7537e82, 6) STEP4 (d, a, b, c, 11, 0xbd3af235, 10) STEP4 (c, d, a, b, 2, 0x2ad7d2bb, 15) STEP4 (b, c, d, a, 9, 0xeb86d391, 21) " mov (%%ebp), %%edi\n" " add %%eax, 0x0(%%edi)\n" " add %%ebx, 0x4(%%edi)\n" " add %%ecx, 0x8(%%edi)\n" " add %%edx, 0xc(%%edi)\n" " mov 0xc(%%ebp), %%ebx\n" " mov 0x8(%%ebp), %%ebp\n" : : "a" (&tmp) : "esi", "ecx", "edx", "edi", "memory"); #undef STEP1 #undef STEP2 #undef STEP3 #undef STEP4 } OIL_DEFINE_IMPL_ASM (md5_asm2, md5); #ifdef ENABLE_BROKEN_IMPLS /* FIXME this is way too clever. Using %esp as a general purpose * register? NOT a brilliant idea. */ static void md5_asm3(uint32_t *state, uint32_t *src) { struct { void *state; void *src; void *ebp; void *esp; void *ebx; }tmp; tmp.state = state; tmp.src = src; asm ( " mov %%ebp, 0x8(%%eax)\n" " mov %%esp, 0xc(%%eax)\n" " mov %%ebx, 0x10(%%eax)\n" " mov %%eax, %%ebp\n" " mov (%%ebp), %%esi\n" " mov (%%esi), %%eax\n" " mov 0x4(%%esi), %%ebx\n" " mov 0x8(%%esi), %%ecx\n" " mov 0xc(%%esi), %%edx\n" " mov 0x4(%%ebp), %%esi\n" #define STEP1(r1,r2,r3,r4,offset,constant,rotate) \ " mov %%e" #r2 "x, %%edi\n" \ " mov %%e" #r2 "x, %%esp\n" \ " not %%esp\n" \ " and %%e" #r3 "x, %%edi\n" \ " and %%e" #r4 "x, %%esp\n" \ " or %%esp, %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " mov (" #offset "* 4)(%%esi), %%edi\n" \ " add $" #constant ", %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " rol $" #rotate ", %%e" #r1 "x\n" \ " add %%e" #r2 "x, %%e" #r1 "x\n" STEP1 (a, b, c, d, 0, 0xd76aa478, 7) STEP1 (d, a, b, c, 1, 0xe8c7b756, 12) STEP1 (c, d, a, b, 2, 0x242070db, 17) STEP1 (b, c, d, a, 3, 0xc1bdceee, 22) STEP1 (a, b, c, d, 4, 0xf57c0faf, 7) STEP1 (d, a, b, c, 5, 0x4787c62a, 12) STEP1 (c, d, a, b, 6, 0xa8304613, 17) STEP1 (b, c, d, a, 7, 0xfd469501, 22) STEP1 (a, b, c, d, 8, 0x698098d8, 7) STEP1 (d, a, b, c, 9, 0x8b44f7af, 12) STEP1 (c, d, a, b, 10, 0xffff5bb1, 17) STEP1 (b, c, d, a, 11, 0x895cd7be, 22) STEP1 (a, b, c, d, 12, 0x6b901122, 7) STEP1 (d, a, b, c, 13, 0xfd987193, 12) STEP1 (c, d, a, b, 14, 0xa679438e, 17) STEP1 (b, c, d, a, 15, 0x49b40821, 22) #define STEP2(r1,r2,r3,r4,offset,constant,rotate) \ " mov %%e" #r4 "x, %%edi\n" \ " mov %%e" #r4 "x, %%esp\n" \ " not %%esp\n" \ " and %%e" #r2 "x, %%edi\n" \ " and %%e" #r3 "x, %%esp\n" \ " or %%esp, %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " mov (" #offset "* 4)(%%esi), %%edi\n" \ " add $" #constant ", %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " rol $" #rotate ", %%e" #r1 "x\n" \ " add %%e" #r2 "x, %%e" #r1 "x\n" STEP2(a, b, c, d, 1, 0xf61e2562, 5) STEP2(d, a, b, c, 6, 0xc040b340, 9) STEP2(c, d, a, b, 11, 0x265e5a51, 14) STEP2(b, c, d, a, 0, 0xe9b6c7aa, 20) STEP2(a, b, c, d, 5, 0xd62f105d, 5) STEP2(d, a, b, c, 10, 0x02441453, 9) STEP2(c, d, a, b, 15, 0xd8a1e681, 14) STEP2(b, c, d, a, 4, 0xe7d3fbc8, 20) STEP2(a, b, c, d, 9, 0x21e1cde6, 5) STEP2(d, a, b, c, 14, 0xc33707d6, 9) STEP2(c, d, a, b, 3, 0xf4d50d87, 14) STEP2(b, c, d, a, 8, 0x455a14ed, 20) STEP2(a, b, c, d, 13, 0xa9e3e905, 5) STEP2(d, a, b, c, 2, 0xfcefa3f8, 9) STEP2(c, d, a, b, 7, 0x676f02d9, 14) STEP2(b, c, d, a, 12, 0x8d2a4c8a, 20) #define STEP3(r1,r2,r3,r4,offset,constant,rotate) \ " mov %%e" #r4 "x, %%edi\n" \ " xor %%e" #r3 "x, %%edi\n" \ " xor %%e" #r2 "x, %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " mov (" #offset "* 4)(%%esi), %%edi\n" \ " add $" #constant ", %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " rol $" #rotate ", %%e" #r1 "x\n" \ " add %%e" #r2 "x, %%e" #r1 "x\n" STEP3 (a, b, c, d, 5, 0xfffa3942, 4) STEP3 (d, a, b, c, 8, 0x8771f681, 11) STEP3 (c, d, a, b, 11, 0x6d9d6122, 16) STEP3 (b, c, d, a, 14, 0xfde5380c, 23) STEP3 (a, b, c, d, 1, 0xa4beea44, 4) STEP3 (d, a, b, c, 4, 0x4bdecfa9, 11) STEP3 (c, d, a, b, 7, 0xf6bb4b60, 16) STEP3 (b, c, d, a, 10, 0xbebfbc70, 23) STEP3 (a, b, c, d, 13, 0x289b7ec6, 4) STEP3 (d, a, b, c, 0, 0xeaa127fa, 11) STEP3 (c, d, a, b, 3, 0xd4ef3085, 16) STEP3 (b, c, d, a, 6, 0x04881d05, 23) STEP3 (a, b, c, d, 9, 0xd9d4d039, 4) STEP3 (d, a, b, c, 12, 0xe6db99e5, 11) STEP3 (c, d, a, b, 15, 0x1fa27cf8, 16) STEP3 (b, c, d, a, 2, 0xc4ac5665, 23) #define STEP4(r1,r2,r3,r4,offset,constant,rotate) \ " mov %%e" #r4 "x, %%edi\n" \ " not %%edi\n" \ " or %%e" #r2 "x, %%edi\n" \ " xor %%e" #r3 "x, %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " mov (" #offset "* 4)(%%esi), %%edi\n" \ " add $" #constant ", %%edi\n" \ " add %%edi, %%e" #r1 "x\n" \ " rol $" #rotate ", %%e" #r1 "x\n" \ " add %%e" #r2 "x, %%e" #r1 "x\n" STEP4 (a, b, c, d, 0, 0xf4292244, 6) STEP4 (d, a, b, c, 7, 0x432aff97, 10) STEP4 (c, d, a, b, 14, 0xab9423a7, 15) STEP4 (b, c, d, a, 5, 0xfc93a039, 21) STEP4 (a, b, c, d, 12, 0x655b59c3, 6) STEP4 (d, a, b, c, 3, 0x8f0ccc92, 10) STEP4 (c, d, a, b, 10, 0xffeff47d, 15) STEP4 (b, c, d, a, 1, 0x85845dd1, 21) STEP4 (a, b, c, d, 8, 0x6fa87e4f, 6) STEP4 (d, a, b, c, 15, 0xfe2ce6e0, 10) STEP4 (c, d, a, b, 6, 0xa3014314, 15) STEP4 (b, c, d, a, 13, 0x4e0811a1, 21) STEP4 (a, b, c, d, 4, 0xf7537e82, 6) STEP4 (d, a, b, c, 11, 0xbd3af235, 10) STEP4 (c, d, a, b, 2, 0x2ad7d2bb, 15) STEP4 (b, c, d, a, 9, 0xeb86d391, 21) " mov (%%ebp), %%edi\n" " add %%eax, 0x0(%%edi)\n" " add %%ebx, 0x4(%%edi)\n" " add %%ecx, 0x8(%%edi)\n" " add %%edx, 0xc(%%edi)\n" " mov 0x10(%%ebp), %%ebx\n" " mov 0xc(%%ebp), %%esp\n" " mov 0x8(%%ebp), %%ebp\n" : : "a" (&tmp) : "esi", "ecx", "edx", "edi"); #undef STEP1 #undef STEP2 #undef STEP3 #undef STEP4 } OIL_DEFINE_IMPL_ASM (md5_asm3, md5); #endif liboil-0.3.17/liboil/i386/argb_paint_i386.c0000644000175000017500000000561110717203073014766 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include OIL_DECLARE_CLASS (argb_paint_u8); #define div255(x) (((x + 128) + ((x + 128)>>8))>>8) #define blend(x,y,a) div255((x)*(a) + (y)*(255-(a))) static short constants[][4] = { { 255, 255, 255, 255 }, { 128, 128, 128, 128 } }; static void argb_paint_u8_mmx (uint8_t *dest, uint8_t *color, uint8_t *alpha, int n) { if (n<1)return; asm volatile ( " pxor %%mm0, %%mm0\n" " movq (%1), %%mm3\n" " punpcklbw %%mm0, %%mm3\n" " movl $0, %1\n" "1:\n" " movq (%0), %%mm1\n" " punpcklbw %%mm0, %%mm1\n" " movb (%2), %%al\n" " je 4f\n" " cmpl $255, %1\n" " jne 2f\n" " movq %%mm3, %%mm2\n" " jmp 3f\n" "2:\n" " movd %1, %%mm2\n" " pshufw $0x00, %%mm2, %%mm2\n" " movq 0(%4), %%mm4\n" " psubw %%mm2, %%mm4\n" " pmullw %%mm1, %%mm4\n" " pmullw %%mm3, %%mm2\n" " paddw %%mm4, %%mm2\n" " paddw 8(%4), %%mm2\n" " movq %%mm2, %%mm1\n" " psrlw $8, %%mm1\n" " paddw %%mm1, %%mm2\n" " psrlw $8, %%mm2\n" "3: \n" " packuswb %%mm0, %%mm2\n" " movd %%mm2, (%0)\n" "4:\n" " add $4, %0\n" " add $1, %2\n" " decl %3\n" " jne 1b\n" " emms\n" : "+r" (dest), "+a" (color), "+r" (alpha), "+r" (n) : "r" (&constants)); } OIL_DEFINE_IMPL_FULL (argb_paint_u8_mmx, argb_paint_u8, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); liboil-0.3.17/liboil/i386/recon8x8_i386.c0000644000175000017500000001533010717203073014335 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include OIL_DECLARE_CLASS (recon8x8_intra); OIL_DECLARE_CLASS (recon8x8_inter); OIL_DECLARE_CLASS (recon8x8_inter2); const uint8_t c0x80[8] = { 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80 }; static void recon8x8_intra_i386_mmx (uint8_t *dest, int ds, int16_t *change) { __asm__ __volatile__ ( " movq (%3), %%mm0 \n\t" /* Set mm0 to 0x8080808080808080 */ " lea 128(%1), %%edi \n\t" /* Endpoint in input buffer */ "1: \n\t" " movq (%1), %%mm2 \n\t" /* First four input values */ " packsswb 8(%1), %%mm2 \n\t" /* pack with next(high) four values */ " por %%mm0, %%mm0 \n\t" " pxor %%mm0, %%mm2 \n\t" /* Convert result to unsigned (same as add 128) */ " lea 16(%1), %1 \n\t" /* Step source buffer */ " cmp %%edi, %1 \n\t" /* are we done */ " movq %%mm2, (%0) \n\t" /* store results */ " lea (%0, %2), %0 \n\t" /* Step output buffer */ " jc 1b \n\t" /* Loop back if we are not done */ " emms \n\t" : "+r" (dest) : "r" (change), "r" (ds), "r" (c0x80) : "memory", "edi" ); } OIL_DEFINE_IMPL_FULL (recon8x8_intra_i386_mmx, recon8x8_intra, OIL_IMPL_FLAG_MMX); #if 0 static void recon8x8_inter_i386_mmx (uint8_t *dest, int ds, uint8_t *src, int ss, int16_t *change) { /* FIXME doesn't handle ss */ __asm__ __volatile__ ( " pxor %%mm0, %%mm0 \n\t" " lea 128(%1), %%edi \n\t" "1: \n\t" " movq (%2), %%mm2 \n\t" /* (+3 misaligned) 8 reference pixels */ " movq (%1), %%mm4 \n\t" /* first 4 changes */ " movq %%mm2, %%mm3 \n\t" " movq 8(%1), %%mm5 \n\t" /* last 4 changes */ " punpcklbw %%mm0, %%mm2 \n\t" /* turn first 4 refs into positive 16-bit #s */ " paddsw %%mm4, %%mm2 \n\t" /* add in first 4 changes */ " punpckhbw %%mm0, %%mm3 \n\t" /* turn last 4 refs into positive 16-bit #s */ " paddsw %%mm5, %%mm3 \n\t" /* add in last 4 changes */ " add %3, %2 \n\t" /* next row of reference pixels */ " packuswb %%mm3, %%mm2 \n\t" /* pack result to unsigned 8-bit values */ " lea 16(%1), %1 \n\t" /* next row of changes */ " cmp %%edi, %1 \n\t" /* are we done? */ " movq %%mm2, (%0) \n\t" /* store result */ " lea (%0, %3), %0 \n\t" /* next row of output */ " jc 1b \n\t" " emms \n\t" : "+r" (dest) : "r" (change), "r" (src), "r" (ds) : "memory", "edi" ); } OIL_DEFINE_IMPL_FULL (recon8x8_inter_i386_mmx, recon8x8_inter, OIL_IMPL_FLAG_MMX); static void recon8x8_inter2_i386_mmx (uint8_t *dest, int ds, uint8_t *s1, int ss1, uint8_t *s2, int ss2, int16_t *change) { /* FIXME doesn't handle ss1, ss2 */ __asm__ __volatile__ ( " pxor %%mm0, %%mm0 \n\t" " lea 128(%1), %%edi \n\t" "1: \n\t" " movq (%2), %%mm2 \n\t" /* (+3 misaligned) 8 reference pixels */ " movq (%3), %%mm4 \n\t" /* (+3 misaligned) 8 reference pixels */ " movq %%mm2, %%mm3 \n\t" " punpcklbw %%mm0, %%mm2 \n\t" /* mm2 = start ref1 as positive 16-bit #s */ " movq %%mm4, %%mm5 \n\t" " movq (%1), %%mm6 \n\t" /* first 4 changes */ " punpckhbw %%mm0, %%mm3 \n\t" /* mm3 = end ref1 as positive 16-bit #s */ " movq 8(%1), %%mm7 \n\t" /* last 4 changes */ " punpcklbw %%mm0, %%mm4 \n\t" /* mm4 = start ref2 as positive 16-bit #s */ " punpckhbw %%mm0, %%mm5 \n\t" /* mm5 = end ref2 as positive 16-bit #s */ " paddw %%mm4, %%mm2 \n\t" /* mm2 = start (ref1 + ref2) */ " paddw %%mm5, %%mm3 \n\t" /* mm3 = end (ref1 + ref2) */ " psrlw $1, %%mm2 \n\t" /* mm2 = start (ref1 + ref2)/2 */ " psrlw $1, %%mm3 \n\t" /* mm3 = end (ref1 + ref2)/2 */ " paddw %%mm6, %%mm2 \n\t" /* add changes to start */ " paddw %%mm7, %%mm3 \n\t" /* add changes to end */ " lea 16(%1), %1 \n\t" /* next row of changes */ " packuswb %%mm3, %%mm2 \n\t" /* pack start|end to unsigned 8-bit */ " add %4, %2 \n\t" /* next row of reference pixels */ " add %4, %3 \n\t" /* next row of reference pixels */ " movq %%mm2, (%0) \n\t" /* store result */ " add %4, %0 \n\t" /* next row of output */ " cmp %%edi, %1 \n\t" /* are we done? */ " jc 1b \n\t" " emms \n\t" : "+r" (dest) : "r" (change), "r" (s1), "r" (s2), "m" (ds) : "memory", "edi" ); } OIL_DEFINE_IMPL_FULL (recon8x8_inter2_i386_mmx, recon8x8_inter2, OIL_IMPL_FLAG_MMX); #endif liboil-0.3.17/liboil/i386/composite_i386.c0000644000175000017500000006263010717203073014666 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include OIL_DECLARE_CLASS (composite_in_argb); OIL_DECLARE_CLASS (composite_in_argb_const_src); OIL_DECLARE_CLASS (composite_in_argb_const_mask); OIL_DECLARE_CLASS (composite_over_argb); OIL_DECLARE_CLASS (composite_over_argb_const_src); OIL_DECLARE_CLASS (composite_add_argb); OIL_DECLARE_CLASS (composite_add_argb_const_src); OIL_DECLARE_CLASS (composite_in_over_argb); OIL_DECLARE_CLASS (composite_in_over_argb_const_src); OIL_DECLARE_CLASS (composite_in_over_argb_const_mask); #if 0 static void composite_in_argb_mmx (uint32_t *dest, uint32_t *src, uint8_t *mask, int n) { int i; for(i=0;i>=1; if (n>0){ __asm__ __volatile__ ("\n" "3:\n" #if 0 " movl (%1), %%eax\n" " orl 4(%1), %%eax\n" " testl $0xff000000, %%eax\n" " jz 4f\n" #endif " movq (%1), %%xmm1\n" " punpcklbw %%xmm7, %%xmm1\n" " pshuflw $0xff, %%xmm1, %%xmm0\n" " pshufhw $0xff, %%xmm0, %%xmm0\n" " pxor %%xmm5, %%xmm0\n" " movq (%0), %%xmm3\n" " punpcklbw %%xmm7, %%xmm3\n" " pmullw %%xmm0, %%xmm3\n" " paddw %%xmm6, %%xmm3\n" " pmulhuw %%xmm4, %%xmm3\n" " paddw %%xmm1, %%xmm3\n" " packuswb %%xmm3, %%xmm3\n" " movq %%xmm3, (%0)\n" "4:\n" " addl $8, %0\n" " addl $8, %1\n" " subl $1, %2\n" " jnz 3b\n" :"+r" (dest), "+r" (src), "+r" (n) : :"eax"); } } OIL_DEFINE_IMPL_FULL (composite_over_argb_sse2_2, composite_over_argb, OIL_IMPL_FLAG_SSE2); /* written for shaun */ static void composite_over_argb_sse2_3 (uint32_t *dest, uint32_t *src, int n) { int begin; int middle; int end; __asm__ __volatile__ (" pxor %%xmm7, %%xmm7\n" // mm7 = { 0, 0, 0, 0 } " movl $0x80808080, %%eax\n" " movd %%eax, %%xmm6\n" // mm6 = { 128, 128, 128, 128 } " punpcklbw %%xmm7, %%xmm6\n" " punpcklwd %%xmm6, %%xmm6\n" " movl $0xffffffff, %%eax\n" // mm5 = { 255, 255, 255, 255 } " movd %%eax, %%xmm5\n" " punpcklbw %%xmm7, %%xmm5\n" " punpcklwd %%xmm5, %%xmm5\n" " movl $0x02020202, %%eax\n" " movd %%eax, %%xmm4\n" " punpcklbw %%xmm7, %%xmm4\n" " paddw %%xmm5, %%xmm4\n" // mm4 = { 257, 257, 257, 257 } " punpcklwd %%xmm4, %%xmm4\n" : : :"eax"); begin = 0x3 & (4 - (((unsigned long)dest & 0xf) >> 2)); if (begin>n) { begin = n; middle = 0; end = 0; } else { middle = (n-begin)>>2; end = n - begin - middle*4; } if (begin>0) { __asm__ __volatile__ ("\n" "1:\n" " movl (%1), %%eax\n" " testl $0xff000000, %%eax\n" " jz 2f\n" " movd (%1), %%xmm1\n" " punpcklbw %%xmm7, %%xmm1\n" " pshuflw $0xff, %%xmm1, %%xmm0\n" " pxor %%xmm5, %%xmm0\n" " movd (%0), %%xmm3\n" " punpcklbw %%xmm7, %%xmm3\n" " pmullw %%xmm0, %%xmm3\n" " paddw %%xmm6, %%xmm3\n" " pmulhuw %%xmm4, %%xmm3\n" " paddw %%xmm1, %%xmm3\n" " packuswb %%xmm3, %%xmm3\n" " movd %%xmm3, (%0)\n" "2:\n" " addl $4, %0\n" " addl $4, %1\n" " subl $1, %2\n" " jnz 1b\n" :"+r" (dest), "+r" (src), "+r" (begin) : :"eax"); } if (middle>0){ __asm__ __volatile__ ("\n" "1:\n" " movq (%1), %%xmm1\n" " movq 8(%1), %%xmm0\n" " movl (%1), %%eax\n" " orl 4(%1), %%eax\n" " orl 8(%1), %%eax\n" " orl 12(%1), %%eax\n" " test $0xff000000, %%eax\n" " jz 2f\n" " punpcklbw %%xmm7, %%xmm1\n" " punpcklbw %%xmm7, %%xmm0\n" " pshuflw $0xff, %%xmm1, %%xmm1\n" " pshuflw $0xff, %%xmm0, %%xmm0\n" " pshufhw $0xff, %%xmm1, %%xmm1\n" " pshufhw $0xff, %%xmm0, %%xmm0\n" " pxor %%xmm5, %%xmm1\n" " pxor %%xmm5, %%xmm0\n" " movq (%0), %%xmm3\n" " movq 8(%0), %%xmm2\n" " punpcklbw %%xmm7, %%xmm3\n" " punpcklbw %%xmm7, %%xmm2\n" " pmullw %%xmm1, %%xmm3\n" " paddw %%xmm6, %%xmm3\n" " pmulhuw %%xmm4, %%xmm3\n" " pmullw %%xmm0, %%xmm2\n" " paddw %%xmm6, %%xmm2\n" " pmulhuw %%xmm4, %%xmm2\n" " packuswb %%xmm2, %%xmm3\n" " movdqu (%1), %%xmm1\n" " paddb %%xmm1, %%xmm3\n" " movdqa %%xmm3, (%0)\n" "2:\n" " addl $16, %0\n" " addl $16, %1\n" " subl $1, %2\n" " jnz 1b\n" :"+r" (dest), "+r" (src), "+r" (middle) : :"eax"); } if (end>0) { __asm__ __volatile__ ("\n" "1:\n" " movl (%1), %%eax\n" " testl $0xff000000, %%eax\n" " jz 2f\n" " movd (%1), %%xmm1\n" " punpcklbw %%xmm7, %%xmm1\n" " pshuflw $0xff, %%xmm1, %%xmm0\n" " pxor %%xmm5, %%xmm0\n" " movd (%0), %%xmm3\n" " punpcklbw %%xmm7, %%xmm3\n" " pmullw %%xmm0, %%xmm3\n" " paddw %%xmm6, %%xmm3\n" " pmulhuw %%xmm4, %%xmm3\n" " paddw %%xmm1, %%xmm3\n" " packuswb %%xmm3, %%xmm3\n" " movd %%xmm3, (%0)\n" "2:\n" " addl $4, %0\n" " addl $4, %1\n" " subl $1, %2\n" " jnz 1b\n" :"+r" (dest), "+r" (src), "+r" (end) : :"eax"); } } OIL_DEFINE_IMPL_FULL (composite_over_argb_sse2_3, composite_over_argb, OIL_IMPL_FLAG_SSE2); static void composite_over_argb_const_src_mmx (uint32_t *dest, uint32_t *src, int n) { __asm__ __volatile__ ( MMX_LOAD_CONSTANTS " movl (%1), %%eax\n" " movd %%eax, %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0xff, %%mm0, %%mm3\n" " pxor %%mm5, %%mm3\n" "1:\n" " movq %%mm3, %%mm1\n" " movd (%0), %%mm2\n" " punpcklbw %%mm7, %%mm2\n" MMX_MULDIV255(mm2, mm1) " paddw %%mm0, %%mm2\n" " packuswb %%mm2, %%mm2\n" " movd %%mm2, (%0)\n" " addl $4, %0\n" " decl %2\n" " jnz 1b\n" " emms\n" :"+r" (dest), "+r" (src), "+r" (n) : :"eax"); } OIL_DEFINE_IMPL_FULL (composite_over_argb_const_src_mmx, composite_over_argb_const_src, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); static void composite_add_argb_mmx (uint32_t *dest, uint32_t *src, int n) { __asm__ __volatile__ ( "1:\n" " movd (%1), %%mm0\n" " movd (%0), %%mm2\n" " paddusb %%mm0, %%mm2\n" " movd %%mm2, (%0)\n" " addl $4, %0\n" " addl $4, %1\n" " decl %2\n" " jnz 1b\n" " emms\n" :"+r" (dest), "+r" (src), "+r" (n) : :"eax"); } OIL_DEFINE_IMPL_FULL (composite_add_argb_mmx, composite_add_argb, OIL_IMPL_FLAG_MMX); static void composite_add_argb_const_src_mmx (uint32_t *dest, uint32_t *src, int n) { __asm__ __volatile__ ( " movd (%1), %%mm0\n" "1:\n" " movd (%0), %%mm2\n" " paddusb %%mm0, %%mm2\n" " movd %%mm2, (%0)\n" " addl $4, %0\n" " decl %2\n" " jnz 1b\n" " emms\n" :"+r" (dest), "+r" (src), "+r" (n) : :"eax"); } OIL_DEFINE_IMPL_FULL (composite_add_argb_const_src_mmx, composite_add_argb_const_src, OIL_IMPL_FLAG_MMX); static void composite_in_over_argb_mmx (uint32_t *dest, uint32_t *src, uint8_t *mask, int n) { __asm__ __volatile__ ( MMX_LOAD_CONSTANTS "1:\n" " movd (%2), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x00, %%mm0, %%mm1\n" " movd (%1), %%mm2\n" " punpcklbw %%mm7, %%mm2\n" MMX_MULDIV255(mm2, mm1) " movd (%0), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0xff, %%mm2, %%mm1\n" " pxor %%mm5, %%mm1\n" MMX_MULDIV255(mm0, mm1) " paddw %%mm0, %%mm2\n" " packuswb %%mm2, %%mm2\n" " movd %%mm2, (%0)\n" " addl $4, %0\n" " addl $4, %1\n" " addl $1, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" :"+r" (dest), "+r" (src), "+r" (mask), "+r" (n) : :"eax"); } OIL_DEFINE_IMPL_FULL (composite_in_over_argb_mmx, composite_in_over_argb, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); static void composite_in_over_argb_const_src_mmx (uint32_t *dest, uint32_t *src, uint8_t *mask, int n) { __asm__ __volatile__ ( MMX_LOAD_CONSTANTS " movd (%1), %%mm3\n" " punpcklbw %%mm7, %%mm3\n" "1:\n" " movd (%2), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x00, %%mm0, %%mm1\n" " movq %%mm3, %%mm2\n" MMX_MULDIV255(mm2, mm1) " movd (%0), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0xff, %%mm2, %%mm1\n" " pxor %%mm5, %%mm1\n" MMX_MULDIV255(mm0, mm1) " paddw %%mm0, %%mm2\n" " packuswb %%mm2, %%mm2\n" " movd %%mm2, (%0)\n" " addl $4, %0\n" " addl $1, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" :"+r" (dest), "+r" (src), "+r" (mask), "+r" (n) : :"eax"); } OIL_DEFINE_IMPL_FULL (composite_in_over_argb_const_src_mmx, composite_in_over_argb_const_src, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); static void composite_in_over_argb_const_mask_mmx (uint32_t *dest, uint32_t *src, uint8_t *mask, int n) { __asm__ __volatile__ ( MMX_LOAD_CONSTANTS " movd (%2), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x00, %%mm0, %%mm3\n" "1:\n" " movd (%1), %%mm2\n" " punpcklbw %%mm7, %%mm2\n" " movq %%mm3, %%mm1\n" MMX_MULDIV255(mm2, mm1) " movd (%0), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0xff, %%mm2, %%mm1\n" " pxor %%mm5, %%mm1\n" MMX_MULDIV255(mm0, mm1) " paddw %%mm0, %%mm2\n" " packuswb %%mm2, %%mm2\n" " movd %%mm2, (%0)\n" " addl $4, %0\n" " addl $4, %1\n" " decl %3\n" " jnz 1b\n" " emms\n" :"+r" (dest), "+r" (src), "+r" (mask), "+r" (n) : :"eax"); } OIL_DEFINE_IMPL_FULL (composite_in_over_argb_const_mask_mmx, composite_in_over_argb_const_mask, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); liboil-0.3.17/liboil/i386/ayuv2argb_i386.c0000644000175000017500000000722310717203073014563 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #if 0 static int16_t matrix[][4] = { { 0, 0, -8192, -8192 }, { 16384, 0, 0, 0 }, { 0, 16384, 16384, 16384 }, { 0, 0, -5638, 29032 }, { 0, 22970, -11700, 0 }, { 0, 0, 0, 0 } #if 0 { 0, 0, 0, 0 }, { 16384, 0, 0, 0 }, { 0, 16384, 0, 0, }, { 0, 0, 16384, 0, }, { 0, 0, 0, 16384, }, { 0, 0, 0, 0 } #endif }; #endif static void colorspace_argb_mmx (uint32_t *argb, uint32_t *ayuv, int16_t *matrix, int n) { asm volatile ( " sub $48, %%esp\n" " pshufw $0x1b, 0(%3), %%mm0\n" " movq %%mm0, 0(%%esp)\n" " pshufw $0x1b, 8(%3), %%mm0\n" " movq %%mm0, 8(%%esp)\n" " pshufw $0x1b, 16(%3), %%mm0\n" " movq %%mm0, 16(%%esp)\n" " pshufw $0x1b, 16(%3), %%mm0\n" " movq %%mm0, 16(%%esp)\n" " pshufw $0x1b, 24(%3), %%mm0\n" " movq %%mm0, 24(%%esp)\n" " pshufw $0x1b, 32(%3), %%mm0\n" " movq %%mm0, 32(%%esp)\n" " pshufw $0x1b, 40(%3), %%mm7\n" " pxor %%mm0, %%mm0\n" " mov $0x08080808, %%eax\n" " movd %%eax, %%mm1\n" " punpcklbw %%mm0, %%mm1\n" " paddw %%mm1, %%mm7\n" "1:\n" " movd (%1), %%mm1\n" " add $4, %1\n" " punpcklbw %%mm0, %%mm1\n" " psllw $6, %%mm1\n" " paddw 0(%%esp), %%mm1\n" " pshufw $0x00, %%mm1, %%mm4\n" " pshufw $0x55, %%mm1, %%mm3\n" " pshufw $0xaa, %%mm1, %%mm2\n" " pshufw $0xff, %%mm1, %%mm1\n" " pmulhw 8(%%esp), %%mm1\n" " pmulhw 16(%%esp), %%mm2\n" " pmulhw 24(%%esp), %%mm3\n" " pmulhw 32(%%esp), %%mm4\n" " paddsw %%mm2, %%mm1\n" " paddsw %%mm4, %%mm3\n" " paddsw %%mm3, %%mm1\n" " paddsw %%mm7, %%mm1\n" " psraw $4, %%mm1\n" " packuswb %%mm0, %%mm1\n" " movd %%mm1, (%0)\n" " add $4, %0\n" " decl %2\n" " jne 1b\n" " emms\n" " add $48, %%esp\n" : "+r" (argb), "+r" (ayuv), "+r" (n) : "r" (matrix) : "eax" ); } OIL_DEFINE_IMPL_FULL (colorspace_argb_mmx, colorspace_argb, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); liboil-0.3.17/liboil/i386/Makefile.am0000644000175000017500000000067511066773257014022 00000000000000 noinst_LTLIBRARIES = libi386.la libi386_la_SOURCES = \ argb_paint_i386.c \ ayuv2argb_i386.c \ composite_i386.c \ copy8x8_i386.c \ diff8x8_i386.c \ error8x8_i386.c \ md5_i386.c \ mult8x8_i386.c \ recon8x8_i386.c \ rowcolsad8x8_i386.c \ sad8x8avg_i386.c \ splat_i386.c \ trans8x8_i386.c \ wavelet.c if USE_NEW_ABI else libi386_la_SOURCES += \ abs_i386.c \ conv_sse.c \ conv_3dnow.c endif libi386_la_CFLAGS = $(LIBOIL_CFLAGS) liboil-0.3.17/liboil/i386/abs_i386.c0000644000175000017500000002145010717203073013424 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #define ABS(x) ((x)>0 ? (x) : -(x)) #if 0 static void abs_u16_s16_i386asm (uint16_t * dest, int dstr, int16_t * src, int sstr, int n) { __asm__ __volatile__ ("\n" " .p2align 4,,15 \n" "1: movswl (%0), %%eax \n" " addl $2, %0 \n" " movl %%eax, %%edx \n" " negl %%edx \n" " cmpl $-1, %%eax \n" " cmovle %%edx, %%eax \n" " movw %%ax, (%1) \n" " addl $2, %1 \n" " decl %2 \n" " testl %2, %2 \n" " jg 1b \n":"+r" (src), "+r" (dest), "+r" (n) ::"eax", "edx"); } OIL_DEFINE_IMPL_FULL (abs_u16_s16_i386asm, abs_u16_s16, OIL_IMPL_FLAG_CMOV); #endif #if 0 /* The previous function after running through uberopt */ static void abs_u16_s16_i386asm_uber4 (uint16_t * dest, int dstr, int16_t * src, int sstr, int n) { __asm__ __volatile__ ("\n" " .p2align 4,,15 \n" "1: \n" " movswl (%0), %%eax \n" /* UBER 0: */ " addl $2, %0 \n" /* UBER 1: 0 */ " movl %%eax, %%edx \n" /* UBER 2: 0 */ " decl %2 \n" /* UBER 7: */ " negl %%edx \n" /* UBER 3: 2 */ " cmpl $-1, %%eax ; cmovle %%edx, %%eax \n" /* UBER 4: 3 */ " movw %%ax, (%1) \n" /* UBER 5: 4 */ " addl $2, %1 \n" /* UBER 6: 5 */ " testl %2, %2 \n" " jg 1b \n" :"+r" (src), "+r" (dest), "+r" (n) ::"eax", "edx"); } OIL_DEFINE_IMPL_FULL (abs_u16_s16_i386asm_uber4, abs_u16_s16, OIL_IMPL_FLAG_CMOV); #endif #if 0 static void abs_u16_s16_i386asm2 (uint16_t * dest, int dstr, int16_t * src, int sstr, int n) { __asm__ __volatile__ ("\n" " pushl %%ebp \n" " movl %%eax, %%ebp \n" " .p2align 4,,15 \n" "1: movswl (%%edi), %%eax \n" " addl $2, %%edi \n" " movl %%eax, %%edx \n" " negl %%edx \n" " cmpl $-1, %%eax \n" " cmovle %%edx, %%eax \n" " movw %%ax, (%%ebp) \n" " addl $2, %%ebp \n" " decl %2 \n" " testl %2, %2 \n" " jg 1b \n" " popl %%ebp \n":"+D" (src), "+a" (dest), "+S" (n) ::"ecx", "edx"); } OIL_DEFINE_IMPL_FULL (abs_u16_s16_i386asm2, abs_u16_s16, OIL_IMPL_FLAG_CMOV); #endif static void abs_u16_s16_i386asm3 (uint16_t * dest, int dstr, int16_t * src, int sstr, int n) { __asm__ __volatile__ ("\n" " .p2align 4,,15 \n" "1: movswl (%1), %%eax \n" " add %3, %1 \n" " mov %%eax, %%edx \n" " sar $0xf, %%ax \n" " and %%edx, %%eax \n" " add %%eax, %%eax \n" " sub %%eax, %%edx \n" " mov %%dx, (%0) \n" " add %4, %0 \n" " decl %2 \n" " jne 1b \n" : "+r" (dest), "+r" (src), "+m" (n) : "m" (dstr), "m" (sstr) : "eax", "edx"); } OIL_DEFINE_IMPL_ASM (abs_u16_s16_i386asm3, abs_u16_s16); static void abs_u16_s16_mmx (uint16_t * dest, int dstr, int16_t * src, int sstr, int n) { static const int16_t p[][4] = { { -32768, -32768, -32768, -32768 }, { 32767, 32767, 32767, 32767 } }; int16_t tmp[4]; while (n & 3) { *dest = ABS (*src); OIL_INCREMENT (dest, dstr); OIL_INCREMENT (src, sstr); n--; } n /= 4; __asm__ __volatile__ ("\n" " movq (%0), %%mm2 \n" " movq 8(%0), %%mm3 \n" :: "r" (p)); while (n--) { tmp[0] = *src; OIL_INCREMENT (src, sstr); tmp[1] = *src; OIL_INCREMENT (src, sstr); tmp[2] = *src; OIL_INCREMENT (src, sstr); tmp[3] = *src; OIL_INCREMENT (src, sstr); __asm__ __volatile__ ("\n" " movq (%0), %%mm1 \n" " movq %%mm1, %%mm0 \n" " paddsw %%mm2, %%mm0 \n" " paddsw %%mm3, %%mm1 \n" " psubsw %%mm2, %%mm0 \n" " psubsw %%mm3, %%mm1 \n" " psubw %%mm1, %%mm0 \n" " movq %%mm0, (%0) \n" : : "r" (tmp) : "memory" ); *dest = tmp[0]; OIL_INCREMENT (dest, dstr); *dest = tmp[1]; OIL_INCREMENT (dest, dstr); *dest = tmp[2]; OIL_INCREMENT (dest, dstr); *dest = tmp[3]; OIL_INCREMENT (dest, dstr); } asm volatile ("emms"); } OIL_DEFINE_IMPL_FULL (abs_u16_s16_mmx, abs_u16_s16, OIL_IMPL_FLAG_MMX); #if 0 static void abs_u16_s16_mmxx (uint16_t * dest, int dstr, int16_t * src, int sstr, int n) { short p[] = { -32768, -32768, -32768, -32768, 32767, 32767, 32767, 32767 }; while (n & 7) { *dest = ABS (*src); OIL_INCREMENT (dest, dstr); OIL_INCREMENT (src, sstr); n--; } n /= 8; __asm__ __volatile__ ("\n" " movq (%3), %%mm2 \n" " movq 8(%3), %%mm3 \n" " .p2align 4,,15 \n" "1: movq (%%edi), %%mm0 \n" " movq (%%edi), %%mm1 \n" " paddsw %%mm2, %%mm0 \n" " paddsw %%mm3, %%mm1 \n" " psubsw %%mm2, %%mm0 \n" " psubsw %%mm3, %%mm1 \n" " psubw %%mm1, %%mm0 \n" " movq %%mm0, (%%eax) \n" " movq 8(%%edi), %%mm4 \n" " movq 8(%%edi), %%mm5 \n" " addl $16, %%edi \n" " paddsw %%mm2, %%mm4 \n" " paddsw %%mm3, %%mm5 \n" " psubsw %%mm2, %%mm4 \n" " psubsw %%mm3, %%mm5 \n" " psubw %%mm5, %%mm4 \n" " movq %%mm4, 8(%%eax) \n" " addl $16, %%eax \n" " decl %2 \n" " testl %2, %2 \n" " jg 1b \n":"+D" (src), "+a" (dest), "+S" (n) :"c" (p)); asm volatile ("emms"); } OIL_DEFINE_IMPL_FULL (abs_u16_s16_mmxx, abs_u16_s16, OIL_IMPL_FLAG_MMX); #endif #ifdef ENABLE_BROKEN_IMPLS static void abs_u16_s16_mmx2 (uint16_t * dest, int dstr, int16_t * src, int sstr, int n) { while (n & 7) { *dest = ABS (*src); OIL_INCREMENT (dest, dstr); OIL_INCREMENT (src, sstr); n--; } n /= 8; __asm__ __volatile__ ("\n" " pushl %%ebp \n" " movl %%eax, %%ebp \n" " .p2align 4,,15 \n" "1: movq (%%edi), %%mm0 \n" " pxor %%mm1, %%mm1 \n" " movq 8(%%edi), %%mm2 \n" " addl $16, %%edi \n" " psubw %%mm0, %%mm1 \n" " pxor %%mm3, %%mm3 \n" " pmaxsw %%mm0, %%mm1 \n" " psubw %%mm2, %%mm3 \n" " movq %%mm1, (%%ebp) \n" " pmaxsw %%mm2, %%mm3 \n" " movq %%mm3, 8(%%ebp) \n" " addl $16, %%ebp \n" " decl %2 \n" " testl %2, %2 \n" " jg 1b \n" " popl %%ebp \n":"+D" (src), "+a" (dest), "+S" (n) ::"ecx", "edx"); asm volatile ("emms"); } OIL_DEFINE_IMPL_FULL (abs_u16_s16_mmx2, abs_u16_s16, OIL_IMPL_FLAG_MMXEXT); #endif #ifdef ENABLE_BROKEN_IMPLS static void abs_u16_s16_sse2 (uint16_t * dest, int dstr, int16_t * src, int sstr, int n) { while (n & 7) { *dest = ABS (*src); OIL_INCREMENT (dest, dstr); OIL_INCREMENT (src, sstr); n--; } n /= 8; __asm__ __volatile__ ("\n" " pushl %%ebp \n" " movl %%eax, %%ebp \n" " .p2align 4,,15 \n" "1: movq (%%edi), %%xmm0 \n" " addl $16, %%edi \n" " pxor %%xmm1, %%xmm1 \n" " psubw %%xmm0, %%xmm1 \n" " pmaxsw %%xmm0, %%xmm1 \n" " movq %%xmm1, (%%ebp) \n" " addl $16, %%ebp \n" " decl %2 \n" " testl %2, %2 \n" " jg 1b \n" " popl %%ebp \n":"+D" (src), "+a" (dest), "+S" (n) ::"ecx", "edx"); } OIL_DEFINE_IMPL_FULL (abs_u16_s16_sse2, abs_u16_s16, OIL_IMPL_FLAG_SSE2); #endif liboil-0.3.17/liboil/i386/mult8x8_i386.c0000644000175000017500000001035010717203073014205 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include static void mult8x8_s16_mmx(int16_t *dest, int16_t *src1, int16_t *src2, int dstr, int sstr1, int sstr2) { asm volatile( " movq 0(%1), %%mm0 \n" " pmullw 0(%2), %%mm0 \n" " movq %%mm0, 0(%0) \n" " movq 8(%1), %%mm1 \n" " pmullw 8(%2), %%mm1 \n" " movq %%mm1, 8(%0) \n" " add %3, %0 \n" " add %4, %1 \n" " add %5, %2 \n" " movq 0(%1), %%mm0 \n" " pmullw 0(%2), %%mm0 \n" " movq %%mm0, 0(%0) \n" " movq 8(%1), %%mm1 \n" " pmullw 8(%2), %%mm1 \n" " movq %%mm1, 8(%0) \n" " add %3, %0 \n" " add %4, %1 \n" " add %5, %2 \n" " movq 0(%1), %%mm0 \n" " pmullw 0(%2), %%mm0 \n" " movq %%mm0, 0(%0) \n" " movq 8(%1), %%mm1 \n" " pmullw 8(%2), %%mm1 \n" " movq %%mm1, 8(%0) \n" " add %3, %0 \n" " add %4, %1 \n" " add %5, %2 \n" " movq 0(%1), %%mm0 \n" " pmullw 0(%2), %%mm0 \n" " movq %%mm0, 0(%0) \n" " movq 8(%1), %%mm1 \n" " pmullw 8(%2), %%mm1 \n" " movq %%mm1, 8(%0) \n" " add %3, %0 \n" " add %4, %1 \n" " add %5, %2 \n" " movq 0(%1), %%mm0 \n" " pmullw 0(%2), %%mm0 \n" " movq %%mm0, 0(%0) \n" " movq 8(%1), %%mm1 \n" " pmullw 8(%2), %%mm1 \n" " movq %%mm1, 8(%0) \n" " add %3, %0 \n" " add %4, %1 \n" " add %5, %2 \n" " movq 0(%1), %%mm0 \n" " pmullw 0(%2), %%mm0 \n" " movq %%mm0, 0(%0) \n" " movq 8(%1), %%mm1 \n" " pmullw 8(%2), %%mm1 \n" " movq %%mm1, 8(%0) \n" " add %3, %0 \n" " add %4, %1 \n" " add %5, %2 \n" " movq 0(%1), %%mm0 \n" " pmullw 0(%2), %%mm0 \n" " movq %%mm0, 0(%0) \n" " movq 8(%1), %%mm1 \n" " pmullw 8(%2), %%mm1 \n" " movq %%mm1, 8(%0) \n" " add %3, %0 \n" " add %4, %1 \n" " add %5, %2 \n" " movq 0(%1), %%mm0 \n" " pmullw 0(%2), %%mm0 \n" " movq %%mm0, 0(%0) \n" " movq 8(%1), %%mm1 \n" " pmullw 8(%2), %%mm1 \n" " movq %%mm1, 8(%0) \n" " emms\n " : "+r" (dest), "+r" (src1), "+r" (src2) : "m" (dstr), "m" (sstr1), "m" (sstr2)); } OIL_DEFINE_IMPL_FULL (mult8x8_s16_mmx, mult8x8_s16, OIL_IMPL_FLAG_MMX); liboil-0.3.17/liboil/i386/conv_3dnow.c0000644000175000017500000000575410717203073014176 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include /* suboptimal */ static void conv_f32_s16_3dnow (float *dst, int dst_stride, int16_t * src, int src_stride, int n) { int i; for (i = 0; i < n; i++) { asm volatile (" movswl 0(%0), %%eax \n" " movd %%eax, %%mm0 \n" " pi2fd %%mm0, %%mm0 \n" " movd %%mm0, 0(%1) \n" ::"r" (src), "r" (dst) :"eax"); dst = OIL_OFFSET (dst, dst_stride); src = OIL_OFFSET (src, src_stride); } asm volatile ("emms"); } OIL_DEFINE_IMPL_FULL (conv_f32_s16_3dnow, conv_f32_s16, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_3DNOW); #ifdef ENABLE_BROKEN_IMPLS /* suboptimal */ /* This appears to fail because of differences in rounding of half * integers. */ static void conv_s32_f32_3dnow (int32_t * dst, int dst_stride, float *src, int src_stride, int n) { int i; const float constants[][2] = { { 0.5, 0.5}, {-1.0, -1.0} }; for (i = 0; i < n; i++) { asm volatile ( " movq 0(%0), %%mm0 \n" " pxor %%mm1, %%mm1 \n" " pfcmpgt %%mm0, %%mm1 \n" " movq %%mm0, %%mm2 \n" " pfadd 0(%2), %%mm0 \n" " pfcmpeq %%mm0, %%mm2 \n" " pandn %%mm1, %%mm2 \n" " pf2id %%mm0, %%mm0 \n" " paddd %%mm2, %%mm0 \n" " movd %%mm0, 0(%1) \n" : :"r" (src), "r" (dst), "r" (constants) ); dst = OIL_OFFSET (dst, dst_stride); src = OIL_OFFSET (src, src_stride); } asm volatile ("emms"); } OIL_DEFINE_IMPL_FULL (conv_s32_f32_3dnow, conv_s32_f32, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_3DNOW); #endif liboil-0.3.17/liboil/i386/copy8x8_i386.c0000644000175000017500000000517010717203073014202 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include OIL_DECLARE_CLASS(copy8x8_u8); static void copy8x8_u8_mmx (uint8_t *dest, int dstr, uint8_t *src, int sstr) { __asm__ __volatile__ ( " lea (%2, %2, 2), %%edi \n\t" " movq (%1), %%mm0 \n\t" " movq (%1, %2), %%mm1 \n\t" " movq (%1, %2, 2), %%mm2 \n\t" " movq (%1, %%edi), %%mm3 \n\t" " lea (%1, %2, 4), %1 \n\t" " movq %%mm0, (%0) \n\t" " movq %%mm1, (%0, %2) \n\t" " movq %%mm2, (%0, %2, 2) \n\t" " movq %%mm3, (%0, %%edi) \n\t" " lea (%0, %2, 4), %0 \n\t" " movq (%1), %%mm0 \n\t" " movq (%1, %2), %%mm1 \n\t" " movq (%1, %2, 2), %%mm2 \n\t" " movq (%1, %%edi), %%mm3 \n\t" " movq %%mm0, (%0) \n\t" " movq %%mm1, (%0, %2) \n\t" " movq %%mm2, (%0, %2, 2) \n\t" " movq %%mm3, (%0, %%edi) \n\t" " emms \n\t" : "+a" (dest) : "c" (src), "r" (sstr), "r" (dstr) : "memory", "edi" ); } OIL_DEFINE_IMPL_FULL (copy8x8_u8_mmx, copy8x8_u8, OIL_IMPL_FLAG_MMX); liboil-0.3.17/liboil/i386/trans8x8_i386.c0000644000175000017500000001714510717203073014364 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include OIL_DECLARE_CLASS(trans8x8_u16); /* this could use additional work. */ static void trans8x8_u16_mmx (uint16_t *dest, int dstr, uint16_t *src, int sstr) { asm volatile ( " leal (%3,%3,2),%%eax \n" // UBER 0: " movq (%1), %%mm0 \n" // UBER 1: " movq (%1,%3,2), %%mm2 \n" // UBER 2: " movq %%mm0, %%mm4 \n" // UBER 3: 1 " movq %%mm2, %%mm5 \n" // UBER 4: 2 " punpcklwd (%1,%3), %%mm0 \n" // UBER 5: 1 " punpcklwd (%1,%%eax), %%mm2 \n" // UBER 6: 0 2 " punpckhwd (%1,%3), %%mm4 \n" // UBER 7: 3 " punpckhwd (%1,%%eax), %%mm5 \n" // UBER 8: 4 " movq %%mm0, %%mm1 \n" // UBER 9: 5 " movq %%mm4, %%mm3 \n" // UBER 10: 7 " punpckldq %%mm2, %%mm0 \n" // UBER 11: 5 6 " punpckldq %%mm5, %%mm4 \n" // UBER 12: 7 8 " punpckhdq %%mm2, %%mm1 \n" // UBER 13: 6 9 " punpckhdq %%mm5, %%mm3 \n" // UBER 14: 9 10 " leal (%2,%2,2),%%eax \n" // UBER 15: 8 " movq %%mm0, 0(%0) \n" // UBER 16: 11 " movq %%mm1, (%0,%2) \n" // UBER 17: 13 " movq %%mm4, (%0,%2,2) \n" // UBER 18: 12 " movq %%mm3, (%0,%%eax) \n" // UBER 19: 14 15 " leal (%3,%3,2),%%eax \n" " movq 8(%1), %%mm0 \n" " movq 8(%1,%3,2), %%mm2 \n" " movq %%mm0, %%mm4 \n" " movq %%mm2, %%mm5 \n" " punpcklwd 8(%1,%3), %%mm0 \n" " punpcklwd 8(%1,%%eax), %%mm2 \n" " punpckhwd 8(%1,%3), %%mm4 \n" " punpckhwd 8(%1,%%eax), %%mm5 \n" " movq %%mm0, %%mm1 \n" " movq %%mm4, %%mm3 \n" " punpckldq %%mm2, %%mm0 \n" " punpckldq %%mm5, %%mm4 \n" " punpckhdq %%mm2, %%mm1 \n" " punpckhdq %%mm5, %%mm3 \n" " leal (%2,%2,2),%%eax \n" " leal (%0,%2,4),%0 \n" " movq %%mm0, 0(%0) \n" " movq %%mm1, (%0,%2) \n" " movq %%mm4, (%0,%2,2) \n" " movq %%mm3, (%0,%%eax) \n" " leal (%1,%3,4),%1 \n" " leal (%3,%3,2),%%eax \n" " movq 0(%1), %%mm0 \n" " movq 0(%1,%3,2), %%mm2 \n" " movq %%mm0, %%mm4 \n" " movq %%mm2, %%mm5 \n" " punpcklwd 0(%1,%3), %%mm0 \n" " punpcklwd 0(%1,%%eax), %%mm2 \n" " punpckhwd 0(%1,%3), %%mm4 \n" " punpckhwd 0(%1,%%eax), %%mm5 \n" " movq %%mm0, %%mm1 \n" " movq %%mm4, %%mm3 \n" " punpckldq %%mm2, %%mm0 \n" " punpckldq %%mm5, %%mm4 \n" " punpckhdq %%mm2, %%mm1 \n" " punpckhdq %%mm5, %%mm3 \n" " leal (%2,%2,2),%%eax \n" " neg %2 \n" " leal (%0,%2,4),%0 \n" " neg %2 \n" " movq %%mm0, 8(%0) \n" " movq %%mm1, 8(%0,%2) \n" " movq %%mm4, 8(%0,%2,2) \n" " movq %%mm3, 8(%0,%%eax) \n" " leal (%3,%3,2),%%eax \n" " movq 8(%1), %%mm0 \n" " movq 8(%1,%3,2), %%mm2 \n" " movq %%mm0, %%mm4 \n" " movq %%mm2, %%mm5 \n" " punpcklwd 8(%1,%3), %%mm0 \n" " punpcklwd 8(%1,%%eax), %%mm2 \n" " punpckhwd 8(%1,%3), %%mm4 \n" " punpckhwd 8(%1,%%eax), %%mm5 \n" " movq %%mm0, %%mm1 \n" " movq %%mm4, %%mm3 \n" " punpckldq %%mm2, %%mm0 \n" " punpckldq %%mm5, %%mm4 \n" " punpckhdq %%mm2, %%mm1 \n" " punpckhdq %%mm5, %%mm3 \n" " leal (%2,%2,2),%%eax \n" " leal (%0,%2,4),%0 \n" " movq %%mm0, 8(%0) \n" " movq %%mm1, 8(%0,%2) \n" " movq %%mm4, 8(%0,%2,2) \n" " movq %%mm3, 8(%0,%%eax) \n" " emms \n" : "+r" (dest), "+r" (src), "+r" (dstr), "+r" (sstr) : : "eax"); } OIL_DEFINE_IMPL_FULL (trans8x8_u16_mmx, trans8x8_u16, OIL_IMPL_FLAG_MMX); static void trans8x8_u16_asm1 (uint16_t *dest, int dstr, uint16_t *src, int sstr) { int saved_ebx = 0; asm ( " movl %%ebx, %4 \n" " movl %0, %%ecx \n" " movl %2, %%ebx \n" " movl %1, %%edx \n" " lea (%%ecx,%%edx,8), %%esi \n" " sub %%edx, %%esi\n " " movl $7, %%edi \n" "1: \n" " mov (%%ebx), %%ax \n" " mov %%ax,(%%ecx) \n" " mov 2(%%ebx), %%ax \n" " mov %%ax,(%%ecx,%%edx,1) \n" " mov 4(%%ebx), %%ax \n" " mov %%ax,(%%ecx,%%edx,2) \n" " mov 8(%%ebx), %%ax \n" " mov %%ax,(%%ecx,%%edx,4) \n" " neg %%edx \n" " mov 6(%%ebx), %%ax \n" " mov %%ax,(%%esi,%%edx,4) \n" " mov 10(%%ebx), %%ax \n" " mov %%ax,(%%esi,%%edx,2) \n" " mov 12(%%ebx), %%ax \n" " mov %%ax,(%%esi,%%edx,1) \n" " mov 14(%%ebx), %%ax \n" " mov %%ax,(%%esi) \n" " neg %%edx \n" " add %3, %%ebx \n" " add $2, %%ecx \n" " add $2, %%esi \n" " dec %%edi \n" " jge 1b \n" " movl %4, %%ebx \n" : : "m" (dest), "m" (dstr), "m" (src), "m" (sstr), "m" (saved_ebx) : "eax", "ecx", "edx", "esi", "edi"); } OIL_DEFINE_IMPL (trans8x8_u16_asm1, trans8x8_u16); static void trans8x8_u16_asm2 (uint16_t *dest, int dstr, uint16_t *src, int sstr) { int i; int saved_ebx = 0; asm ( " movl %%ebx, %5 \n" " movl %0, %%ecx \n" " movl %2, %%ebx \n" " movl %1, %%edx \n" " lea (%%ecx,%%edx,8), %%esi \n" " sub %%edx, %%esi\n " " movl $7, %4 \n" " movl %%edx, %%edi \n" " negl %%edi \n" "1: \n" " movl (%%ebx), %%eax \n" " mov %%ax,(%%ecx) \n" " shr $16, %%eax \n" " mov %%ax,(%%ecx,%%edx,1) \n" " movl 4(%%ebx), %%eax \n" " mov %%ax,(%%ecx,%%edx,2) \n" " shr $16, %%eax \n" " mov %%ax,(%%esi,%%edi,4) \n" " movl 8(%%ebx), %%eax \n" " mov %%ax,(%%ecx,%%edx,4) \n" " shr $16, %%eax \n" " mov %%ax,(%%esi,%%edi,2) \n" " movl 12(%%ebx), %%eax \n" " mov %%ax,(%%esi,%%edi,1) \n" " shr $16, %%eax \n" " mov %%ax,(%%esi) \n" " add %3, %%ebx \n" " add $2, %%ecx \n" " add $2, %%esi \n" " decl %4 \n" " jge 1b \n" " movl %5, %%ebx \n" : : "m" (dest), "m" (dstr), "m" (src), "m" (sstr), "m" (i), "m" (saved_ebx) : "eax", "ecx", "edx", "esi", "edi"); } OIL_DEFINE_IMPL (trans8x8_u16_asm2, trans8x8_u16); liboil-0.3.17/liboil/i386/wavelet.c0000644000175000017500000014566411067011142013564 00000000000000 #include #include void split_53_nomix (int16_t *d_2xn, int16_t *s_2xn, int n) { int i; if (n == 0) return; /* predict */ for(i=1;i> 1); } d_2xn[n*2-1] = s_2xn[n*2-1] - s_2xn[n*2-2]; /* update */ d_2xn[0] = s_2xn[0] + (d_2xn[1] >> 1); for(i=2;i> 2); } } OIL_DEFINE_IMPL (split_53_nomix, split_53); #if 0 void synth_53_nomix (int16_t *d_2xn, int16_t *s_2xn, int n) { int i; /* predict */ i_n[0] -= i_n[1] >> 1; for(i=2;i> 2; } /* update */ for(i=1;i> 1; } i_n[n*2-1] += i_n[n*2-2]; } #endif void split_53_c (int16_t *d_2xn, int16_t *s_2xn, int n) { int i; if (n == 0) return; if (n == 1) { d_2xn[1] = s_2xn[1] - s_2xn[0]; d_2xn[0] = s_2xn[0] + (d_2xn[1] >> 1); } else { d_2xn[1] = s_2xn[1] - ((s_2xn[0] + s_2xn[2]) >> 1); d_2xn[0] = s_2xn[0] + (d_2xn[1] >> 1); d_2xn+=2; s_2xn+=2; for(i=0;i<(n*2-4)/2;i++){ d_2xn[1] = s_2xn[1] - ((s_2xn[0] + s_2xn[2]) >> 1); d_2xn[0] = s_2xn[0] + ((d_2xn[-1] + d_2xn[1]) >> 2); d_2xn+=2; s_2xn+=2; } d_2xn[1] = s_2xn[1] - s_2xn[0]; d_2xn[0] = s_2xn[0] + ((d_2xn[-1] + d_2xn[1]) >> 2); } } OIL_DEFINE_IMPL (split_53_c, split_53); void synth_53_c (int16_t *d_2xn, int16_t *s_2xn, int n) { int i; if (n == 0) return; if (n == 1) { d_2xn[0] = s_2xn[0] - (s_2xn[1] >> 1); d_2xn[1] = s_2xn[1] + d_2xn[0]; } else { d_2xn[0] = s_2xn[0] - (s_2xn[1] >> 1); for(i=2;i> 2); d_2xn[i-1] = s_2xn[i-1] + ((d_2xn[i] + d_2xn[i-2]) >> 1); } d_2xn[n*2-2] = s_2xn[n*2-2] - ((s_2xn[n*2-3] + s_2xn[n*2-1]) >> 2); d_2xn[n*2-3] = s_2xn[n*2-3] + ((d_2xn[n*2-2] + d_2xn[n*2-4]) >> 1); d_2xn[n*2-1] = s_2xn[n*2-1] + d_2xn[n*2-2]; } } OIL_DEFINE_IMPL (synth_53_c, synth_53); void deinterleave2_c_1 (int16_t *d1, int16_t *d2, int16_t *s_2xn, int n) { int i; for(i=0;i>12); d++; s1++; s2++; s3++; n--; } if (n==0) return; val = ((*(uint16_t *)s4)<<16) | (*(uint16_t *)s4); n>>=2; asm volatile ("\n" " mov %4, %%ecx\n" " movd %%ecx, %%mm7\n" " punpcklwd %%mm7, %%mm7\n" " mov %5, %%ecx\n" "1:\n" " movq 0(%2), %%mm0\n" " paddsw 0(%3), %%mm0\n" " movq %%mm0, %%mm1\n" " pmullw %%mm7, %%mm0\n" " pmulhw %%mm7, %%mm1\n" " psrlw $12, %%mm0\n" " psllw $4, %%mm1\n" " por %%mm1, %%mm0\n" " paddsw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " add $8, %3\n" " decl %%ecx\n" " jne 1b\n" " emms\n" : "+r" (d), "+r" (s1), "+r" (s2), "+r" (s3) : "m" (val), "m" (n) : "ecx"); } OIL_DEFINE_IMPL_FULL (lift_add_mult_shift12_i386_mmx, lift_add_mult_shift12, OIL_IMPL_FLAG_MMX); void interleave2_mmx (int16_t *d_2xn, int16_t *s1, int16_t *s2, int n) { while (n&3) { d_2xn[0] = s1[0]; d_2xn[1] = s2[0]; s1++; s2++; d_2xn+=2; n--; } if (n==0) return; asm volatile ("\n" " xor %%ecx, %%ecx\n" "1:\n" " movq (%1,%%ecx,2), %%mm0\n" " movq (%2,%%ecx,2), %%mm1\n" " movq %%mm0, %%mm2\n" " punpckhwd %%mm1, %%mm0\n" " punpcklwd %%mm1, %%mm2\n" " movq %%mm2, (%0,%%ecx,4)\n" " movq %%mm0, 8(%0,%%ecx,4)\n" " add $4, %%ecx\n" " cmp %3, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d_2xn), "+r" (s1), "+r" (s2) : "m" (n) : "eax", "ecx"); } OIL_DEFINE_IMPL_FULL (interleave2_mmx, interleave2_s16, OIL_IMPL_FLAG_MMX); void lift_add_shift1_mmx (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n) { while (n&3) { d[0] = s1[0] + ((s2[0] + s3[0])>>1); d++; s1++; s2++; s3++; n--; } if (n==0) return; asm volatile ("\n" " xor %%ecx, %%ecx\n" "1:\n" " movq (%2,%%ecx,2), %%mm1\n" " movq (%3,%%ecx,2), %%mm2\n" " paddw %%mm2, %%mm1\n" " psraw $1, %%mm1\n" " paddw (%1,%%ecx,2), %%mm1\n" " movq %%mm1, (%0,%%ecx,2)\n" " add $4, %%ecx\n" " cmp %4, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d), "+r" (s1), "+r" (s2), "+r" (s3) : "m" (n) : "ecx"); } OIL_DEFINE_IMPL_FULL (lift_add_shift1_mmx, lift_add_shift1, OIL_IMPL_FLAG_MMX); void lift_sub_shift1_mmx (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n) { while (n&3) { d[0] = s1[0] - ((s2[0] + s3[0])>>1); d++; s1++; s2++; s3++; n--; } if (n==0) return; asm volatile ("\n" " xor %%ecx, %%ecx\n" "1:\n" " movq (%2,%%ecx,2), %%mm1\n" " movq (%3,%%ecx,2), %%mm2\n" " movq (%1,%%ecx,2), %%mm0\n" " paddw %%mm2, %%mm1\n" " psraw $1, %%mm1\n" " psubw %%mm1, %%mm0\n" " movq %%mm0, (%0,%%ecx,2)\n" " add $4, %%ecx\n" " cmp %4, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d), "+r" (s1), "+r" (s2), "+r" (s3) : "m" (n) : "ecx"); } OIL_DEFINE_IMPL_FULL (lift_sub_shift1_mmx, lift_sub_shift1, OIL_IMPL_FLAG_MMX); void lift_add_shift2_mmx (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n) { while (n&3) { d[0] = s1[0] + ((s2[0] + s3[0])>>2); d++; s1++; s2++; s3++; n--; } if (n==0) return; asm volatile ("\n" " xor %%ecx, %%ecx\n" "1:\n" " movq (%2,%%ecx,2), %%mm1\n" " movq (%3,%%ecx,2), %%mm2\n" " paddw %%mm2, %%mm1\n" " psraw $2, %%mm1\n" " paddw (%1,%%ecx,2), %%mm1\n" " movq %%mm1, (%0,%%ecx,2)\n" " add $4, %%ecx\n" " cmp %4, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d), "+r" (s1), "+r" (s2), "+r" (s3) : "m" (n) : "ecx"); } OIL_DEFINE_IMPL_FULL (lift_add_shift2_mmx, lift_add_shift2, OIL_IMPL_FLAG_MMX); void lift_sub_shift2_mmx (int16_t *d, int16_t *s1, int16_t *s2, int16_t *s3, int n) { while (n&3) { d[0] = s1[0] - ((s2[0] + s3[0])>>2); d++; s1++; s2++; s3++; n--; } if (n==0) return; asm volatile ("\n" " xor %%ecx, %%ecx\n" "1:\n" " movq (%2,%%ecx,2), %%mm1\n" " movq (%3,%%ecx,2), %%mm2\n" " movq (%1,%%ecx,2), %%mm0\n" " paddw %%mm2, %%mm1\n" " psraw $2, %%mm1\n" " psubw %%mm1, %%mm0\n" " movq %%mm0, (%0,%%ecx,2)\n" " add $4, %%ecx\n" " cmp %4, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d), "+r" (s1), "+r" (s2), "+r" (s3) : "m" (n) : "ecx"); } OIL_DEFINE_IMPL_FULL (lift_sub_shift2_mmx, lift_sub_shift2, OIL_IMPL_FLAG_MMX); #ifdef ENABLE_BROKEN_IMPLS void synth_53_mmx (int16_t *d_2xn, int16_t *s_2xn, int n) { int i; if (n==0) return; if (n == 1) { d_2xn[0] = s_2xn[0] - (s_2xn[1] >> 1); d_2xn[1] = s_2xn[1] + d_2xn[0]; } else { int i; d_2xn[0] = s_2xn[0] - (s_2xn[1] >> 1); if (n > 6) { n-=5; asm volatile ("\n" " xor %%ecx, %%ecx\n" " movw 2(%1), %%ecx\n" " movd %%ecx, %%mm7\n" " movw 0(%0), %%ecx\n" " movd %%ecx, %%mm6\n" " movw 0(%1), %%ecx\n" " movd %%ecx, %%mm5\n" " xor %%ecx, %%ecx\n" "1:\n" " movq 4(%1,%%ecx,4), %%mm1\n" // mm1 = s5 s4 s3 s2 " movq %%mm1, %%mm2\n" // mm2 = s5 s4 s3 s2 " movq 12(%1,%%ecx,4), %%mm0\n" // mm0 = s9 s8 s7 s6 " punpcklwd %%mm0, %%mm1\n" // mm1 = s7 s3 s6 s2 " punpckhwd %%mm0, %%mm2\n" // mm2 = s9 s5 s8 s4 " movq %%mm1, %%mm0\n" // mm0 = s7 s3 s6 s2 " punpcklwd %%mm2, %%mm0\n" // mm0 = s8 s6 s4 s2 " punpckhwd %%mm2, %%mm1\n" // mm1 = s9 s7 s5 s3 //" movq %%mm0, %%mm3\n" // mm0 = s8 s6 s4 s2 " movq %%mm1, %%mm2\n" // mm2 = s9 s7 s5 s3 " psllq $16, %%mm2\n" // mm2 = s7 s5 s3 00 " por %%mm7, %%mm2\n" // mm2 = s7 s5 s3 s1 " movq %%mm2, %%mm4\n" // mm4 = s7 s5 s3 s1 " paddw %%mm1, %%mm2\n" // mm2 = s9+s7 ... " psraw $2, %%mm2\n" // mm2 = (s9+s7)>>2 ... " movq %%mm1, %%mm7\n" // mm7 = s9 s7 s5 s3 " psrlq $48, %%mm7\n" // mm7 = 00 00 00 s9 " psubw %%mm2, %%mm0\n" // mm0 = d8 d6 d4 d2 " movq %%mm0, %%mm1\n" // mm1 = d8 d6 d4 d2 " movq %%mm0, %%mm3\n" // mm1 = d8 d6 d4 d2 " psllq $16, %%mm0\n" // mm0 = d6 d4 d2 00 " por %%mm6, %%mm0\n" // mm0 = d6 d4 d2 d0 " psrlq $48, %%mm1\n" // mm1 = 00 00 00 d8 " movq %%mm1, %%mm6\n" // mm6 = 00 00 00 d8 " movq %%mm0, %%mm1\n" " paddw %%mm3, %%mm1\n" // mm0 = d8+d6 ... " psraw $1, %%mm1\n" // mm1 = (d8+d6)>>1 ... " paddw %%mm4, %%mm1\n" // mm1 = d7 d5 d3 d1 " movq %%mm1, %%mm2\n" " movq %%mm0, %%mm1\n" " punpcklwd %%mm2, %%mm0\n" " punpckhwd %%mm2, %%mm1\n" " movq %%mm0, (%0, %%ecx, 4)\n" " movq %%mm1, 8(%0, %%ecx, 4)\n" " add $4, %%ecx\n" " cmp %3, %%ecx\n" " jl 1b\n" " emms\n" : "+r" (d_2xn), "+r" (s_2xn), "+ecx" (i) : "m" (n)); i*=2; n+=5; d_2xn[i] = s_2xn[i] - ((s_2xn[i-1] + s_2xn[i+1]) >> 2); i+=2; } else { i = 2; } for(;i> 2); d_2xn[i-1] = s_2xn[i-1] + ((d_2xn[i] + d_2xn[i-2]) >> 1); } d_2xn[n*2-2] = s_2xn[n*2-2] - ((s_2xn[n*2-3] + s_2xn[n*2-1]) >> 2); d_2xn[n*2-3] = s_2xn[n*2-3] + ((d_2xn[n*2-2] + d_2xn[n*2-4]) >> 1); d_2xn[n*2-1] = s_2xn[n*2-1] + d_2xn[n*2-2]; } } OIL_DEFINE_IMPL_FULL (synth_53_mmx, synth_53, OIL_IMPL_FLAG_MMX); #endif void mas2_add_s16_mmx (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { int shift = s4_2[1]; while (n&3) { int x; x = s4_2[0] + s2[0]*s3_2[0] + s2[1]*s3_2[1]; x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; n--; } if (n==0) return; n>>=2; asm volatile ("\n" " movzwl 0(%0), %%ecx\n" " movd %%ecx, %%mm7\n" " pshufw $0x00, %%mm7, %%mm7\n" " movzwl 2(%0), %%ecx\n" " movd %%ecx, %%mm6\n" " pshufw $0x00, %%mm6, %%mm6\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm5\n" " pshufw $0x44, %%mm5, %%mm5\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" // mm0 = s0, s1, s2, s3 " movq 0(%2), %%mm1\n" // mm1 = s0, s1, s2, s3 " pmullw %%mm7, %%mm0\n" // mm0 = lo(s0*a0), lo(s1*a0), ... " pmulhw %%mm7, %%mm1\n" // mm1 = hi(s0*a0), hi(s1*a0), ... " movq %%mm0, %%mm2\n" // mm2 = lo(s0*a0), lo(s1*a0), ... " punpcklwd %%mm1, %%mm0\n" // mm0 = s0*a0, s1*a0 " punpckhwd %%mm1, %%mm2\n" // mm2 = s2*a0, s3*a0 " movq %%mm2, %%mm1\n" // mm1 = s2*a0, s3*a0 " movq 2(%2), %%mm2\n" " movq 2(%2), %%mm3\n" " pmullw %%mm6, %%mm2\n" " pmulhw %%mm6, %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" // mm2 = s1*a1, s2*a1 " punpckhwd %%mm3, %%mm4\n" // mm4 = s3*a1, s4*a1 " movq %%mm4, %%mm3\n" // mm3 = s3*a1, s4*a1 " paddd %%mm3, %%mm1\n" // mm1 = s2*a0 + s3*a1, ... " paddd %%mm2, %%mm0\n" // mm0 = s0*a0 + s1*a1, ... " paddd %%mm5, %%mm1\n" // mm1 = s2*a0 + s3*a1 + offset, ... " paddd %%mm5, %%mm0\n" // mm0 = s0*a0 + s1*a1 + offset, ... " movd %4, %%mm4\n" " psrad %%mm4, %%mm1\n" // mm1 = (s2*a0 + s3*a1 + offset)>>shift, ... " psrad %%mm4, %%mm0\n" // mm0 = (s0*a0 + s1*a1 + offset)>>shift, ... " packssdw %%mm1, %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : "r" (shift) ); } OIL_DEFINE_IMPL_FULL (mas2_add_s16_mmx, mas2_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #if 0 void mas2_add_s16_lim_mmx (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { int shift = s4_2[1]; while (n&3) { int x; x = s4_2[0] + s2[0]*s3_2[0] + s2[1]*s3_2[1]; x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; n--; } if (n==0) return; n>>=2; asm volatile ("\n" " movzwl 0(%0), %%ecx\n" " movd %%ecx, %%mm7\n" " pshufw $0x00, %%mm7, %%mm7\n" " movzwl 2(%0), %%ecx\n" " movd %%ecx, %%mm6\n" " pshufw $0x00, %%mm6, %%mm6\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm5\n" " pshufw $0x44, %%mm5, %%mm5\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " paddq 2(%2), %%mm0\n" " movd %4, %%mm4\n" " psraw %%mm4, %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : "r" (shift) ); } OIL_DEFINE_IMPL_FULL (mas2_add_s16_lim_mmx, mas2_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #endif void mas4_add_s16_mmx (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_4, int16_t *s4_2, int n) { int shift = s4_2[1]; //int m; //m = n&3; #if 1 while (n&3) { int x; int i; x = s4_2[0]; for(i=0;i<4;i++){ x += s2[i]*s3_4[i]; } x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; n--; } #endif if (n==0) return; n>>=2; asm volatile ("\n" " movq 0(%0), %%mm7\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm5\n" " pshufw $0x44, %%mm5, %%mm5\n" :: "r" (s3_4), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" // mm0 = s0, s1, s2, s3 " movq 0(%2), %%mm1\n" // mm1 = s0, s1, s2, s3 " pshufw $0x00, %%mm7, %%mm6\n" " pmullw %%mm6, %%mm0\n" // mm0 = lo(s0*a0), lo(s1*a0), ... " pmulhw %%mm6, %%mm1\n" // mm1 = hi(s0*a0), hi(s1*a0), ... " movq %%mm0, %%mm2\n" // mm2 = lo(s0*a0), lo(s1*a0), ... " punpcklwd %%mm1, %%mm0\n" // mm0 = s0*a0, s1*a0 " punpckhwd %%mm1, %%mm2\n" // mm2 = s2*a0, s3*a0 " movq %%mm2, %%mm1\n" // mm1 = s2*a0, s3*a0 " movq 2(%2), %%mm2\n" " movq 2(%2), %%mm3\n" " pshufw $0x55, %%mm7, %%mm6\n" " pmullw %%mm6, %%mm2\n" " pmulhw %%mm6, %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" // mm2 = s1*a1, s2*a1 " punpckhwd %%mm3, %%mm4\n" // mm4 = s3*a1, s4*a1 " movq %%mm4, %%mm3\n" // mm3 = s3*a1, s4*a1 " paddd %%mm3, %%mm1\n" // mm1 = s2*a0 + s3*a1, ... " paddd %%mm2, %%mm0\n" // mm0 = s0*a0 + s1*a1, ... " movq 4(%2), %%mm2\n" " movq 4(%2), %%mm3\n" " pshufw $0xaa, %%mm7, %%mm6\n" " pmullw %%mm6, %%mm2\n" " pmulhw %%mm6, %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " movq %%mm4, %%mm3\n" " paddd %%mm3, %%mm1\n" " paddd %%mm2, %%mm0\n" " movq 6(%2), %%mm2\n" " movq 6(%2), %%mm3\n" " pshufw $0xff, %%mm7, %%mm6\n" " pmullw %%mm6, %%mm2\n" " pmulhw %%mm6, %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " movq %%mm4, %%mm3\n" " paddd %%mm3, %%mm1\n" " paddd %%mm2, %%mm0\n" " paddd %%mm5, %%mm1\n" " paddd %%mm5, %%mm0\n" " movd %4, %%mm4\n" " psrad %%mm4, %%mm1\n" " psrad %%mm4, %%mm0\n" " packssdw %%mm1, %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : "r" (shift) ); #if 0 while (m) { int x; int i; x = s4_2[0]; for(i=0;i<4;i++){ x += s2[i]*s3_4[i]; } x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; m--; } #endif } OIL_DEFINE_IMPL_FULL (mas4_add_s16_mmx, mas4_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #if 0 /* This only does 16-bit intermediates, whereas the ref specifies 32-bit */ void mas2_add_s16_mmx (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { while (n&3) { int x; x = s4_2[0] + s2[0]*s3_2[0] + s2[1]*s3_2[1]; x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; n--; } if (n==0) return; n>>=2; asm volatile ("\n" " movzwl 0(%0), %%ecx\n" " movd %%ecx, %%mm7\n" " pshufw $0x00, %%mm7, %%mm7\n" " movzwl 2(%0), %%ecx\n" " movd %%ecx, %%mm6\n" " pshufw $0x00, %%mm6, %%mm6\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm5\n" " pshufw $0x00, %%mm5, %%mm5\n" " movzwl 2(%1), %%ecx\n" " movd %%ecx, %%mm4\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " pmullw %%mm7, %%mm0\n" " movq 2(%2), %%mm1\n" " pmullw %%mm6, %%mm1\n" " paddw %%mm1, %%mm0\n" " paddw %%mm5, %%mm0\n" " psraw %%mm4, %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (mas2_add_s16_mmx, mas2_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #endif #if 0 /* This only does 16-bit intermediates, whereas the ref specifies 32-bit */ void mas4_add_s16_mmx (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { while (n&3) { int x; x = s4_2[0] + s2[0]*s3_2[0] + s2[1]*s3_2[1] + s2[2]*s3_2[2] + s2[2]*s3_2[2]; x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; n--; } if (n==0) return; n>>=2; asm volatile ("\n" " movzwl 0(%0), %%ecx\n" " movd %%ecx, %%mm7\n" " pshufw $0x00, %%mm7, %%mm7\n" " movzwl 2(%0), %%ecx\n" " movd %%ecx, %%mm6\n" " pshufw $0x00, %%mm6, %%mm6\n" " movzwl 2(%0), %%ecx\n" " movd %%ecx, %%mm5\n" " pshufw $0x00, %%mm5, %%mm5\n" " movzwl 2(%0), %%ecx\n" " movd %%ecx, %%mm4\n" " pshufw $0x00, %%mm4, %%mm4\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm3\n" " pshufw $0x00, %%mm3, %%mm3\n" " movzwl 2(%1), %%ecx\n" " movd %%ecx, %%mm2\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " pmullw %%mm7, %%mm0\n" " movq 2(%2), %%mm1\n" " pmullw %%mm6, %%mm1\n" " paddw %%mm1, %%mm0\n" " movq 4(%2), %%mm1\n" " pmullw %%mm5, %%mm1\n" " paddw %%mm1, %%mm0\n" " movq 6(%2), %%mm1\n" " pmullw %%mm4, %%mm1\n" " paddw %%mm1, %%mm0\n" " paddw %%mm3, %%mm0\n" " psraw %%mm2, %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (mas4_add_s16_mmx, mas4_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #endif #if 0 /* This only does 16-bit intermediates, whereas the ref specifies 32-bit */ void mas8_add_s16_mmx (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { while (n&3) { int x; int i; x = s4_2[0]; for(i=0;i<8;i++){ x += s2[i]*s3_2[i]; } x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; n--; } if (n==0) return; n>>=2; asm volatile ("\n" " movq 0(%0), %%mm6\n" " movq 8(%0), %%mm7\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm3\n" " pshufw $0x00, %%mm3, %%mm3\n" " pxor %%mm4, %%mm4\n" " movzwl 2(%1), %%ecx\n" " movd %%ecx, %%mm4\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " pshufw $0x00, %%mm6, %%mm1\n" " movq 0(%2), %%mm0\n" " pmullw %%mm1, %%mm0\n" " pshufw $0x55, %%mm6, %%mm2\n" " movq 2(%2), %%mm1\n" " pmullw %%mm2, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0xaa, %%mm6, %%mm2\n" " movq 4(%2), %%mm1\n" " pmullw %%mm2, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0xff, %%mm6, %%mm2\n" " movq 6(%2), %%mm1\n" " pmullw %%mm2, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0x00, %%mm7, %%mm2\n" " movq 8(%2), %%mm1\n" " pmullw %%mm2, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0x55, %%mm7, %%mm2\n" " movq 10(%2), %%mm1\n" " pmullw %%mm2, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0xaa, %%mm7, %%mm2\n" " movq 12(%2), %%mm1\n" " pmullw %%mm2, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0xff, %%mm7, %%mm2\n" " movq 14(%2), %%mm1\n" " pmullw %%mm2, %%mm1\n" " paddw %%mm1, %%mm0\n" " paddw %%mm3, %%mm0\n" " psraw %%mm4, %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (mas8_add_s16_mmx, mas8_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #endif void mas4_add_s16_pmaddwd (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { if (n==0) return; asm volatile ("\n" " movq 0(%0), %%mm6\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm3\n" " movzwl 2(%1), %%ecx\n" " movd %%ecx, %%mm4\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " pmaddwd %%mm6, %%mm0\n" " pshufw $0xee, %%mm0, %%mm1\n" // 11 10 11 10 " paddd %%mm1, %%mm0\n" " paddd %%mm3, %%mm0\n" " psrad %%mm4, %%mm0\n" " movd %%mm0, %%eax\n" " addw 0(%1), %%ax\n" " movw %%ax, 0(%0)\n" " add $2, %0\n" " add $2, %1\n" " add $2, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : : "eax" ); } OIL_DEFINE_IMPL_FULL (mas4_add_s16_pmaddwd, mas4_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void mas4_add_s16_pmaddwd_2 (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { if (n==0) return; asm volatile ("\n" " movq 0(%0), %%mm6\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm3\n" " pshufw $0x44, %%mm3, %%mm3\n" // 01 00 01 00 " movzwl 2(%1), %%ecx\n" " movd %%ecx, %%mm4\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); if (n&1) { asm volatile ("\n" " movq 0(%2), %%mm0\n" " pmaddwd %%mm6, %%mm0\n" " pshufw $0xee, %%mm0, %%mm1\n" // 11 10 11 10 " paddd %%mm1, %%mm0\n" " paddd %%mm3, %%mm0\n" " psrad %%mm4, %%mm0\n" " movd %%mm0, %%eax\n" " addw 0(%1), %%ax\n" " movw %%ax, 0(%0)\n" " add $2, %0\n" " add $2, %1\n" " add $2, %2\n" " decl %3\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : : "eax" ); } n>>=1; asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " pmaddwd %%mm6, %%mm0\n" " movq 2(%2), %%mm2\n" " pmaddwd %%mm6, %%mm2\n" " movq %%mm0, %%mm1\n" " punpckhdq %%mm2, %%mm0\n" " punpckldq %%mm2, %%mm1\n" " paddd %%mm1, %%mm0\n" " paddd %%mm3, %%mm0\n" " psrad %%mm4, %%mm0\n" " pshufw $0xd8, %%mm0, %%mm0\n" // 11 01 10 00 " paddw 0(%1), %%mm0\n" " movd %%mm0, 0(%0)\n" " add $4, %0\n" " add $4, %1\n" " add $4, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : : "eax" ); } OIL_DEFINE_IMPL_FULL (mas4_add_s16_pmaddwd_2, mas4_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void mas8_add_s16_pmaddwd (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { if (n==0) return; asm volatile ("\n" " movq 0(%0), %%mm6\n" " movq 8(%0), %%mm7\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm3\n" " movzwl 2(%1), %%ecx\n" " movd %%ecx, %%mm4\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " pmaddwd %%mm6, %%mm0\n" " movq 8(%2), %%mm1\n" " pmaddwd %%mm7, %%mm1\n" " paddd %%mm1, %%mm0\n" " pshufw $0xee, %%mm0, %%mm1\n" " paddd %%mm1, %%mm0\n" " paddd %%mm3, %%mm0\n" " psrad %%mm4, %%mm0\n" " movd %%mm0, %%eax\n" " addw 0(%1), %%ax\n" " movw %%ax, 0(%0)\n" " add $2, %0\n" " add $2, %1\n" " add $2, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : : "eax" ); } OIL_DEFINE_IMPL_FULL (mas8_add_s16_pmaddwd, mas8_add_s16, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); #if 0 void mas8_add_s16_pmaddwd2 (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { while (n&3) { int x; int i; x = s4_2[0]; for(i=0;i<8;i++){ x += s2[i]*s3_2[i]; } x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; n--; } if (n==0) return; n>>=2; asm volatile ("\n" " movq 0(%0), %%mm6\n" " movq 8(%0), %%mm7\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm5\n" " pshufw $0x00, %%mm5, %%mm5\n" " pxor %%mm4, %%mm4\n" " movzwl 2(%1), %%ecx\n" " movd %%ecx, %%mm4\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " pmaddwd %%mm6, %%mm0\n" " movq 8(%2), %%mm1\n" " pmaddwd %%mm7, %%mm1\n" " paddd %%mm1, %%mm0\n" " pshufw $0xee, %%mm0, %%mm1\n" " paddw %%mm1, %%mm0\n" " movq 2(%2), %%mm2\n" " pmaddwd %%mm6, %%mm2\n" " movq 10(%2), %%mm3\n" " pmaddwd %%mm7, %%mm3\n" " paddd %%mm3, %%mm2\n" " pshufw $0xee, %%mm2, %%mm3\n" " paddw %%mm3, %%mm2\n" " pextrw $0, %%mm2, %%eax\n" " pinsrw $1, %%eax, %%mm0\n" " movq 4(%2), %%mm2\n" " pmaddwd %%mm6, %%mm2\n" " movq 12(%2), %%mm3\n" " pmaddwd %%mm7, %%mm3\n" " paddd %%mm3, %%mm2\n" " pshufw $0xee, %%mm2, %%mm3\n" " paddw %%mm3, %%mm2\n" " pextrw $0, %%mm2, %%eax\n" " pinsrw $2, %%eax, %%mm0\n" " movq 6(%2), %%mm2\n" " pmaddwd %%mm6, %%mm2\n" " movq 14(%2), %%mm3\n" " pmaddwd %%mm7, %%mm3\n" " paddd %%mm3, %%mm2\n" " pshufw $0xee, %%mm2, %%mm3\n" " paddw %%mm3, %%mm2\n" " pextrw $0, %%mm2, %%eax\n" " pinsrw $3, %%eax, %%mm0\n" " paddw %%mm5, %%mm0\n" " psraw %%mm4, %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : : "eax" ); } OIL_DEFINE_IMPL_FULL (mas8_add_s16_pmaddwd2, mas8_add_s16, OIL_IMPL_FLAG_SSE); #endif #if 0 /* This only does 16-bit intermediates, whereas the ref specifies 32-bit */ void mas8_add_s16_sse2 (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { asm volatile ("\n" " movq 0(%0), %%mm6\n" " movq 8(%0), %%mm7\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm3\n" " pshufw $0x00, %%mm3, %%mm3\n" " pxor %%mm4, %%mm4\n" " movzwl 2(%1), %%ecx\n" " movd %%ecx, %%mm4\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " pmullw %%mm6, %%mm0\n" " movq 8(%2), %%mm1\n" " pmullw %%mm7, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0xee, %%mm0, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0x01, %%mm0, %%mm1\n" " paddw %%mm1, %%mm0\n" " paddw %%mm3, %%mm0\n" " psraw %%mm4, %%mm0\n" " movd %%mm0, %%eax\n" " addw 0(%1), %%ax\n" " movw %%ax, 0(%0)\n" " add $2, %0\n" " add $2, %1\n" " add $2, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : : "eax" ); } OIL_DEFINE_IMPL_FULL (mas8_add_s16_sse2, mas8_add_s16, OIL_IMPL_FLAG_SSE); #endif void mas2_across_add_s16_mmx (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4_2, int16_t *s5_2, int n) { int shift = s5_2[1]; while (n&3) { int x; x = s5_2[0] + s2[0]*s4_2[0] + s3[0]*s4_2[1]; x >>= s5_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; s3++; n--; } if (n==0) return; n>>=2; if (n==0) return; asm volatile ("\n" " movzwl 0(%0), %%ecx\n" " movd %%ecx, %%mm7\n" " pshufw $0x00, %%mm7, %%mm7\n" " movzwl 2(%0), %%ecx\n" " movd %%ecx, %%mm6\n" " pshufw $0x00, %%mm6, %%mm6\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%mm5\n" " pshufw $0x44, %%mm5, %%mm5\n" :: "r" (s4_2), "r" (s5_2) : "ecx" ); asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" // mm0 = s0, s1, s2, s3 " movq 0(%2), %%mm1\n" // mm1 = s0, s1, s2, s3 " pmullw %%mm7, %%mm0\n" // mm0 = lo(s0*a0), lo(s1*a0), ... " pmulhw %%mm7, %%mm1\n" // mm1 = hi(s0*a0), hi(s1*a0), ... " movq %%mm0, %%mm2\n" // mm2 = lo(s0*a0), lo(s1*a0), ... " punpcklwd %%mm1, %%mm0\n" // mm0 = s0*a0, s1*a0 " punpckhwd %%mm1, %%mm2\n" // mm2 = s2*a0, s3*a0 " movq %%mm2, %%mm1\n" // mm1 = s2*a0, s3*a0 " movq 0(%3), %%mm2\n" " movq 0(%3), %%mm3\n" " pmullw %%mm6, %%mm2\n" " pmulhw %%mm6, %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" // mm2 = s1*a1, s2*a1 " punpckhwd %%mm3, %%mm4\n" // mm4 = s3*a1, s4*a1 " movq %%mm4, %%mm3\n" // mm3 = s3*a1, s4*a1 " paddd %%mm3, %%mm1\n" // mm1 = s2*a0 + s3*a1, ... " paddd %%mm2, %%mm0\n" // mm0 = s0*a0 + s1*a1, ... " paddd %%mm5, %%mm1\n" // mm1 = s2*a0 + s3*a1 + offset, ... " paddd %%mm5, %%mm0\n" // mm0 = s0*a0 + s1*a1 + offset, ... " movd %5, %%mm4\n" " psrad %%mm4, %%mm1\n" // mm1 = (s2*a0 + s3*a1 + offset)>>shift, ... " psrad %%mm4, %%mm0\n" // mm0 = (s0*a0 + s1*a1 + offset)>>shift, ... " packssdw %%mm1, %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " add $8, %3\n" " decl %4\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (s3), "+m" (n) : "r" (shift) ); } OIL_DEFINE_IMPL_FULL (mas2_across_add_s16_mmx, mas2_across_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void add_const_rshift_s16_mmx(int16_t *d1, int16_t *s1, int16_t *s2_2, int n) { while(n&3) { d1[0] = (s1[0] + s2_2[0])>>s2_2[1]; d1++; s1++; n--; } n>>=2; if (n==0) return; asm volatile ("\n" " movzwl 0(%2), %%ecx\n" " movd %%ecx, %%mm7\n" " pshufw $0x00, %%mm7, %%mm7\n" " movzwl 2(%2), %%ecx\n" " movd %%ecx, %%mm6\n" "1:\n" " movq 0(%1), %%mm0\n" " paddsw %%mm7, %%mm0\n" " psraw %%mm6, %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2_2), "+r" (n) : : "ecx" ); } OIL_DEFINE_IMPL_FULL (add_const_rshift_s16_mmx, add_const_rshift_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void multiply_and_add_s16_mmx(int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3, int n) { while(n&3) { d1[0] = s1[0] + s2[0]*s3[0]; d1++; s1++; s2++; s3++; n--; } n>>=2; if (n==0) return; asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " pmullw 0(%3), %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " add $8, %3\n" " decl %4\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (s3), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (multiply_and_add_s16_mmx, multiply_and_add_s16, OIL_IMPL_FLAG_MMX); void multiply_and_add_s16_u8_mmx(int16_t *d1, int16_t *s1, int16_t *s2, uint8_t *s3, int n) { while(n&3) { d1[0] = s1[0] + s2[0]*s3[0]; d1++; s1++; s2++; s3++; n--; } n>>=2; if (n==0) return; asm volatile ("\n" " pxor %%mm7, %%mm7\n" "1:\n" " movd 0(%3), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pmullw 0(%2), %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " add $4, %3\n" " decl %4\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (s3), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (multiply_and_add_s16_u8_mmx, multiply_and_add_s16_u8, OIL_IMPL_FLAG_MMX); void multiply_and_add_s16_u8_mmx_2(int16_t *d1, int16_t *s1, int16_t *s2, uint8_t *s3, int n) { while(n&7) { d1[0] = s1[0] + s2[0]*s3[0]; d1++; s1++; s2++; s3++; n--; } n>>=3; if (n==0) return; asm volatile ("\n" " pxor %%mm7, %%mm7\n" "1:\n" " movd 0(%3), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " movd 4(%3), %%mm1\n" " pmullw 0(%2), %%mm0\n" " punpcklbw %%mm7, %%mm1\n" " paddw 0(%1), %%mm0\n" " pmullw 8(%2), %%mm1\n" " movq %%mm0, 0(%0)\n" " paddw 8(%1), %%mm1\n" " movq %%mm1, 8(%0)\n" " add $16, %0\n" " add $16, %1\n" " add $16, %2\n" " add $8, %3\n" " decl %4\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (s3), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (multiply_and_add_s16_u8_mmx_2, multiply_and_add_s16_u8, OIL_IMPL_FLAG_MMX); void multiply_and_acc_12xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1, int ss1, uint8_t *s2, int ss2, int n) { if (n==0) return; __asm__ __volatile__ ("\n" " pxor %%mm7, %%mm7\n" "1:\n" " movd 0(%2), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pmullw 0(%1), %%mm0\n" " paddw 0(%0), %%mm0\n" " movq %%mm0, 0(%0)\n" " movd 4(%2), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " pmullw 8(%1), %%mm1\n" " paddw 8(%0), %%mm1\n" " movq %%mm1, 8(%0)\n" " movd 8(%2), %%mm2\n" " punpcklbw %%mm7, %%mm2\n" " pmullw 16(%1), %%mm2\n" " paddw 16(%0), %%mm2\n" " movq %%mm2, 16(%0)\n" " addl %4, %0\n" " addl %5, %1\n" " addl %6, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (i1), "+r" (s1), "+r" (s2), "+r" (n) : "m" (is1), "m" (ss1), "m" (ss2) ); } OIL_DEFINE_IMPL_FULL (multiply_and_acc_12xn_s16_u8_mmx, multiply_and_acc_12xn_s16_u8, OIL_IMPL_FLAG_MMX); #ifdef ENABLE_BROKEN_IMPLS void mas4_across_add_s16_mmx (int16_t *d, int16_t *s1, int16_t *s2_nx4, int sstr2, int16_t *s3_4, int16_t *s4_2, int n) { int16_t *s2_nx4_off; while (n&3) { int x; int j; x = s4_2[0]; for(j=0;j<4;j++){ x += OIL_GET(s2_nx4, j*sstr2, int16_t)*s3_4[j]; } x >>= s4_2[1]; d[0] = s1[0] + x; n--; d++; s1++; s2_nx4++; } if (n==0) return; s2_nx4_off = OIL_OFFSET(s2_nx4, 3*sstr2); n >>= 2; __asm__ __volatile__ ("\n" " movq 0(%[s3_4]), %%mm0\n" " pshufw $0x55, %%mm0, %%mm1\n" " pshufw $0xaa, %%mm0, %%mm2\n" " pshufw $0xff, %%mm0, %%mm3\n" " pshufw $0x00, %%mm0, %%mm0\n" " movzwl 0(%[s4_2]), %%ecx\n" " movd %%ecx, %%mm7\n" " pshufw $0x00, %%mm7, %%mm7\n" " movzwl 2(%[s4_2]), %%ecx\n" " movd %%ecx, %%mm6\n" : : [s3_4] "r" (s3_4), [s4_2] "r" (s4_2) : "ecx" ); __asm__ __volatile__ ("\n" "1:\n" " movq 0(%[s2_nx4]), %%mm4\n" " pmullw %%mm0, %%mm4\n" " movq (%[s2_nx4],%[sstr]), %%mm5\n" " pmullw %%mm1, %%mm5\n" " paddsw %%mm5,%%mm4\n" " movq (%[s2_nx4],%[sstr],2), %%mm5\n" " pmullw %%mm2, %%mm5\n" " paddsw %%mm5,%%mm4\n" " movq (%[s2_nx4_off]), %%mm5\n" " pmullw %%mm3, %%mm5\n" " paddsw %%mm5,%%mm4\n" " paddsw %%mm7, %%mm4\n" " psraw %%mm6, %%mm4\n" " paddsw (%[s1]),%%mm4\n" " movq %%mm4, 0(%[d])\n" " addl $8, %[s2_nx4]\n" " addl $8, %[s2_nx4_off]\n" " addl $8, %[s1]\n" " addl $8, %[d]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [s2_nx4] "+r" (s2_nx4), [d] "+r" (d), [s2_nx4_off] "+r" (s2_nx4_off), [n] "+m" (n), [s1] "+r" (s1) : [sstr] "r" (sstr2) ); } OIL_DEFINE_IMPL_FULL (mas4_across_add_s16_mmx, mas4_across_add_s16, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); #endif void mas4_across_add_s16_mmx (int16_t *d, int16_t *s1, int16_t *s2_nx4, int sstr2, int16_t *s3_4, int16_t *s4_2, int n) { int16_t *s2_nx4_off; while (n&3) { int x; int j; x = s4_2[0]; for(j=0;j<4;j++){ x += OIL_GET(s2_nx4, j*sstr2, int16_t)*s3_4[j]; } x >>= s4_2[1]; d[0] = s1[0] + x; n--; d++; s1++; s2_nx4++; } if (n==0) return; s2_nx4_off = OIL_OFFSET(s2_nx4, 3*sstr2); n >>= 2; __asm__ __volatile__ ("\n" " movq 0(%[s3_4]), %%mm0\n" " pxor %%mm5, %%mm5\n" " movd 0(%[s4_2]), %%mm5\n" : : [s3_4] "r" (s3_4), [s4_2] "r" (s4_2) ); __asm__ __volatile__ ("\n" "1:\n" " pshufw $0x00, %%mm0, %%mm6\n" " pmullw 0(%[s2_nx4]), %%mm6\n" " pshufw $0x00, %%mm0, %%mm3\n" " pmulhw 0(%[s2_nx4]), %%mm3\n" " movq %%mm6, %%mm7\n" " punpcklwd %%mm3, %%mm6\n" " punpckhwd %%mm3, %%mm7\n" " pshufw $0x55, %%mm0, %%mm2\n" " pmullw 0(%[s2_nx4],%[sstr]), %%mm2\n" " pshufw $0x55, %%mm0, %%mm3\n" " pmulhw 0(%[s2_nx4],%[sstr]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " pshufw $0xaa, %%mm0, %%mm2\n" " pmullw 0(%[s2_nx4],%[sstr],2), %%mm2\n" " pshufw $0xaa, %%mm0, %%mm3\n" " pmulhw 0(%[s2_nx4],%[sstr],2), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " pshufw $0xff, %%mm0, %%mm2\n" " pmullw 0(%[s2_nx4_off]), %%mm2\n" " pshufw $0xff, %%mm0, %%mm3\n" " pmulhw 0(%[s2_nx4_off]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " pshufw $0xcc, %%mm5, %%mm1\n" " paddd %%mm1, %%mm6\n" " paddd %%mm1, %%mm7\n" " pshufw $0xfd, %%mm5, %%mm1\n" " psrad %%mm1, %%mm6\n" " psrad %%mm1, %%mm7\n" " packssdw %%mm7, %%mm6\n" " paddsw (%[s1]),%%mm6\n" " movq %%mm6, 0(%[d])\n" " addl $8, %[s2_nx4]\n" " addl $8, %[s2_nx4_off]\n" " addl $8, %[s1]\n" " addl $8, %[d]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [s2_nx4] "+r" (s2_nx4), [d] "+r" (d), [s2_nx4_off] "+r" (s2_nx4_off), [n] "+m" (n), [s1] "+r" (s1) : [sstr] "r" (sstr2) ); } OIL_DEFINE_IMPL_FULL (mas4_across_add_s16_mmx, mas4_across_add_s16, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); void mas8_across_add_s16_mmx (int16_t *d, int16_t *s1, int16_t *s2_nx8, int sstr2, int16_t *s3_8, int16_t *s4_2, int n) { int16_t *s2_nx8_off; void *tmp = NULL; while (n&3) { int x; int j; x = s4_2[0]; for(j=0;j<8;j++){ x += OIL_GET(s2_nx8, j*sstr2, int16_t)*s3_8[j]; } x >>= s4_2[1]; d[0] = s1[0] + x; n--; d++; s1++; s2_nx8++; } if (n==0) return; s2_nx8_off = OIL_OFFSET(s2_nx8, 7*sstr2); n >>= 2; __asm__ __volatile__ ("\n" " movq 0(%[s3_8]), %%mm0\n" " pxor %%mm5, %%mm5\n" " movd 0(%[s4_2]), %%mm5\n" : : [s3_8] "r" (s3_8), [s4_2] "r" (s4_2) ); __asm__ __volatile__ ("\n" "1:\n" " movl %[s2_nx8], %[tmp]\n" " movq 0(%[s3_8]), %%mm0\n" " pshufw $0x00, %%mm0, %%mm6\n" " pmullw 0(%[tmp]), %%mm6\n" " pshufw $0x00, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm6, %%mm7\n" " punpcklwd %%mm3, %%mm6\n" " punpckhwd %%mm3, %%mm7\n" " addl %[sstr], %[tmp]\n" " pshufw $0x55, %%mm0, %%mm2\n" " pmullw 0(%[tmp]), %%mm2\n" " pshufw $0x55, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " addl %[sstr], %[tmp]\n" " pshufw $0xaa, %%mm0, %%mm2\n" " pmullw 0(%[tmp]), %%mm2\n" " pshufw $0xaa, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " addl %[sstr], %[tmp]\n" " pshufw $0xff, %%mm0, %%mm2\n" " pmullw 0(%[tmp]), %%mm2\n" " pshufw $0xff, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " movq 8(%[s3_8]), %%mm0\n" " addl %[sstr], %[tmp]\n" " pshufw $0x00, %%mm0, %%mm2\n" " pmullw 0(%[tmp]), %%mm2\n" " pshufw $0x00, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " addl %[sstr], %[tmp]\n" " pshufw $0x55, %%mm0, %%mm2\n" " pmullw 0(%[tmp]), %%mm2\n" " pshufw $0x55, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " addl %[sstr], %[tmp]\n" " pshufw $0xaa, %%mm0, %%mm2\n" " pmullw 0(%[tmp]), %%mm2\n" " pshufw $0xaa, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " addl %[sstr], %[tmp]\n" " pshufw $0xff, %%mm0, %%mm2\n" " pmullw 0(%[tmp]), %%mm2\n" " pshufw $0xff, %%mm0, %%mm3\n" " pmulhw 0(%[tmp]), %%mm3\n" " movq %%mm2, %%mm4\n" " punpcklwd %%mm3, %%mm2\n" " punpckhwd %%mm3, %%mm4\n" " paddd %%mm2, %%mm6\n" " paddd %%mm4, %%mm7\n" " pshufw $0xcc, %%mm5, %%mm1\n" " paddd %%mm1, %%mm6\n" " paddd %%mm1, %%mm7\n" " pshufw $0xfd, %%mm5, %%mm1\n" " psrad %%mm1, %%mm6\n" " psrad %%mm1, %%mm7\n" " packssdw %%mm7, %%mm6\n" " paddsw (%[s1]),%%mm6\n" " movq %%mm6, 0(%[d])\n" " addl $8, %[s2_nx8]\n" " addl $8, %[s1]\n" " addl $8, %[d]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [s2_nx8] "+r" (s2_nx8), [tmp] "+r" (tmp), [s3_8] "+r" (s3_8), [d] "+r" (d), [n] "+m" (n), [s1] "+r" (s1) : [sstr] "m" (sstr2) ); } OIL_DEFINE_IMPL_FULL (mas8_across_add_s16_mmx, mas8_across_add_s16, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); void lshift_s16_mmx(int16_t *d1, int16_t *s1, int16_t *s3_1, int n) { while (n&3) { d1[0] = s1[0]<>= 2; __asm__ __volatile__ ("\n" " movzwl 0(%[s3_1]), %%ecx\n" " movd %%ecx, %%mm1\n" "1:\n" " movq 0(%[s1]), %%mm0\n" " psllw %%mm1, %%mm0\n" " movq %%mm0, 0(%[d1])\n" " add $8, %[d1]\n" " add $8, %[s1]\n" " decl %[n]\n" " jnz 1b\n" " emms" : [d1] "+r" (d1), [s1] "+r" (s1), [n] "+r" (n) : [s3_1] "r" (s3_1) : "ecx"); } OIL_DEFINE_IMPL_FULL (lshift_s16_mmx, lshift_s16, OIL_IMPL_FLAG_MMX); void lshift_s16_mmx_2(int16_t *d1, int16_t *s1, int16_t *s3_1, int n) { while (n&7) { d1[0] = s1[0]<>= 3; if (n == 0) return; __asm__ __volatile__ ("\n" " movzwl 0(%[s3_1]), %%ecx\n" " movd %%ecx, %%mm1\n" "1:\n" " movq 0(%[s1]), %%mm0\n" " psllw %%mm1, %%mm0\n" " movq %%mm0, 0(%[d1])\n" " movq 8(%[s1]), %%mm0\n" " psllw %%mm1, %%mm0\n" " movq %%mm0, 8(%[d1])\n" " add $16, %[d1]\n" " add $16, %[s1]\n" " decl %[n]\n" " jnz 1b\n" " emms" : [d1] "+r" (d1), [s1] "+r" (s1), [n] "+r" (n) : [s3_1] "r" (s3_1) : "ecx"); } OIL_DEFINE_IMPL_FULL (lshift_s16_mmx_2, lshift_s16, OIL_IMPL_FLAG_MMX); liboil-0.3.17/liboil/i386/error8x8_i386.c0000644000175000017500000002600110717203073014355 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include OIL_DECLARE_CLASS (err_intra8x8_u8); OIL_DECLARE_CLASS (err_inter8x8_u8); OIL_DECLARE_CLASS (err_inter8x8_u8_avg); static void err_intra8x8_u8_mmx (uint32_t *dest, uint8_t *src1, int ss1) { uint32_t xsum; uint32_t xxsum; __asm__ __volatile__ ( " pxor %%mm5, %%mm5 \n\t" " pxor %%mm6, %%mm6 \n\t" " pxor %%mm7, %%mm7 \n\t" " mov $8, %%edi \n\t" "1: \n\t" " movq (%2), %%mm0 \n\t" /* take 8 bytes */ " movq %%mm0, %%mm2 \n\t" " punpcklbw %%mm6, %%mm0 \n\t" " punpckhbw %%mm6, %%mm2 \n\t" " paddw %%mm0, %%mm5 \n\t" " paddw %%mm2, %%mm5 \n\t" " pmaddwd %%mm0, %%mm0 \n\t" " pmaddwd %%mm2, %%mm2 \n\t" " paddd %%mm0, %%mm7 \n\t" " paddd %%mm2, %%mm7 \n\t" " add %3, %2 \n\t" /* Inc pointer into src data */ " dec %%edi \n\t" " jnz 1b \n\t" " movq %%mm5, %%mm0 \n\t" " psrlq $32, %%mm5 \n\t" " paddw %%mm0, %%mm5 \n\t" " movq %%mm5, %%mm0 \n\t" " psrlq $16, %%mm5 \n\t" " paddw %%mm0, %%mm5 \n\t" " movd %%mm5, %%edi \n\t" " movswl %%di, %%edi \n\t" " movl %%edi, %0 \n\t" " movq %%mm7, %%mm0 \n\t" " psrlq $32, %%mm7 \n\t" " paddd %%mm0, %%mm7 \n\t" " movd %%mm7, %1 \n\t" " emms \n\t" : "=r" (xsum), "=r" (xxsum), "+r" (src1) : "r" (ss1) : "edi", "memory" ); /* Compute population variance as mis-match metric. */ *dest = (((xxsum<<6) - xsum*xsum)); } OIL_DEFINE_IMPL_FULL (err_intra8x8_u8_mmx, err_intra8x8_u8, OIL_IMPL_FLAG_MMX); static void err_inter8x8_u8_mmx (uint32_t *dest, uint8_t *src1, int ss1, uint8_t *src2, int ss2) { uint32_t xsum; uint32_t xxsum; __asm__ __volatile__ ( " pxor %%mm5, %%mm5 \n\t" " pxor %%mm6, %%mm6 \n\t" " pxor %%mm7, %%mm7 \n\t" " mov $8, %%edi \n\t" "1: \n\t" " movq (%2), %%mm0 \n\t" /* take 8 bytes */ " movq (%3), %%mm1 \n\t" " movq %%mm0, %%mm2 \n\t" " movq %%mm1, %%mm3 \n\t" " punpcklbw %%mm6, %%mm0 \n\t" " punpcklbw %%mm6, %%mm1 \n\t" " punpckhbw %%mm6, %%mm2 \n\t" " punpckhbw %%mm6, %%mm3 \n\t" " psubsw %%mm1, %%mm0 \n\t" " psubsw %%mm3, %%mm2 \n\t" " paddw %%mm0, %%mm5 \n\t" " paddw %%mm2, %%mm5 \n\t" " pmaddwd %%mm0, %%mm0 \n\t" " pmaddwd %%mm2, %%mm2 \n\t" " paddd %%mm0, %%mm7 \n\t" " paddd %%mm2, %%mm7 \n\t" " add %4, %2 \n\t" /* Inc pointer into src data */ " add %5, %3 \n\t" /* Inc pointer into ref data */ " dec %%edi \n\t" " jnz 1b \n\t" " movq %%mm5, %%mm0 \n\t" " psrlq $32, %%mm5 \n\t" " paddw %%mm0, %%mm5 \n\t" " movq %%mm5, %%mm0 \n\t" " psrlq $16, %%mm5 \n\t" " paddw %%mm0, %%mm5 \n\t" " movd %%mm5, %%edi \n\t" " movswl %%di, %%edi \n\t" " movl %%edi, %0 \n\t" " movq %%mm7, %%mm0 \n\t" " psrlq $32, %%mm7 \n\t" " paddd %%mm0, %%mm7 \n\t" " movd %%mm7, %1 \n\t" " emms \n\t" : "=m" (xsum), "=m" (xxsum), "+r" (src1), "+r" (src2) : "m" (ss1), "m" (ss2) : "edi", "memory" ); /* Compute and return population variance as mis-match metric. */ *dest = (((xxsum<<6) - xsum*xsum)); } OIL_DEFINE_IMPL_FULL (err_inter8x8_u8_mmx, err_inter8x8_u8, OIL_IMPL_FLAG_MMX); static void err_inter8x8_u8_avg_mmx (uint32_t *dest, uint8_t *src1, int ss1, uint8_t *src2, uint8_t *src3, int ss2) { uint32_t xsum; uint32_t xxsum; __asm__ __volatile__ ( " pcmpeqd %%mm4, %%mm4 \n\t" /* fefefefefefefefe in mm4 */ " paddb %%mm4, %%mm4 \n\t" " pxor %%mm5, %%mm5 \n\t" " pxor %%mm6, %%mm6 \n\t" " pxor %%mm7, %%mm7 \n\t" " mov $8, %%edi \n\t" "1: \n\t" " movq (%2), %%mm0 \n\t" /* take 8 bytes */ " movq (%3), %%mm2 \n\t" " movq (%4), %%mm3 \n\t" /* take average of mm2 and mm3 */ " movq %%mm2, %%mm1 \n\t" " pand %%mm3, %%mm1 \n\t" " pxor %%mm2, %%mm3 \n\t" " pand %%mm4, %%mm3 \n\t" " psrlq $1, %%mm3 \n\t" " paddb %%mm3, %%mm1 \n\t" " movq %%mm0, %%mm2 \n\t" " movq %%mm1, %%mm3 \n\t" " punpcklbw %%mm6, %%mm0 \n\t" " punpcklbw %%mm6, %%mm1 \n\t" " punpckhbw %%mm6, %%mm2 \n\t" " punpckhbw %%mm6, %%mm3 \n\t" " psubsw %%mm1, %%mm0 \n\t" " psubsw %%mm3, %%mm2 \n\t" " paddw %%mm0, %%mm5 \n\t" " paddw %%mm2, %%mm5 \n\t" " pmaddwd %%mm0, %%mm0 \n\t" " pmaddwd %%mm2, %%mm2 \n\t" " paddd %%mm0, %%mm7 \n\t" " paddd %%mm2, %%mm7 \n\t" " add %5, %2 \n\t" /* Inc pointer into src data */ " add %6, %3 \n\t" /* Inc pointer into ref data */ " add %6, %4 \n\t" /* Inc pointer into ref data */ " dec %%edi \n\t" " jnz 1b \n\t" " movq %%mm5, %%mm0 \n\t" " psrlq $32, %%mm5 \n\t" " paddw %%mm0, %%mm5 \n\t" " movq %%mm5, %%mm0 \n\t" " psrlq $16, %%mm5 \n\t" " paddw %%mm0, %%mm5 \n\t" " movd %%mm5, %%edi \n\t" " movswl %%di, %%edi \n\t" " movl %%edi, %0 \n\t" " movq %%mm7, %%mm0 \n\t" " psrlq $32, %%mm7 \n\t" " paddd %%mm0, %%mm7 \n\t" " movd %%mm7, %1 \n\t" " emms \n\t" : "=m" (xsum), "=m" (xxsum), "+r" (src1), "+r" (src2), "+r" (src3) : "m" (ss1), "m" (ss2) : "edi", "memory" ); /* Compute and return population variance as mis-match metric. */ *dest = (((xxsum<<6) - xsum*xsum)); } OIL_DEFINE_IMPL_FULL (err_inter8x8_u8_avg_mmx, err_inter8x8_u8_avg, OIL_IMPL_FLAG_MMX); #ifdef ENABLE_BROKEN_IMPLS static void err_inter8x8_u8_avg_mmxext (uint32_t *dest, uint8_t *src1, int ss1, uint8_t *src2, uint8_t *src3, int ss2) { uint32_t xsum; uint32_t xxsum; __asm__ __volatile__ ( " pxor %%mm4, %%mm4 \n\t" " pxor %%mm5, %%mm5 \n\t" " mov $0x01010101, %%edi \n\t" " movd %%edi, %%mm6 \n\t" " punpcklbw %%mm6, %%mm6 \n\t" " pxor %%mm7, %%mm7 \n\t" " mov $8, %%edi \n\t" "1: \n\t" " movq (%2), %%mm0 \n\t" /* take 8 bytes */ " movq (%3), %%mm2 \n\t" " movq (%4), %%mm1 \n\t" /* take average of mm2 and mm1 */ " movq %%mm1, %%mm3 \n\t" " pavgb %%mm2, %%mm1 \n\t" " pxor %%mm2, %%mm3 \n\t" " pand %%mm6, %%mm3 \n\t" " psubb %%mm3, %%mm1 \n\t" " movq %%mm0, %%mm2 \n\t" " movq %%mm1, %%mm3 \n\t" " punpcklbw %%mm4, %%mm0 \n\t" " punpcklbw %%mm4, %%mm1 \n\t" " punpckhbw %%mm4, %%mm2 \n\t" " punpckhbw %%mm4, %%mm3 \n\t" " psubsw %%mm1, %%mm0 \n\t" " psubsw %%mm3, %%mm2 \n\t" " paddw %%mm0, %%mm5 \n\t" " paddw %%mm2, %%mm5 \n\t" " pmaddwd %%mm0, %%mm0 \n\t" " pmaddwd %%mm2, %%mm2 \n\t" " paddd %%mm0, %%mm7 \n\t" " paddd %%mm2, %%mm7 \n\t" " add %5, %2 \n\t" /* Inc pointer into src data */ " add %6, %3 \n\t" /* Inc pointer into ref data */ " add %6, %4 \n\t" /* Inc pointer into ref data */ " dec %%edi \n\t" " jnz 1b \n\t" " movq %%mm5, %%mm0 \n\t" " psrlq $32, %%mm5 \n\t" " paddw %%mm0, %%mm5 \n\t" " movq %%mm5, %%mm0 \n\t" " psrlq $16, %%mm5 \n\t" " paddw %%mm0, %%mm5 \n\t" " movd %%mm5, %%edi \n\t" " movswl %%di, %%edi \n\t" " movl %%edi, %0 \n\t" " movq %%mm7, %%mm0 \n\t" " psrlq $32, %%mm7 \n\t" " paddd %%mm0, %%mm7 \n\t" " movd %%mm7, %1 \n\t" " emms \n\t" : "=m" (xsum), "=m" (xxsum), "+r" (src1), "+r" (src2), "+r" (src3) : "m" (ss1), "m" (ss2) : "edi", "memory" ); /* Compute and return population variance as mis-match metric. */ *dest = (((xxsum<<6) - xsum*xsum)); } OIL_DEFINE_IMPL_FULL (err_inter8x8_u8_avg_mmxext, err_inter8x8_u8_avg, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #endif liboil-0.3.17/liboil/i386/diff8x8_i386.c0000644000175000017500000001542510717203073014144 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include OIL_DECLARE_CLASS (diff8x8_s16_u8); OIL_DECLARE_CLASS (diff8x8_const128_s16_u8); OIL_DECLARE_CLASS (diff8x8_average_s16_u8); static void diff8x8_s16_u8_mmx (int16_t *dest, uint8_t *src1, int ss1, uint8_t *src2, int ss2) { __asm__ __volatile__ ( " pxor %%mm7, %%mm7 \n\t" #define LOOP \ " movq (%0), %%mm0 \n\t" /* mm0 = FiltPtr */ \ " movq (%1), %%mm1 \n\t" /* mm1 = ReconPtr */ \ " movq %%mm0, %%mm2 \n\t" /* dup to prepare for up conversion */ \ " movq %%mm1, %%mm3 \n\t" /* dup to prepare for up conversion */ \ /* convert from UINT8 to INT16 */ \ " punpcklbw %%mm7, %%mm0 \n\t" /* mm0 = INT16(FiltPtr) */ \ " punpcklbw %%mm7, %%mm1 \n\t" /* mm1 = INT16(ReconPtr) */ \ " punpckhbw %%mm7, %%mm2 \n\t" /* mm2 = INT16(FiltPtr) */ \ " punpckhbw %%mm7, %%mm3 \n\t" /* mm3 = INT16(ReconPtr) */ \ /* start calculation */ \ " psubw %%mm1, %%mm0 \n\t" /* mm0 = FiltPtr - ReconPtr */ \ " psubw %%mm3, %%mm2 \n\t" /* mm2 = FiltPtr - ReconPtr */ \ " movq %%mm0, (%2) \n\t" /* write answer out */ \ " movq %%mm2, 8(%2) \n\t" /* write answer out */ \ /* Increment pointers */ \ " add $16, %2 \n\t" \ " add %3, %0 \n\t" \ " add %4, %1 \n\t" LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP #undef LOOP " emms \n\t" : "+r" (src1), "+r" (src2), "+r" (dest) : "m" (ss1), "m" (ss2) : "memory" ); } OIL_DEFINE_IMPL_FULL (diff8x8_s16_u8_mmx, diff8x8_s16_u8, OIL_IMPL_FLAG_MMX); static void diff8x8_const128_s16_u8_mmx (int16_t *dest, uint8_t *src1, int ss1) { const int16_t tmp[4] = { 0x0080, 0x0080, 0x0080, 0x0080 }; __asm__ __volatile__ ( " pxor %%mm7, %%mm7 \n\t" " movq (%3), %%mm1 \n\t" #define LOOP \ " movq (%0), %%mm0 \n\t" /* mm0 = FiltPtr */ \ " movq %%mm0, %%mm2 \n\t" /* dup to prepare for up conversion */ \ /* convert from UINT8 to INT16 */ \ " punpcklbw %%mm7, %%mm0 \n\t" /* mm0 = INT16(FiltPtr) */ \ " punpckhbw %%mm7, %%mm2 \n\t" /* mm2 = INT16(FiltPtr) */ \ /* start calculation */ \ " psubw %%mm1, %%mm0 \n\t" /* mm0 = FiltPtr - 128 */ \ " psubw %%mm1, %%mm2 \n\t" /* mm2 = FiltPtr - 128 */ \ " movq %%mm0, (%1) \n\t" /* write answer out */ \ " movq %%mm2, 8(%1) \n\t" /* write answer out */ \ /* Increment pointers */ \ " add $16, %1 \n\t" \ " add %2, %0 \n\t" LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP #undef LOOP " emms \n\t" : "+r" (src1), "+r" (dest) : "r" (ss1), "r" (tmp) : "memory" ); } OIL_DEFINE_IMPL_FULL (diff8x8_const128_s16_u8_mmx, diff8x8_const128_s16_u8, OIL_IMPL_FLAG_MMX); static void diff8x8_average_s16_u8_mmx (int16_t *dest, uint8_t *src1, int ss1, uint8_t *src2, int ss2, uint8_t *src3) { __asm__ __volatile__ ( " pxor %%mm7, %%mm7 \n\t" #define LOOP \ " movq (%0), %%mm0 \n\t" /* mm0 = FiltPtr */ \ " movq (%1), %%mm1 \n\t" /* mm1 = ReconPtr1 */ \ " movq (%2), %%mm4 \n\t" /* mm1 = ReconPtr2 */ \ " movq %%mm0, %%mm2 \n\t" /* dup to prepare for up conversion */ \ " movq %%mm1, %%mm3 \n\t" /* dup to prepare for up conversion */ \ " movq %%mm4, %%mm5 \n\t" /* dup to prepare for up conversion */ \ /* convert from UINT8 to INT16 */ \ " punpcklbw %%mm7, %%mm0 \n\t" /* mm0 = INT16(FiltPtr) */ \ " punpcklbw %%mm7, %%mm1 \n\t" /* mm1 = INT16(ReconPtr1) */ \ " punpcklbw %%mm7, %%mm4 \n\t" /* mm1 = INT16(ReconPtr2) */ \ " punpckhbw %%mm7, %%mm2 \n\t" /* mm2 = INT16(FiltPtr) */ \ " punpckhbw %%mm7, %%mm3 \n\t" /* mm3 = INT16(ReconPtr1) */ \ " punpckhbw %%mm7, %%mm5 \n\t" /* mm3 = INT16(ReconPtr2) */ \ /* average ReconPtr1 and ReconPtr2 */ \ " paddw %%mm4, %%mm1 \n\t" /* mm1 = ReconPtr1 + ReconPtr2 */ \ " paddw %%mm5, %%mm3 \n\t" /* mm3 = ReconPtr1 + ReconPtr2 */ \ " psrlw $1, %%mm1 \n\t" /* mm1 = (ReconPtr1 + ReconPtr2) / 2 */ \ " psrlw $1, %%mm3 \n\t" /* mm3 = (ReconPtr1 + ReconPtr2) / 2 */ \ " psubw %%mm1, %%mm0 \n\t" /* mm0 = FiltPtr - ((ReconPtr1 + ReconPtr2) / 2) */ \ " psubw %%mm3, %%mm2 \n\t" /* mm2 = FiltPtr - ((ReconPtr1 + ReconPtr2) / 2) */ \ " movq %%mm0, (%3) \n\t" /* write answer out */ \ " movq %%mm2, 8(%3) \n\t" /* write answer out */ \ /* Increment pointers */ \ " add $16, %3 \n\t" \ " add %4, %0 \n\t" \ " add %5, %1 \n\t" \ " add %5, %2 \n\t" LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP #undef LOOP " emms \n\t" : "+r" (src1), "+r" (src2), "+r" (src3), "+r" (dest) : "m" (ss1), "m" (ss2) : "memory" ); } OIL_DEFINE_IMPL_FULL (diff8x8_average_s16_u8_mmx, diff8x8_average_s16_u8, OIL_IMPL_FLAG_MMX); liboil-0.3.17/liboil/i386/sad8x8avg_i386.c0000644000175000017500000001270310717203073014475 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include OIL_DECLARE_CLASS (sad8x8_u8_avg); static void sad8x8_u8_avg_mmx (uint32_t *dest, uint8_t *src1, int ss1, uint8_t *src2, uint8_t *src3, int ss2) { uint32_t diff; __asm__ __volatile__ ( " pcmpeqd %%mm5, %%mm5 \n\t" /* fefefefefefefefe in mm5 */ " paddb %%mm5, %%mm5 \n\t" " pxor %%mm6, %%mm6 \n\t" /* zero out mm6 for unpack */ " pxor %%mm7, %%mm7 \n\t" /* mm7 contains the result */ " mov $8, %%edi \n\t" /* 8 rows */ "1: \n\t" " movq (%1), %%mm0 \n\t" /* take 8 bytes */ " movq (%2), %%mm2 \n\t" " movq (%3), %%mm3 \n\t" /* take average of mm2 and mm3 */ " movq %%mm2, %%mm1 \n\t" " pand %%mm3, %%mm1 \n\t" " pxor %%mm2, %%mm3 \n\t" " pand %%mm5, %%mm3 \n\t" " psrlq $1, %%mm3 \n\t" " paddb %%mm3, %%mm1 \n\t" " movq %%mm0, %%mm2 \n\t" " psubusb %%mm1, %%mm0 \n\t" /* A - B */ " psubusb %%mm2, %%mm1 \n\t" /* B - A */ " por %%mm1, %%mm0 \n\t" /* and or gives abs difference */ " movq %%mm0, %%mm1 \n\t" " punpcklbw %%mm6, %%mm0 \n\t" /* unpack to higher precision for accumulation */ " paddw %%mm0, %%mm7 \n\t" /* accumulate difference... */ " punpckhbw %%mm6, %%mm1 \n\t" /* unpack high four bytes to higher precision */ " add %4, %1 \n\t" /* Inc pointer into the new data */ " paddw %%mm1, %%mm7 \n\t" /* accumulate difference... */ " add %5, %2 \n\t" /* Inc pointer into ref data */ " add %5, %3 \n\t" /* Inc pointer into ref data */ " dec %%edi \n\t" " jnz 1b \n\t" " movq %%mm7, %%mm0 \n\t" " psrlq $32, %%mm7 \n\t" " paddw %%mm0, %%mm7 \n\t" " movq %%mm7, %%mm0 \n\t" " psrlq $16, %%mm7 \n\t" " paddw %%mm0, %%mm7 \n\t" " movd %%mm7, %0 \n\t" " andl $0xffff, %0 \n\t" " emms \n\t" : "=m" (diff), "+r" (src1), "+r" (src2), "+r" (src3) : "m" (ss1), "m" (ss2) : "edi", "memory" ); *dest = diff; } OIL_DEFINE_IMPL_FULL (sad8x8_u8_avg_mmx, sad8x8_u8_avg, OIL_IMPL_FLAG_MMX); static void sad8x8_u8_avg_mmxext (uint32_t *dest, uint8_t *src1, int ss1, uint8_t *src2, uint8_t *src3, int ss2) { uint32_t diff; __asm__ __volatile__ ( " pxor %%mm7, %%mm7 \n\t" /* mm7 contains the result */ " mov $0x01010101, %%eax \n\t" " movd %%eax, %%mm6 \n\t" " punpcklbw %%mm6, %%mm6 \n\t" " mov $8, %%eax \n\t" "1: \n\t" " movq (%1), %%mm0 \n\t" /* take 8 bytes */ " movq (%2), %%mm1 \n\t" " movq (%3), %%mm2 \n\t" " movq %%mm1, %%mm3 \n\t" " pavgb %%mm2, %%mm1 \n\t" " pxor %%mm2, %%mm3 \n\t" " pand %%mm6, %%mm3 \n\t" " psubb %%mm3, %%mm1 \n\t" " psadbw %%mm1, %%mm0 \n\t" " add %4, %1 \n\t" /* Inc pointer into the new data */ " paddw %%mm0, %%mm7 \n\t" /* accumulate difference... */ " add %5, %2 \n\t" /* Inc pointer into ref data */ " add %5, %3 \n\t" /* Inc pointer into ref data */ " decl %%eax \n\t" " jnz 1b \n\t" " movd %%mm7, %0 \n\t" " emms \n\t" : "=m" (diff), "+r" (src1), "+r" (src2), "+r" (src3) : "m" (ss1), "m" (ss2) : "eax", "memory" ); *dest = diff; } OIL_DEFINE_IMPL_FULL (sad8x8_u8_avg_mmxext, sad8x8_u8_avg, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); liboil-0.3.17/liboil/i386/Makefile.in0000644000175000017500000010540011332627672014016 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @USE_NEW_ABI_FALSE@am__append_1 = \ @USE_NEW_ABI_FALSE@ abs_i386.c \ @USE_NEW_ABI_FALSE@ conv_sse.c \ @USE_NEW_ABI_FALSE@ conv_3dnow.c subdir = liboil/i386 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libi386_la_LIBADD = am__libi386_la_SOURCES_DIST = argb_paint_i386.c ayuv2argb_i386.c \ composite_i386.c copy8x8_i386.c diff8x8_i386.c error8x8_i386.c \ md5_i386.c mult8x8_i386.c recon8x8_i386.c rowcolsad8x8_i386.c \ sad8x8avg_i386.c splat_i386.c trans8x8_i386.c wavelet.c \ abs_i386.c conv_sse.c conv_3dnow.c @USE_NEW_ABI_FALSE@am__objects_1 = libi386_la-abs_i386.lo \ @USE_NEW_ABI_FALSE@ libi386_la-conv_sse.lo \ @USE_NEW_ABI_FALSE@ libi386_la-conv_3dnow.lo am_libi386_la_OBJECTS = libi386_la-argb_paint_i386.lo \ libi386_la-ayuv2argb_i386.lo libi386_la-composite_i386.lo \ libi386_la-copy8x8_i386.lo libi386_la-diff8x8_i386.lo \ libi386_la-error8x8_i386.lo libi386_la-md5_i386.lo \ libi386_la-mult8x8_i386.lo libi386_la-recon8x8_i386.lo \ libi386_la-rowcolsad8x8_i386.lo libi386_la-sad8x8avg_i386.lo \ libi386_la-splat_i386.lo libi386_la-trans8x8_i386.lo \ libi386_la-wavelet.lo $(am__objects_1) libi386_la_OBJECTS = $(am_libi386_la_OBJECTS) libi386_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libi386_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libi386_la_SOURCES) DIST_SOURCES = $(am__libi386_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libi386.la libi386_la_SOURCES = argb_paint_i386.c ayuv2argb_i386.c \ composite_i386.c copy8x8_i386.c diff8x8_i386.c error8x8_i386.c \ md5_i386.c mult8x8_i386.c recon8x8_i386.c rowcolsad8x8_i386.c \ sad8x8avg_i386.c splat_i386.c trans8x8_i386.c wavelet.c \ $(am__append_1) libi386_la_CFLAGS = $(LIBOIL_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/i386/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/i386/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libi386.la: $(libi386_la_OBJECTS) $(libi386_la_DEPENDENCIES) $(libi386_la_LINK) $(libi386_la_OBJECTS) $(libi386_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-abs_i386.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-argb_paint_i386.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-ayuv2argb_i386.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-composite_i386.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-conv_3dnow.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-conv_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-copy8x8_i386.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-diff8x8_i386.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-error8x8_i386.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-md5_i386.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-mult8x8_i386.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-recon8x8_i386.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-rowcolsad8x8_i386.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-sad8x8avg_i386.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-splat_i386.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-trans8x8_i386.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_la-wavelet.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libi386_la-argb_paint_i386.lo: argb_paint_i386.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-argb_paint_i386.lo -MD -MP -MF $(DEPDIR)/libi386_la-argb_paint_i386.Tpo -c -o libi386_la-argb_paint_i386.lo `test -f 'argb_paint_i386.c' || echo '$(srcdir)/'`argb_paint_i386.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-argb_paint_i386.Tpo $(DEPDIR)/libi386_la-argb_paint_i386.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='argb_paint_i386.c' object='libi386_la-argb_paint_i386.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-argb_paint_i386.lo `test -f 'argb_paint_i386.c' || echo '$(srcdir)/'`argb_paint_i386.c libi386_la-ayuv2argb_i386.lo: ayuv2argb_i386.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-ayuv2argb_i386.lo -MD -MP -MF $(DEPDIR)/libi386_la-ayuv2argb_i386.Tpo -c -o libi386_la-ayuv2argb_i386.lo `test -f 'ayuv2argb_i386.c' || echo '$(srcdir)/'`ayuv2argb_i386.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-ayuv2argb_i386.Tpo $(DEPDIR)/libi386_la-ayuv2argb_i386.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ayuv2argb_i386.c' object='libi386_la-ayuv2argb_i386.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-ayuv2argb_i386.lo `test -f 'ayuv2argb_i386.c' || echo '$(srcdir)/'`ayuv2argb_i386.c libi386_la-composite_i386.lo: composite_i386.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-composite_i386.lo -MD -MP -MF $(DEPDIR)/libi386_la-composite_i386.Tpo -c -o libi386_la-composite_i386.lo `test -f 'composite_i386.c' || echo '$(srcdir)/'`composite_i386.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-composite_i386.Tpo $(DEPDIR)/libi386_la-composite_i386.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='composite_i386.c' object='libi386_la-composite_i386.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-composite_i386.lo `test -f 'composite_i386.c' || echo '$(srcdir)/'`composite_i386.c libi386_la-copy8x8_i386.lo: copy8x8_i386.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-copy8x8_i386.lo -MD -MP -MF $(DEPDIR)/libi386_la-copy8x8_i386.Tpo -c -o libi386_la-copy8x8_i386.lo `test -f 'copy8x8_i386.c' || echo '$(srcdir)/'`copy8x8_i386.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-copy8x8_i386.Tpo $(DEPDIR)/libi386_la-copy8x8_i386.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy8x8_i386.c' object='libi386_la-copy8x8_i386.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-copy8x8_i386.lo `test -f 'copy8x8_i386.c' || echo '$(srcdir)/'`copy8x8_i386.c libi386_la-diff8x8_i386.lo: diff8x8_i386.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-diff8x8_i386.lo -MD -MP -MF $(DEPDIR)/libi386_la-diff8x8_i386.Tpo -c -o libi386_la-diff8x8_i386.lo `test -f 'diff8x8_i386.c' || echo '$(srcdir)/'`diff8x8_i386.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-diff8x8_i386.Tpo $(DEPDIR)/libi386_la-diff8x8_i386.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='diff8x8_i386.c' object='libi386_la-diff8x8_i386.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-diff8x8_i386.lo `test -f 'diff8x8_i386.c' || echo '$(srcdir)/'`diff8x8_i386.c libi386_la-error8x8_i386.lo: error8x8_i386.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-error8x8_i386.lo -MD -MP -MF $(DEPDIR)/libi386_la-error8x8_i386.Tpo -c -o libi386_la-error8x8_i386.lo `test -f 'error8x8_i386.c' || echo '$(srcdir)/'`error8x8_i386.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-error8x8_i386.Tpo $(DEPDIR)/libi386_la-error8x8_i386.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='error8x8_i386.c' object='libi386_la-error8x8_i386.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-error8x8_i386.lo `test -f 'error8x8_i386.c' || echo '$(srcdir)/'`error8x8_i386.c libi386_la-md5_i386.lo: md5_i386.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-md5_i386.lo -MD -MP -MF $(DEPDIR)/libi386_la-md5_i386.Tpo -c -o libi386_la-md5_i386.lo `test -f 'md5_i386.c' || echo '$(srcdir)/'`md5_i386.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-md5_i386.Tpo $(DEPDIR)/libi386_la-md5_i386.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='md5_i386.c' object='libi386_la-md5_i386.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-md5_i386.lo `test -f 'md5_i386.c' || echo '$(srcdir)/'`md5_i386.c libi386_la-mult8x8_i386.lo: mult8x8_i386.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-mult8x8_i386.lo -MD -MP -MF $(DEPDIR)/libi386_la-mult8x8_i386.Tpo -c -o libi386_la-mult8x8_i386.lo `test -f 'mult8x8_i386.c' || echo '$(srcdir)/'`mult8x8_i386.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-mult8x8_i386.Tpo $(DEPDIR)/libi386_la-mult8x8_i386.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mult8x8_i386.c' object='libi386_la-mult8x8_i386.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-mult8x8_i386.lo `test -f 'mult8x8_i386.c' || echo '$(srcdir)/'`mult8x8_i386.c libi386_la-recon8x8_i386.lo: recon8x8_i386.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-recon8x8_i386.lo -MD -MP -MF $(DEPDIR)/libi386_la-recon8x8_i386.Tpo -c -o libi386_la-recon8x8_i386.lo `test -f 'recon8x8_i386.c' || echo '$(srcdir)/'`recon8x8_i386.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-recon8x8_i386.Tpo $(DEPDIR)/libi386_la-recon8x8_i386.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='recon8x8_i386.c' object='libi386_la-recon8x8_i386.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-recon8x8_i386.lo `test -f 'recon8x8_i386.c' || echo '$(srcdir)/'`recon8x8_i386.c libi386_la-rowcolsad8x8_i386.lo: rowcolsad8x8_i386.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-rowcolsad8x8_i386.lo -MD -MP -MF $(DEPDIR)/libi386_la-rowcolsad8x8_i386.Tpo -c -o libi386_la-rowcolsad8x8_i386.lo `test -f 'rowcolsad8x8_i386.c' || echo '$(srcdir)/'`rowcolsad8x8_i386.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-rowcolsad8x8_i386.Tpo $(DEPDIR)/libi386_la-rowcolsad8x8_i386.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rowcolsad8x8_i386.c' object='libi386_la-rowcolsad8x8_i386.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-rowcolsad8x8_i386.lo `test -f 'rowcolsad8x8_i386.c' || echo '$(srcdir)/'`rowcolsad8x8_i386.c libi386_la-sad8x8avg_i386.lo: sad8x8avg_i386.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-sad8x8avg_i386.lo -MD -MP -MF $(DEPDIR)/libi386_la-sad8x8avg_i386.Tpo -c -o libi386_la-sad8x8avg_i386.lo `test -f 'sad8x8avg_i386.c' || echo '$(srcdir)/'`sad8x8avg_i386.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-sad8x8avg_i386.Tpo $(DEPDIR)/libi386_la-sad8x8avg_i386.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sad8x8avg_i386.c' object='libi386_la-sad8x8avg_i386.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-sad8x8avg_i386.lo `test -f 'sad8x8avg_i386.c' || echo '$(srcdir)/'`sad8x8avg_i386.c libi386_la-splat_i386.lo: splat_i386.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-splat_i386.lo -MD -MP -MF $(DEPDIR)/libi386_la-splat_i386.Tpo -c -o libi386_la-splat_i386.lo `test -f 'splat_i386.c' || echo '$(srcdir)/'`splat_i386.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-splat_i386.Tpo $(DEPDIR)/libi386_la-splat_i386.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='splat_i386.c' object='libi386_la-splat_i386.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-splat_i386.lo `test -f 'splat_i386.c' || echo '$(srcdir)/'`splat_i386.c libi386_la-trans8x8_i386.lo: trans8x8_i386.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-trans8x8_i386.lo -MD -MP -MF $(DEPDIR)/libi386_la-trans8x8_i386.Tpo -c -o libi386_la-trans8x8_i386.lo `test -f 'trans8x8_i386.c' || echo '$(srcdir)/'`trans8x8_i386.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-trans8x8_i386.Tpo $(DEPDIR)/libi386_la-trans8x8_i386.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trans8x8_i386.c' object='libi386_la-trans8x8_i386.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-trans8x8_i386.lo `test -f 'trans8x8_i386.c' || echo '$(srcdir)/'`trans8x8_i386.c libi386_la-wavelet.lo: wavelet.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-wavelet.lo -MD -MP -MF $(DEPDIR)/libi386_la-wavelet.Tpo -c -o libi386_la-wavelet.lo `test -f 'wavelet.c' || echo '$(srcdir)/'`wavelet.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-wavelet.Tpo $(DEPDIR)/libi386_la-wavelet.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='wavelet.c' object='libi386_la-wavelet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-wavelet.lo `test -f 'wavelet.c' || echo '$(srcdir)/'`wavelet.c libi386_la-abs_i386.lo: abs_i386.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-abs_i386.lo -MD -MP -MF $(DEPDIR)/libi386_la-abs_i386.Tpo -c -o libi386_la-abs_i386.lo `test -f 'abs_i386.c' || echo '$(srcdir)/'`abs_i386.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-abs_i386.Tpo $(DEPDIR)/libi386_la-abs_i386.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='abs_i386.c' object='libi386_la-abs_i386.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-abs_i386.lo `test -f 'abs_i386.c' || echo '$(srcdir)/'`abs_i386.c libi386_la-conv_sse.lo: conv_sse.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-conv_sse.lo -MD -MP -MF $(DEPDIR)/libi386_la-conv_sse.Tpo -c -o libi386_la-conv_sse.lo `test -f 'conv_sse.c' || echo '$(srcdir)/'`conv_sse.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-conv_sse.Tpo $(DEPDIR)/libi386_la-conv_sse.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='conv_sse.c' object='libi386_la-conv_sse.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-conv_sse.lo `test -f 'conv_sse.c' || echo '$(srcdir)/'`conv_sse.c libi386_la-conv_3dnow.lo: conv_3dnow.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -MT libi386_la-conv_3dnow.lo -MD -MP -MF $(DEPDIR)/libi386_la-conv_3dnow.Tpo -c -o libi386_la-conv_3dnow.lo `test -f 'conv_3dnow.c' || echo '$(srcdir)/'`conv_3dnow.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_la-conv_3dnow.Tpo $(DEPDIR)/libi386_la-conv_3dnow.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='conv_3dnow.c' object='libi386_la-conv_3dnow.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_la_CFLAGS) $(CFLAGS) -c -o libi386_la-conv_3dnow.lo `test -f 'conv_3dnow.c' || echo '$(srcdir)/'`conv_3dnow.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/i386/rowcolsad8x8_i386.c0000644000175000017500000002551310717203073015230 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include OIL_DECLARE_CLASS (rowsad8x8_u8); OIL_DECLARE_CLASS (colsad8x8_u8); static void rowsad8x8_u8_mmx (uint32_t *dest, uint8_t *src1, uint8_t *src2) { uint32_t MaxSad; __asm__ __volatile__ ( " pxor %%mm6, %%mm6 \n\t" /* zero out mm6 for unpack */ " pxor %%mm7, %%mm7 \n\t" /* zero out mm7 for unpack */ " movq (%1), %%mm0 \n\t" /* take 8 bytes */ " movq (%2), %%mm1 \n\t" " movq %%mm0, %%mm2 \n\t" " psubusb %%mm1, %%mm0 \n\t" /* A - B */ " psubusb %%mm2, %%mm1 \n\t" /* B - A */ " por %%mm1, %%mm0 \n\t" /* and or gives abs difference */ " movq %%mm0, %%mm1 \n\t" " punpcklbw %%mm6, %%mm0 \n\t" /* ; unpack low four bytes to higher precision */ " punpckhbw %%mm7, %%mm1 \n\t" /* ; unpack high four bytes to higher precision */ " movq %%mm0, %%mm2 \n\t" " movq %%mm1, %%mm3 \n\t" " psrlq $32, %%mm2 \n\t" /* fold and add */ " psrlq $32, %%mm3 \n\t" " paddw %%mm2, %%mm0 \n\t" " paddw %%mm3, %%mm1 \n\t" " movq %%mm0, %%mm2 \n\t" " movq %%mm1, %%mm3 \n\t" " psrlq $16, %%mm2 \n\t" " psrlq $16, %%mm3 \n\t" " paddw %%mm2, %%mm0 \n\t" " paddw %%mm3, %%mm1 \n\t" " psubusw %%mm0, %%mm1 \n\t" " paddw %%mm0, %%mm1 \n\t" /* mm1 = max(mm1, mm0) */ " movd %%mm1, %0 \n\t" " andl $0xffff, %0 \n\t" " emms \n\t" : "=m" (MaxSad), "+r" (src1), "+r" (src2) : : "memory" ); *dest = MaxSad; } OIL_DEFINE_IMPL_FULL (rowsad8x8_u8_mmx, rowsad8x8_u8, OIL_IMPL_FLAG_MMX); static void rowsad8x8_u8_mmxext (uint32_t *dest, uint8_t *src1, uint8_t *src2) { uint32_t MaxSad; __asm__ __volatile__ ( " movd (%1), %%mm0 \n\t" " movd (%2), %%mm1 \n\t" " psadbw %%mm0, %%mm1 \n\t" " movd 4(%1), %%mm2 \n\t" " movd 4(%2), %%mm3 \n\t" " psadbw %%mm2, %%mm3 \n\t" " pmaxsw %%mm1, %%mm3 \n\t" " movd %%mm3, %0 \n\t" " andl $0xffff, %0 \n\t" " emms \n\t" : "=m" (MaxSad), "+r" (src1), "+r" (src2) : : "memory" ); *dest = MaxSad; } OIL_DEFINE_IMPL_FULL (rowsad8x8_u8_mmxext, rowsad8x8_u8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); static void colsad8x8_u8_mmx (uint32_t *dest, uint8_t *src1, int ss1, uint8_t *src2, int ss2) { uint32_t MaxSad; __asm__ __volatile__ ( " pxor %%mm3, %%mm3 \n\t" /* zero out mm3 for unpack */ " pxor %%mm4, %%mm4 \n\t" /* mm4 low sum */ " pxor %%mm5, %%mm5 \n\t" /* mm5 high sum */ " pxor %%mm6, %%mm6 \n\t" /* mm6 low sum */ " pxor %%mm7, %%mm7 \n\t" /* mm7 high sum */ " mov $4, %%edi \n\t" /* 4 rows */ "1: \n\t" " movq (%1), %%mm0 \n\t" /* take 8 bytes */ " movq (%2), %%mm1 \n\t" /* take 8 bytes */ " movq %%mm0, %%mm2 \n\t" " psubusb %%mm1, %%mm0 \n\t" /* A - B */ " psubusb %%mm2, %%mm1 \n\t" /* B - A */ " por %%mm1, %%mm0 \n\t" /* and or gives abs difference */ " movq %%mm0, %%mm1 \n\t" " punpcklbw %%mm3, %%mm0 \n\t" /* unpack to higher precision for accumulation */ " paddw %%mm0, %%mm4 \n\t" /* accumulate difference... */ " punpckhbw %%mm3, %%mm1 \n\t" /* unpack high four bytes to higher precision */ " paddw %%mm1, %%mm5 \n\t" /* accumulate difference... */ " add %3, %1 \n\t" /* Inc pointer into the new data */ " add %3, %2 \n\t" /* Inc pointer into the new data */ " dec %%edi \n\t" " jnz 1b \n\t" " mov $4, %%edi \n\t" /* 4 rows */ "2: \n\t" " movq (%1), %%mm0 \n\t" /* take 8 bytes */ " movq (%2), %%mm1 \n\t" /* take 8 bytes */ " movq %%mm0, %%mm2 \n\t" " psubusb %%mm1, %%mm0 \n\t" /* A - B */ " psubusb %%mm2, %%mm1 \n\t" /* B - A */ " por %%mm1, %%mm0 \n\t" /* and or gives abs difference */ " movq %%mm0, %%mm1 \n\t" " punpcklbw %%mm3, %%mm0 \n\t" /* unpack to higher precision for accumulation */ " paddw %%mm0, %%mm6 \n\t" /* accumulate difference... */ " punpckhbw %%mm3, %%mm1 \n\t" /* unpack high four bytes to higher precision */ " paddw %%mm1, %%mm7 \n\t" /* accumulate difference... */ " add %3, %1 \n\t" /* Inc pointer into the new data */ " add %3, %2 \n\t" /* Inc pointer into the new data */ " dec %%edi \n\t" " jnz 2b \n\t" " psubusw %%mm6, %%mm7 \n\t" " paddw %%mm6, %%mm7 \n\t" /* mm7 = max(mm7, mm6) */ " psubusw %%mm4, %%mm5 \n\t" " paddw %%mm4, %%mm5 \n\t" /* mm5 = max(mm5, mm4) */ " psubusw %%mm5, %%mm7 \n\t" " paddw %%mm5, %%mm7 \n\t" /* mm7 = max(mm5, mm7) */ " movq %%mm7, %%mm6 \n\t" " psrlq $32, %%mm6 \n\t" " psubusw %%mm6, %%mm7 \n\t" " paddw %%mm6, %%mm7 \n\t" /* mm7 = max(mm5, mm7) */ " movq %%mm7, %%mm6 \n\t" " psrlq $16, %%mm6 \n\t" " psubusw %%mm6, %%mm7 \n\t" " paddw %%mm6, %%mm7 \n\t" /* mm7 = max(mm5, mm7) */ " movd %%mm7, %0 \n\t" " andl $0xffff, %0 \n\t" " emms \n\t" : "=r" (MaxSad), "+r" (src1), "+r" (src2) : "r" (ss1) : "memory", "edi" ); *dest = MaxSad; } OIL_DEFINE_IMPL_FULL (colsad8x8_u8_mmx, colsad8x8_u8, OIL_IMPL_FLAG_MMX); static void colsad8x8_u8_mmxext (uint32_t *dest, uint8_t *src1, int ss1, uint8_t *src2, int ss2) { uint32_t MaxSad; __asm__ __volatile__ ( " pxor %%mm3, %%mm3 \n\t" /* zero out mm3 for unpack */ " pxor %%mm4, %%mm4 \n\t" /* mm4 low sum */ " pxor %%mm5, %%mm5 \n\t" /* mm5 high sum */ " pxor %%mm6, %%mm6 \n\t" /* mm6 low sum */ " pxor %%mm7, %%mm7 \n\t" /* mm7 high sum */ " mov $4, %%edi \n\t" /* 4 rows */ "1: \n\t" " movq (%1), %%mm0 \n\t" /* take 8 bytes */ " movq (%2), %%mm1 \n\t" /* take 8 bytes */ " movq %%mm0, %%mm2 \n\t" " psubusb %%mm1, %%mm0 \n\t" /* A - B */ " psubusb %%mm2, %%mm1 \n\t" /* B - A */ " por %%mm1, %%mm0 \n\t" /* and or gives abs difference */ " movq %%mm0, %%mm1 \n\t" " punpcklbw %%mm3, %%mm0 \n\t" /* unpack to higher precision for accumulation */ " paddw %%mm0, %%mm4 \n\t" /* accumulate difference... */ " punpckhbw %%mm3, %%mm1 \n\t" /* unpack high four bytes to higher precision */ " paddw %%mm1, %%mm5 \n\t" /* accumulate difference... */ " add %3, %1 \n\t" /* Inc pointer into the new data */ " add %3, %2 \n\t" /* Inc pointer into the new data */ " dec %%edi \n\t" " jnz 1b \n\t" " mov $4, %%edi \n\t" /* 4 rows */ "2: \n\t" " movq (%1), %%mm0 \n\t" /* take 8 bytes */ " movq (%2), %%mm1 \n\t" /* take 8 bytes */ " movq %%mm0, %%mm2 \n\t" " psubusb %%mm1, %%mm0 \n\t" /* A - B */ " psubusb %%mm2, %%mm1 \n\t" /* B - A */ " por %%mm1, %%mm0 \n\t" /* and or gives abs difference */ " movq %%mm0, %%mm1 \n\t" " punpcklbw %%mm3, %%mm0 \n\t" /* unpack to higher precision for accumulation */ " paddw %%mm0, %%mm6 \n\t" /* accumulate difference... */ " punpckhbw %%mm3, %%mm1 \n\t" /* unpack high four bytes to higher precision */ " paddw %%mm1, %%mm7 \n\t" /* accumulate difference... */ " add %3, %1 \n\t" /* Inc pointer into the new data */ " add %3, %2 \n\t" /* Inc pointer into the new data */ " dec %%edi \n\t" " jnz 2b \n\t" " pmaxsw %%mm6, %%mm7 \n\t" " pmaxsw %%mm4, %%mm5 \n\t" " pmaxsw %%mm5, %%mm7 \n\t" " movq %%mm7, %%mm6 \n\t" " psrlq $32, %%mm6 \n\t" " pmaxsw %%mm6, %%mm7 \n\t" " movq %%mm7, %%mm6 \n\t" " psrlq $16, %%mm6 \n\t" " pmaxsw %%mm6, %%mm7 \n\t" " movd %%mm7, %0 \n\t" " andl $0xffff, %0 \n\t" " emms \n\t" : "=r" (MaxSad), "+r" (src1), "+r" (src2) : "r" (ss1) : "memory", "edi" ); *dest = MaxSad; } OIL_DEFINE_IMPL_FULL (colsad8x8_u8_mmxext, colsad8x8_u8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); liboil-0.3.17/liboil/liboilfunction.c0000644000175000017500000003240011332406374014435 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include /** * SECTION:liboilclass-unstable * @title:OilFunctionClass * @short_description: Functions for manipulating function classes * * * Functions operate on arrays of data. The arrays can be either source * arrays (input only), destination arrays (output only), or in-place * arrays (both input and output). * * * * The interpretation of a parameter can usually be determined from its * name. Parameters for arrays are of the form d1_1xn, where the first * character represents the direction (source, destination, or in-place), * the second represents the index for that particular direction, and * the characters after the underscore indicate the size of the array. * In this case, "1xn" represents an array that is 1 by N. Note that * the index and the size can both be omitted, giving a default of 1 * for the index and 1xn for the size. * * * * Parameters that represent strides are of the form "d1s". The * interpretation is similar to above, except that the s indicates * a stride parameter. * * * * The exceptions to the above rule are "dest", "src", "dstr", "sstr", etc. * These are aliases for "d1", "s1", "d1s", and "s1s", respectively. This * form is deprecated and will be removed in the 0.4 series. * * * * Two special parameters are "n" and "m", which determine the size of * the arrays in other parameters. * * * * Data arrays are laid out such that rows are separated by the number * of bytes given by the corresponding stride. Elements in each row * are contiguous. If there is no stride parameter corresponding to an * array, the rows of the array are contiguous. * */ /** * SECTION:liboilimpl-unstable * @title:OilFunctionImpl * @short_description: Functions for manipulating function implementations. */ extern OilFunctionClass *_oil_function_class_array[]; extern OilFunctionImpl *_oil_function_impl_array[]; static int _oil_n_function_impls; static int _oil_n_function_classes; static void oil_init_pointers (void); static void oil_init_structs (void); static char * xstrdup (const char *s); void _oil_cpu_init (void); /** * SECTION:liboilinit * @title: Intialization * @short_description: Initialization functions */ /** * SECTION:liboilinit-unstable * @title: Intialization * @short_description: Initialization functions */ /** * oil_init: * * Initialize liboil. This function must be called before any * other liboil function is used. oil_init() may be called multiple * times. * * Since: 0.3.0 */ static int _oil_inited = 0; void oil_init (void) { if (_oil_inited) return; _oil_inited = 1; srand(time(NULL)); _oil_debug_init (); _oil_cpu_init (); oil_init_pointers (); oil_init_structs (); oil_optimize_all (); OIL_INFO ("oil_init() finished"); } /** * oil_init_no_optimize: * * Initialize liboil similar to oil_init(), but do not run the * profiling stage. This function is mainly useful for internal * programs. */ void oil_init_no_optimize (void) { if (_oil_inited) return; _oil_inited = 1; srand(time(NULL)); _oil_debug_init (); _oil_cpu_init (); oil_init_pointers (); oil_init_structs (); } /** * oil_optimize_all: * * Optimize all function classes. */ void oil_optimize_all (void) { OilFunctionClass *klass; int i; oil_fault_check_enable (); for (i = 0; i < _oil_n_function_classes; i++) { klass = oil_class_get_by_index (i); oil_class_optimize (klass); } OIL_INFO("%d classes, %d implementations, %d enabled", _oil_n_function_classes, _oil_n_function_impls, 0); oil_fault_check_disable (); } /** * oil_optimize: * @class_name: a string * * Optimize the function class that has the name specified by @class_name. */ void oil_optimize (const char *class_name) { OilFunctionClass *klass; klass = oil_class_get (class_name); if (klass == NULL) { OIL_ERROR ("could not find class %s", class_name); return; } oil_class_optimize (klass); } /** * oil_class_get_n_classes: * * Returns the number of function classes. * * Returns: the number of function classes */ int oil_class_get_n_classes (void) { return _oil_n_function_classes; } /** * oil_class_get_by_index: * @i: index * * Returns a pointer to the function class with index @i. * * Returns: an @OilFunctionClass */ OilFunctionClass * oil_class_get_by_index (int i) { if (i<0 || i>=_oil_n_function_classes) return NULL; return _oil_function_class_array[i]; } /** * oil_impl_is_runnable: * @impl: an @OilFunctionImpl * * Determines whether the function implementation given by @impl * can be executed by the current CPU. * * Returns: 1 if the implementation can be executed, otherwise 0 */ int oil_impl_is_runnable (OilFunctionImpl *impl) { unsigned int oil_cpu_flags = oil_cpu_get_flags(); if ((impl->flags & OIL_CPU_FLAG_MASK) & (~oil_cpu_flags)) return 0; return 1; } /** * oil_impl_is_usable: * @impl: an @OilFunctionImpl * * Determines whether the function implementation given by @impl * is useful, that is, it can be executed on the current CPU and * passes tests. * * Returns: 1 if the implementation can be used, otherwise 0 */ int oil_impl_is_usable (OilFunctionImpl *impl) { unsigned int oil_cpu_flags = oil_cpu_get_flags(); if ((impl->flags & OIL_CPU_FLAG_MASK) & (~oil_cpu_flags)) return 0; if (impl->flags & OIL_IMPL_FLAG_DISABLED) return 0; return 1; } /** * oil_impl_get_by_index: * @i: index * * Returns a pointer to the function implementation with index @i. * * Returns: a pointer to a function implementation structure */ OilFunctionImpl * oil_impl_get_by_index (int i) { if (i<0 || i>=_oil_n_function_impls) return NULL; return _oil_function_impl_array[i]; } /** * oil_class_get: * @class_name: the name of the function class * * Returns a pointer to the function class that has the given class * name. If no such class is found, NULL is returned. * * Returns: a pointer to a function class */ OilFunctionClass * oil_class_get (const char *class_name) { OilFunctionClass *klass; int i; for (i = 0; i < _oil_n_function_classes; i++) { klass = oil_class_get_by_index (i); if (strcmp (klass->name, class_name) == 0) return klass; } return NULL; } /** * oil_class_choose_by_name: * @klass: a function class * @name: the name of an implementation * * Sets the chosen implementation for the given function class to * the implementation with the given name. If no implementation * having the given name is found, the chosen implementation is * not changed. */ void oil_class_choose_by_name (OilFunctionClass * klass, const char *name) { OilFunctionImpl *impl; for(impl = klass->first_impl; impl; impl = impl->next) { if (impl->name && strcmp (impl->name, name) == 0) { klass->chosen_impl = impl; klass->func = impl->func; return; } } } /** * oil_class_optimize: * @klass: a function class * * Tests and profiles each implementation for the given function * class. Testing compares the output of running each implementation * on random input against the reference implementation for the * same input. */ void oil_class_optimize (OilFunctionClass * klass) { OilFunctionImpl *impl; OilFunctionImpl *min_impl; OilTest *test; int ret; OIL_DEBUG ("optimizing class %s", klass->name); if (klass->reference_impl == NULL) { OIL_ERROR ("class %s has no reference implmentation", klass->name); return; } if (klass->first_impl == NULL) { OIL_ERROR ("class %s has no implmentations", klass->name); return; } if (klass->first_impl->next == NULL) { if (!oil_impl_is_runnable (klass->first_impl)) { OIL_ERROR ("class %s has no runable implmentations", klass->name); return; } OIL_DEBUG ("class %s has only one implementation %s", klass->name, klass->first_impl->name); klass->chosen_impl = klass->first_impl; klass->func = klass->first_impl->func; return; } test = oil_test_new (klass); if (test == NULL) { OIL_ERROR ("failed to test function class %s", klass->name); return; } min_impl = NULL; for (impl = klass->first_impl; impl; impl = impl->next) { OIL_LOG ("testing impl %s", impl->name); if (!oil_impl_is_runnable (impl)) continue; ret = oil_test_check_impl (test, impl); if (ret) { impl->profile_ave = test->profile_ave; impl->profile_std = test->profile_std; OIL_LOG ("impl %s ave=%g std=%g", impl->name, impl->profile_ave, impl->profile_std); if (min_impl == NULL) { min_impl = impl; } else { if (impl->profile_ave < min_impl->profile_ave) { min_impl = impl; } } } else { OIL_WARNING("disabling implementation %s", impl->name); impl->profile_ave = test->profile_ave; impl->profile_std = test->profile_std; impl->flags |= OIL_IMPL_FLAG_DISABLED; } } if (min_impl == NULL) { OIL_ERROR ("failed to find optimal implementation for class %s", klass->name); return; } OIL_DEBUG("choosing implementation %s", min_impl->name); klass->chosen_impl = min_impl; klass->func = min_impl->func; oil_test_free (test); } static void oil_init_pointers (void) { int i; for(i=0;_oil_function_class_array[i];i++) { _oil_n_function_classes++; } for(i=0;_oil_function_impl_array[i];i++) { _oil_n_function_impls++; } } static void oil_init_structs (void) { int i; OilFunctionImpl *impl; for (i = 0; i < _oil_n_function_impls; i++) { impl = oil_impl_get_by_index (i); OIL_LOG ("registering impl %p (%s)", impl, (impl->name != NULL) ? impl->name : "NULL"); if (impl->klass == NULL) { OIL_ERROR ("impl->klass is NULL for impl %p (%s)", impl, (impl->name != NULL) ? impl->name : "NULL"); continue; } impl->next = impl->klass->first_impl; impl->klass->first_impl = impl; if (impl->flags & OIL_IMPL_FLAG_REF) { impl->klass->reference_impl = impl; impl->klass->chosen_impl = impl; impl->klass->func = impl->func; } } } /** * oil_class_register_impl_by_name: * @klass_name: the name of the class * @impl: an implementation * * Adds @impl to the list of implementations associated with * the function class given by @klass_name. */ void oil_class_register_impl_by_name (const char *klass_name, OilFunctionImpl *impl) { OilFunctionClass *klass; klass = oil_class_get (klass_name); if (klass == NULL) return; oil_class_register_impl (klass, impl); } /** * oil_class_register_impl: * @klass: the class * @impl: an implementation * * Adds @impl to the list of implementations associated with * the function class given by @klass. */ void oil_class_register_impl (OilFunctionClass *klass, OilFunctionImpl *impl) { impl->klass = klass; impl->next = impl->klass->first_impl; klass->first_impl = impl; if (impl->flags & OIL_IMPL_FLAG_REF) { impl->klass->reference_impl = impl; impl->klass->chosen_impl = impl; impl->klass->func = impl->func; } } /** * oil_class_register_impl_full: * @klass: the class * @func: the function * @name: name of the function * @flags: CPU flags * * Adds @func to the list of implementations associated with * the function class given by @klass. */ void oil_class_register_impl_full (OilFunctionClass *klass, void (*func)(void), const char *name, unsigned int flags) { OilFunctionImpl *impl; impl = malloc(sizeof(OilFunctionImpl)); memset (impl, 0, sizeof(OilFunctionImpl)); impl->func = func; impl->flags = flags; impl->name = xstrdup(name); oil_class_register_impl(klass,impl); } static char * xstrdup (const char *s) { int n = strlen(s); char *t; n = strlen(s); t = malloc(n + 1); memcpy (t, s, n); t[n] = 0; return t; } liboil-0.3.17/liboil/liboiltmp.c0000644000175000017500000000046310717203073013411 00000000000000 /* A few stubs to get liboiltmp1 to link correctly. */ void oil_param_get_source_data(void) {} void oil_random_alpha(void) {} void oil_random_argb(void) {} void oil_test_get_source_data(void) {} void oil_test_get_value(void) {} void oil_test_get_arg_post_n(void) {} void oil_test_get_arg_stride(void) {} liboil-0.3.17/liboil/colorspace/0000777000175000017500000000000011332637375013477 500000000000000liboil-0.3.17/liboil/colorspace/composite.c0000644000175000017500000000573710717203073015563 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #define COMPOSITE_OVER(d,s,m) ((d) + (s) - oil_muldiv_255((d),(m))) #define COMPOSITE_ADD(d,s) oil_clamp_255((d) + (s)) #define COMPOSITE_IN(s,m) oil_muldiv_255((s),(m)) OIL_DECLARE_CLASS (composite_over_argb); static void composite_over_argb_noclamp (uint32_t *dest, const uint32_t *src, int n) { int i; uint8_t a; for(i=0;i>24) #define oil_muldiv_255_2(a,b) oil_divide_255_2((a)*(b)) #define COMPOSITE_OVER_2(d,s,m) ((d) + (s) - oil_muldiv_255((d),(m))) static void composite_over_argb_noclamp_2 (uint32_t *dest, const uint32_t *src, int n) { int i; uint8_t a; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "jpeg.h" #include /** * oil_conv8x8_s16_f64: * @d_8x8: * @dstr: * @s_8x8: * @sstr: * * Converts elements in source array @s_8x8 to the destination * type, placing the results in @d_8x8. */ OIL_DEFINE_CLASS (conv8x8_s16_f64, "int16_t * d_8x8, int dstr, double *s_8x8, int sstr"); /** * oil_conv8x8_f64_s16: * @d_8x8: * @dstr: * @s_8x8: * @sstr: * * Converts elements in source array @s_8x8 to the destination * type, placing the results in @d_8x8. The conversion of source * values outside the destination range are undefined and * implementation dependent. */ OIL_DEFINE_CLASS (conv8x8_f64_s16, "double *d_8x8, int dstr, int16_t * s_8x8, int sstr"); /** * oil_clipconv8x8_u8_s16: * @d_8x8: * @dstr: * @s_8x8: * @sstr: * * Converts elements in source array @s_8x8 to the destination * type, placing the results in @d_8x8. Source values outside * the destination range are clipped to the destination range. */ OIL_DEFINE_CLASS (clipconv8x8_u8_s16, "uint8_t * d_8x8, int dstr, int16_t * s_8x8, int sstr"); #define BLOCK8x8_F64(ptr, stride, row, column) \ (*((double *)((unsigned char *)ptr + stride*row) + column)) #define BLOCK8x8_PTR_F64(ptr, stride, row, column) \ ((double *)((unsigned char *)ptr + stride*row) + column) #define BLOCK8x8_S16(ptr, stride, row, column) \ (*((int16_t *)((unsigned char *)ptr + stride*row) + column)) #define BLOCK8x8_U8(ptr, stride, row, column) \ (*((uint8_t *)((unsigned char *)ptr + stride*row) + column)) static void conv8x8_s16_f64_c (int16_t * dest, int dstr, double *src, int sstr) { int i, j; for (i = 0; i < 8; i++) { for (j = 0; j < 8; j++) { BLOCK8x8_S16 (dest, dstr, i, j) = floor (0.5 + BLOCK8x8_F64 (src, sstr, i, j)); } } } OIL_DEFINE_IMPL_REF (conv8x8_s16_f64_c, conv8x8_s16_f64); static void conv8x8_f64_s16_c (double *dest, int dstr, int16_t * src, int sstr) { int i, j; for (i = 0; i < 8; i++) { for (j = 0; j < 8; j++) { BLOCK8x8_F64 (dest, dstr, i, j) = BLOCK8x8_S16 (src, sstr, i, j); } } } OIL_DEFINE_IMPL_REF (conv8x8_f64_s16_c, conv8x8_f64_s16); static void clipconv8x8_u8_s16_c (uint8_t * dest, int dstr, int16_t * src, int sstr) { int i, j; int16_t x; for (i = 0; i < 8; i++) { for (j = 0; j < 8; j++) { x = BLOCK8x8_S16 (src, sstr, i, j); if (x < 0) x = 0; if (x > 255) x = 255; BLOCK8x8_U8 (dest, dstr, i, j) = x; } } } OIL_DEFINE_IMPL_REF (clipconv8x8_u8_s16_c, clipconv8x8_u8_s16); liboil-0.3.17/liboil/jpeg/zigzag8x8_c.c0000644000175000017500000001411510717203073014507 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "jpeg.h" /** * oil_zigzag8x8_s16: * @d_8x8: * @ds: * @s_8x8: * @ss: * * Reorders an 8x8 block using a zig-zag pattern. The zig-zag pattern * is described in the JPEG specification. * * FIXME: describe zigzag pattern */ OIL_DEFINE_CLASS (zigzag8x8_s16, "int16_t *d_8x8, int ds, int16_t *s_8x8, int ss"); /** * oil_unzigzag8x8_s16: * @d_8x8: * @ds: * @s_8x8: * @ss: * * Reorders an 8x8 block to reverse the zig-zag reordering of * @oil_zigzag8x8_s16. */ OIL_DEFINE_CLASS (unzigzag8x8_s16, "int16_t *d_8x8, int ds, int16_t *s_8x8, int ss"); #define BLOCK8x8_S16(ptr, stride, row, column) \ (*((int16_t *)((void *)ptr + stride*row) + column)) static const unsigned char zigzag_order[64] = { 0, 8, 1, 2, 9, 16, 24, 17, 10, 3, 4, 11, 18, 25, 32, 40, 33, 26, 19, 12, 5, 6, 13, 20, 27, 34, 41, 48, 56, 49, 42, 35, 28, 21, 14, 7, 15, 22, 29, 36, 43, 50, 57, 58, 51, 44, 37, 30, 23, 31, 38, 45, 52, 59, 60, 53, 46, 39, 47, 54, 61, 62, 55, 63 }; static const unsigned char unzigzag_order[64] = { 0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63, }; static void zigzag8x8_s16_ref(int16_t *dest, int dstr, int16_t *src, int sstr) { int i,j; unsigned int z; for(j=0;j<8;j++){ for(i=0;i<8;i++){ z = zigzag_order[j*8+i]; OIL_GET(dest,j*dstr +i*sizeof(int16_t), int16_t) = OIL_GET(src, sstr*(z>>3)+(z&7)*sizeof(int16_t), int16_t); } } } OIL_DEFINE_IMPL_REF (zigzag8x8_s16_ref, zigzag8x8_s16); static void unzigzag8x8_s16_ref (int16_t *dest, int dstr, int16_t *src, int sstr) { int i,j; unsigned int z; for(i=0;i<8;i++){ for(j=0;j<8;j++){ z = unzigzag_order[i*8+j]; OIL_GET(dest,j*dstr +i*sizeof(int16_t), int16_t) = OIL_GET(src, sstr*(z>>3)+(z&7)*sizeof(int16_t), int16_t); } } } OIL_DEFINE_IMPL_REF (unzigzag8x8_s16_ref, unzigzag8x8_s16); static void zigzag8x8_s16_unroll (int16_t *dest, int dstr, int16_t *src, int sstr) { #define ACK(x,y) \ OIL_GET(dest, ((x)>>3) * dstr + ((x)&7) * sizeof(int16_t), int16_t) = \ OIL_GET(src, ((y)>>3) * sstr + ((y)&7) * sizeof(int16_t), int16_t); ACK(0, 0); ACK(1, 8); ACK(2, 1); ACK(3, 2); ACK(4, 9); ACK(5, 16); ACK(6, 24); ACK(7, 17); ACK(8, 10); ACK(9, 3); ACK(10, 4); ACK(11, 11); ACK(12, 18); ACK(13, 25); ACK(14, 32); ACK(15, 40); ACK(16, 33); ACK(17, 26); ACK(18, 19); ACK(19, 12); ACK(20, 5); ACK(21, 6); ACK(22, 13); ACK(23, 20); ACK(24, 27); ACK(25, 34); ACK(26, 41); ACK(27, 48); ACK(28, 56); ACK(29, 49); ACK(30, 42); ACK(31, 35); ACK(32, 28); ACK(33, 21); ACK(34, 14); ACK(35, 7); ACK(36, 15); ACK(37, 22); ACK(38, 29); ACK(39, 36); ACK(40, 43); ACK(41, 50); ACK(42, 57); ACK(43, 58); ACK(44, 51); ACK(45, 44); ACK(46, 37); ACK(47, 30); ACK(48, 23); ACK(49, 31); ACK(50, 38); ACK(51, 45); ACK(52, 52); ACK(53, 59); ACK(54, 60); ACK(55, 53); ACK(56, 46); ACK(57, 39); ACK(58, 47); ACK(59, 54); ACK(60, 61); ACK(61, 62); ACK(62, 55); ACK(63, 63); } OIL_DEFINE_IMPL (zigzag8x8_s16_unroll, zigzag8x8_s16); static void unzigzag8x8_s16_unroll (int16_t *dest, int dstr, int16_t *src, int sstr) { ACK(0, 0) ACK(1, 2) ACK(2, 3) ACK(3, 9) ACK(4, 10) ACK(5, 20) ACK(6, 21) ACK(7, 35) ACK(8, 1) ACK(9, 4) ACK(10, 8) ACK(11, 11) ACK(12, 19) ACK(13, 22) ACK(14, 34) ACK(15, 36) ACK(16, 5) ACK(17, 7) ACK(18, 12) ACK(19, 18) ACK(20, 23) ACK(21, 33) ACK(22, 37) ACK(23, 48) ACK(24, 6) ACK(25, 13) ACK(26, 17) ACK(27, 24) ACK(28, 32) ACK(29, 38) ACK(30, 47) ACK(31, 49) ACK(32, 14) ACK(33, 16) ACK(34, 25) ACK(35, 31) ACK(36, 39) ACK(37, 46) ACK(38, 50) ACK(39, 57) ACK(40, 15) ACK(41, 26) ACK(42, 30) ACK(43, 40) ACK(44, 45) ACK(45, 51) ACK(46, 56) ACK(47, 58) ACK(48, 27) ACK(49, 29) ACK(50, 41) ACK(51, 44) ACK(52, 52) ACK(53, 55) ACK(54, 59) ACK(55, 62) ACK(56, 28) ACK(57, 42) ACK(58, 43) ACK(59, 53) ACK(60, 54) ACK(61, 60) ACK(62, 61) ACK(63, 63) } OIL_DEFINE_IMPL (unzigzag8x8_s16_unroll, unzigzag8x8_s16); liboil-0.3.17/liboil/jpeg/Makefile.am0000644000175000017500000000072510717203073014234 00000000000000 if USE_ALT_OPT opt_libs = libjpeg_opt.la else opt_libs = endif noinst_LTLIBRARIES = libjpeg.la $(opt_libs) noinst_HEADERS = jpeg.h c_sources = \ convert8x8_c.c \ jpeg_rgb_decoder.c \ quantize8x8_c.c \ yuv2rgb_c.c \ zigzag8x8_c.c libjpeg_la_SOURCES = \ $(c_sources) \ $(powerpc_sources) libjpeg_la_LIBADD = $(opt_libs) libjpeg_la_CFLAGS = $(LIBOIL_CFLAGS) libjpeg_opt_la_SOURCES = $(c_sources) libjpeg_opt_la_CFLAGS = $(LIBOIL_CFLAGS) $(LIBOIL_OPT_CFLAGS) liboil-0.3.17/liboil/jpeg/yuv2rgb_c.c0000644000175000017500000001314110717203073014242 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "jpeg.h" /** * oil_yuv2rgbx_u8: * @d_4xn: * @src1: Y component * @src2: U component * @src3: V component * @n: * * Converts YUV pixels to RGB pixels. Each YUV component is in a * separate source array, and are combined and converted to RGB. * * This function should be replaced by one that makes sense. */ OIL_DEFINE_CLASS (yuv2rgbx_u8, "uint8_t *d_4xn, uint8_t *src1, uint8_t *src2, uint8_t *src3, int n"); /** * oil_yuv2rgbx_sub2_u8: * @d_4xn: * @src1: Y component * @src2: U component * @src3: V component * @n: * * Converts YUV pixels to RGB pixels. Each YUV component is in a * separate source array, and are combined and converted to RGB. * The U and V arrays are subsampled by a factor of 2, so only * half of each array is used. * * This function should be replaced by one that makes sense. */ OIL_DEFINE_CLASS (yuv2rgbx_sub2_u8, "uint8_t *d_4xn, uint8_t *src1, uint8_t *src2, uint8_t *src3, int n"); /** * oil_yuv2rgbx_sub4_u8: * @d_4xn: * @src1: Y component * @src2: U component * @src3: V component * @n: * * Converts YUV pixels to RGB pixels. Each YUV component is in a * separate source array, and are combined and converted to RGB. * The U and V arrays are subsampled by a factor of 4, so only * a quarter of each array is used. * * This function should be replaced by one that makes sense. */ OIL_DEFINE_CLASS (yuv2rgbx_sub4_u8, "uint8_t *d_4xn, uint8_t *src1, uint8_t *src2, uint8_t *src3, int n"); #define clamp(x,a,b) clamp_lower(clamp_upper(x,b),a) #define clamp_lower(x,a) ((xb)?(b):(x)) /* from the JFIF spec */ #define YUV_TO_R(y,u,v) clamp((y) + 1.402*((v)-128),0,255) #define YUV_TO_G(y,u,v) clamp((y) - 0.34414*((u)-128) - 0.71414*((v)-128),0,255) #define YUV_TO_B(y,u,v) clamp((y) + 1.772*((u)-128),0,255) #define YUV_TO_R_INT(y,u,v) clamp(((y)*256 + 358*((v)-128))>>8,0,255) #define YUV_TO_G_INT(y,u,v) clamp(((y)*256 - 88*((u)-128) - 183*((v)-128))>>8,0,255) #define YUV_TO_B_INT(y,u,v) clamp(((y)*256 + 454*((u)-128))>>8,0,255) static void yuv2rgbx_u8_ref (uint8_t *rgbp, uint8_t *yp, uint8_t *up, uint8_t *vp, int n) { int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_JPEG_H_ #define _LIBOIL_JPEG_H_ #include OIL_DECLARE_CLASS(conv8x8_s16_f64); OIL_DECLARE_CLASS(conv8x8_f64_s16); OIL_DECLARE_CLASS(clipconv8x8_u8_s16); OIL_DECLARE_CLASS(scanlinescale2_u8); OIL_DECLARE_CLASS(dequantize8x8_s16); OIL_DECLARE_CLASS(yuv2rgbx_u8); OIL_DECLARE_CLASS(yuv2rgbx_sub2_u8); OIL_DECLARE_CLASS(yuv2rgbx_sub4_u8); OIL_DECLARE_CLASS(unzigzag8x8_s16); OIL_DECLARE_CLASS(zigzag8x8_s16); #endif liboil-0.3.17/liboil/jpeg/quantize8x8_c.c0000644000175000017500000000435311067011142015050 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "jpeg.h" /** * oil_dequantize8x8_s16: * @d_8x8: * @dstr: * @s1_8x8: * @sstr1: * @s2_8x8: * * Multiplies each element in @s1_8x8 by the corresponding element * in @s2_8x8 and places the result in @d_8x8. */ OIL_DEFINE_CLASS (dequantize8x8_s16, "int16_t *d_8x8, int dstr, int16_t *s1_8x8, int sstr1, " "int16_t *s2_8x8, int sstr2"); #define BLOCK8x8_S16(ptr, stride, row, column) \ (*((int16_t *)((unsigned char *)ptr + stride*row) + column)) static void dequantize8x8_s16_ref (int16_t *dest, int dstr, int16_t *src, int sstr, int16_t *quant, int qstr) { int i,j; for(i=0;i<8;i++){ for(j=0;j<8;j++){ BLOCK8x8_S16(dest,dstr,i,j) = BLOCK8x8_S16(src,sstr,i,j) * BLOCK8x8_S16(quant,qstr,i,j); } } } OIL_DEFINE_IMPL_REF (dequantize8x8_s16_ref, dequantize8x8_s16); liboil-0.3.17/liboil/jpeg/Makefile.in0000644000175000017500000006715711332627672014272 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = liboil/jpeg DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @USE_ALT_OPT_TRUE@am__DEPENDENCIES_1 = libjpeg_opt.la libjpeg_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__objects_1 = libjpeg_la-convert8x8_c.lo \ libjpeg_la-jpeg_rgb_decoder.lo libjpeg_la-quantize8x8_c.lo \ libjpeg_la-yuv2rgb_c.lo libjpeg_la-zigzag8x8_c.lo am_libjpeg_la_OBJECTS = $(am__objects_1) libjpeg_la_OBJECTS = $(am_libjpeg_la_OBJECTS) libjpeg_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libjpeg_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ libjpeg_opt_la_LIBADD = am__objects_2 = libjpeg_opt_la-convert8x8_c.lo \ libjpeg_opt_la-jpeg_rgb_decoder.lo \ libjpeg_opt_la-quantize8x8_c.lo libjpeg_opt_la-yuv2rgb_c.lo \ libjpeg_opt_la-zigzag8x8_c.lo am_libjpeg_opt_la_OBJECTS = $(am__objects_2) libjpeg_opt_la_OBJECTS = $(am_libjpeg_opt_la_OBJECTS) libjpeg_opt_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libjpeg_opt_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_ALT_OPT_TRUE@am_libjpeg_opt_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libjpeg_la_SOURCES) $(libjpeg_opt_la_SOURCES) DIST_SOURCES = $(libjpeg_la_SOURCES) $(libjpeg_opt_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @USE_ALT_OPT_FALSE@opt_libs = @USE_ALT_OPT_TRUE@opt_libs = libjpeg_opt.la noinst_LTLIBRARIES = libjpeg.la $(opt_libs) noinst_HEADERS = jpeg.h c_sources = \ convert8x8_c.c \ jpeg_rgb_decoder.c \ quantize8x8_c.c \ yuv2rgb_c.c \ zigzag8x8_c.c libjpeg_la_SOURCES = \ $(c_sources) \ $(powerpc_sources) libjpeg_la_LIBADD = $(opt_libs) libjpeg_la_CFLAGS = $(LIBOIL_CFLAGS) libjpeg_opt_la_SOURCES = $(c_sources) libjpeg_opt_la_CFLAGS = $(LIBOIL_CFLAGS) $(LIBOIL_OPT_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/jpeg/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/jpeg/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libjpeg.la: $(libjpeg_la_OBJECTS) $(libjpeg_la_DEPENDENCIES) $(libjpeg_la_LINK) $(libjpeg_la_OBJECTS) $(libjpeg_la_LIBADD) $(LIBS) libjpeg_opt.la: $(libjpeg_opt_la_OBJECTS) $(libjpeg_opt_la_DEPENDENCIES) $(libjpeg_opt_la_LINK) $(am_libjpeg_opt_la_rpath) $(libjpeg_opt_la_OBJECTS) $(libjpeg_opt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpeg_la-convert8x8_c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpeg_la-jpeg_rgb_decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpeg_la-quantize8x8_c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpeg_la-yuv2rgb_c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpeg_la-zigzag8x8_c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpeg_opt_la-convert8x8_c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpeg_opt_la-jpeg_rgb_decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpeg_opt_la-quantize8x8_c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpeg_opt_la-yuv2rgb_c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpeg_opt_la-zigzag8x8_c.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libjpeg_la-convert8x8_c.lo: convert8x8_c.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -MT libjpeg_la-convert8x8_c.lo -MD -MP -MF $(DEPDIR)/libjpeg_la-convert8x8_c.Tpo -c -o libjpeg_la-convert8x8_c.lo `test -f 'convert8x8_c.c' || echo '$(srcdir)/'`convert8x8_c.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpeg_la-convert8x8_c.Tpo $(DEPDIR)/libjpeg_la-convert8x8_c.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='convert8x8_c.c' object='libjpeg_la-convert8x8_c.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -c -o libjpeg_la-convert8x8_c.lo `test -f 'convert8x8_c.c' || echo '$(srcdir)/'`convert8x8_c.c libjpeg_la-jpeg_rgb_decoder.lo: jpeg_rgb_decoder.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -MT libjpeg_la-jpeg_rgb_decoder.lo -MD -MP -MF $(DEPDIR)/libjpeg_la-jpeg_rgb_decoder.Tpo -c -o libjpeg_la-jpeg_rgb_decoder.lo `test -f 'jpeg_rgb_decoder.c' || echo '$(srcdir)/'`jpeg_rgb_decoder.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpeg_la-jpeg_rgb_decoder.Tpo $(DEPDIR)/libjpeg_la-jpeg_rgb_decoder.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='jpeg_rgb_decoder.c' object='libjpeg_la-jpeg_rgb_decoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -c -o libjpeg_la-jpeg_rgb_decoder.lo `test -f 'jpeg_rgb_decoder.c' || echo '$(srcdir)/'`jpeg_rgb_decoder.c libjpeg_la-quantize8x8_c.lo: quantize8x8_c.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -MT libjpeg_la-quantize8x8_c.lo -MD -MP -MF $(DEPDIR)/libjpeg_la-quantize8x8_c.Tpo -c -o libjpeg_la-quantize8x8_c.lo `test -f 'quantize8x8_c.c' || echo '$(srcdir)/'`quantize8x8_c.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpeg_la-quantize8x8_c.Tpo $(DEPDIR)/libjpeg_la-quantize8x8_c.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quantize8x8_c.c' object='libjpeg_la-quantize8x8_c.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -c -o libjpeg_la-quantize8x8_c.lo `test -f 'quantize8x8_c.c' || echo '$(srcdir)/'`quantize8x8_c.c libjpeg_la-yuv2rgb_c.lo: yuv2rgb_c.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -MT libjpeg_la-yuv2rgb_c.lo -MD -MP -MF $(DEPDIR)/libjpeg_la-yuv2rgb_c.Tpo -c -o libjpeg_la-yuv2rgb_c.lo `test -f 'yuv2rgb_c.c' || echo '$(srcdir)/'`yuv2rgb_c.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpeg_la-yuv2rgb_c.Tpo $(DEPDIR)/libjpeg_la-yuv2rgb_c.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='yuv2rgb_c.c' object='libjpeg_la-yuv2rgb_c.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -c -o libjpeg_la-yuv2rgb_c.lo `test -f 'yuv2rgb_c.c' || echo '$(srcdir)/'`yuv2rgb_c.c libjpeg_la-zigzag8x8_c.lo: zigzag8x8_c.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -MT libjpeg_la-zigzag8x8_c.lo -MD -MP -MF $(DEPDIR)/libjpeg_la-zigzag8x8_c.Tpo -c -o libjpeg_la-zigzag8x8_c.lo `test -f 'zigzag8x8_c.c' || echo '$(srcdir)/'`zigzag8x8_c.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpeg_la-zigzag8x8_c.Tpo $(DEPDIR)/libjpeg_la-zigzag8x8_c.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zigzag8x8_c.c' object='libjpeg_la-zigzag8x8_c.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_la_CFLAGS) $(CFLAGS) -c -o libjpeg_la-zigzag8x8_c.lo `test -f 'zigzag8x8_c.c' || echo '$(srcdir)/'`zigzag8x8_c.c libjpeg_opt_la-convert8x8_c.lo: convert8x8_c.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_opt_la_CFLAGS) $(CFLAGS) -MT libjpeg_opt_la-convert8x8_c.lo -MD -MP -MF $(DEPDIR)/libjpeg_opt_la-convert8x8_c.Tpo -c -o libjpeg_opt_la-convert8x8_c.lo `test -f 'convert8x8_c.c' || echo '$(srcdir)/'`convert8x8_c.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpeg_opt_la-convert8x8_c.Tpo $(DEPDIR)/libjpeg_opt_la-convert8x8_c.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='convert8x8_c.c' object='libjpeg_opt_la-convert8x8_c.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_opt_la_CFLAGS) $(CFLAGS) -c -o libjpeg_opt_la-convert8x8_c.lo `test -f 'convert8x8_c.c' || echo '$(srcdir)/'`convert8x8_c.c libjpeg_opt_la-jpeg_rgb_decoder.lo: jpeg_rgb_decoder.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_opt_la_CFLAGS) $(CFLAGS) -MT libjpeg_opt_la-jpeg_rgb_decoder.lo -MD -MP -MF $(DEPDIR)/libjpeg_opt_la-jpeg_rgb_decoder.Tpo -c -o libjpeg_opt_la-jpeg_rgb_decoder.lo `test -f 'jpeg_rgb_decoder.c' || echo '$(srcdir)/'`jpeg_rgb_decoder.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpeg_opt_la-jpeg_rgb_decoder.Tpo $(DEPDIR)/libjpeg_opt_la-jpeg_rgb_decoder.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='jpeg_rgb_decoder.c' object='libjpeg_opt_la-jpeg_rgb_decoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_opt_la_CFLAGS) $(CFLAGS) -c -o libjpeg_opt_la-jpeg_rgb_decoder.lo `test -f 'jpeg_rgb_decoder.c' || echo '$(srcdir)/'`jpeg_rgb_decoder.c libjpeg_opt_la-quantize8x8_c.lo: quantize8x8_c.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_opt_la_CFLAGS) $(CFLAGS) -MT libjpeg_opt_la-quantize8x8_c.lo -MD -MP -MF $(DEPDIR)/libjpeg_opt_la-quantize8x8_c.Tpo -c -o libjpeg_opt_la-quantize8x8_c.lo `test -f 'quantize8x8_c.c' || echo '$(srcdir)/'`quantize8x8_c.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpeg_opt_la-quantize8x8_c.Tpo $(DEPDIR)/libjpeg_opt_la-quantize8x8_c.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='quantize8x8_c.c' object='libjpeg_opt_la-quantize8x8_c.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_opt_la_CFLAGS) $(CFLAGS) -c -o libjpeg_opt_la-quantize8x8_c.lo `test -f 'quantize8x8_c.c' || echo '$(srcdir)/'`quantize8x8_c.c libjpeg_opt_la-yuv2rgb_c.lo: yuv2rgb_c.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_opt_la_CFLAGS) $(CFLAGS) -MT libjpeg_opt_la-yuv2rgb_c.lo -MD -MP -MF $(DEPDIR)/libjpeg_opt_la-yuv2rgb_c.Tpo -c -o libjpeg_opt_la-yuv2rgb_c.lo `test -f 'yuv2rgb_c.c' || echo '$(srcdir)/'`yuv2rgb_c.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpeg_opt_la-yuv2rgb_c.Tpo $(DEPDIR)/libjpeg_opt_la-yuv2rgb_c.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='yuv2rgb_c.c' object='libjpeg_opt_la-yuv2rgb_c.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_opt_la_CFLAGS) $(CFLAGS) -c -o libjpeg_opt_la-yuv2rgb_c.lo `test -f 'yuv2rgb_c.c' || echo '$(srcdir)/'`yuv2rgb_c.c libjpeg_opt_la-zigzag8x8_c.lo: zigzag8x8_c.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_opt_la_CFLAGS) $(CFLAGS) -MT libjpeg_opt_la-zigzag8x8_c.lo -MD -MP -MF $(DEPDIR)/libjpeg_opt_la-zigzag8x8_c.Tpo -c -o libjpeg_opt_la-zigzag8x8_c.lo `test -f 'zigzag8x8_c.c' || echo '$(srcdir)/'`zigzag8x8_c.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpeg_opt_la-zigzag8x8_c.Tpo $(DEPDIR)/libjpeg_opt_la-zigzag8x8_c.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zigzag8x8_c.c' object='libjpeg_opt_la-zigzag8x8_c.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libjpeg_opt_la_CFLAGS) $(CFLAGS) -c -o libjpeg_opt_la-zigzag8x8_c.lo `test -f 'zigzag8x8_c.c' || echo '$(srcdir)/'`zigzag8x8_c.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/jpeg/jpeg_rgb_decoder.c0000644000175000017500000000407110717203073015606 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "jpeg.h" /** * oil_scanlinescale2_u8: * @d: destination array * @s: source array * @n: number of elements * * Upsamples the source array by a factor of two. That is, if the * values in @s are A,B,C,D,E, the values written to @d are * A,A,B,B,C,C,D,D,E,E. Note that @n is the number of elements * written to @d, and that half of @s is not used. */ OIL_DEFINE_CLASS (scanlinescale2_u8, "uint8_t *d, uint8_t *s, int n"); static void scanlinescale2_u8_ref (uint8_t *dest, uint8_t *src, int n) { int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include void print_header (void); void print_footer (void); void add_pointer_mask (unsigned int mask); unsigned int proto_masks[1000]; int n_for_mask[1000]; int n_proto_masks; int main (int argc, char *argv[]) { OilFunctionClass *klass; OilPrototype *proto; int i; int j; int n; unsigned int pointer_mask; oil_init_no_optimize (); print_header (); n = oil_class_get_n_classes (); for (i=0;iprototype) { proto = oil_prototype_from_string (klass->prototype); if (proto) { pointer_mask = 1; for (j=0;jn_params;j++){ pointer_mask <<= 1; if (proto->params[j].is_pointer) pointer_mask |= 1; } add_pointer_mask (pointer_mask); oil_prototype_free (proto); } else { printf("/* ERROR: could not parse %s(%s) */\n", klass->name, klass->prototype); } } } for(i=0;i>=2; printf(" case 0x%04x:\n", pointer_mask); printf(" oil_profile_start (prof);\n"); printf(" ((void (*)("); if(hibit == 0) { printf("void"); } else { for(bit=hibit;bit;bit >>= 1) { if (pointer_mask & bit) { printf("void *"); } else { printf("int"); } if (bit > 1) { printf(","); } } } printf("))func)\n"); printf(" ("); j=0; for(bit=hibit;bit;bit >>= 1) { if (pointer_mask & bit) { printf("(void *)args[%d]", j); } else { printf("(int)args[%d]", j); } if (bit > 1) { printf(","); } j++; } printf(");\n"); printf(" oil_profile_stop (prof);\n"); printf(" break;\n"); } print_footer (); return 0; } void add_pointer_mask (unsigned int mask) { int i; for(i=0;i\n"); printf (" * All rights reserved.\n"); printf (" *\n"); printf (" * Redistribution and use in source and binary forms, with or without\n"); printf (" * modification, are permitted provided that the following conditions\n"); printf (" * are met:\n"); printf (" * 1. Redistributions of source code must retain the above copyright\n"); printf (" * notice, this list of conditions and the following disclaimer.\n"); printf (" * 2. Redistributions in binary form must reproduce the above copyright\n"); printf (" * notice, this list of conditions and the following disclaimer in the\n"); printf (" * documentation and/or other materials provided with the distribution.\n"); printf (" * \n"); printf (" * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n"); printf (" * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n"); printf (" * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n"); printf (" * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,\n"); printf (" * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n"); printf (" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n"); printf (" * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n"); printf (" * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n"); printf (" * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\n"); printf (" * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n"); printf (" * POSSIBILITY OF SUCH DAMAGE.\n"); printf (" */\n"); printf ("\n"); printf ("/* This file is automatically generated. Do not edit. */\n"); printf ("\n"); printf ("#ifdef HAVE_CONFIG_H\n"); printf ("#include \n"); printf ("#endif\n"); printf ("\n"); printf ("#include \n"); printf ("#include \n"); printf ("#include \n"); printf ("\n"); printf ("void\n"); printf ("_oil_test_marshal_function (void *func, unsigned long *args, int n_args,\n"); printf (" unsigned int pointer_mask, OilProfile *prof)\n"); printf ("{\n"); printf (" switch (pointer_mask) {\n"); } void print_footer (void) { printf (" default:\n"); printf (" OIL_ERROR (\"unhandled marshal case\");\n"); printf (" }\n"); printf ("}\n"); printf ("\n"); } liboil-0.3.17/liboil/build_trampolines.c0000644000175000017500000001226310717203073015133 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include static char * xstrdup (const char *s); void print_header (void); void print_footer (void); int main (int argc, char *argv[]) { OilFunctionClass *klass; OilPrototype *proto; int i; int n; char *string; char *arg_string; oil_init_no_optimize (); print_header (); n = oil_class_get_n_classes (); for (i=0;iprototype) { proto = oil_prototype_from_string (klass->prototype); if (proto) { string = oil_prototype_to_string (proto); if (strlen (string) == 0) { free (string); string = xstrdup("void"); } arg_string = oil_prototype_to_arg_string (proto); printf ("#undef oil_%s\n", klass->name); printf ("void\n"); printf ("oil_%s (%s)\n", klass->name, string); printf ("{\n"); printf (" if (_oil_function_class_%s.func == NULL) {\n", klass->name); printf (" oil_class_optimize (&_oil_function_class_%s);\n", klass->name); printf (" }\n"); printf (" ((void (*)(%s))(_oil_function_class_%s.func))(%s);\n", string, klass->name, arg_string); printf ("}\n"); printf ("\n"); oil_prototype_free (proto); free (string); free (arg_string); } else { printf("/* ERROR: could not parse %s(%s) */\n", klass->name, klass->prototype); } } } print_footer (); return 0; } void print_header (void) { printf ("/*\n"); printf (" * LIBOIL - Library of Optimized Inner Loops\n"); printf (" * Copyright (c) 2004 David A. Schleef \n"); printf (" * All rights reserved.\n"); printf (" *\n"); printf (" * Redistribution and use in source and binary forms, with or without\n"); printf (" * modification, are permitted provided that the following conditions\n"); printf (" * are met:\n"); printf (" * 1. Redistributions of source code must retain the above copyright\n"); printf (" * notice, this list of conditions and the following disclaimer.\n"); printf (" * 2. Redistributions in binary form must reproduce the above copyright\n"); printf (" * notice, this list of conditions and the following disclaimer in the\n"); printf (" * documentation and/or other materials provided with the distribution.\n"); printf (" * \n"); printf (" * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n"); printf (" * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n"); printf (" * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n"); printf (" * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,\n"); printf (" * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n"); printf (" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n"); printf (" * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n"); printf (" * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n"); printf (" * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\n"); printf (" * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n"); printf (" * POSSIBILITY OF SUCH DAMAGE.\n"); printf (" */\n"); printf ("\n"); printf ("/* This file is automatically generated. Do not edit. */\n"); printf ("\n"); printf ("#include \n"); printf ("#include \n"); printf ("#include \n"); printf ("\n"); } void print_footer (void) { printf ("\n"); } static char * xstrdup (const char *s) { int n = strlen(s); char *t; n = strlen(s); t = malloc(n + 1); memcpy (t, s, n); t[n] = 0; return t; } liboil-0.3.17/liboil/conv/0000777000175000017500000000000011332637375012312 500000000000000liboil-0.3.17/liboil/conv/Makefile.am0000644000175000017500000000062110717203073014247 00000000000000 if USE_ALT_OPT opt_libs = libconv_opt.la else opt_libs = endif noinst_LTLIBRARIES = libconv.la $(opt_libs) c_sources = \ conv_c.c \ conv_bitstuff.c \ conv_misc.c libconv_opt_la_SOURCES = $(c_sources) libconv_opt_la_CFLAGS = $(LIBOIL_CFLAGS) $(LIBOIL_OPT_CFLAGS) noinst_HEADERS = conv.h libconv_la_SOURCES = \ $(c_sources) libconv_la_CFLAGS = $(LIBOIL_CFLAGS) libconv_la_LIBADD = $(opt_libs) liboil-0.3.17/liboil/conv/conv.h0000644000175000017500000001050610717203073013334 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_CONV_H_ #define _LIBOIL_CONV_H_ #include OIL_DECLARE_CLASS(conv_f64_s8); OIL_DECLARE_CLASS(conv_f64_s16); OIL_DECLARE_CLASS(conv_f64_s32); OIL_DECLARE_CLASS(conv_f64_u8); OIL_DECLARE_CLASS(conv_f64_u16); OIL_DECLARE_CLASS(conv_f64_u32); OIL_DECLARE_CLASS(conv_f64_f32); OIL_DECLARE_CLASS(conv_f32_s8); OIL_DECLARE_CLASS(conv_f32_s16); OIL_DECLARE_CLASS(conv_f32_u8); OIL_DECLARE_CLASS(conv_f32_u16); OIL_DECLARE_CLASS(conv_s32_s8); OIL_DECLARE_CLASS(conv_s32_s16); OIL_DECLARE_CLASS(conv_s32_u8); OIL_DECLARE_CLASS(conv_s32_u16); OIL_DECLARE_CLASS(conv_u32_s8); OIL_DECLARE_CLASS(conv_u32_s16); OIL_DECLARE_CLASS(conv_u32_u8); OIL_DECLARE_CLASS(conv_u32_u16); OIL_DECLARE_CLASS(conv_s16_s8); OIL_DECLARE_CLASS(conv_s16_u8); OIL_DECLARE_CLASS(conv_u16_s8); OIL_DECLARE_CLASS(conv_u16_u8); OIL_DECLARE_CLASS(clipconv_s8_u8); OIL_DECLARE_CLASS(clipconv_s8_s16); OIL_DECLARE_CLASS(clipconv_s8_u16); OIL_DECLARE_CLASS(clipconv_s8_s32); OIL_DECLARE_CLASS(clipconv_s8_u32); OIL_DECLARE_CLASS(clipconv_s8_f32); OIL_DECLARE_CLASS(clipconv_s8_f64); OIL_DECLARE_CLASS(clipconv_u8_s8); OIL_DECLARE_CLASS(clipconv_u8_s16); OIL_DECLARE_CLASS(clipconv_u8_u16); OIL_DECLARE_CLASS(clipconv_u8_s32); OIL_DECLARE_CLASS(clipconv_u8_u32); OIL_DECLARE_CLASS(clipconv_u8_f32); OIL_DECLARE_CLASS(clipconv_u8_f64); OIL_DECLARE_CLASS(clipconv_s16_u16); OIL_DECLARE_CLASS(clipconv_s16_s32); OIL_DECLARE_CLASS(clipconv_s16_u32); OIL_DECLARE_CLASS(clipconv_s16_f32); OIL_DECLARE_CLASS(clipconv_s16_f64); OIL_DECLARE_CLASS(clipconv_u16_s16); OIL_DECLARE_CLASS(clipconv_u16_s32); OIL_DECLARE_CLASS(clipconv_u16_u32); OIL_DECLARE_CLASS(clipconv_u16_f32); OIL_DECLARE_CLASS(clipconv_u16_f64); OIL_DECLARE_CLASS(clipconv_s32_u32); OIL_DECLARE_CLASS(clipconv_s32_f32); OIL_DECLARE_CLASS(clipconv_s32_f64); OIL_DECLARE_CLASS(clipconv_u32_s32); OIL_DECLARE_CLASS(clipconv_u32_f32); OIL_DECLARE_CLASS(clipconv_u32_f64); OIL_DECLARE_CLASS(conv_f32_s32); OIL_DECLARE_CLASS(conv_f32_u32); OIL_DECLARE_CLASS(conv_f32_f64); OIL_DECLARE_CLASS(conv_s8_u8); OIL_DECLARE_CLASS(conv_s8_s16); OIL_DECLARE_CLASS(conv_s8_u16); OIL_DECLARE_CLASS(conv_s8_s32); OIL_DECLARE_CLASS(conv_s8_u32); OIL_DECLARE_CLASS(conv_s8_f32); OIL_DECLARE_CLASS(conv_s8_f64); OIL_DECLARE_CLASS(conv_u8_s8); OIL_DECLARE_CLASS(conv_u8_s16); OIL_DECLARE_CLASS(conv_u8_u16); OIL_DECLARE_CLASS(conv_u8_s32); OIL_DECLARE_CLASS(conv_u8_u32); OIL_DECLARE_CLASS(conv_u8_f32); OIL_DECLARE_CLASS(conv_u8_f64); OIL_DECLARE_CLASS(conv_s16_u16); OIL_DECLARE_CLASS(conv_s16_s32); OIL_DECLARE_CLASS(conv_s16_u32); OIL_DECLARE_CLASS(conv_s16_f32); OIL_DECLARE_CLASS(conv_s16_f64); OIL_DECLARE_CLASS(conv_u16_s16); OIL_DECLARE_CLASS(conv_u16_s32); OIL_DECLARE_CLASS(conv_u16_u32); OIL_DECLARE_CLASS(conv_u16_f32); OIL_DECLARE_CLASS(conv_u16_f64); OIL_DECLARE_CLASS(conv_s32_u32); OIL_DECLARE_CLASS(conv_s32_f32); OIL_DECLARE_CLASS(conv_s32_f64); OIL_DECLARE_CLASS(conv_u32_s32); OIL_DECLARE_CLASS(conv_u32_f32); OIL_DECLARE_CLASS(conv_u32_f64); #endif liboil-0.3.17/liboil/conv/conv_bitstuff.c0000644000175000017500000001407311067011142015231 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "conv.h" #ifdef HAVE_IEEE754_H #include static void conv_f32_u8_bitstuff(float *dst, int dest_stride, const uint8_t *src, int src_stride, int n) { const float offset = -65536; union ieee754_float id; int i; id.f = 0x1ffff; for(i=0;i>31) #if 0 /* broken */ /* This implementation is slightly inaccurate */ static void conv_s16_f32_bitstuff(int16_t *dst, int dest_stride, const float *src, int src_stride, int n) { const float offset = 98304.5; union ieee754_double id; int i; int16_t d; for(i=0;i> 4); d += (-32768-d)*signbit_S32(id.ieee.exponent-1039); d += (32767-d)*signbit_S32(1039-id.ieee.exponent); *dst = d; OIL_INCREMENT(dst, dest_stride); OIL_INCREMENT(src, src_stride); } } OIL_DEFINE_IMPL(conv_s16_f32_bitstuff, conv_s16_f32); #endif #if 0 static void conv_f64_u8_bitstuff(float *dst, int dest_stride, const uint8_t *src, int src_stride, int n) { const float offset = -65536; union ieee754_float id; int i; id.f = 0x1ffff; for(i=0;i> 4); d += (-32768-d)*signbit_S32(id.ieee.exponent-1039); d += (32767-d)*signbit_S32(1039-id.ieee.exponent); #if 0 /* for clipping */ if (id.ieee.exponent < 1039) { d = -32768; } if (id.ieee.exponent > 1039) { d = 32767; } #endif *dst = d; OIL_INCREMENT (dst, dest_stride); OIL_INCREMENT (src, src_stride); } } OIL_DEFINE_IMPL(conv_s16_f64_bitstuff, conv_s16_f64); #endif #endif liboil-0.3.17/liboil/conv/conv_c.c0000644000175000017500000004301011067011142013616 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2001,2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #define CONV_DEFINE_CAST(desttype,srctype) \ static void conv_ ## desttype ## _ ## srctype ## _c ( \ oil_type_ ## desttype *dest, \ int dest_stride, \ const oil_type_ ## srctype *src, \ int src_stride, int n) \ { \ int i; \ for(i=0;ioil_type_max_ ## desttype) x=oil_type_max_ ## desttype; \ *dest = x; \ dest = OIL_OFFSET(dest, dest_stride); \ src = OIL_OFFSET(src, src_stride); \ } \ } \ OIL_DEFINE_IMPL(clipconv_ ## desttype ## _ ## srctype ## _c, \ clipconv_ ## desttype ## _ ## srctype); #define CLIPCONV_DEFINE_UPPER(desttype,srctype) \ static void clipconv_ ## desttype ## _ ## srctype ## _c ( \ oil_type_ ## desttype *dest, \ int dest_stride, \ const oil_type_ ## srctype *src, \ int src_stride, int n) \ { \ int i; \ oil_type_ ## srctype x; \ for(i=0;ioil_type_max_ ## desttype) x=oil_type_max_ ## desttype; \ *dest = x; \ dest = OIL_OFFSET(dest, dest_stride); \ src = OIL_OFFSET(src, src_stride); \ } \ } \ OIL_DEFINE_IMPL(clipconv_ ## desttype ## _ ## srctype ## _c, \ clipconv_ ## desttype ## _ ## srctype); #define CLIPCONV_DEFINE_LOWER(desttype,srctype) \ static void clipconv_ ## desttype ## _ ## srctype ## _c ( \ oil_type_ ## desttype *dest, \ int dest_stride, \ const oil_type_ ## srctype *src, \ int src_stride, int n) \ { \ int i; \ oil_type_ ## srctype x; \ for(i=0;ioil_type_max_ ## desttype) x=oil_type_max_ ## desttype; \ *dest = rint(x); \ dest = OIL_OFFSET(dest, dest_stride); \ src = OIL_OFFSET(src, src_stride); \ } \ } \ OIL_DEFINE_IMPL(clipconv_ ## desttype ## _ ## srctype ## _c, \ clipconv_ ## desttype ## _ ## srctype); #else #define CLIPCONV_DEFINE_FLOAT(desttype,srctype) #endif /* clip upper */ CLIPCONV_DEFINE_UPPER(s8,u8); CLIPCONV_DEFINE_UPPER(s8,u16); CLIPCONV_DEFINE_UPPER(s8,u32); CLIPCONV_DEFINE_UPPER(u8,u32); CLIPCONV_DEFINE_UPPER(u8,u16); CLIPCONV_DEFINE_UPPER(s16,u16); CLIPCONV_DEFINE_UPPER(s16,u32); CLIPCONV_DEFINE_UPPER(s32,u32); CLIPCONV_DEFINE_UPPER(u16,u32); /* clip both */ CLIPCONV_DEFINE_BOTH(s8,s16); CLIPCONV_DEFINE_BOTH(s8,s32); CLIPCONV_DEFINE_BOTH(u8,s16); CLIPCONV_DEFINE_BOTH(u8,s32); CLIPCONV_DEFINE_BOTH(s16,s32); CLIPCONV_DEFINE_BOTH(u16,s32); /* clip lower */ CLIPCONV_DEFINE_LOWER(u8,s8); CLIPCONV_DEFINE_LOWER(u16,s16); CLIPCONV_DEFINE_LOWER(u32,s32); /* clip both, float */ CLIPCONV_DEFINE_FLOAT(s8,f32); CLIPCONV_DEFINE_FLOAT(s8,f64); CLIPCONV_DEFINE_FLOAT(u8,f32); CLIPCONV_DEFINE_FLOAT(u8,f64); CLIPCONV_DEFINE_FLOAT(s16,f32); CLIPCONV_DEFINE_FLOAT(s16,f64); CLIPCONV_DEFINE_FLOAT(u16,f32); CLIPCONV_DEFINE_FLOAT(u16,f64); CLIPCONV_DEFINE_FLOAT(s32,f32); CLIPCONV_DEFINE_FLOAT(s32,f64); CLIPCONV_DEFINE_FLOAT(u32,f32); CLIPCONV_DEFINE_FLOAT(u32,f64); #define CONV_DEFINE_CAST_UNROLL2(desttype,srctype) \ static void conv_ ## desttype ## _ ## srctype ## _unroll2 ( \ oil_type_ ## desttype *dest, \ int dest_stride, \ const oil_type_ ## srctype *src, \ int src_stride, int n) \ { \ int i; \ if(n&1){ \ *dest = *src; \ dest = OIL_OFFSET(dest, dest_stride); \ src = OIL_OFFSET(src, src_stride); \ } \ n>>=1; \ for(i=0;i>=1; \ for(i=0;i>=2; \ for(i=0;i>=2; \ for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "conv.h" #include static void conv_f64_s16_table(double *dest, int dest_stride, const short *src, int src_stride, int n) { static double ints_high[256]; static double ints_low[256]; static int init = 0; int i; unsigned int idx; if(!init){ for(i=0;i<256;i++){ ints_high[i]=256.0*((i<128)?i:i-256); ints_low[i]=i; } init = 1; } if(n&1){ idx = (unsigned short)*src; *dest = ints_high[(idx>>8)] + ints_low[(idx&0xff)]; OIL_INCREMENT(dest, dest_stride); OIL_INCREMENT(src, src_stride); n-=1; } for(i=0;i>8)] + ints_low[(idx&0xff)]; OIL_INCREMENT(dest, dest_stride); OIL_INCREMENT(src, src_stride); idx = (unsigned short)*src; *dest = ints_high[(idx>>8)] + ints_low[(idx&0xff)]; OIL_INCREMENT(dest, dest_stride); OIL_INCREMENT(src, src_stride); } } OIL_DEFINE_IMPL(conv_f64_s16_table, conv_f64_s16); static void conv_f32_s16_table(float *dest, int dest_stride, const short *src, int src_stride, int n) { static float ints_high[256]; static float ints_low[256]; static int init = 0; int i; unsigned int idx; if(!init){ for(i=0;i<256;i++){ ints_high[i]=256.0*((i<128)?i:i-256); ints_low[i]=i; } init = 1; } if(n&1){ idx = (unsigned short)*src; *dest = ints_high[(idx>>8)] + ints_low[(idx&0xff)]; OIL_INCREMENT(dest, dest_stride); OIL_INCREMENT(src, src_stride); n-=1; } for(i=0;i>8)] + ints_low[(idx&0xff)]; OIL_INCREMENT(dest, dest_stride); OIL_INCREMENT(src, src_stride); idx = (unsigned short)*src; *dest = ints_high[(idx>>8)] + ints_low[(idx&0xff)]; OIL_INCREMENT(dest, dest_stride); OIL_INCREMENT(src, src_stride); } } OIL_DEFINE_IMPL(conv_f32_s16_table, conv_f32_s16); liboil-0.3.17/liboil/i386_amd64/0000777000175000017500000000000011332637375013031 500000000000000liboil-0.3.17/liboil/i386_amd64/mas.c0000644000175000017500000006471311265637233013702 00000000000000 #include #include void mas10_u8_mmx (uint8_t *d, const uint8_t *s1_np9, const int16_t *s2_10, const int16_t *s3_2, int n) { int j; int x; while(n&3) { x = 0; for(j=0;j<10;j++){ x += s1_np9[j] * s2_10[j]; } *d = CLAMP((x + s3_2[0])>>s3_2[1],0,255); d++; s1_np9++; n--; } if (n == 0) return; n>>=2; __asm__ __volatile__("\n" " pxor %%mm7, %%mm7\n" " movd (%[s3_2]), %%mm6\n" " movzwl 2(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm5\n" "1:\n" /* load 128 */ " pshufw $0x00, %%mm6, %%mm2\n" #define LOOP(x) \ " movd " #x "(%[s1_np9]), %%mm0\n" \ " punpcklbw %%mm7, %%mm0\n" \ " movq 2*" #x "(%[s2_10]), %%mm1\n" \ " pshufw $0x00, %%mm1, %%mm1\n" \ " pmullw %%mm1, %%mm0\n" \ " paddw %%mm0, %%mm2\n" LOOP(0) LOOP(1) LOOP(2) LOOP(3) LOOP(4) LOOP(5) LOOP(6) LOOP(7) LOOP(8) LOOP(9) #undef LOOP " psraw %%mm5, %%mm2\n" " pmaxsw %%mm7, %%mm2\n" " packuswb %%mm2, %%mm2\n" " movd %%mm2, 0(%[d])\n" " add $4, %[d]\n" " add $4, %[s1_np9]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d] "+r" (d), [s1_np9] "+r" (s1_np9), [n] "+m" (n) : [s2_10] "r" (s2_10), [s3_2] "r" (s3_2) : "ecx"); } OIL_DEFINE_IMPL_FULL (mas10_u8_mmx, mas10_u8_l15, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); #if 0 void mas10_u8_mmx_2 (uint8_t *d, const uint8_t *s1_np9, const int16_t *s2_10, const int16_t *s3_2, int n) { int j; int x; int16_t coeff[4*10]; int16_t *ptr; ptr = coeff; while(n&3) { x = 0; for(j=0;j<10;j++){ x += s1_np9[j] * s2_10[j]; } *d = CLAMP((x + s3_2[0])>>s3_2[1],0,255); d++; s1_np9++; n--; } for(j=0;j<10;j++){ ptr[4*j + 0] = s2_10[j]; ptr[4*j + 1] = s2_10[j]; ptr[4*j + 2] = s2_10[j]; ptr[4*j + 3] = s2_10[j]; } if (n == 0) return; n>>=2; __asm__ __volatile__("\n" " pxor %%mm7, %%mm7\n" " movd (%[s3_2]), %%mm6\n" " movzwl 2(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm5\n" "1:\n" /* load 128 */ " pshufw $0x00, %%mm6, %%mm2\n" #define LOOP(x) \ " movd " #x "(%[s1_np9]), %%mm0\n" \ " punpcklbw %%mm7, %%mm0\n" \ " pmullw 8*" #x "(%[coeff]), %%mm0\n" \ " paddw %%mm0, %%mm2\n" LOOP(0) LOOP(1) LOOP(2) LOOP(3) LOOP(4) LOOP(5) LOOP(6) LOOP(7) LOOP(8) LOOP(9) #undef LOOP " psraw %%mm5, %%mm2\n" " pmaxsw %%mm7, %%mm2\n" " packuswb %%mm2, %%mm2\n" " movd %%mm2, 0(%[d])\n" " add $4, %[d]\n" " add $4, %[s1_np9]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d] "+r" (d), [s1_np9] "+r" (s1_np9), [n] "+m" (n) : [coeff] "r" (ptr), [s3_2] "r" (s3_2) : "ecx"); } OIL_DEFINE_IMPL_FULL (mas10_u8_mmx_2, mas10_u8_l15, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); #endif void mas10_u8_mmx_3 (uint8_t *d, const uint8_t *s1_np9, const int16_t *s2_10, const int16_t *s3_2, int n) { int j; int x; while(n&3) { x = 0; for(j=0;j<10;j++){ x += s1_np9[j] * s2_10[j]; } *d = CLAMP((x + s3_2[0])>>s3_2[1],0,255); d++; s1_np9++; n--; } if (n == 0) return; n>>=2; __asm__ __volatile__("\n" " pxor %%mm7, %%mm7\n" " movd (%[s3_2]), %%mm6\n" " movzwl 2(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm5\n" " movq 0(%[s2_10]), %%mm3\n" " movq 8(%[s2_10]), %%mm4\n" "1:\n" /* load 128 */ " pshufw $0x00, %%mm6, %%mm2\n" #define LOOP(x) \ " movd " #x "(%[s1_np9]), %%mm0\n" \ " punpcklbw %%mm7, %%mm0\n" \ " movq 2*" #x "(%[s2_10]), %%mm1\n" \ " pshufw $0x00, %%mm1, %%mm1\n" \ " pmullw %%mm1, %%mm0\n" \ " paddw %%mm0, %%mm2\n" //LOOP(0) " movd 0(%[s1_np9]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x00, %%mm3, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" //LOOP(1) " movd 1(%[s1_np9]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*1, %%mm3, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" //LOOP(2) " movd 2(%[s1_np9]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*2, %%mm3, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" //LOOP(3) " movd 3(%[s1_np9]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*3, %%mm3, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" //LOOP(4) " movd 4(%[s1_np9]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x00, %%mm4, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" //LOOP(5) " movd 5(%[s1_np9]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*1, %%mm4, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" //LOOP(6) " movd 6(%[s1_np9]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*2, %%mm4, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" //LOOP(7) " movd 7(%[s1_np9]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*3, %%mm4, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" LOOP(8) LOOP(9) #undef LOOP " psraw %%mm5, %%mm2\n" " pmaxsw %%mm7, %%mm2\n" " packuswb %%mm2, %%mm2\n" " movd %%mm2, 0(%[d])\n" " add $4, %[d]\n" " add $4, %[s1_np9]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d] "+r" (d), [s1_np9] "+r" (s1_np9), [n] "+m" (n) : [s2_10] "r" (s2_10), [s3_2] "r" (s3_2) : "ecx"); } OIL_DEFINE_IMPL_FULL (mas10_u8_mmx_3, mas10_u8_l15, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); void mas10_u8_mmx_4 (uint8_t *d, const uint8_t *s1_np9, const int16_t *s2_10, const int16_t *s3_2, int n) { if (n == 0) return; __asm__ __volatile__("\n" " pxor %%mm7, %%mm7\n" " movzwl 0(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm6\n" " movzwl 2(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm5\n" "1:\n" " movd 0(%[s1_np9]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pmaddwd 0(%[s2_10]), %%mm0\n" " movd 4(%[s1_np9]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " pmaddwd 8(%[s2_10]), %%mm1\n" " movd 8(%[s1_np9]), %%mm2\n" " punpcklbw %%mm7, %%mm2\n" " pmaddwd 16(%[s2_10]), %%mm2\n" " paddd %%mm1, %%mm0\n" " movq %%mm0, %%mm1\n" " psrlq $32, %%mm0\n" " paddd %%mm1, %%mm0\n" " paddd %%mm2, %%mm0\n" " paddd %%mm6, %%mm0\n" " psrad %%mm5, %%mm0\n" " pmaxsw %%mm7, %%mm0\n" " packuswb %%mm0, %%mm0\n" " movd %%mm0, %%ecx\n" " movb %%cl,0(%[d])\n" " add $1, %[d]\n" " add $1, %[s1_np9]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d] "+r" (d), [s1_np9] "+r" (s1_np9), [n] "+m" (n) : [s2_10] "r" (s2_10), [s3_2] "r" (s3_2) : "ecx"); } OIL_DEFINE_IMPL_FULL (mas10_u8_mmx_4, mas10_u8, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); void mas8_u8_mmx_3 (uint8_t *d, const uint8_t *s1_np7, const int16_t *s2_8, const int16_t *s3_2, int n) { int j; int x; while(n&3) { x = 0; for(j=0;j<8;j++){ x += s1_np7[j] * s2_8[j]; } *d = CLAMP((x + s3_2[0])>>s3_2[1],0,255); d++; s1_np7++; n--; } if (n == 0) return; n>>=2; __asm__ __volatile__("\n" " pxor %%mm7, %%mm7\n" " movd (%[s3_2]), %%mm6\n" " movzwl 2(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm5\n" " movq 0(%[s2_8]), %%mm3\n" " movq 8(%[s2_8]), %%mm4\n" "1:\n" /* load 128 */ " pshufw $0x00, %%mm6, %%mm2\n" " movd 0(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x00, %%mm3, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 1(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*1, %%mm3, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 2(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*2, %%mm3, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 3(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*3, %%mm3, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 4(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x00, %%mm4, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 5(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*1, %%mm4, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 6(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*2, %%mm4, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 7(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*3, %%mm4, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " psraw %%mm5, %%mm2\n" " pmaxsw %%mm7, %%mm2\n" " packuswb %%mm2, %%mm2\n" " movd %%mm2, 0(%[d])\n" " add $4, %[d]\n" " add $4, %[s1_np7]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d] "+r" (d), [s1_np7] "+r" (s1_np7), [n] "+m" (n) : [s2_8] "r" (s2_8), [s3_2] "r" (s3_2) : "ecx"); } OIL_DEFINE_IMPL_FULL (mas8_u8_mmx_3, mas8_u8_l15, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); void mas8_u8_mmx_4 (uint8_t *d, const uint8_t *s1_np7, const int16_t *s2_8, const int16_t *s3_2, int n) { if (n == 0) return; __asm__ __volatile__("\n" " pxor %%mm7, %%mm7\n" " movzwl 0(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm6\n" " movzwl 2(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm5\n" "1:\n" " movd 0(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pmaddwd 0(%[s2_8]), %%mm0\n" " movd 4(%[s1_np7]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " pmaddwd 8(%[s2_8]), %%mm1\n" " paddd %%mm1, %%mm0\n" " movq %%mm0, %%mm1\n" " psrlq $32, %%mm0\n" " paddd %%mm1, %%mm0\n" " paddd %%mm6, %%mm0\n" " psrad %%mm5, %%mm0\n" " pmaxsw %%mm7, %%mm0\n" " packuswb %%mm0, %%mm0\n" " movd %%mm0, %%ecx\n" " movb %%cl,0(%[d])\n" " add $1, %[d]\n" " add $1, %[s1_np7]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d] "+r" (d), [s1_np7] "+r" (s1_np7), [n] "+m" (n) : [s2_8] "r" (s2_8), [s3_2] "r" (s3_2) : "ecx"); } OIL_DEFINE_IMPL_FULL (mas8_u8_mmx_4, mas8_u8, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); void mas8_u8_sym_mmx_3 (uint8_t *d, const uint8_t *s1_np7, const int16_t *s2_8, const int16_t *s3_2, int n) { int j; int x; while(n&3) { x = 0; for(j=0;j<8;j++){ x += s1_np7[j] * s2_8[j]; } *d = CLAMP((x + s3_2[0])>>s3_2[1],0,255); d++; s1_np7++; n--; } if (n == 0) return; n>>=2; __asm__ __volatile__("\n" " pxor %%mm7, %%mm7\n" " movd (%[s3_2]), %%mm6\n" " movzwl 2(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm5\n" " movq 0(%[s2_8]), %%mm3\n" " movq 8(%[s2_8]), %%mm4\n" " .p2align 4,,15 \n" "1:\n" /* load 128 */ " pshufw $0x00, %%mm6, %%mm2\n" " movd 0(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " movd 7(%[s1_np7]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " paddw %%mm1, %%mm0\n" //" pshufw $0x00, %%mm3, %%mm1\n" //" pmullw %%mm1, %%mm0\n" //" paddw %%mm0, %%mm2\n" " psubw %%mm0, %%mm2\n" " movd 1(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " movd 6(%[s1_np7]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0x55*1, %%mm3, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 2(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " movd 5(%[s1_np7]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0x55*2, %%mm3, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 3(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " movd 4(%[s1_np7]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " paddw %%mm1, %%mm0\n" " pshufw $0x55*3, %%mm3, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " psraw %%mm5, %%mm2\n" " pmaxsw %%mm7, %%mm2\n" " packuswb %%mm2, %%mm2\n" " movd %%mm2, 0(%[d])\n" " add $4, %[d]\n" " add $4, %[s1_np7]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d] "+r" (d), [s1_np7] "+r" (s1_np7), [n] "+m" (n) : [s2_8] "r" (s2_8), [s3_2] "r" (s3_2) : "ecx"); } OIL_DEFINE_IMPL_FULL (mas8_u8_sym_mmx_3, mas8_u8_sym_l15, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); void mas8_u8_sym_mmx_41 (uint8_t *d, const uint8_t *s1_np7, const int16_t *s2_8, const int16_t *s3_2, int n) { int j; int x; int16_t tmp[16]; while(n&3) { x = 0; for(j=0;j<8;j++){ x += s1_np7[j] * s2_8[j]; } *d = CLAMP((x + s3_2[0])>>s3_2[1],0,255); d++; s1_np7++; n--; } if (n == 0) return; n>>=2; __asm__ __volatile__("\n" " pxor %%mm7, %%mm7\n" " movd (%[s3_2]), %%mm6\n" " movzwl 2(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm5\n" " movq 0(%[s2_8]), %%mm3\n" " pshufw $0x55*0, %%mm3, %%mm1\n" " movq %%mm1, 0(%[coeff])\n" " pshufw $0x55*1, %%mm3, %%mm1\n" " movq %%mm1, 8(%[coeff])\n" " pshufw $0x55*2, %%mm3, %%mm1\n" " movq %%mm1, 16(%[coeff])\n" " pshufw $0x55*3, %%mm3, %%mm1\n" " movq %%mm1, 24(%[coeff])\n" : : [s2_8] "r" (s2_8), [s3_2] "r" (s3_2), [coeff] "r" (tmp) : "ecx"); __asm__ __volatile__("\n" " .p2align 4,,15 \n" "1:\n" /* load 128 */ " pshufw $0x00, %%mm6, %%mm2\n" " movd 0(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " movd 7(%[s1_np7]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " paddw %%mm1, %%mm0\n" " pmullw 0(%[coeff]), %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 1(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " movd 6(%[s1_np7]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " paddw %%mm1, %%mm0\n" " pmullw 8(%[coeff]), %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 2(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " movd 5(%[s1_np7]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " paddw %%mm1, %%mm0\n" " pmullw 16(%[coeff]), %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 3(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " movd 4(%[s1_np7]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " paddw %%mm1, %%mm0\n" " pmullw 24(%[coeff]), %%mm0\n" " paddw %%mm0, %%mm2\n" " psraw %%mm5, %%mm2\n" " pmaxsw %%mm7, %%mm2\n" " packuswb %%mm2, %%mm2\n" " movd %%mm2, 0(%[d])\n" " add $4, %[d]\n" " add $4, %[s1_np7]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d] "+r" (d), [s1_np7] "+r" (s1_np7), [n] "+m" (n) : [s2_8] "r" (s2_8), [coeff] "r" (tmp) : "ecx"); } OIL_DEFINE_IMPL_FULL (mas8_u8_sym_mmx_41, mas8_u8_sym_l15, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); #define PSHUFW_3210 "0xe4" #define PSHUFW_0123 "0x1b" void mas8_u8_sym_mmx_5 (uint8_t *d, const uint8_t *s1_np7, const int16_t *s2_8, const int16_t *s3_2, int n) { if (n==0) return; __asm__ __volatile__("\n" " pxor %%mm7, %%mm7\n" " movzwl 0(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm6\n" " pshufw $0x44, %%mm6, %%mm6\n" // 01 00 01 00 " movzwl 2(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm5\n" " cmpl $0, %[n]\n" " jz 2f\n" "1:\n" " movd 0(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" #if 1 " movd 4(%[s1_np7]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " pshufw $0x1b, %%mm1, %%mm1\n" // 00 01 10 11 " paddw %%mm1, %%mm0\n" " pmaddwd 0(%[s2_8]), %%mm0\n" #else " pmaddwd 0(%[s2_8]), %%mm0\n" " movd 4(%[s1_np7]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " pmaddwd 8(%[s2_8]), %%mm1\n" " paddd %%mm1, %%mm0\n" #endif " pshufw $0xee, %%mm0, %%mm1\n" // 11 10 11 10 " paddd %%mm1, %%mm0\n" " paddd %%mm6, %%mm0\n" " psrad %%mm5, %%mm0\n" " pmaxsw %%mm7, %%mm0\n" " packuswb %%mm0, %%mm0\n" " movd %%mm0, %%ecx\n" " movb %%cl,0(%[d])\n" " add $1, %[d]\n" " add $1, %[s1_np7]\n" " decl %[n]\n" " jnz 1b\n" "2:\n" " emms\n" : [d] "+r" (d), [s1_np7] "+r" (s1_np7), [n] "+m" (n) : [s2_8] "r" (s2_8), [s3_2] "r" (s3_2) : "ecx"); } OIL_DEFINE_IMPL_FULL (mas8_u8_sym_mmx_5, mas8_u8_sym_l15, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); #ifdef HAVE_SSSE3_ASM void mas8_u8_sym_mmx_6 (uint8_t *d, const uint8_t *s1_np7, const int16_t *s2_8, const int16_t *s3_2, int n) { int8_t coeff[8]; int8_t *ack; int i; for(i=0;i<8;i++){ //coeff[i] = s2_8[i]; coeff[i] = i; } ack = coeff; if (n==0) return; __asm__ __volatile__("\n" " pxor %%mm7, %%mm7\n" " movzwl 0(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm6\n" " pshufw $0x44, %%mm6, %%mm6\n" // 01 00 01 00 " movzwl 2(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm5\n" " movq 0(%[s2_8]), %%mm4\n" " packsswb 8(%[s2_8]), %%mm4\n" "1:\n" " movq 0(%[s1_np7]), %%mm0\n" " pmaddubsw %%mm4, %%mm0\n" #if 1 " pshufw $0xee, %%mm0, %%mm1\n" // 11 10 11 10 " paddw %%mm1, %%mm0\n" " pshufw $0x55, %%mm0, %%mm1\n" // 01 01 01 01 " paddw %%mm1, %%mm0\n" #else " phaddw %%mm0, %%mm0\n" " phaddw %%mm0, %%mm0\n" #endif " paddw %%mm6, %%mm0\n" " psraw %%mm5, %%mm0\n" " pmaxsw %%mm7, %%mm0\n" " packuswb %%mm0, %%mm0\n" " movd %%mm0, %%ecx\n" " movb %%cl,0(%[d])\n" " add $1, %[d]\n" " add $1, %[s1_np7]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d] "+r" (d), [s1_np7] "+r" (s1_np7), [n] "+m" (n) : [s2_8] "r" (s2_8), [s3_2] "r" (s3_2) : "ecx"); } OIL_DEFINE_IMPL_FULL (mas8_u8_sym_mmx_6, mas8_u8_sym_l15, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT|OIL_IMPL_FLAG_SSSE3); #endif #ifdef ENABLE_BROKEN_IMPLS /* This only works for the taps array: -1, 3, -7, 21, 21, -7, 3, -1 */ void mas8_u8_supersym_mmx (uint8_t *d, const uint8_t *s1_np7, const int16_t *s2_8, const int16_t *s3_2, int n) { int j; int x; while(n&3) { x = 0; for(j=0;j<8;j++){ x += s1_np7[j] * s2_8[j]; } *d = CLAMP((x + s3_2[0])>>s3_2[1],0,255); d++; s1_np7++; n--; } n>>=2; __asm__ __volatile__("\n" " pxor %%mm7, %%mm7\n" " movd (%[s3_2]), %%mm6\n" " pshufw $0x00, %%mm6, %%mm6\n" " movzwl 2(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm5\n" " movq 0(%[s2_8]), %%mm3\n" " movq 8(%[s2_8]), %%mm4\n" "1:\n" " movd 0(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " movd 7(%[s1_np7]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " paddw %%mm1, %%mm0\n" " movd 1(%[s1_np7]), %%mm2\n" " punpcklbw %%mm7, %%mm2\n" " movd 6(%[s1_np7]), %%mm3\n" " punpcklbw %%mm7, %%mm3\n" " paddw %%mm3, %%mm2\n" " paddw %%mm2, %%mm0\n" " psllw $2, %%mm2\n" " psubw %%mm0, %%mm2\n" " movq %%mm2, %%mm4\n" " movd 2(%[s1_np7]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " movd 5(%[s1_np7]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " paddw %%mm1, %%mm0\n" " movd 3(%[s1_np7]), %%mm2\n" " punpcklbw %%mm7, %%mm2\n" " movd 4(%[s1_np7]), %%mm3\n" " punpcklbw %%mm7, %%mm3\n" " paddw %%mm3, %%mm2\n" " paddw %%mm2, %%mm0\n" " psllw $2, %%mm2\n" " psubw %%mm0, %%mm2\n" " psubw %%mm2, %%mm4\n" " psllw $3, %%mm2\n" " paddw %%mm4, %%mm2\n" " paddw %%mm6, %%mm2\n" " psraw %%mm5, %%mm2\n" " pmaxsw %%mm7, %%mm2\n" " packuswb %%mm2, %%mm2\n" " movd %%mm2, 0(%[d])\n" " add $4, %[d]\n" " add $4, %[s1_np7]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d] "+r" (d), [s1_np7] "+r" (s1_np7), [n] "+m" (n) : [s2_8] "r" (s2_8), [s3_2] "r" (s3_2) : "ecx"); } OIL_DEFINE_IMPL_FULL (mas8_u8_supersym_mmx, mas8_u8_sym_l15, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); #endif void mas12_addc_rshift_decim2_u8_mmx_4 (uint8_t *d, const uint8_t *s1_2xnp11, const int16_t *s2_12, const int16_t *s3_2, int n) { if (n == 0) return; __asm__ __volatile__("\n" " pxor %%mm7, %%mm7\n" " movzwl 0(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm6\n" " movzwl 2(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm5\n" "1:\n" " movd 0(%[s1_2xnp11]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pmaddwd 0(%[s2_12]), %%mm0\n" " movd 4(%[s1_2xnp11]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " pmaddwd 8(%[s2_12]), %%mm1\n" " paddd %%mm1, %%mm0\n" " movd 8(%[s1_2xnp11]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " pmaddwd 16(%[s2_12]), %%mm1\n" " paddd %%mm1, %%mm0\n" " movq %%mm0, %%mm1\n" " psrlq $32, %%mm0\n" " paddd %%mm1, %%mm0\n" " paddd %%mm6, %%mm0\n" " psrad %%mm5, %%mm0\n" " pmaxsw %%mm7, %%mm0\n" " packuswb %%mm0, %%mm0\n" " movd %%mm0, %%ecx\n" " movb %%cl,0(%[d])\n" " add $1, %[d]\n" " add $2, %[s1_2xnp11]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d] "+r" (d), [s1_2xnp11] "+r" (s1_2xnp11), [n] "+m" (n) : [s2_12] "r" (s2_12), [s3_2] "r" (s3_2) : "ecx"); } OIL_DEFINE_IMPL_FULL (mas12_addc_rshift_decim2_u8_mmx_4, mas12_addc_rshift_decim2_u8, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); #if 0 void mas8_addc_rshift_decim2_u8_mmx_4 (uint8_t *d, const uint8_t *s1_2xnp9, const int16_t *s2_8, const int16_t *s3_2, int n) { if (n == 0) return; __asm__ __volatile__("\n" " pxor %%mm7, %%mm7\n" " movzwl 0(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm6\n" " movzwl 2(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm5\n" "1:\n" " movd 0(%[s1_2xnp9]), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pmaddwd 0(%[s2_8]), %%mm0\n" " movd 4(%[s1_2xnp9]), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " pmaddwd 8(%[s2_8]), %%mm1\n" " paddd %%mm1, %%mm0\n" " movq %%mm0, %%mm1\n" " psrlq $32, %%mm0\n" " paddd %%mm1, %%mm0\n" " paddd %%mm6, %%mm0\n" " psrad %%mm5, %%mm0\n" " pmaxsw %%mm7, %%mm0\n" " packuswb %%mm0, %%mm0\n" " movd %%mm0, %%ecx\n" " movb %%cl,0(%[d])\n" " add $1, %[d]\n" " add $2, %[s1_2xnp9]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d] "+r" (d), [s1_2xnp9] "+r" (s1_2xnp9), [n] "+m" (n) : [s2_8] "r" (s2_8), [s3_2] "r" (s3_2) : "ecx"); } OIL_DEFINE_IMPL_FULL (mas8_addc_rshift_decim2_u8_mmx_4, mas8_addc_rshift_decim2_u8, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); #endif void mas8_across_u8_mmx_3 (uint8_t *d, const uint8_t *s1_nx8, int ss1, const int16_t *s2_8, const int16_t *s3_2, int n) { int i; int x; while(n&3) { x = 0; for(i=0;i<8;i++){ x += OIL_GET(s1_nx8, i*ss1, uint8_t)*s2_8[i]; } *d = CLAMP((x + s3_2[0])>>s3_2[1],0,255); d++; s1_nx8++; n--; } if (n == 0) return; n>>=2; __asm__ __volatile__("\n" " pxor %%mm7, %%mm7\n" " movd (%[s3_2]), %%mm6\n" " movzwl 2(%[s3_2]), %%ecx\n" " movd %%ecx, %%mm5\n" " movq 0(%[s2_8]), %%mm3\n" " movq 8(%[s2_8]), %%mm4\n" : : [s2_8] "r" (s2_8), [s3_2] "r" (s3_2) : "ecx"); while (n > 0) { const uint8_t *p = s1_nx8; __asm__ __volatile__("\n" "1:\n" /* load 128 */ " pshufw $0x00, %%mm6, %%mm2\n" " movd 0(%[p]), %%mm0\n" " add %[ss1], %[p]\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x00, %%mm3, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 0(%[p]), %%mm0\n" " add %[ss1], %[p]\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*1, %%mm3, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 0(%[p]), %%mm0\n" " add %[ss1], %[p]\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*2, %%mm3, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 0(%[p]), %%mm0\n" " add %[ss1], %[p]\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*3, %%mm3, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 0(%[p]), %%mm0\n" " add %[ss1], %[p]\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x00, %%mm4, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 0(%[p]), %%mm0\n" " add %[ss1], %[p]\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*1, %%mm4, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 0(%[p]), %%mm0\n" " add %[ss1], %[p]\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*2, %%mm4, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " movd 0(%[p]), %%mm0\n" " add %[ss1], %[p]\n" " punpcklbw %%mm7, %%mm0\n" " pshufw $0x55*3, %%mm4, %%mm1\n" " pmullw %%mm1, %%mm0\n" " paddw %%mm0, %%mm2\n" " psraw %%mm5, %%mm2\n" " pmaxsw %%mm7, %%mm2\n" " packuswb %%mm2, %%mm2\n" " movd %%mm2, 0(%[d])\n" : [p] "+r" (p) : [d] "r" (d), [ss1] "r" ((long)ss1)); d+=4; s1_nx8+=4; n--; } asm volatile ("emms"); } OIL_DEFINE_IMPL_FULL (mas8_across_u8_mmx_3, mas8_across_u8, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); liboil-0.3.17/liboil/i386_amd64/swab.c0000644000175000017500000002006010717203073014031 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include static void swab_u32_i386 (uint32_t *dest, uint32_t *src, int n) { asm volatile ("\n" "1:\n" " movl 0(%1), %%eax\n" " bswap %%eax\n" " movl %%eax, 0(%0)\n" " add $4, %0\n" " add $4, %1\n" " decl %2\n" " jnz 1b\n" : "+r" (dest), "+r" (src), "+r" (n) : : "eax", "memory"); } OIL_DEFINE_IMPL (swab_u32_i386, swab_u32); static void swab_u32_i386_unroll2 (uint32_t *dest, uint32_t *src, int n) { asm volatile ("\n" " test $1, %2\n" " jz 1f\n" " movl 0(%1), %%eax\n" " bswap %%eax\n" " movl %%eax, 0(%0)\n" " add $4, %0\n" " add $4, %1\n" " decl %2\n" " jz 2f\n" "1:\n" " movl 0(%1), %%eax\n" " movl 4(%1), %%ecx\n" " bswap %%eax\n" " bswap %%ecx\n" " movl %%eax, 0(%0)\n" " movl %%ecx, 4(%0)\n" " add $8, %0\n" " add $8, %1\n" " sub $2, %2\n" " jnz 1b\n" "2:\n" : "+r" (dest), "+r" (src), "+r" (n) : : "eax", "ecx", "memory"); } OIL_DEFINE_IMPL (swab_u32_i386_unroll2, swab_u32); static void swab_u32_i386_unroll4 (uint32_t *dest, uint32_t *src, int n) { asm volatile ("\n" " jmp 2f\n" "1:\n" " movl 0(%1), %%eax\n" " bswap %%eax\n" " movl %%eax, 0(%0)\n" " add $4, %0\n" " add $4, %1\n" " decl %2\n" "2:\n" " test $3, %2\n" " jnz 1b\n" " test %2, %2\n" " jz 4f\n" "3:\n" " movl 0(%1), %%eax\n" " movl 4(%1), %%ecx\n" " bswap %%eax\n" " bswap %%ecx\n" " movl %%eax, 0(%0)\n" " movl %%ecx, 4(%0)\n" " movl 8(%1), %%eax\n" " movl 12(%1), %%ecx\n" " bswap %%eax\n" " bswap %%ecx\n" " movl %%eax, 8(%0)\n" " movl %%ecx, 12(%0)\n" " add $16, %0\n" " add $16, %1\n" " sub $4, %2\n" " jnz 3b\n" "4:\n" : "+r" (dest), "+r" (src), "+r" (n) : : "eax", "ecx", "memory"); } OIL_DEFINE_IMPL (swab_u32_i386_unroll4, swab_u32); /* * This could be improved by using aligned stores */ static void swab_u16_mmx (uint16_t *dest, uint16_t *src, int n) { asm volatile ("\n" " jmp 2f\n" "1:\n" " movw 0(%1), %%ax\n" " xchg %%al, %%ah\n" " movw %%ax, 0(%0)\n" " add $2, %0\n" " add $2, %1\n" " decl %2\n" "2:\n" " test $3, %2\n" " jnz 1b\n" " test %2, %2\n" " jz 4f\n" "3:\n" " movq 0(%1), %%mm0\n" " movq 0(%1), %%mm1\n" " psllw $8, %%mm0\n" " psrlw $8, %%mm1\n" " por %%mm0, %%mm1\n" " movq %%mm1, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " sub $4, %2\n" " jnz 3b\n" " emms\n" "4:\n" : "+r" (dest), "+r" (src), "+r" (n) : : "eax", "memory"); } OIL_DEFINE_IMPL_FULL (swab_u16_mmx, swab_u16, OIL_IMPL_FLAG_MMX); static void swab_u16_mmx_unroll2 (uint16_t *dest, uint16_t *src, int n) { asm volatile ("\n" " jmp 2f\n" "1:\n" " movw 0(%1), %%ax\n" " xchg %%al, %%ah\n" " movw %%ax, 0(%0)\n" " add $2, %0\n" " add $2, %1\n" " decl %2\n" "2:\n" " test $7, %2\n" " jnz 1b\n" " test %2, %2\n" " jz 4f\n" "3:\n" " movq 0(%1), %%mm0\n" " movq 0(%1), %%mm1\n" " movq 8(%1), %%mm2\n" " psllw $8, %%mm0\n" " movq 8(%1), %%mm3\n" " psrlw $8, %%mm1\n" " psllw $8, %%mm2\n" " por %%mm0, %%mm1\n" " psrlw $8, %%mm3\n" " movq %%mm1, 0(%0)\n" " por %%mm2, %%mm3\n" " movq %%mm3, 8(%0)\n" " add $16, %0\n" " add $16, %1\n" " sub $8, %2\n" " jnz 3b\n" " emms\n" "4:\n" : "+r" (dest), "+r" (src), "+r" (n) : : "eax", "memory"); } OIL_DEFINE_IMPL_FULL (swab_u16_mmx_unroll2, swab_u16, OIL_IMPL_FLAG_MMX); /* 10 instructions to swab 2 words? not likely */ static void swab_u32_mmx (uint16_t *dest, uint16_t *src, int n) { asm volatile ("\n" " jmp 2f\n" "1:\n" " movl 0(%1), %%eax\n" " bswap %%eax\n" " movl %%eax, 0(%0)\n" " add $4, %0\n" " add $4, %1\n" " decl %2\n" "2:\n" " test $1, %2\n" " jnz 1b\n" " test %2, %2\n" " jz 4f\n" "3:\n" " movq 0(%1), %%mm0\n" " movq 0(%1), %%mm1\n" " psllw $8, %%mm0\n" " psrlw $8, %%mm1\n" " por %%mm0, %%mm1\n" " movq %%mm1, %%mm0\n" " pslld $16, %%mm0\n" " psrld $16, %%mm1\n" " por %%mm0, %%mm1\n" " movq %%mm1, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " sub $2, %2\n" " jnz 3b\n" " emms\n" "4:\n" : "+r" (dest), "+r" (src), "+r" (n) : : "eax", "memory"); } OIL_DEFINE_IMPL_FULL (swab_u32_mmx, swab_u32, OIL_IMPL_FLAG_MMX); static void swab_u16_sse2 (uint16_t *dest, uint16_t *src, int n) { asm volatile ("\n" " jmp 2f\n" "1:\n" " movw 0(%1), %%ax\n" " xchg %%al, %%ah\n" " movw %%ax, 0(%0)\n" " add $2, %0\n" " add $2, %1\n" " decl %2\n" "2:\n" " test $7, %2\n" " jnz 1b\n" " test %2, %2\n" " jz 4f\n" "3:\n" " movdqu 0(%1), %%xmm0\n" " movdqu 0(%1), %%xmm1\n" " psllw $8, %%xmm0\n" " psrlw $8, %%xmm1\n" " por %%xmm0, %%xmm1\n" " movdqu %%xmm1, 0(%0)\n" " add $16, %0\n" " add $16, %1\n" " sub $8, %2\n" " jnz 3b\n" "4:\n" : "+r" (dest), "+r" (src), "+r" (n) : : "eax", "memory"); } OIL_DEFINE_IMPL_FULL (swab_u16_sse2, swab_u16, OIL_IMPL_FLAG_SSE2); static void swab_u32_sse2 (uint16_t *dest, uint16_t *src, int n) { asm volatile ("\n" " jmp 2f\n" "1:\n" " movl 0(%1), %%eax\n" " bswap %%eax\n" " movl %%eax, 0(%0)\n" " add $4, %0\n" " add $4, %1\n" " decl %2\n" "2:\n" " test $3, %2\n" " jnz 1b\n" " test %2, %2\n" " jz 4f\n" "3:\n" " movdqu 0(%1), %%xmm0\n" " movdqu 0(%1), %%xmm1\n" " psllw $8, %%xmm0\n" " psrlw $8, %%xmm1\n" " por %%xmm0, %%xmm1\n" " movdqu %%xmm1, %%xmm0\n" " pslld $16, %%xmm0\n" " psrld $16, %%xmm1\n" " por %%xmm0, %%xmm1\n" " movdqu %%xmm1, 0(%0)\n" " add $16, %0\n" " add $16, %1\n" " sub $4, %2\n" " jnz 3b\n" "4:\n" : "+r" (dest), "+r" (src), "+r" (n) : : "eax", "memory"); } OIL_DEFINE_IMPL_FULL (swab_u32_sse2, swab_u32, OIL_IMPL_FLAG_SSE2); liboil-0.3.17/liboil/i386_amd64/sum.c0000644000175000017500000000142611270131246013703 00000000000000 #include #include void sum_s16_mmx (int16_t *d, int16_t *s, int n) { int16_t sum = 0; int16_t a[4]; while(n&15) { sum += s[0]; s++; n--; } if (n > 0) { n >>= 4; asm volatile ("\n" " pxor %%mm0, %%mm0\n" "1:\n" " paddw 0(%0), %%mm0\n" " paddw 8(%0), %%mm0\n" " paddw 16(%0), %%mm0\n" " paddw 24(%0), %%mm0\n" " add $32, %0\n" " decl %1\n" " jnz 1b\n" " movq %%mm0, 0(%2)\n" " emms\n" : "+r" (s), "+r" (n) : "r" (a) : "memory"); sum += a[0]; sum += a[1]; sum += a[2]; sum += a[3]; } d[0] = sum; } OIL_DEFINE_IMPL_FULL (sum_s16_mmx, sum_s16, OIL_IMPL_FLAG_MMX); liboil-0.3.17/liboil/i386_amd64/add2.c0000644000175000017500000002645211131504056013716 00000000000000 #include #include void add2_rshift_add_s16_mmx (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4_2, int n) { while (n&3) { int x; x = s4_2[0] + s2[0] + s3[0]; x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; s3++; n--; } if (n==0) return; n>>=2; asm volatile ("\n" " movd 0(%[s4_2]), %%mm4\n" " pshufw $0x00, %%mm4, %%mm4\n" " movzwl 2(%[s4_2]), %%ecx\n" " movd %%ecx, %%mm5\n" :: [s4_2] "r" (s4_2) : "ecx"); asm volatile ("\n" "1:\n" " movq %%mm4, %%mm0\n" " paddw 0(%[s2]), %%mm0\n" " paddw 0(%[s3]), %%mm0\n" " psraw %%mm5, %%mm0\n" " paddw 0(%[s1]), %%mm0\n" " movq %%mm0, 0(%[d1])\n" " add $8, %[d1]\n" " add $8, %[s1]\n" " add $8, %[s2]\n" " add $8, %[s3]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d1] "+r" (d1), [s1] "+r" (s1), [s2] "+r" (s2), [s3] "+r" (s3), [n] "+r" (n) : ); } OIL_DEFINE_IMPL_FULL (add2_rshift_add_s16_mmx, add2_rshift_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void add2_rshift_sub_s16_mmx (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4_2, int n) { while (n&3) { int x; x = s4_2[0] + s2[0] + s3[0]; x >>= s4_2[1]; d1[0] = s1[0] - x; d1++; s1++; s2++; s3++; n--; } if (n==0) return; n>>=2; asm volatile ("\n" " movd 0(%[s4_2]), %%mm4\n" " pshufw $0x00, %%mm4, %%mm4\n" " movzwl 2(%[s4_2]), %%ecx\n" " movd %%ecx, %%mm5\n" :: [s4_2] "r" (s4_2) : "ecx"); asm volatile ("\n" "1:\n" " movq %%mm4, %%mm0\n" " paddw 0(%[s2]), %%mm0\n" " paddw 0(%[s3]), %%mm0\n" " psraw %%mm5, %%mm0\n" " movq 0(%[s1]), %%mm1\n" " psubw %%mm0, %%mm1\n" " movq %%mm1, 0(%[d1])\n" " add $8, %[d1]\n" " add $8, %[s1]\n" " add $8, %[s2]\n" " add $8, %[s3]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d1] "+r" (d1), [s1] "+r" (s1), [s2] "+r" (s2), [s3] "+r" (s3), [n] "+r" (n) : ); } OIL_DEFINE_IMPL_FULL (add2_rshift_sub_s16_mmx, add2_rshift_sub_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void add2_rshift_add_s16_mmx_unroll2 (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4_2, int n) { while (n&7) { int x; x = s4_2[0] + s2[0] + s3[0]; x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; s3++; n--; } if (n==0) return; n>>=3; asm volatile ("\n" " movd 0(%[s4_2]), %%mm4\n" " pshufw $0x00, %%mm4, %%mm4\n" " movzwl 2(%[s4_2]), %%ecx\n" " movd %%ecx, %%mm5\n" :: [s4_2] "r" (s4_2) : "ecx"); asm volatile ("\n" "1:\n" " movq %%mm4, %%mm0\n" " paddw 0(%[s2]), %%mm0\n" " paddw 0(%[s3]), %%mm0\n" " psraw %%mm5, %%mm0\n" " paddw 0(%[s1]), %%mm0\n" " movq %%mm0, 0(%[d1])\n" " movq %%mm4, %%mm0\n" " paddw 8(%[s2]), %%mm0\n" " paddw 8(%[s3]), %%mm0\n" " psraw %%mm5, %%mm0\n" " paddw 8(%[s1]), %%mm0\n" " movq %%mm0, 8(%[d1])\n" " add $16, %[d1]\n" " add $16, %[s1]\n" " add $16, %[s2]\n" " add $16, %[s3]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d1] "+r" (d1), [s1] "+r" (s1), [s2] "+r" (s2), [s3] "+r" (s3), [n] "+r" (n) : ); } OIL_DEFINE_IMPL_FULL (add2_rshift_add_s16_mmx_unroll2, add2_rshift_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void add2_rshift_sub_s16_mmx_unroll2 (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4_2, int n) { while (n&7) { int x; x = s4_2[0] + s2[0] + s3[0]; x >>= s4_2[1]; d1[0] = s1[0] - x; d1++; s1++; s2++; s3++; n--; } if (n==0) return; n>>=3; asm volatile ("\n" " movd 0(%[s4_2]), %%mm4\n" " pshufw $0x00, %%mm4, %%mm4\n" " movzwl 2(%[s4_2]), %%ecx\n" " movd %%ecx, %%mm5\n" :: [s4_2] "r" (s4_2) : "ecx"); asm volatile ("\n" "1:\n" " movq %%mm4, %%mm0\n" " paddw 0(%[s2]), %%mm0\n" " paddw 0(%[s3]), %%mm0\n" " psraw %%mm5, %%mm0\n" " movq 0(%[s1]), %%mm1\n" " psubw %%mm0, %%mm1\n" " movq %%mm1, 0(%[d1])\n" " movq %%mm4, %%mm0\n" " paddw 8(%[s2]), %%mm0\n" " paddw 8(%[s3]), %%mm0\n" " psraw %%mm5, %%mm0\n" " movq 8(%[s1]), %%mm1\n" " psubw %%mm0, %%mm1\n" " movq %%mm1, 8(%[d1])\n" " add $16, %[d1]\n" " add $16, %[s1]\n" " add $16, %[s2]\n" " add $16, %[s3]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d1] "+r" (d1), [s1] "+r" (s1), [s2] "+r" (s2), [s3] "+r" (s3), [n] "+r" (n) : ); } OIL_DEFINE_IMPL_FULL (add2_rshift_sub_s16_mmx_unroll2, add2_rshift_sub_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void add2_rshift_add_s16_mmx_unroll4 (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4_2, int n) { while (n&15) { int x; x = s4_2[0] + s2[0] + s3[0]; x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; s3++; n--; } if (n==0) return; n>>=4; asm volatile ("\n" " movd 0(%[s4_2]), %%mm4\n" " pshufw $0x00, %%mm4, %%mm4\n" " movzwl 2(%[s4_2]), %%ecx\n" " movd %%ecx, %%mm5\n" :: [s4_2] "r" (s4_2) : "ecx"); asm volatile ("\n" "1:\n" " movq %%mm4, %%mm0\n" " paddw 0(%[s2]), %%mm0\n" " paddw 0(%[s3]), %%mm0\n" " psraw %%mm5, %%mm0\n" " paddw 0(%[s1]), %%mm0\n" " movq %%mm0, 0(%[d1])\n" " movq %%mm4, %%mm0\n" " paddw 8(%[s2]), %%mm0\n" " paddw 8(%[s3]), %%mm0\n" " psraw %%mm5, %%mm0\n" " paddw 8(%[s1]), %%mm0\n" " movq %%mm0, 8(%[d1])\n" " movq %%mm4, %%mm0\n" " paddw 16(%[s2]), %%mm0\n" " paddw 16(%[s3]), %%mm0\n" " psraw %%mm5, %%mm0\n" " paddw 16(%[s1]), %%mm0\n" " movq %%mm0, 16(%[d1])\n" " movq %%mm4, %%mm0\n" " paddw 24(%[s2]), %%mm0\n" " paddw 24(%[s3]), %%mm0\n" " psraw %%mm5, %%mm0\n" " paddw 24(%[s1]), %%mm0\n" " movq %%mm0, 24(%[d1])\n" " add $32, %[d1]\n" " add $32, %[s1]\n" " add $32, %[s2]\n" " add $32, %[s3]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d1] "+r" (d1), [s1] "+r" (s1), [s2] "+r" (s2), [s3] "+r" (s3), [n] "+r" (n) : ); } OIL_DEFINE_IMPL_FULL (add2_rshift_add_s16_mmx_unroll4, add2_rshift_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void add2_rshift_sub_s16_mmx_unroll4 (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4_2, int n) { while (n&15) { int x; x = s4_2[0] + s2[0] + s3[0]; x >>= s4_2[1]; d1[0] = s1[0] - x; d1++; s1++; s2++; s3++; n--; } if (n==0) return; n>>=4; asm volatile ("\n" " movd 0(%[s4_2]), %%mm4\n" " pshufw $0x00, %%mm4, %%mm4\n" " movzwl 2(%[s4_2]), %%ecx\n" " movd %%ecx, %%mm5\n" :: [s4_2] "r" (s4_2) : "ecx"); asm volatile ("\n" "1:\n" " movq %%mm4, %%mm0\n" " paddw 0(%[s2]), %%mm0\n" " paddw 0(%[s3]), %%mm0\n" " psraw %%mm5, %%mm0\n" " movq 0(%[s1]), %%mm1\n" " psubw %%mm0, %%mm1\n" " movq %%mm1, 0(%[d1])\n" " movq %%mm4, %%mm2\n" " paddw 8(%[s2]), %%mm2\n" " paddw 8(%[s3]), %%mm2\n" " psraw %%mm5, %%mm2\n" " movq 8(%[s1]), %%mm3\n" " psubw %%mm2, %%mm3\n" " movq %%mm3, 8(%[d1])\n" " movq %%mm4, %%mm0\n" " paddw 16(%[s2]), %%mm0\n" " paddw 16(%[s3]), %%mm0\n" " psraw %%mm5, %%mm0\n" " movq 16(%[s1]), %%mm1\n" " psubw %%mm0, %%mm1\n" " movq %%mm1, 16(%[d1])\n" " movq %%mm4, %%mm2\n" " paddw 24(%[s2]), %%mm2\n" " paddw 24(%[s3]), %%mm2\n" " psraw %%mm5, %%mm2\n" " movq 24(%[s1]), %%mm3\n" " psubw %%mm2, %%mm3\n" " movq %%mm3, 24(%[d1])\n" " add $32, %[d1]\n" " add $32, %[s1]\n" " add $32, %[s2]\n" " add $32, %[s3]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [d1] "+r" (d1), [s1] "+r" (s1), [s2] "+r" (s2), [s3] "+r" (s3), [n] "+r" (n) : ); } OIL_DEFINE_IMPL_FULL (add2_rshift_sub_s16_mmx_unroll4, add2_rshift_sub_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void add2_rshift_add_s16_sse (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4_2, int n) { while (n&7) { int x; x = s4_2[0] + s2[0] + s3[0]; x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; s3++; n--; } if (n==0) return; n>>=3; asm volatile ("\n" " movd 0(%[s4_2]), %%xmm4\n" " pshuflw $0x00, %%xmm4, %%xmm4\n" " pshufd $0x00, %%xmm4, %%xmm4\n" " movzwl 2(%[s4_2]), %%ecx\n" " movd %%ecx, %%xmm5\n" :: [s4_2] "r" (s4_2) : "ecx"); asm volatile ("\n" "1:\n" #if 0 " movdqu %%xmm4, %%xmm0\n" " movdqu 0(%[s2]), %%xmm1\n" " paddw %%xmm1, %%xmm0\n" " movdqu 0(%[s3]), %%xmm2\n" " paddw %%xmm2, %%xmm0\n" " psraw %%xmm5, %%xmm0\n" " movdqu 0(%[d1]), %%xmm1\n" " paddw %%xmm1, %%xmm0\n" " movdqu %%xmm0, 0(%[d1])\n" #endif " movdqu %%xmm4, %%xmm0\n" " movdqu 0(%[s2]), %%xmm1\n" " paddw %%xmm1, %%xmm0\n" " movdqu 0(%[s3]), %%xmm2\n" " paddw %%xmm2, %%xmm0\n" " psraw %%xmm5, %%xmm0\n" " movdqu 0(%[s1]), %%xmm1\n" " paddw %%xmm0, %%xmm1\n" " movdqu %%xmm1, 0(%[d1])\n" " add $16, %[d1]\n" " add $16, %[s1]\n" " add $16, %[s2]\n" " add $16, %[s3]\n" " decl %[n]\n" " jnz 1b\n" : [d1] "+r" (d1), [s1] "+r" (s1), [s2] "+r" (s2), [s3] "+r" (s3), [n] "+r" (n) : ); } OIL_DEFINE_IMPL_FULL (add2_rshift_add_s16_sse, add2_rshift_add_s16, OIL_IMPL_FLAG_MMXEXT|OIL_IMPL_FLAG_SSE|OIL_IMPL_FLAG_SSE2); void add2_rshift_sub_s16_sse (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3, int16_t *s4_2, int n) { while (n&7) { int x; x = s4_2[0] + s2[0] + s3[0]; x >>= s4_2[1]; d1[0] = s1[0] - x; d1++; s1++; s2++; s3++; n--; } if (n==0) return; n>>=3; asm volatile ("\n" " movd 0(%[s4_2]), %%xmm4\n" " pshuflw $0x00, %%xmm4, %%xmm4\n" " pshufd $0x00, %%xmm4, %%xmm4\n" " movzwl 2(%[s4_2]), %%ecx\n" " movd %%ecx, %%xmm5\n" :: [s4_2] "r" (s4_2) : "ecx"); asm volatile ("\n" "1:\n" " movdqu %%xmm4, %%xmm0\n" " movdqu 0(%[s2]), %%xmm1\n" " paddw %%xmm1, %%xmm0\n" " movdqu 0(%[s3]), %%xmm2\n" " paddw %%xmm2, %%xmm0\n" " psraw %%xmm5, %%xmm0\n" " movdqu 0(%[s1]), %%xmm1\n" " psubw %%xmm0, %%xmm1\n" " movdqu %%xmm1, 0(%[d1])\n" " add $16, %[d1]\n" " add $16, %[s1]\n" " add $16, %[s2]\n" " add $16, %[s3]\n" " decl %[n]\n" " jnz 1b\n" : [d1] "+r" (d1), [s1] "+r" (s1), [s2] "+r" (s2), [s3] "+r" (s3), [n] "+r" (n) : ); } OIL_DEFINE_IMPL_FULL (add2_rshift_sub_s16_sse, add2_rshift_sub_s16, OIL_IMPL_FLAG_MMXEXT|OIL_IMPL_FLAG_SSE|OIL_IMPL_FLAG_SSE2); liboil-0.3.17/liboil/i386_amd64/clamp.c0000644000175000017500000002345310717203073014202 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include static void clamp_s8_asm_mmx (int8_t *dest, int8_t *src, int n, int8_t *low, int8_t *high) { int32_t l; int32_t h; while(n&7) { oil_type_s8 x = *src; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 3; if (n == 0) return; l = *low + 128; l |= (l<<8); l |= (l<<16); h = 127 - *high; h |= (h<<8); h |= (h<<16); asm volatile ("\n" " movd %3, %%mm6\n" " punpcklbw %%mm6, %%mm6\n" " movd %4, %%mm5\n" " punpcklbw %%mm5, %%mm5\n" " mov $0x80808080, %3\n" " movd %3, %%mm7\n" " punpcklbw %%mm7, %%mm7\n" "1:\n" " movq 0(%1), %%mm0\n" " pxor %%mm7, %%mm0\n" " psubusb %%mm6, %%mm0\n" " paddusb %%mm6, %%mm0\n" " paddusb %%mm5, %%mm0\n" " psubusb %%mm5, %%mm0\n" " pxor %%mm7, %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " decl %2\n" " jnz 1b\n" " emms\n" : "+r" (dest), "+r" (src), "+r" (n), "+r" (l), "+r" (h) : : "memory"); } OIL_DEFINE_IMPL_FULL (clamp_s8_asm_mmx, clamp_s8, OIL_IMPL_FLAG_MMX); static void clamp_s8_asm_mmxext (int8_t *dest, int8_t *src, int n, int8_t *low, int8_t *high) { int32_t l; int32_t h; while(n&7) { oil_type_s8 x = *src; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 3; if (n == 0) return; l = *low + 128; l |= (l<<8); l |= (l<<16); h = *high + 128; h |= (h<<8); h |= (h<<16); asm volatile ("\n" " movd %3, %%mm6\n" " punpcklbw %%mm6, %%mm6\n" " movd %4, %%mm5\n" " punpcklbw %%mm5, %%mm5\n" " mov $0x80808080, %3\n" " movd %3, %%mm7\n" " punpcklbw %%mm7, %%mm7\n" "1:\n" " movq 0(%1), %%mm0\n" " pxor %%mm7, %%mm0\n" " pmaxub %%mm6, %%mm0\n" " pminub %%mm5, %%mm0\n" " pxor %%mm7, %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " decl %2\n" " jnz 1b\n" " emms\n" : "+r" (dest), "+r" (src), "+r" (n), "+r" (l), "+r" (h) : : "memory"); } OIL_DEFINE_IMPL_FULL (clamp_s8_asm_mmxext, clamp_s8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); static void clamp_u8_asm_mmx (uint8_t *dest, uint8_t *src, int n, uint8_t *low, uint8_t *high) { uint32_t l; uint32_t h; while(n&7) { oil_type_u8 x = *src; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 3; if (n == 0) return; l = *low; l |= (l<<8); l |= (l<<16); h = 255 - *high; h |= (h<<8); h |= (h<<16); asm volatile ("\n" " movd %3, %%mm6\n" " punpcklbw %%mm6, %%mm6\n" " movd %4, %%mm5\n" " punpcklbw %%mm5, %%mm5\n" "1:\n" " movq 0(%1), %%mm0\n" " psubusb %%mm6, %%mm0\n" " paddusb %%mm6, %%mm0\n" " paddusb %%mm5, %%mm0\n" " psubusb %%mm5, %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " decl %2\n" " jnz 1b\n" " emms\n" : "+r" (dest), "+r" (src), "+r" (n), "+r" (l), "+r" (h) : : "memory"); } OIL_DEFINE_IMPL_FULL (clamp_u8_asm_mmx, clamp_u8, OIL_IMPL_FLAG_MMX); static void clamp_u8_asm_mmxext (uint8_t *dest, uint8_t *src, int n, uint8_t *low, uint8_t *high) { int32_t l; int32_t h; while(n&7) { oil_type_u8 x = *src; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 3; if (n == 0) return; l = *low; l |= (l<<8); l |= (l<<16); h = *high; h |= (h<<8); h |= (h<<16); asm volatile ("\n" " movd %3, %%mm6\n" " punpcklbw %%mm6, %%mm6\n" " movd %4, %%mm5\n" " punpcklbw %%mm5, %%mm5\n" "1:\n" " movq 0(%1), %%mm0\n" " pmaxub %%mm6, %%mm0\n" " pminub %%mm5, %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " decl %2\n" " jnz 1b\n" " emms\n" : "+r" (dest), "+r" (src), "+r" (n), "+r" (l), "+r" (h) : : "memory"); } OIL_DEFINE_IMPL_FULL (clamp_u8_asm_mmxext, clamp_u8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); static void clamp_s16_asm_mmx (int16_t *dest, int16_t *src, int n, int16_t *low, int16_t *high) { int32_t l; int32_t h; while(n&3) { oil_type_s16 x = *src; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; if (n == 0) return; l = *low + 32768; l |= (l<<16); h = 32767 - *high; h |= (h<<16); asm volatile ("\n" " movd %3, %%mm6\n" " punpcklwd %%mm6, %%mm6\n" " movd %4, %%mm5\n" " punpcklwd %%mm5, %%mm5\n" " mov $0x80008000, %3\n" " movd %3, %%mm7\n" " punpcklwd %%mm7, %%mm7\n" "1:\n" " movq 0(%1), %%mm0\n" " pxor %%mm7, %%mm0\n" " psubusw %%mm6, %%mm0\n" " paddusw %%mm6, %%mm0\n" " paddusw %%mm5, %%mm0\n" " psubusw %%mm5, %%mm0\n" " pxor %%mm7, %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " decl %2\n" " jnz 1b\n" " emms\n" : "+r" (dest), "+r" (src), "+r" (n), "+r" (l), "+r" (h) : : "memory"); } OIL_DEFINE_IMPL_FULL (clamp_s16_asm_mmx, clamp_s16, OIL_IMPL_FLAG_MMX); static void clamp_s16_asm_mmxext (int16_t *dest, int16_t *src, int n, int16_t *low, int16_t *high) { int32_t l; int32_t h; while(n&3) { oil_type_s16 x = *src; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; if (n == 0) return; l = *low & 0xffff; l |= (l<<16); h = *high & 0xffff; h |= (h<<16); asm volatile ("\n" " movd %3, %%mm6\n" " punpcklwd %%mm6, %%mm6\n" " movd %4, %%mm5\n" " punpcklwd %%mm5, %%mm5\n" "1:\n" " movq 0(%1), %%mm0\n" " pmaxsw %%mm6, %%mm0\n" " pminsw %%mm5, %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " decl %2\n" " jnz 1b\n" " emms\n" : "+r" (dest), "+r" (src), "+r" (n), "+r" (l), "+r" (h) : : "memory"); } OIL_DEFINE_IMPL_FULL (clamp_s16_asm_mmxext, clamp_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); static void clamp_u16_asm_mmx (uint16_t *dest, uint16_t *src, int n, uint16_t *low, uint16_t *high) { uint32_t l; uint32_t h; while(n&3) { oil_type_u16 x = *src; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; if (n == 0) return; l = *low; l |= (l<<16); h = 65535 - *high; h |= (h<<16); asm volatile ("\n" " movd %3, %%mm6\n" " punpcklwd %%mm6, %%mm6\n" " movd %4, %%mm5\n" " punpcklwd %%mm5, %%mm5\n" "1:\n" " movq 0(%1), %%mm0\n" " psubusw %%mm6, %%mm0\n" " paddusw %%mm6, %%mm0\n" " paddusw %%mm5, %%mm0\n" " psubusw %%mm5, %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " decl %2\n" " jnz 1b\n" " emms\n" : "+r" (dest), "+r" (src), "+r" (n), "+r" (l), "+r" (h) : : "memory"); } OIL_DEFINE_IMPL_FULL (clamp_u16_asm_mmx, clamp_u16, OIL_IMPL_FLAG_MMX); static void clamp_u16_asm_mmxext (uint16_t *dest, uint16_t *src, int n, uint16_t *low, uint16_t *high) { int32_t l; int32_t h; while(n&3) { oil_type_u16 x = *src; if (x < *low) x = *low; if (x > *high) x = *high; *dest = x; dest++; src++; n--; } n >>= 2; if (n == 0) return; l = *low ^ 0x8000; l |= (l<<16); h = *high ^ 0x8000; h |= (h<<16); asm volatile ("\n" " movd %3, %%mm6\n" " punpcklwd %%mm6, %%mm6\n" " movd %4, %%mm5\n" " punpcklwd %%mm5, %%mm5\n" " mov $0x80008000, %3\n" " movd %3, %%mm7\n" " punpcklwd %%mm7, %%mm7\n" "1:\n" " movq 0(%1), %%mm0\n" " pxor %%mm7, %%mm0\n" " pmaxsw %%mm6, %%mm0\n" " pminsw %%mm5, %%mm0\n" " pxor %%mm7, %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " decl %2\n" " jnz 1b\n" " emms\n" : "+r" (dest), "+r" (src), "+r" (n), "+r" (l), "+r" (h) : : "memory"); } OIL_DEFINE_IMPL_FULL (clamp_u16_asm_mmxext, clamp_u16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); liboil-0.3.17/liboil/i386_amd64/Makefile.am0000644000175000017500000000044411066773257015007 00000000000000 noinst_LTLIBRARIES = libi386_amd64.la libi386_amd64_la_SOURCES = \ add2.c \ addc.c \ clamp.c \ convert.c \ copy.c \ idct8x8_i386.c \ mas.c \ math.c \ multiply_and_acc.c \ mt19937.c \ resample.c \ sad8x8.c \ sum.c \ swab.c \ yuv.c libi386_amd64_la_CFLAGS = $(LIBOIL_CFLAGS) liboil-0.3.17/liboil/i386_amd64/mt19937.c0000644000175000017500000004666110717203073014151 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2007 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #define TWIST(next,pair) \ " movd 0(%1), %%mm0 \n" \ " movd " #next "(%1), %%mm1 \n" \ " pand %%mm7, %%mm0 \n" \ " pand %%mm6, %%mm1 \n" \ " por %%mm1, %%mm0 \n" \ " pslld $31, %%mm1 \n" \ " psrad $31, %%mm1 \n" \ " pand %%mm5, %%mm1 \n" \ " psrld $1, %%mm0 \n" \ " pxor %%mm1, %%mm0 \n" \ " pxor " #pair "(%1), %%mm0 \n" \ " movd %%mm0, 0(%1) \n" #define TWIST2(next,pair) \ " movq 0(%1), %%mm0 \n" \ " movq " #next "(%1), %%mm1 \n" \ " pand %%mm7, %%mm0 \n" \ " pand %%mm6, %%mm1 \n" \ " por %%mm1, %%mm0 \n" \ " pslld $31, %%mm1 \n" \ " psrad $31, %%mm1 \n" \ " pand %%mm5, %%mm1 \n" \ " psrld $1, %%mm0 \n" \ " pxor %%mm1, %%mm0 \n" \ " pxor " #pair "(%1), %%mm0 \n" \ " movq %%mm0, 0(%1) \n" #define TWIST4(next,pair) \ " movq 0(%1), %%mm0 \n" \ " movq 8(%1), %%mm2 \n" \ " movq " #next "(%1), %%mm1 \n" \ " movq (8+" #next ")(%1), %%mm3 \n" \ " pand %%mm7, %%mm0 \n" \ " pand %%mm7, %%mm2 \n" \ " pand %%mm6, %%mm1 \n" \ " pand %%mm6, %%mm3 \n" \ " por %%mm1, %%mm0 \n" \ " por %%mm3, %%mm2 \n" \ " pslld $31, %%mm1 \n" \ " pslld $31, %%mm3 \n" \ " psrad $31, %%mm1 \n" \ " psrad $31, %%mm3 \n" \ " pand %%mm5, %%mm1 \n" \ " pand %%mm5, %%mm3 \n" \ " psrld $1, %%mm0 \n" \ " psrld $1, %%mm2 \n" \ " pxor %%mm1, %%mm0 \n" \ " pxor %%mm3, %%mm2 \n" \ " pxor " #pair "(%1), %%mm0 \n" \ " pxor (8+" #pair ")(%1), %%mm2 \n" \ " movq %%mm0, 0(%1) \n" \ " movq %%mm2, 8(%1) \n" static void mt19937_i386_mmx (uint32_t *d, uint32_t *mt) { asm volatile ( " mov $0x80000000, %2\n" " movd %2, %%mm7\n" " mov $0x7fffffff, %2\n" " movd %2, %%mm6\n" " mov $0x9908b0df, %2\n" " movd %2, %%mm5\n" " mov $0x1, %2\n" " movd %2, %%mm4\n" " mov $227, %2 \n" "1: \n" TWIST(4,1588) " add $4, %1\n" " decl %2 \n" " jne 1b \n" " mov $396, %2 \n" "2: \n" TWIST(4,-908) " add $4, %1\n" " decl %2 \n" " jne 2b \n" TWIST(-2492,-908) " add $-2492, %1 \n" " mov $0x9d2c5680, %2\n" " movd %2, %%mm7\n" " mov $0xefc60000, %2\n" " movd %2, %%mm6\n" " mov $624, %2 \n" "3:\n" " movd 0(%1), %%mm0 \n" " movd 0(%1), %%mm1 \n" " psrld $11, %%mm1 \n" " pxor %%mm1, %%mm0 \n" " movq %%mm0, %%mm1 \n" " pslld $7, %%mm1 \n" " pand %%mm7, %%mm1 \n" " pxor %%mm1, %%mm0 \n" " movq %%mm0, %%mm1 \n" " pslld $15, %%mm1 \n" " pand %%mm6, %%mm1 \n" " pxor %%mm1, %%mm0 \n" " movq %%mm0, %%mm1 \n" " psrld $18, %%mm1 \n" " pxor %%mm1, %%mm0 \n" " movd %%mm0, 0(%0) \n" " add $4, %0\n" " add $4, %1\n" " decl %2 \n" " jne 3b \n" " emms \n" : "+r" (d), "+r" (mt) : "r" (0) ); } OIL_DEFINE_IMPL_FULL (mt19937_i386_mmx, mt19937, OIL_IMPL_FLAG_MMX); static void mt19937_i386_mmx_2 (uint32_t *d, uint32_t *mt) { asm volatile ( " mov $0x80000000, %2\n" " movd %2, %%mm7\n" " pshufw $0x44, %%mm7, %%mm7 \n" " mov $0x7fffffff, %2\n" " movd %2, %%mm6\n" " pshufw $0x44, %%mm6, %%mm6 \n" " mov $0x9908b0df, %2\n" " movd %2, %%mm5\n" " pshufw $0x44, %%mm5, %%mm5 \n" " mov $0x1, %2\n" " movd %2, %%mm4\n" " pshufw $0x44, %%mm4, %%mm4 \n" " mov $113, %2 \n" "1: \n" TWIST2(4,1588) " add $8, %1\n" " decl %2 \n" " jne 1b \n" TWIST(4,1588) " add $4, %1\n" " mov $198, %2 \n" "2: \n" TWIST2(4,-908) " add $8, %1\n" " decl %2 \n" " jne 2b \n" TWIST(-2492,-908) " add $-2492, %1 \n" " mov $0x9d2c5680, %2\n" " movd %2, %%mm7\n" " pshufw $0x44, %%mm7, %%mm7 \n" " mov $0xefc60000, %2\n" " movd %2, %%mm6\n" " pshufw $0x44, %%mm6, %%mm6 \n" " mov $312, %2 \n" "3:\n" " movq 0(%1), %%mm0 \n" " movq 0(%1), %%mm1 \n" " psrld $11, %%mm1 \n" " pxor %%mm1, %%mm0 \n" " movq %%mm0, %%mm1 \n" " pslld $7, %%mm1 \n" " pand %%mm7, %%mm1 \n" " pxor %%mm1, %%mm0 \n" " movq %%mm0, %%mm1 \n" " pslld $15, %%mm1 \n" " pand %%mm6, %%mm1 \n" " pxor %%mm1, %%mm0 \n" " movq %%mm0, %%mm1 \n" " psrld $18, %%mm1 \n" " pxor %%mm1, %%mm0 \n" " movq %%mm0, 0(%0) \n" " add $8, %0\n" " add $8, %1\n" " decl %2 \n" " jne 3b \n" " emms \n" : "+r" (d), "+r" (mt) : "r" (0) ); } OIL_DEFINE_IMPL_FULL (mt19937_i386_mmx_2, mt19937, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); static void mt19937_i386_mmx_3 (uint32_t *d, uint32_t *mt) { asm volatile ( " mov $0x80000000, %2\n" " movd %2, %%mm7\n" " pshufw $0x44, %%mm7, %%mm7 \n" " mov $0x7fffffff, %2\n" " movd %2, %%mm6\n" " pshufw $0x44, %%mm6, %%mm6 \n" " mov $0x9908b0df, %2\n" " movd %2, %%mm5\n" " pshufw $0x44, %%mm5, %%mm5 \n" " mov $0x1, %2\n" " movd %2, %%mm4\n" " mov $56, %2 \n" "1: \n" TWIST4(4,1588) " add $16, %1\n" " decl %2 \n" " jne 1b \n" TWIST2(4,1588) " add $8, %1\n" TWIST(4,1588) " add $4, %1\n" " mov $99, %2 \n" "2: \n" TWIST4(4,-908) " add $16, %1\n" " decl %2 \n" " jne 2b \n" TWIST(-2492,-908) " add $-2492, %1 \n" " mov $0x9d2c5680, %2\n" " movd %2, %%mm7\n" " pshufw $0x44, %%mm7, %%mm7 \n" " mov $0xefc60000, %2\n" " movd %2, %%mm6\n" " pshufw $0x44, %%mm6, %%mm6 \n" " mov $156, %2 \n" "3:\n" " movq 0(%1), %%mm0 \n" " movq 8(%1), %%mm2 \n" " movq 0(%1), %%mm1 \n" " movq 8(%1), %%mm3 \n" " psrld $11, %%mm1 \n" " psrld $11, %%mm3 \n" " pxor %%mm1, %%mm0 \n" " pxor %%mm3, %%mm2 \n" " movq %%mm0, %%mm1 \n" " movq %%mm2, %%mm3 \n" " pslld $7, %%mm1 \n" " pslld $7, %%mm3 \n" " pand %%mm7, %%mm1 \n" " pand %%mm7, %%mm3 \n" " pxor %%mm1, %%mm0 \n" " pxor %%mm3, %%mm2 \n" " movq %%mm0, %%mm1 \n" " movq %%mm2, %%mm3 \n" " pslld $15, %%mm1 \n" " pslld $15, %%mm3 \n" " pand %%mm6, %%mm1 \n" " pand %%mm6, %%mm3 \n" " pxor %%mm1, %%mm0 \n" " pxor %%mm3, %%mm2 \n" " movq %%mm0, %%mm1 \n" " movq %%mm2, %%mm3 \n" " psrld $18, %%mm1 \n" " psrld $18, %%mm3 \n" " pxor %%mm1, %%mm0 \n" " pxor %%mm3, %%mm2 \n" " movq %%mm0, 0(%0) \n" " movq %%mm2, 8(%0) \n" " add $16, %0\n" " add $16, %1\n" " decl %2 \n" " jne 3b \n" " emms \n" : "+r" (d), "+r" (mt) : "r" (0) ); } OIL_DEFINE_IMPL_FULL (mt19937_i386_mmx_3, mt19937, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #undef TWIST #undef TWIST2 #undef TWIST4 #ifdef unused static void mt19937x8_mmx (uint32_t *d, uint32_t *mt) { long i = 0; asm volatile ( " mov $0x80000000, %0\n" " movd %0, %%mm5\n" " punpckldq %%mm5, %%mm5\n" " mov $0x7fffffff, %0\n" " movd %0, %%mm6\n" " punpckldq %%mm6, %%mm6\n" " mov $0x9908b0df, %0\n" " movd %0, %%mm7\n" " punpckldq %%mm7, %%mm7\n" " mov $0, %0\n" "1:\n" #define TWIST(x,y) \ " movq " #x "(%2,%0,1), %%mm0\n" \ " movq 32+" #x "(%2,%0,1), %%mm1\n" \ " pand %%mm5, %%mm0\n" \ " pand %%mm6, %%mm1\n" \ " por %%mm1, %%mm0\n" \ " movq %%mm0, %%mm1\n" \ " pslld $31, %%mm1\n" \ " psrad $31, %%mm1\n" \ " pand %%mm7, %%mm1\n" \ " psrld $1, %%mm0\n" \ " pxor %%mm1, %%mm0\n" \ " pxor " #y "+" #x "(%2,%0,1), %%mm0\n" \ " movq %%mm0, " #x "(%2,%0,1)\n" TWIST(0, 12704) TWIST(8, 12704) TWIST(16, 12704) TWIST(24, 12704) " add $32, %0\n" " cmp $7264, %0\n" " jl 1b\n" "2:\n" TWIST(0, -7264) TWIST(8, -7264) TWIST(16, -7264) TWIST(24, -7264) " add $32, %0\n" " cmp $19936, %0\n" " jl 2b\n" #define TWIST2(x,y) \ " movq " #x "(%2,%0,1), %%mm0\n" \ " movq " #x "(%2), %%mm1\n" \ " pand %%mm5, %%mm0\n" \ " pand %%mm6, %%mm1\n" \ " por %%mm1, %%mm0\n" \ " movq %%mm0, %%mm1\n" \ " pslld $31, %%mm1\n" \ " psrad $31, %%mm1\n" \ " pand %%mm7, %%mm1\n" \ " psrld $1, %%mm0\n" \ " pxor %%mm1, %%mm0\n" \ " pxor " #y "+" #x "(%2,%0,1), %%mm0\n" \ " movq %%mm0, " #x "(%2,%0,1)\n" TWIST2(0, -7264) TWIST2(8, -7264) TWIST2(16, -7264) TWIST2(24, -7264) " mov $0x9d2c5680, %0\n" " movd %0, %%mm5\n" " punpckldq %%mm5, %%mm5\n" " mov $0xefc60000, %0\n" " movd %0, %%mm6\n" " punpckldq %%mm6, %%mm6\n" " mov $0, %0\n" "1:\n" #define TEMPER(x) \ " movq " #x "(%2,%0,1), %%mm0\n" \ " movq %%mm0, %%mm1\n" \ " psrld $11, %%mm1\n" \ " pxor %%mm1, %%mm0\n" \ " movq %%mm0, %%mm1\n" \ " pslld $7, %%mm1\n" \ " pand %%mm5, %%mm1\n" \ " pxor %%mm1, %%mm0\n" \ " movq %%mm0, %%mm1\n" \ " pslld $15, %%mm1\n" \ " pand %%mm6, %%mm1\n" \ " pxor %%mm1, %%mm0\n" \ " movq %%mm0, %%mm1\n" \ " psrld $18, %%mm1\n" \ " pxor %%mm1, %%mm0\n" \ " movq %%mm0, " #x "(%1,%0,1)\n" TEMPER(0) TEMPER(8) TEMPER(16) TEMPER(24) " add $32, %0\n" " cmp $19968, %0\n" " jl 1b\n" " emms\n" : "+r" (i), "+r" (d), "+r" (mt) ); #undef TWIST #undef TWIST2 #undef TEMPER } OIL_DEFINE_IMPL_FULL (mt19937x8_mmx, mt19937x8, OIL_IMPL_FLAG_MMX); static void mt19937x8_mmx_2 (uint32_t *d, uint32_t *mt) { long i = 0; asm volatile ( " mov $0x80000000, %0\n" " movd %0, %%mm5\n" " punpckldq %%mm5, %%mm5\n" " mov $0x7fffffff, %0\n" " movd %0, %%mm6\n" " punpckldq %%mm6, %%mm6\n" " mov $0x9908b0df, %0\n" " movd %0, %%mm7\n" " punpckldq %%mm7, %%mm7\n" " mov $0, %0\n" "1:\n" #define TWIST(x,y) \ " movq " #x "(%2,%0,1), %%mm0\n" \ " movq 32+" #x "(%2,%0,1), %%mm1\n" \ " movq 8+" #x "(%2,%0,1), %%mm2\n" \ " pand %%mm5, %%mm0\n" \ " movq 40+" #x "(%2,%0,1), %%mm3\n" \ " pand %%mm6, %%mm1\n" \ " pand %%mm5, %%mm2\n" \ " por %%mm1, %%mm0\n" \ " pand %%mm6, %%mm3\n" \ " movq %%mm0, %%mm1\n" \ " por %%mm3, %%mm2\n" \ " pslld $31, %%mm1\n" \ " movq %%mm2, %%mm3\n" \ " psrad $31, %%mm1\n" \ " pslld $31, %%mm3\n" \ " pand %%mm7, %%mm1\n" \ " psrad $31, %%mm3\n" \ " psrld $1, %%mm0\n" \ " pand %%mm7, %%mm3\n" \ " pxor %%mm1, %%mm0\n" \ " psrld $1, %%mm2\n" \ " pxor " #y "+" #x "(%2,%0,1), %%mm0\n" \ " pxor %%mm3, %%mm2\n" \ " movq %%mm0, " #x "(%2,%0,1)\n" \ " pxor 8+" #y "+" #x "(%2,%0,1), %%mm2\n" \ " movq %%mm2, 8+" #x "(%2,%0,1)\n" TWIST(0, 12704) //TWIST(8, 12704) TWIST(16, 12704) //TWIST(24, 12704) " add $32, %0\n" " cmp $7264, %0\n" " jl 1b\n" "2:\n" TWIST(0, -7264) //TWIST(8, -7264) TWIST(16, -7264) //TWIST(24, -7264) " add $32, %0\n" " cmp $19936, %0\n" " jl 2b\n" #define TWIST2(x,y) \ " movq " #x "(%2,%0,1), %%mm0\n" \ " movq " #x "(%2), %%mm1\n" \ " pand %%mm5, %%mm0\n" \ " pand %%mm6, %%mm1\n" \ " por %%mm1, %%mm0\n" \ " movq %%mm0, %%mm1\n" \ " pslld $31, %%mm1\n" \ " psrad $31, %%mm1\n" \ " pand %%mm7, %%mm1\n" \ " psrld $1, %%mm0\n" \ " pxor %%mm1, %%mm0\n" \ " pxor " #y "+" #x "(%2,%0,1), %%mm0\n" \ " movq %%mm0, " #x "(%2,%0,1)\n" TWIST2(0, -7264) TWIST2(8, -7264) TWIST2(16, -7264) TWIST2(24, -7264) " mov $0x9d2c5680, %0\n" " movd %0, %%mm5\n" " punpckldq %%mm5, %%mm5\n" " mov $0xefc60000, %0\n" " movd %0, %%mm6\n" " punpckldq %%mm6, %%mm6\n" " mov $0, %0\n" "1:\n" #define TEMPER(x) \ " movq " #x "(%2,%0,1), %%mm0\n" \ " movq 8+" #x "(%2,%0,1), %%mm2\n" \ " movq %%mm0, %%mm1\n" \ " movq %%mm2, %%mm3\n" \ " psrld $11, %%mm1\n" \ " psrld $11, %%mm3\n" \ " pxor %%mm1, %%mm0\n" \ " pxor %%mm3, %%mm2\n" \ " movq %%mm0, %%mm1\n" \ " movq %%mm2, %%mm3\n" \ " pslld $7, %%mm1\n" \ " pslld $7, %%mm3\n" \ " pand %%mm5, %%mm1\n" \ " pand %%mm5, %%mm3\n" \ " pxor %%mm1, %%mm0\n" \ " pxor %%mm3, %%mm2\n" \ " movq %%mm0, %%mm1\n" \ " movq %%mm2, %%mm3\n" \ " pslld $15, %%mm1\n" \ " pslld $15, %%mm3\n" \ " pand %%mm6, %%mm1\n" \ " pand %%mm6, %%mm3\n" \ " pxor %%mm1, %%mm0\n" \ " pxor %%mm3, %%mm2\n" \ " movq %%mm0, %%mm1\n" \ " movq %%mm2, %%mm3\n" \ " psrld $18, %%mm1\n" \ " psrld $18, %%mm3\n" \ " pxor %%mm1, %%mm0\n" \ " pxor %%mm3, %%mm2\n" \ " movq %%mm0, " #x "(%1,%0,1)\n" \ " movq %%mm2, 8+" #x "(%1,%0,1)\n" TEMPER(0) //TEMPER(8) TEMPER(16) //TEMPER(24) " add $32, %0\n" " cmp $19968, %0\n" " jl 1b\n" " emms\n" : "+r" (i), "+r" (d), "+r" (mt) ); #undef TWIST #undef TWIST2 #undef TEMPER } OIL_DEFINE_IMPL_FULL (mt19937x8_mmx_2, mt19937x8, OIL_IMPL_FLAG_MMX); static void mt19937x8_sse (uint32_t *d, uint32_t *mt) { long i = 0; asm volatile ( " mov $0x80000000, %0\n" " movd %0, %%xmm5\n" " punpckldq %%xmm5, %%xmm5\n" " punpcklqdq %%xmm5, %%xmm5\n" " mov $0x7fffffff, %0\n" " movd %0, %%xmm6\n" " punpckldq %%xmm6, %%xmm6\n" " punpcklqdq %%xmm6, %%xmm6\n" " mov $0x9908b0df, %0\n" " movd %0, %%xmm7\n" " punpckldq %%xmm7, %%xmm7\n" " punpcklqdq %%xmm7, %%xmm7\n" " mov $0, %0\n" "1:\n" #define TWIST(x,y) \ " movq " #x "(%2,%0,1), %%xmm0\n" \ " movq 32+" #x "(%2,%0,1), %%xmm1\n" \ " movq 16+" #x "(%2,%0,1), %%xmm2\n" \ " pand %%xmm5, %%xmm0\n" \ " movq 48+" #x "(%2,%0,1), %%xmm3\n" \ " pand %%xmm6, %%xmm1\n" \ " pand %%xmm5, %%xmm2\n" \ " por %%xmm1, %%xmm0\n" \ " pand %%xmm6, %%xmm3\n" \ " movq %%xmm0, %%xmm1\n" \ " por %%xmm3, %%xmm2\n" \ " pslld $31, %%xmm1\n" \ " movq %%xmm2, %%xmm3\n" \ " psrad $31, %%xmm1\n" \ " pslld $31, %%xmm3\n" \ " pand %%xmm7, %%xmm1\n" \ " psrad $31, %%xmm3\n" \ " psrld $1, %%xmm0\n" \ " pand %%xmm7, %%xmm3\n" \ " pxor %%xmm1, %%xmm0\n" \ " psrld $1, %%xmm2\n" \ " pxor " #y "+" #x "(%2,%0,1), %%xmm0\n" \ " pxor %%xmm3, %%xmm2\n" \ " movq %%xmm0, " #x "(%2,%0,1)\n" \ " pxor 16+" #y "+" #x "(%2,%0,1), %%xmm2\n" \ " movq %%xmm2, 16+" #x "(%2,%0,1)\n" TWIST(0, 12704) //TWIST(8, 12704) //TWIST(16, 12704) //TWIST(24, 12704) " add $32, %0\n" " cmp $7264, %0\n" " jl 1b\n" "2:\n" TWIST(0, -7264) //TWIST(8, -7264) //TWIST(16, -7264) //TWIST(24, -7264) " add $32, %0\n" " cmp $19936, %0\n" " jl 2b\n" #define TWIST2(x,y) \ " movq " #x "(%2,%0,1), %%xmm0\n" \ " movq " #x "(%2), %%xmm1\n" \ " pand %%xmm5, %%xmm0\n" \ " pand %%xmm6, %%xmm1\n" \ " por %%xmm1, %%xmm0\n" \ " movq %%xmm0, %%xmm1\n" \ " pslld $31, %%xmm1\n" \ " psrad $31, %%xmm1\n" \ " pand %%xmm7, %%xmm1\n" \ " psrld $1, %%xmm0\n" \ " pxor %%xmm1, %%xmm0\n" \ " pxor " #y "+" #x "(%2,%0,1), %%xmm0\n" \ " movq %%xmm0, " #x "(%2,%0,1)\n" TWIST2(0, -7264) //TWIST2(8, -7264) TWIST2(16, -7264) //TWIST2(24, -7264) " mov $0x9d2c5680, %0\n" " movd %0, %%xmm5\n" " punpckldq %%xmm5, %%xmm5\n" " punpcklqdq %%xmm5, %%xmm5\n" " mov $0xefc60000, %0\n" " movd %0, %%xmm6\n" " punpckldq %%xmm6, %%xmm6\n" " punpcklqdq %%xmm6, %%xmm6\n" " mov $0, %0\n" "1:\n" #define TEMPER(x) \ " movq " #x "(%2,%0,1), %%xmm0\n" \ " movq 16+" #x "(%2,%0,1), %%xmm2\n" \ " movq %%xmm0, %%xmm1\n" \ " movq %%xmm2, %%xmm3\n" \ " psrld $11, %%xmm1\n" \ " psrld $11, %%xmm3\n" \ " pxor %%xmm1, %%xmm0\n" \ " pxor %%xmm3, %%xmm2\n" \ " movq %%xmm0, %%xmm1\n" \ " movq %%xmm2, %%xmm3\n" \ " pslld $7, %%xmm1\n" \ " pslld $7, %%xmm3\n" \ " pand %%xmm5, %%xmm1\n" \ " pand %%xmm5, %%xmm3\n" \ " pxor %%xmm1, %%xmm0\n" \ " pxor %%xmm3, %%xmm2\n" \ " movq %%xmm0, %%xmm1\n" \ " movq %%xmm2, %%xmm3\n" \ " pslld $15, %%xmm1\n" \ " pslld $15, %%xmm3\n" \ " pand %%xmm6, %%xmm1\n" \ " pand %%xmm6, %%xmm3\n" \ " pxor %%xmm1, %%xmm0\n" \ " pxor %%xmm3, %%xmm2\n" \ " movq %%xmm0, %%xmm1\n" \ " movq %%xmm2, %%xmm3\n" \ " psrld $18, %%xmm1\n" \ " psrld $18, %%xmm3\n" \ " pxor %%xmm1, %%xmm0\n" \ " pxor %%xmm3, %%xmm2\n" \ " movq %%xmm0, " #x "(%1,%0,1)\n" \ " movq %%xmm2, 16+" #x "(%1,%0,1)\n" TEMPER(0) //TEMPER(8) //TEMPER(16) //TEMPER(24) " add $32, %0\n" " cmp $19968, %0\n" " jl 1b\n" : "+R" (i), "+r" (d), "+r" (mt) ); } OIL_DEFINE_IMPL_FULL (mt19937x8_sse, mt19937x8, OIL_IMPL_FLAG_SSE2); #endif liboil-0.3.17/liboil/i386_amd64/sad8x8.c0000644000175000017500000006226611131504056014226 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include static void sad8x8_u8_mmx (uint32_t * dest, uint8_t * src1, int sstr1, uint8_t * src2, int sstr2) { uint32_t diff; __asm__ __volatile__ ( " pxor %%mm6, %%mm6 \n\t" /* zero out mm6 for unpack */ " pxor %%mm7, %%mm7 \n\t" /* mm7 contains the result */ #define LOOP \ " movq (%1), %%mm0 \n\t" /* take 8 bytes */ \ " movq (%2), %%mm1 \n\t" \ " movq %%mm0, %%mm2 \n\t" \ \ " psubusb %%mm1, %%mm0 \n\t" /* A - B */ \ " psubusb %%mm2, %%mm1 \n\t" /* B - A */ \ " por %%mm1, %%mm0 \n\t" /* and or gives abs difference */ \ " movq %%mm0, %%mm1 \n\t" \ \ " punpcklbw %%mm6, %%mm0 \n\t" /* unpack to higher precision for accumulation */ \ " paddw %%mm0, %%mm7 \n\t" /* accumulate difference... */ \ " punpckhbw %%mm6, %%mm1 \n\t" /* unpack high four bytes to higher precision */ \ " add %3, %1 \n\t" /* Inc pointer into the new data */ \ " paddw %%mm1, %%mm7 \n\t" /* accumulate difference... */ \ " add %4, %2 \n\t" /* Inc pointer into ref data */ LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP #undef LOOP " movq %%mm7, %%mm0 \n\t" " psrlq $32, %%mm7 \n\t" " paddw %%mm0, %%mm7 \n\t" " movq %%mm7, %%mm0 \n\t" " psrlq $16, %%mm7 \n\t" " paddw %%mm0, %%mm7 \n\t" " movd %%mm7, %0 \n\t" " andl $0xffff, %0 \n\t" " emms \n\t" : "=m" (diff), "+r" (src1), "+r" (src2) : "r" ((ptrdiff_t)(sstr1)), "r" ((ptrdiff_t)(sstr2)) : "memory" ); *dest = diff; } OIL_DEFINE_IMPL_FULL (sad8x8_u8_mmx, sad8x8_u8, OIL_IMPL_FLAG_MMX); static void sad8x8_u8_mmxext (uint32_t * dest, uint8_t * src1, int sstr1, uint8_t * src2, int sstr2) { uint32_t diff; __asm__ __volatile__ ( " pxor %%mm7, %%mm7 \n\t" /* mm7 contains the result */ #define LOOP \ " movq (%1), %%mm0 \n\t" /* take 8 bytes */ \ " movq (%2), %%mm1 \n\t" \ " psadbw %%mm1, %%mm0 \n\t" \ " add %3, %1 \n\t" /* Inc pointer into the new data */ \ " paddw %%mm0, %%mm7 \n\t" /* accumulate difference... */ \ " add %4, %2 \n\t" /* Inc pointer into ref data */ LOOP LOOP LOOP LOOP LOOP LOOP LOOP #undef LOOP " movq (%1), %%mm0 \n\t" /* take 8 bytes */ " movq (%2), %%mm1 \n\t" " psadbw %%mm1, %%mm0 \n\t" " paddw %%mm0, %%mm7 \n\t" /* accumulate difference... */ " movd %%mm7, %0 \n\t" " emms \n\t" : "=r" (diff), "+r" (src1), "+r" (src2) : "r" ((ptrdiff_t)(sstr1)), "r" ((ptrdiff_t)(sstr2)) : "memory" ); *dest = diff; } OIL_DEFINE_IMPL_FULL (sad8x8_u8_mmxext, sad8x8_u8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); static void sad8x8_u8_mmxext_2 (uint32_t * dest, uint8_t * src1, int sstr1, uint8_t * src2, int sstr2) { uint32_t diff; __asm__ __volatile__ ( " pxor %%mm7, %%mm7 \n\t" /* mm7 contains the result */ #define LOOP \ " movq (%1), %%mm0 \n\t" /* take 8 bytes */ \ " psadbw (%2), %%mm0 \n\t" \ " add %3, %1 \n\t" /* Inc pointer into the new data */ \ " paddw %%mm0, %%mm7 \n\t" /* accumulate difference... */ \ " add %4, %2 \n\t" /* Inc pointer into ref data */ LOOP LOOP LOOP LOOP LOOP LOOP LOOP #undef LOOP " movq (%1), %%mm0 \n\t" /* take 8 bytes */ " psadbw (%2), %%mm0 \n\t" \ " paddw %%mm0, %%mm7 \n\t" /* accumulate difference... */ " movd %%mm7, %0 \n\t" " emms \n\t" : "=r" (diff), "+r" (src1), "+r" (src2) : "r" ((ptrdiff_t)(sstr1)), "r" ((ptrdiff_t)(sstr2)) : "memory" ); *dest = diff; } OIL_DEFINE_IMPL_FULL (sad8x8_u8_mmxext_2, sad8x8_u8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); static void sad8x8_u8_mmxext_3 (uint32_t * dest, uint8_t * src1, int sstr1, uint8_t * src2, int sstr2) { uint32_t diff; __asm__ __volatile__ ( " pxor %%mm7, %%mm7 \n\t" /* mm7 contains the result */ " movq (%1), %%mm0 \n\t" /* take 8 bytes */ " psadbw (%2), %%mm0 \n\t" " movq (%1,%3), %%mm1 \n\t" /* take 8 bytes */ " psadbw (%2,%4), %%mm1 \n\t" " lea (%1,%3,2), %1 \n\t" /* Inc pointer into the new data */ " paddw %%mm0, %%mm7 \n\t" /* accumulate difference... */ " lea (%2,%4,2), %2 \n\t" /* Inc pointer into ref data */ " paddw %%mm1, %%mm7 \n\t" /* accumulate difference... */ " movq (%1), %%mm0 \n\t" /* take 8 bytes */ " psadbw (%2), %%mm0 \n\t" " movq (%1,%3), %%mm1 \n\t" /* take 8 bytes */ " psadbw (%2,%4), %%mm1 \n\t" " lea (%1,%3,2), %1 \n\t" /* Inc pointer into the new data */ " paddw %%mm0, %%mm7 \n\t" /* accumulate difference... */ " lea (%2,%4,2), %2 \n\t" /* Inc pointer into ref data */ " paddw %%mm1, %%mm7 \n\t" /* accumulate difference... */ " movq (%1), %%mm0 \n\t" /* take 8 bytes */ " psadbw (%2), %%mm0 \n\t" " movq (%1,%3), %%mm1 \n\t" /* take 8 bytes */ " psadbw (%2,%4), %%mm1 \n\t" " lea (%1,%3,2), %1 \n\t" /* Inc pointer into the new data */ " paddw %%mm0, %%mm7 \n\t" /* accumulate difference... */ " lea (%2,%4,2), %2 \n\t" /* Inc pointer into ref data */ " paddw %%mm1, %%mm7 \n\t" /* accumulate difference... */ " movq (%1), %%mm0 \n\t" /* take 8 bytes */ " psadbw (%2), %%mm0 \n\t" " movq (%1,%3), %%mm1 \n\t" /* take 8 bytes */ " psadbw (%2,%4), %%mm1 \n\t" " paddw %%mm0, %%mm7 \n\t" /* accumulate difference... */ " paddw %%mm1, %%mm7 \n\t" /* accumulate difference... */ " movd %%mm7, %0 \n\t" " emms \n\t" : "=r" (diff), "+r" (src1), "+r" (src2) : "r" ((ptrdiff_t)(sstr1)), "r" ((ptrdiff_t)(sstr2)) : "memory" ); *dest = diff; } OIL_DEFINE_IMPL_FULL (sad8x8_u8_mmxext_3, sad8x8_u8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); static void sad8x8_u8_mmxext_4 (uint32_t * dest, uint8_t * src1, int sstr1, uint8_t * src2, int sstr2) { uint32_t diff; __asm__ __volatile__ ( " movq (%1), %%mm6 \n\t" " movq (%1,%3,1), %%mm7 \n\t" " psadbw (%2), %%mm6 \n\t" " psadbw (%2,%4,1), %%mm7 \n\t" " movq (%1,%3,2), %%mm0 \n\t" " movq (%1,%3,4), %%mm1 \n\t" " psadbw (%2,%4,2), %%mm0 \n\t" " psadbw (%2,%4,4), %%mm1 \n\t" " paddw %%mm0, %%mm6 \n\t" " paddw %%mm1, %%mm7 \n\t" " lea (%1,%3,8), %1 \n\t" " lea (%2,%4,8), %2 \n\t" " neg %3\n\t" " neg %4\n\t" " lea (%1,%3), %1 \n\t" " lea (%2,%4), %2 \n\t" " movq (%1), %%mm0 \n\t" " movq (%1,%3,1), %%mm1 \n\t" " psadbw (%2), %%mm0 \n\t" " psadbw (%2,%4,1), %%mm1 \n\t" " paddw %%mm0, %%mm6 \n\t" " paddw %%mm1, %%mm7 \n\t" " movq (%1,%3,2), %%mm0 \n\t" " movq (%1,%3,4), %%mm1 \n\t" " psadbw (%2,%4,2), %%mm0 \n\t" " psadbw (%2,%4,4), %%mm1 \n\t" " paddw %%mm0, %%mm6 \n\t" " paddw %%mm1, %%mm7 \n\t" " paddw %%mm6, %%mm7 \n\t" " movd %%mm7, %0 \n\t" " emms \n\t" : "=r" (diff), "+r" (src1), "+r" (src2) : "r" ((ptrdiff_t)(sstr1)), "r" ((ptrdiff_t)(sstr2)) : "memory" ); *dest = diff; } OIL_DEFINE_IMPL_FULL (sad8x8_u8_mmxext_4, sad8x8_u8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); static void sad8x8_8xn_u8_psadbw (uint32_t * dest, uint8_t * src1, int sstr1, uint8_t * src2, int sstr2, int n) { int n_tmp = n; uint32_t *dest_tmp = dest; uint8_t *src2_tmp = src2; uint8_t *src1_tmp = src1; __asm__ __volatile__ ("\n" "1:\n" " movq (%[src1]), %%mm7 \n\t" " psadbw (%[src2]), %%mm7 \n\t" " movq (%[src1],%[sstr1],1), %%mm1 \n\t" " psadbw (%[src2],%[sstr2],1), %%mm1 \n\t" " paddw %%mm1, %%mm7 \n\t" " movq (%[src1],%[sstr1],2), %%mm0 \n\t" " psadbw (%[src2],%[sstr2],2), %%mm0 \n\t" " paddw %%mm0, %%mm7 \n\t" " movq (%[src1],%[sstr1],4), %%mm1 \n\t" " psadbw (%[src2],%[sstr2],4), %%mm1 \n\t" " paddw %%mm1, %%mm7 \n\t" " movd %%mm7, 0(%[dest]) \n\t" " add %[sstr2],%[src2]\n\t" " add $4, %[dest]\n\t" " decl %[n]\n\t" " jnz 1b\n\t" " emms \n\t" : [src1] "+r" (src1_tmp), [src2] "+r" (src2_tmp), [n] "+m" (n_tmp), [dest] "+r" (dest_tmp) : [sstr1] "r" ((ptrdiff_t)(sstr1)), [sstr2] "r" ((ptrdiff_t)(sstr2)) : "memory" ); src1 = OIL_OFFSET(src1, 7 * sstr1); src2 = OIL_OFFSET(src2, 7 * sstr2); sstr1 = -sstr1; sstr2 = -sstr2; __asm__ __volatile__ ("\n" "1:\n" " movq (%[src1]), %%mm7 \n\t" " psadbw (%[src2]), %%mm7 \n\t" " movq (%[src1],%[sstr1],1), %%mm1 \n\t" " psadbw (%[src2],%[sstr2],1), %%mm1 \n\t" " paddw %%mm1, %%mm7 \n\t" " movq (%[src1],%[sstr1],2), %%mm0 \n\t" " psadbw (%[src2],%[sstr2],2), %%mm0 \n\t" " paddw %%mm0, %%mm7 \n\t" " movq (%[src1],%[sstr1],4), %%mm1 \n\t" " psadbw (%[src2],%[sstr2],4), %%mm1 \n\t" " paddw %%mm1, %%mm7 \n\t" " movq 0(%[dest]), %%mm1\n\t" " paddd %%mm7, %%mm1\n\t" " movq %%mm1, 0(%[dest])\n\t" " sub %[sstr2],%[src2]\n\t" " add $4, %[dest]\n\t" " decl %[n]\n\t" " jnz 1b\n\t" " emms \n\t" : [src1] "+r" (src1), [src2] "+r" (src2), [dest] "+r" (dest), [n] "+m" (n) : [sstr1] "r" ((ptrdiff_t)(sstr1)), [sstr2] "r" ((ptrdiff_t)(sstr2)) : "memory" ); } OIL_DEFINE_IMPL_FULL (sad8x8_8xn_u8_psadbw, sad8x8_8xn_u8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); static void sad12x12_u8_mmxext (uint32_t * dest, uint8_t * src1, int sstr1, uint8_t * src2, int sstr2) { uint32_t diff; __asm__ __volatile__ ( " pxor %%mm7, %%mm7 \n\t" /* mm7 contains the result */ " pxor %%mm2, %%mm2 \n\t" " pxor %%mm3, %%mm3 \n\t" #define LOOP \ " movq (%1), %%mm0 \n\t" /* take 8 bytes */ \ " movq (%2), %%mm1 \n\t" \ " psadbw %%mm1, %%mm0 \n\t" \ " paddw %%mm0, %%mm7 \n\t" /* accumulate difference... */ \ " movd 8(%1), %%mm2 \n\t" /* take 4 bytes */ \ " movd 8(%2), %%mm3 \n\t" \ " psadbw %%mm3, %%mm2 \n\t" \ " paddw %%mm2, %%mm7 \n\t" /* accumulate difference... */ \ " add %3, %1 \n\t" /* Inc pointer into the new data */ \ " add %4, %2 \n\t" /* Inc pointer into ref data */ LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP #undef LOOP " movq (%1), %%mm0 \n\t" /* take 8 bytes */ " movq (%2), %%mm1 \n\t" " psadbw %%mm1, %%mm0 \n\t" " paddw %%mm0, %%mm7 \n\t" /* accumulate difference... */ " movd 8(%1), %%mm2 \n\t" /* take 4 bytes */ " movd 8(%2), %%mm3 \n\t" " psadbw %%mm3, %%mm2 \n\t" " paddw %%mm2, %%mm7 \n\t" /* accumulate difference... */ " movd %%mm7, %0 \n\t" " emms \n\t" : "=r" (diff), "+r" (src1), "+r" (src2) : "r" ((ptrdiff_t)(sstr1)), "r" ((ptrdiff_t)(sstr2)) : "memory" ); *dest = diff; } OIL_DEFINE_IMPL_FULL (sad12x12_u8_mmxext, sad12x12_u8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); static void sad16x16_u8_mmxext (uint32_t * dest, uint8_t * src1, int sstr1, uint8_t * src2, int sstr2) { uint32_t diff; __asm__ __volatile__ ( " pxor %%mm7, %%mm7 \n\t" /* mm7 contains the result */ #define LOOP \ " movq (%1), %%mm0 \n\t" /* take 8 bytes */ \ " movq (%2), %%mm1 \n\t" \ " psadbw %%mm1, %%mm0 \n\t" \ " paddw %%mm0, %%mm7 \n\t" /* accumulate difference... */ \ " movq 8(%1), %%mm2 \n\t" /* take 8 bytes */ \ " movq 8(%2), %%mm3 \n\t" \ " psadbw %%mm3, %%mm2 \n\t" \ " paddw %%mm2, %%mm7 \n\t" /* accumulate difference... */ \ " add %3, %1 \n\t" /* Inc pointer into the new data */ \ " add %4, %2 \n\t" /* Inc pointer into ref data */ LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP #undef LOOP " movq (%1), %%mm0 \n\t" /* take 8 bytes */ " movq (%2), %%mm1 \n\t" " psadbw %%mm1, %%mm0 \n\t" " paddw %%mm0, %%mm7 \n\t" /* accumulate difference... */ " movq 8(%1), %%mm2 \n\t" /* take 8 bytes */ " movq 8(%2), %%mm3 \n\t" " psadbw %%mm3, %%mm2 \n\t" " paddw %%mm2, %%mm7 \n\t" /* accumulate difference... */ " movd %%mm7, %0 \n\t" " emms \n\t" : "=r" (diff), "+r" (src1), "+r" (src2) : "r" ((ptrdiff_t)(sstr1)), "r" ((ptrdiff_t)(sstr2)) : "memory" ); *dest = diff; } OIL_DEFINE_IMPL_FULL (sad16x16_u8_mmxext, sad16x16_u8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void combine4_12xn_u8_mmx (uint8_t *d, int ds1, uint8_t *s1, int ss1, uint8_t *s2, int ss2, uint8_t *s3, int ss3, uint8_t *s4, int ss4, int16_t *s5_6, int n) { int j; asm volatile ("\n" " pxor %%mm7, %%mm7\n" " movq 0(%0), %%mm6\n" " movd 8(%0), %%mm4\n" " pshufw $0x00, %%mm4, %%mm4\n" ::"r" (s5_6)); for(j=0;j * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include static void convert_u8_s16_mmx (uint8_t * dest, const int16_t * src, int n) { while(n&7) { int x; x = src[0]; if (x<0) x = 0; if (x>255) x = 255; dest[0] = x; src++; dest++; n--; } if (n==0) return; n>>=3; __asm__ __volatile__ ("\n" "1:\n" " movq 0(%1), %%mm0\n" " packuswb 8(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $16, %1\n" " add $8, %0\n" " decl %2\n" " jg 1b\n" " emms\n" : "+r" (dest), "+r" (src), "+r" (n)); } OIL_DEFINE_IMPL_FULL (convert_u8_s16_mmx, convert_u8_s16, OIL_IMPL_FLAG_MMX); static void convert_u8_s16_mmx_2 (uint8_t * dest, const int16_t * src, int n) { while(n&7) { int x; x = src[0]; if (x<0) x = 0; if (x>255) x = 255; dest[0] = x; src++; dest++; n--; } if (n==0) return; n>>=3; if (n&1) { __asm__ __volatile__ ("\n" " movq 0(%1), %%mm0\n" " packuswb 8(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $16, %1\n" " add $8, %0\n" : "+r" (dest), "+r" (src), "+r" (n)); } n >>= 1; if (n > 0) { __asm__ __volatile__ ("\n" "2:\n" " movq 0(%1), %%mm0\n" " packuswb 8(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " movq 16(%1), %%mm0\n" " packuswb 24(%1), %%mm0\n" " movq %%mm0, 8(%0)\n" " add $32, %1\n" " add $16, %0\n" " decl %2\n" " jg 2b\n" : "+r" (dest), "+r" (src), "+r" (n)); } __asm__ __volatile__ ("emms\n"); } OIL_DEFINE_IMPL_FULL (convert_u8_s16_mmx_2, convert_u8_s16, OIL_IMPL_FLAG_MMX); static void convert_s16_u8_mmx (int16_t * dest, const uint8_t * src, int n) { while(n&7) { dest[0] = src[0]; src++; dest++; n--; } if (n==0) return; n>>=3; __asm__ __volatile__ ("\n" " pxor %%mm0, %%mm0\n" "1:\n" " movd 0(%1), %%mm1\n" " punpcklbw %%mm0, %%mm1\n" " movq %%mm1, 0(%0)\n" " movd 4(%1), %%mm2\n" " punpcklbw %%mm0, %%mm2\n" " movq %%mm2, 8(%0)\n" " add $8, %1\n" " add $16, %0\n" " decl %2\n" " jg 1b\n" " emms\n" : "+r" (dest), "+r" (src), "+r" (n)); } OIL_DEFINE_IMPL_FULL (convert_s16_u8_mmx, convert_s16_u8, OIL_IMPL_FLAG_MMX); liboil-0.3.17/liboil/i386_amd64/resample.c0000644000175000017500000000764610717203073014724 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include static void merge_linear_u8_mmx (uint8_t *dest, uint8_t *src1, uint8_t *src2, uint32_t *src3, int n) { unsigned int x = src3[0]; while (n&3) { dest[0] = (src1[0]*(256-x) + src2[0]*x) >> 8; dest++; src1++; src2++; n--; } n >>= 2; if (n == 0) return; x |= (x<<16); asm volatile ("\n" " pxor %%mm7, %%mm7\n" " movd %3, %%mm6\n" " pshufw $0x00, %%mm6, %%mm6\n" " movl $0x01010101, %3\n" " movd %3, %%mm5\n" " punpcklbw %%mm7, %%mm5\n" " psllw $8, %%mm5\n" " psubw %%mm6, %%mm5\n" "1:\n" " movd 0(%1), %%mm0\n" " movd 0(%2), %%mm1\n" " punpcklbw %%mm7, %%mm0\n" " punpcklbw %%mm7, %%mm1\n" " pmullw %%mm5, %%mm0\n" " pmullw %%mm6, %%mm1\n" " paddw %%mm1, %%mm0\n" " psrlw $8, %%mm0\n" " packuswb %%mm0, %%mm0\n" " movd %%mm0, 0(%0)\n" " add $4, %0\n" " add $4, %1\n" " add $4, %2\n" " decl %4\n" " jnz 1b\n" " emms\n" : "+r" (dest), "+r" (src1), "+r" (src2), "+r" (x), "+r" (n) : : "memory"); } OIL_DEFINE_IMPL_FULL (merge_linear_u8_mmx, merge_linear_u8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); static void merge_linear_u8_sse2 (uint8_t *dest, uint8_t *src1, uint8_t *src2, uint32_t *src3, int n) { unsigned int x = src3[0]; while (n&7) { dest[0] = (src1[0]*(256-x) + src2[0]*x) >> 8; dest++; src1++; src2++; n--; } n >>= 3; if (n == 0) return; x |= (x<<16); asm volatile ("\n" " pxor %%xmm7, %%xmm7\n" " movd %3, %%xmm6\n" " pshufd $0x00, %%xmm6, %%xmm6\n" " movl $0x01010101, %3\n" " movd %3, %%xmm5\n" " pshufd $0x00, %%xmm5, %%xmm5\n" " punpcklbw %%xmm7, %%xmm5\n" " psllw $8, %%xmm5\n" " psubw %%xmm6, %%xmm5\n" "1:\n" " movq 0(%1), %%xmm0\n" " movq 0(%2), %%xmm1\n" " punpcklbw %%xmm7, %%xmm0\n" " punpcklbw %%xmm7, %%xmm1\n" " pmullw %%xmm5, %%xmm0\n" " pmullw %%xmm6, %%xmm1\n" " paddw %%xmm1, %%xmm0\n" " psrlw $8, %%xmm0\n" " packuswb %%xmm0, %%xmm0\n" " movq %%xmm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %4\n" " jnz 1b\n" : "+r" (dest), "+r" (src1), "+r" (src2), "+r" (x), "+r" (n) : : "memory"); } OIL_DEFINE_IMPL_FULL (merge_linear_u8_sse2, merge_linear_u8, OIL_IMPL_FLAG_SSE2); liboil-0.3.17/liboil/i386_amd64/addc.c0000644000175000017500000001025711066763262014010 00000000000000 #include #include void addc_s16_mmx (int16_t *d, int16_t *s, int16_t *s2, int n) { int val = s2[0]; while(n&15) { d[0] = s[0] + s2[0]; s++; d++; n--; } if (n > 0) { n >>= 4; __asm__ __volatile__ ("\n" " movd %[val], %%mm0\n" " pshufw $00, %%mm0, %%mm0\n" "1:\n" " movq 0(%[s]), %%mm1\n" " paddw %%mm0, %%mm1\n" " movq %%mm1, 0(%[d])\n" " movq 8(%[s]), %%mm2\n" " paddw %%mm0, %%mm2\n" " movq %%mm2, 8(%[d])\n" " movq 16(%[s]), %%mm3\n" " paddw %%mm0, %%mm3\n" " movq %%mm3, 16(%[d])\n" " movq 24(%[s]), %%mm4\n" " paddw %%mm0, %%mm4\n" " movq %%mm4, 24(%[d])\n" " add $32, %[s]\n" " add $32, %[d]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [s] "+r" (s), [n] "+r" (n), [d] "+r" (d) : [val] "r" (val)); } } OIL_DEFINE_IMPL_FULL (addc_s16_mmx, addc_s16, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); void addc_s16_mmx2 (int16_t *d, int16_t *s, int16_t *s2, int n) { int val = s2[0]; while(n&15) { d[0] = s[0] + s2[0]; s++; d++; n--; } if (n > 0) { n >>= 4; __asm__ __volatile__ ("\n" " movd %[val], %%mm0\n" " pshufw $00, %%mm0, %%mm0\n" "1:\n" " movq 0(%[s]), %%mm1\n" " movq 8(%[s]), %%mm2\n" " paddw %%mm0, %%mm1\n" " paddw %%mm0, %%mm2\n" " movq %%mm1, 0(%[d])\n" " movq %%mm2, 8(%[d])\n" " movq 16(%[s]), %%mm3\n" " movq 24(%[s]), %%mm4\n" " paddw %%mm0, %%mm3\n" " paddw %%mm0, %%mm4\n" " movq %%mm3, 16(%[d])\n" " movq %%mm4, 24(%[d])\n" " add $32, %[s]\n" " add $32, %[d]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [s] "+r" (s), [n] "+r" (n), [d] "+r" (d) : [val] "r" (val)); } } OIL_DEFINE_IMPL_FULL (addc_s16_mmx2, addc_s16, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); void addc_s16_sse (int16_t *d, int16_t *s, int16_t *s2, int n) { int val = s2[0]; while(n&15) { d[0] = s[0] + s2[0]; s++; d++; n--; } if (n > 0) { n >>= 4; __asm__ __volatile__ ("\n" " movd %[val], %%xmm0\n" " pshuflw $00, %%xmm0, %%xmm0\n" " pshufd $00, %%xmm0, %%xmm0\n" "1:\n" " movdqu 0(%[s]), %%xmm1\n" " paddw %%xmm0, %%xmm1\n" " movdqu %%xmm1, 0(%[d])\n" " movdqu 16(%[s]), %%xmm2\n" " paddw %%xmm0, %%xmm2\n" " movdqu %%xmm2, 16(%[d])\n" " add $32, %[s]\n" " add $32, %[d]\n" " decl %[n]\n" " jnz 1b\n" : [s] "+r" (s), [n] "+r" (n), [d] "+r" (d) : [val] "r" (val)); } } OIL_DEFINE_IMPL_FULL (addc_s16_sse, addc_s16, OIL_IMPL_FLAG_SSE|OIL_IMPL_FLAG_SSE2|OIL_IMPL_FLAG_MMXEXT); void addc_rshift_s16_mmx (int16_t *d, int16_t *s, int16_t *s2, int n) { int val = s2[0]; int shift = s2[1]; int16_t x; while(n&15) { x = s[0] + s2[0]; d[0] = x>>shift; s++; d++; n--; } if (n > 0) { n >>= 4; __asm__ __volatile__ ("\n" " movd %[val], %%mm0\n" " pshufw $00, %%mm0, %%mm0\n" " movd %[shift], %%mm7\n" "1:\n" " movq 0(%[s]), %%mm1\n" " paddw %%mm0, %%mm1\n" " psraw %%mm7, %%mm1\n" " movq %%mm1, 0(%[d])\n" " movq 8(%[s]), %%mm2\n" " paddw %%mm0, %%mm2\n" " psraw %%mm7, %%mm2\n" " movq %%mm2, 8(%[d])\n" " movq 16(%[s]), %%mm3\n" " paddw %%mm0, %%mm3\n" " psraw %%mm7, %%mm3\n" " movq %%mm3, 16(%[d])\n" " movq 24(%[s]), %%mm4\n" " paddw %%mm0, %%mm4\n" " psraw %%mm7, %%mm4\n" " movq %%mm4, 24(%[d])\n" " add $32, %[s]\n" " add $32, %[d]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [s] "+r" (s), [n] "+r" (n), [d] "+r" (d) : [val] "r" (val), [shift] "r" (shift)); } } OIL_DEFINE_IMPL_FULL (addc_rshift_s16_mmx, addc_rshift_s16, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); liboil-0.3.17/liboil/i386_amd64/idct8x8_i386.c0000644000175000017500000005522110717203073015150 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #ifdef ENABLE_BROKEN_IMPLS #define CONST(x) (32768.0*(x) + 0.5) #define C1_0000 (32767) #define C0_9808 CONST(0.980785280) #define C0_9239 CONST(0.923879532) #define C0_8315 CONST(0.831469612) #define C0_7071 CONST(0.707106781) #define C0_5556 CONST(0.555570233) #define C0_3827 CONST(0.382683432) #define C0_1951 CONST(0.195090322) #define FOUR(x) { x, x, x, x } #define MMX_CONST(x) {32768.0*(x) + 0.5,32768.0*(x) + 0.5,32768.0*(x) + 0.5,32768.0*(x) + 0.5} static const int16_t dct_mmx_constants [][4] = { FOUR(0), FOUR(C0_9808), FOUR(C0_9239), FOUR(C0_8315), FOUR(C0_7071), FOUR(C0_5556), FOUR(C0_3827), FOUR(C0_1951), { 1, 1, -1, -1 }, // 64 { 1, -1, 1, -1 }, { C1_0000, C0_9239, C0_7071, C0_3827 }, // 80 { C1_0000, C0_3827, C0_7071, C0_9239 }, // 88 { C0_9808, C0_8315, C0_5556, C0_1951 }, // 96 { C0_8315, C0_1951, C0_9808, C0_5556 }, // 104 { 1, -1, -1, -1 }, { C0_5556, C0_9808, C0_1951, C0_8315 }, // 120 { 1, -1, 1, 1 }, { C0_1951, C0_5556, C0_8315, C0_9808 }, // 136 { 1, -1, 1, -1 }, FOUR(CONST(0.5)), //152 { C0_7071, C0_9239, C0_7071, C0_3827 }, // 160 { C0_7071, C0_3827, C0_7071, C0_9239 }, // 168 }; static void idct8x8_s16_mmx (int16_t *dest, int dstr, int16_t *src, int sstr) { int32_t tmp[32]; int32_t save_ebx; asm volatile ( " movl %%ebx, %6 \n" /* left half */ " movl %1, %%eax \n" // src " movl %3, %%ebx \n" // sstr " leal (%%eax,%%ebx,4),%%ecx \n" // src + sstr * 4 " movq (%%eax), %%mm0 \n" " movq (%%eax), %%mm1 \n" " paddsw (%%ecx), %%mm0 \n" // ss07s34 " psubsw (%%ecx), %%mm1 \n" // ss16s25 " pmulhw 32(%5), %%mm0 \n" // .7071 " pmulhw 32(%5), %%mm1 \n" // .7071 " movq (%%eax,%%ebx,2), %%mm2 \n" " movq (%%eax,%%ebx,2), %%mm3 \n" " movq (%%ecx,%%ebx,2), %%mm4 \n" " movq (%%ecx,%%ebx,2), %%mm5 \n" " pmulhw 16(%5), %%mm2 \n" // .9239 " pmulhw 48(%5), %%mm3 \n" // .3827 " pmulhw 48(%5), %%mm4 \n" // .3827 " pmulhw 16(%5), %%mm5 \n" // .9239 " paddsw %%mm4, %%mm2 \n" // ds07s34 " psubsw %%mm5, %%mm3 \n" // ds16s25 " movq %%mm0, %%mm4 \n" " movq %%mm1, %%mm5 \n" " paddsw %%mm2, %%mm0 \n" // s07 " psubsw %%mm2, %%mm4 \n" // s34 " paddsw %%mm3, %%mm1 \n" // s16 " psubsw %%mm3, %%mm5 \n" // s25 " movq %%mm0, 0(%4) \n" " movq %%mm1, 8(%4) \n" " movq %%mm5, 16(%4) \n" " movq %%mm4, 24(%4) \n" " addl %3, %%eax \n" " addl %3, %%ecx \n" " movq (%%eax), %%mm0 \n" " pmulhw 8(%5), %%mm0 \n" " movq (%%eax,%%ebx,2), %%mm1 \n" " pmulhw 24(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq (%%ecx), %%mm1 \n" " pmulhw 40(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq (%%ecx,%%ebx,2), %%mm1 \n" " pmulhw 56(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" // d07 " movq (%%eax), %%mm2 \n" " pmulhw 24(%5), %%mm2 \n" " movq (%%eax,%%ebx,2), %%mm1 \n" " pmulhw 56(%5), %%mm1 \n" " psubsw %%mm1, %%mm2 \n" " movq (%%ecx), %%mm1 \n" " pmulhw 8(%5), %%mm1 \n" " psubsw %%mm1, %%mm2 \n" " movq (%%ecx,%%ebx,2), %%mm1 \n" " pmulhw 40(%5), %%mm1 \n" " psubsw %%mm1, %%mm2 \n" // d16 " movq (%%eax), %%mm3 \n" " pmulhw 40(%5), %%mm3 \n" " movq (%%eax,%%ebx,2), %%mm1 \n" " pmulhw 8(%5), %%mm1 \n" " psubsw %%mm1, %%mm3 \n" " movq (%%ecx), %%mm1 \n" " pmulhw 56(%5), %%mm1 \n" " paddsw %%mm1, %%mm3 \n" " movq (%%ecx,%%ebx,2), %%mm1 \n" " pmulhw 24(%5), %%mm1 \n" " paddsw %%mm1, %%mm3 \n" // d25 " movq (%%eax), %%mm4 \n" " pmulhw 56(%5), %%mm4 \n" " movq (%%eax,%%ebx,2), %%mm1 \n" " pmulhw 40(%5), %%mm1 \n" " psubsw %%mm1, %%mm4 \n" " movq (%%ecx), %%mm1 \n" " pmulhw 24(%5), %%mm1 \n" " paddsw %%mm1, %%mm4 \n" " movq (%%ecx,%%ebx,2), %%mm1 \n" " pmulhw 8(%5), %%mm1 \n" " psubsw %%mm1, %%mm4 \n" // d34 " movl %0, %%eax \n" // dest " movl %2, %%ebx \n" // dstr " leal (%%ebx, %%ebx, 2), %%edx \n" // dstr*3 " movq %%mm0, %%mm1 \n" " paddsw 0(%4), %%mm1 \n" " movq %%mm1, (%%eax) \n" " movq %%mm2, %%mm1 \n" " paddsw 8(%4), %%mm1 \n" " movq %%mm1, (%%eax, %%ebx, 1) \n" " movq %%mm3, %%mm1 \n" " paddsw 16(%4), %%mm1 \n" " movq %%mm1, (%%eax, %%ebx, 2) \n" // s25 + d25 " movq %%mm4, %%mm1 \n" " paddsw 24(%4), %%mm1 \n" " movq %%mm1, (%%eax, %%edx, 1) \n" " leal (%%eax, %%ebx, 4), %%eax \n" " movq 24(%4), %%mm1 \n" " psubsw %%mm4, %%mm1 \n" " movq %%mm1, (%%eax) \n" " movq 16(%4), %%mm1 \n" " psubsw %%mm3, %%mm1 \n" " movq %%mm1, (%%eax, %%ebx, 1) \n" " movq 8(%4), %%mm1 \n" " psubsw %%mm2, %%mm1 \n" " movq %%mm1, (%%eax, %%ebx, 2) \n" " movq 0(%4), %%mm1 \n" " psubsw %%mm0, %%mm1 \n" " movq %%mm1, (%%eax, %%edx, 1) \n" /* right half */ " movl %1, %%eax \n" // src " movl %3, %%ebx \n" // sstr " leal (%%eax,%%ebx,4),%%ecx \n" // src + sstr * 4 " movq 8(%%eax), %%mm0 \n" " movq 8(%%eax), %%mm1 \n" " paddsw 8(%%ecx), %%mm0 \n" // ss07s34 " psubsw 8(%%ecx), %%mm1 \n" // ss16s25 " pmulhw 32(%5), %%mm0 \n" // .7071 " pmulhw 32(%5), %%mm1 \n" // .7071 " movq 8(%%eax,%%ebx,2), %%mm2 \n" " movq 8(%%eax,%%ebx,2), %%mm3 \n" " movq 8(%%ecx,%%ebx,2), %%mm4 \n" " movq 8(%%ecx,%%ebx,2), %%mm5 \n" " pmulhw 16(%5), %%mm2 \n" // .9239 " pmulhw 48(%5), %%mm3 \n" // .3827 " pmulhw 48(%5), %%mm4 \n" // .3827 " pmulhw 16(%5), %%mm5 \n" // .9239 " paddsw %%mm4, %%mm2 \n" // ds07s34 " psubsw %%mm5, %%mm3 \n" // ds16s25 " movq %%mm0, %%mm4 \n" " movq %%mm1, %%mm5 \n" " paddsw %%mm2, %%mm0 \n" // s07 " psubsw %%mm2, %%mm4 \n" // s34 " paddsw %%mm3, %%mm1 \n" // s16 " psubsw %%mm3, %%mm5 \n" // s25 " movq %%mm0, 0(%4) \n" " movq %%mm1, 8(%4) \n" " movq %%mm5, 16(%4) \n" " movq %%mm4, 24(%4) \n" " addl %3, %%eax \n" " addl %3, %%ecx \n" " movq 8(%%eax), %%mm0 \n" " pmulhw 8(%5), %%mm0 \n" " movq 8(%%eax,%%ebx,2), %%mm1 \n" " pmulhw 24(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq 8(%%ecx), %%mm1 \n" " pmulhw 40(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq 8(%%ecx,%%ebx,2), %%mm1 \n" " pmulhw 56(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" // d07 " movq 8(%%eax), %%mm2 \n" " pmulhw 24(%5), %%mm2 \n" " movq 8(%%eax,%%ebx,2), %%mm1 \n" " pmulhw 56(%5), %%mm1 \n" " psubsw %%mm1, %%mm2 \n" " movq 8(%%ecx), %%mm1 \n" " pmulhw 8(%5), %%mm1 \n" " psubsw %%mm1, %%mm2 \n" " movq 8(%%ecx,%%ebx,2), %%mm1 \n" " pmulhw 40(%5), %%mm1 \n" " psubsw %%mm1, %%mm2 \n" // d16 " movq 8(%%eax), %%mm3 \n" " pmulhw 40(%5), %%mm3 \n" " movq 8(%%eax,%%ebx,2), %%mm1 \n" " pmulhw 8(%5), %%mm1 \n" " psubsw %%mm1, %%mm3 \n" " movq 8(%%ecx), %%mm1 \n" " pmulhw 56(%5), %%mm1 \n" " paddsw %%mm1, %%mm3 \n" " movq 8(%%ecx,%%ebx,2), %%mm1 \n" " pmulhw 24(%5), %%mm1 \n" " paddsw %%mm1, %%mm3 \n" // d25 " movq 8(%%eax), %%mm4 \n" " pmulhw 56(%5), %%mm4 \n" " movq 8(%%eax,%%ebx,2), %%mm1 \n" " pmulhw 40(%5), %%mm1 \n" " psubsw %%mm1, %%mm4 \n" " movq 8(%%ecx), %%mm1 \n" " pmulhw 24(%5), %%mm1 \n" " paddsw %%mm1, %%mm4 \n" " movq 8(%%ecx,%%ebx,2), %%mm1 \n" " pmulhw 8(%5), %%mm1 \n" " psubsw %%mm1, %%mm4 \n" // d34 " movl %0, %%eax \n" // dest " movl %2, %%ebx \n" // dstr " leal (%%ebx, %%ebx, 2), %%edx \n" // dstr*3 " movq %%mm0, %%mm1 \n" " paddsw 0(%4), %%mm1 \n" " movq %%mm1, 8(%%eax) \n" " movq %%mm2, %%mm1 \n" " paddsw 8(%4), %%mm1 \n" " movq %%mm1, 8(%%eax, %%ebx, 1) \n" " movq %%mm3, %%mm1 \n" " paddsw 16(%4), %%mm1 \n" " movq %%mm1, 8(%%eax, %%ebx, 2) \n" // s25 + d25 " movq %%mm4, %%mm1 \n" " paddsw 24(%4), %%mm1 \n" " movq %%mm1, 8(%%eax, %%edx, 1) \n" " leal (%%eax, %%ebx, 4), %%eax \n" " movq 24(%4), %%mm1 \n" " psubsw %%mm4, %%mm1 \n" " movq %%mm1, 8(%%eax) \n" " movq 16(%4), %%mm1 \n" " psubsw %%mm3, %%mm1 \n" " movq %%mm1, 8(%%eax, %%ebx, 1) \n" " movq 8(%4), %%mm1 \n" " psubsw %%mm2, %%mm1 \n" " movq %%mm1, 8(%%eax, %%ebx, 2) \n" " movq 0(%4), %%mm1 \n" " psubsw %%mm0, %%mm1 \n" " movq %%mm1, 8(%%eax, %%edx, 1) \n" /* rows */ " movl %0, %%eax \n" /* dest */ #define LOOP \ " pshufw $0x88, 0(%%eax), %%mm0 \n" /* x0 x2 x0 x2 */ \ " pshufw $0x88, 8(%%eax), %%mm1 \n" /* x4 x6 x4 x6 */ \ " pmulhw 160(%5), %%mm0 \n" /* 0.707 0.9239 0.707 0.3827 */ \ " pmulhw 168(%5), %%mm1 \n" /* 0.707 0.3827 0.707 0.9239 */ \ " pmullw 64(%5), %%mm1 \n" /* 1 1 -1 -1 */ \ " paddsw %%mm1, %%mm0 \n" /* ss07s34 ds07s34 ss16s25 ds16s25 */ \ \ " pshufw $0xa0, %%mm0, %%mm1 \n" /* ss07s34 ss07s34 ss16s25 ss16s25 */ \ " pshufw $0xf5, %%mm0, %%mm2 \n" /* ds07s34 ds07s34 ds16s25 ds16s25 */ \ " pmullw 72(%5), %%mm2 \n" /* 1 -1 1 -1 */ \ " paddsw %%mm2, %%mm1 \n" /* s07 s34 s16 s25 */ \ " pshufw $0x78, %%mm1, %%mm2 \n" /* s07 s16 s25 s34 */ \ \ " pshufw $0x55, 0(%%eax), %%mm0 \n" \ " pmulhw 96(%5), %%mm0 \n" \ " pshufw $0xff, 0(%%eax), %%mm1 \n" \ " pmulhw 104(%5), %%mm1 \n" \ " pmullw 112(%5), %%mm1 \n" \ " paddsw %%mm1, %%mm0 \n" \ " pshufw $0x55, 8(%%eax), %%mm1 \n" \ " pmulhw 120(%5), %%mm1 \n" \ " pmullw 128(%5), %%mm1 \n" \ " paddsw %%mm1, %%mm0 \n" \ " pshufw $0xff, 8(%%eax), %%mm1 \n" \ " pmulhw 136(%5), %%mm1 \n" \ " pmullw 144(%5), %%mm1 \n" \ " paddsw %%mm1, %%mm0 \n" \ \ " movq %%mm2, %%mm1 \n" \ " paddsw %%mm0, %%mm1 \n" \ " psubsw %%mm0, %%mm2 \n" \ " pshufw $0x1b, %%mm2, %%mm2 \n" \ \ " movq %%mm1, 0(%%eax) \n" \ " movq %%mm2, 8(%%eax) \n" \ " addl %3, %%eax \n" LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP #undef LOOP " movl %6, %%ebx \n" " emms \n" : : "m" (dest), "m" (src), "m" (dstr), "m" (sstr), "r" (tmp), "r" (dct_mmx_constants), "m" (save_ebx) : "eax", "ecx", "edx"); } OIL_DEFINE_IMPL_FULL (idct8x8_s16_mmx, idct8x8_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #if 0 #define CONST(x) (32768.0*(x) + 0.5) #define C1_0000 (32767) #define C0_9808 CONST(0.980785280) #define C0_9239 CONST(0.923879532) #define C0_8315 CONST(0.831469612) #define C0_7071 CONST(0.707106781) #define C0_5556 CONST(0.555570233) #define C0_3827 CONST(0.382683432) #define C0_1951 CONST(0.195090322) #define FOUR(x) { x, x, x, x } #define MMX_CONST(x) {32768.0*(x) + 0.5,32768.0*(x) + 0.5,32768.0*(x) + 0.5,32768.0*(x) + 0.5} static const int16_t dct_mmx_constants [][4] = { FOUR(0), FOUR(C0_9808), FOUR(C0_9239), FOUR(C0_8315), FOUR(C0_7071), FOUR(C0_5556), FOUR(C0_3827), FOUR(C0_1951), { 1, 1, -1, -1 }, // 64 { 1, -1, 1, -1 }, { C1_0000, C0_9239, C0_7071, C0_3827 }, // 80 { C1_0000, C0_3827, C0_7071, C0_9239 }, // 88 { C0_9808, C0_8315, C0_5556, C0_1951 }, // 96 { C0_8315, C0_1951, C0_9808, C0_5556 }, // 104 { 1, -1, -1, -1 }, { C0_5556, C0_9808, C0_1951, C0_8315 }, // 120 { 1, -1, 1, 1 }, { C0_1951, C0_5556, C0_8315, C0_9808 }, // 136 { 1, -1, 1, -1 }, }; #endif /* a 3dnow version can use pmulhrw instead of pmulhw for increased * accuracy */ static void fdct8x8s_s16_mmx (uint16_t *dest, int dstr, uint16_t *src, int sstr) { int32_t tmp[32]; int32_t save_ebx; asm volatile ( " movl %%ebx, %6 \n" /* first half */ " movl %1, %%eax \n" // src " movl %3, %%ebx \n" // sstr " leal (%%ebx,%%ebx,2),%%edx \n" // sstr * 3 " leal (%%eax,%%ebx,4),%%ecx \n" // src + sstr * 4 " movq (%%eax), %%mm0 \n" " movq (%%eax), %%mm1 \n" " paddsw (%%ecx,%%edx,1), %%mm0 \n" // s07 " psubsw (%%ecx,%%edx,1), %%mm1 \n" // d07 " movq %%mm1, (%4) \n" " movq (%%eax,%%ebx), %%mm2 \n" " movq (%%eax,%%ebx), %%mm3 \n" " paddsw (%%ecx,%%ebx,2), %%mm2 \n" // s16 " psubsw (%%ecx,%%ebx,2), %%mm3 \n" // d16 " movq %%mm3, 8(%4) \n" " movq (%%eax,%%ebx,2), %%mm1 \n" " movq (%%eax,%%ebx,2), %%mm4 \n" " paddsw (%%ecx,%%ebx), %%mm1 \n" // s25 " psubsw (%%ecx,%%ebx), %%mm4 \n" // d25 " movq %%mm4, 16(%4) \n" " movq (%%eax,%%edx), %%mm3 \n" " movq (%%eax,%%edx), %%mm5 \n" " paddsw (%%ecx), %%mm3 \n" // s34 " psubsw (%%ecx), %%mm5 \n" // d34 " movq %%mm5, 24(%4) \n" " movq %%mm0, %%mm4 \n" " paddsw %%mm3, %%mm0 \n" // ss07s34 " psubsw %%mm3, %%mm4 \n" // ds07s34 " movq %%mm2, %%mm5 \n" " paddsw %%mm1, %%mm2 \n" // ss16s25 " psubsw %%mm1, %%mm5 \n" // ds16s25 " movq %%mm0, %%mm1 \n" " paddsw %%mm2, %%mm1 \n" " pmulhw 32(%5), %%mm1 \n" // .7071 " psubsw %%mm2, %%mm0 \n" " pmulhw 32(%5), %%mm0 \n" // .7071 " movq %%mm4, %%mm2 \n" " pmulhw 16(%5), %%mm2 \n" " movq %%mm5, %%mm6 \n" " pmulhw 48(%5), %%mm6 \n" " paddsw %%mm6, %%mm2 \n" // " pmulhw 48(%5), %%mm4 \n" " pmulhw 16(%5), %%mm5 \n" " psubsw %%mm5, %%mm4 \n" // " movl %0, %%eax \n" // dest " movl %2, %%ebx \n" // dstr " add %%ebx, %%ebx \n" " leal (%%ebx,%%ebx,2),%%edx \n" // dstr * 3 " movq %%mm1, 0(%%eax) \n" " movq %%mm2, 0(%%eax,%%ebx) \n" " movq %%mm0, 0(%%eax,%%ebx,2) \n" " movq %%mm4, 0(%%eax,%%edx) \n" " add %2, %%eax \n" " movq 0(%4), %%mm0 \n" " pmulhw 8(%5), %%mm0 \n" " movq 8(%4), %%mm1 \n" " pmulhw 24(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq 16(%4), %%mm1 \n" " pmulhw 40(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq 24(%4), %%mm1 \n" " pmulhw 56(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq %%mm0, (%%eax) \n" " movq 0(%4), %%mm0 \n" " pmulhw 24(%5), %%mm0 \n" " movq 8(%4), %%mm1 \n" " pmulhw 56(%5), %%mm1 \n" " psubsw %%mm1, %%mm0 \n" " movq 16(%4), %%mm1 \n" " pmulhw 8(%5), %%mm1 \n" " psubsw %%mm1, %%mm0 \n" " movq 24(%4), %%mm1 \n" " pmulhw 40(%5), %%mm1 \n" " psubsw %%mm1, %%mm0 \n" " movq %%mm0, (%%eax,%%ebx) \n" " movq 0(%4), %%mm0 \n" " pmulhw 40(%5), %%mm0 \n" " movq 8(%4), %%mm1 \n" " pmulhw 8(%5), %%mm1 \n" " psubsw %%mm1, %%mm0 \n" " movq 16(%4), %%mm1 \n" " pmulhw 56(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq 24(%4), %%mm1 \n" " pmulhw 24(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq %%mm0, (%%eax,%%ebx,2) \n" " movq 0(%4), %%mm0 \n" " pmulhw 56(%5), %%mm0 \n" " movq 8(%4), %%mm1 \n" " pmulhw 40(%5), %%mm1 \n" " psubsw %%mm1, %%mm0 \n" " movq 16(%4), %%mm1 \n" " pmulhw 24(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq 24(%4), %%mm1 \n" " pmulhw 8(%5), %%mm1 \n" " psubsw %%mm1, %%mm0 \n" " movq %%mm0, (%%eax,%%edx) \n" /* second half */ " movl %1, %%eax \n" // src " add $8, %%eax \n" " movl %3, %%ebx \n" // sstr " leal (%%ebx,%%ebx,2),%%edx \n" // sstr * 3 " leal (%%eax,%%ebx,4),%%ecx \n" // src + sstr * 4 " movq (%%eax), %%mm0 \n" " movq (%%eax), %%mm1 \n" " paddsw (%%ecx,%%edx,1), %%mm0 \n" // s07 " psubsw (%%ecx,%%edx,1), %%mm1 \n" // d07 " movq %%mm1, (%4) \n" " movq (%%eax,%%ebx), %%mm2 \n" " movq (%%eax,%%ebx), %%mm3 \n" " paddsw (%%ecx,%%ebx,2), %%mm2 \n" // s16 " psubsw (%%ecx,%%ebx,2), %%mm3 \n" // d16 " movq %%mm3, 8(%4) \n" " movq (%%eax,%%ebx,2), %%mm1 \n" " movq (%%eax,%%ebx,2), %%mm4 \n" " paddsw (%%ecx,%%ebx), %%mm1 \n" // s25 " psubsw (%%ecx,%%ebx), %%mm4 \n" // d25 " movq %%mm4, 16(%4) \n" " movq (%%eax,%%edx), %%mm3 \n" " movq (%%eax,%%edx), %%mm5 \n" " paddsw (%%ecx), %%mm3 \n" // s34 " psubsw (%%ecx), %%mm5 \n" // d34 " movq %%mm5, 24(%4) \n" " movq %%mm0, %%mm4 \n" " paddsw %%mm3, %%mm0 \n" // ss07s34 " psubsw %%mm3, %%mm4 \n" // ds07s34 " movq %%mm2, %%mm5 \n" " paddsw %%mm1, %%mm2 \n" // ss16s25 " psubsw %%mm1, %%mm5 \n" // ds16s25 " movq %%mm0, %%mm1 \n" " paddsw %%mm2, %%mm1 \n" " pmulhw 32(%5), %%mm1 \n" // .7071 " psubsw %%mm2, %%mm0 \n" " pmulhw 32(%5), %%mm0 \n" // .7071 " movq %%mm4, %%mm2 \n" " pmulhw 16(%5), %%mm2 \n" " movq %%mm5, %%mm6 \n" " pmulhw 48(%5), %%mm6 \n" " paddsw %%mm6, %%mm2 \n" // " pmulhw 48(%5), %%mm4 \n" " pmulhw 16(%5), %%mm5 \n" " psubsw %%mm5, %%mm4 \n" // " movl %0, %%eax \n" // dest " add $8, %%eax \n" " movl %2, %%ebx \n" // dstr " add %%ebx, %%ebx \n" " leal (%%ebx,%%ebx,2),%%edx \n" // dstr * 3 " movq %%mm1, 0(%%eax) \n" " movq %%mm2, 0(%%eax,%%ebx) \n" " movq %%mm0, 0(%%eax,%%ebx,2) \n" " movq %%mm4, 0(%%eax,%%edx) \n" " add %2, %%eax \n" " movq 0(%4), %%mm0 \n" " pmulhw 8(%5), %%mm0 \n" " movq 8(%4), %%mm1 \n" " pmulhw 24(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq 16(%4), %%mm1 \n" " pmulhw 40(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq 24(%4), %%mm1 \n" " pmulhw 56(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq %%mm0, (%%eax) \n" " movq 0(%4), %%mm0 \n" " pmulhw 24(%5), %%mm0 \n" " movq 8(%4), %%mm1 \n" " pmulhw 56(%5), %%mm1 \n" " psubsw %%mm1, %%mm0 \n" " movq 16(%4), %%mm1 \n" " pmulhw 8(%5), %%mm1 \n" " psubsw %%mm1, %%mm0 \n" " movq 24(%4), %%mm1 \n" " pmulhw 40(%5), %%mm1 \n" " psubsw %%mm1, %%mm0 \n" " movq %%mm0, (%%eax,%%ebx) \n" " movq 0(%4), %%mm0 \n" " pmulhw 40(%5), %%mm0 \n" " movq 8(%4), %%mm1 \n" " pmulhw 8(%5), %%mm1 \n" " psubsw %%mm1, %%mm0 \n" " movq 16(%4), %%mm1 \n" " pmulhw 56(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq 24(%4), %%mm1 \n" " pmulhw 24(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq %%mm0, (%%eax,%%ebx,2) \n" " movq 0(%4), %%mm0 \n" " pmulhw 56(%5), %%mm0 \n" " movq 8(%4), %%mm1 \n" " pmulhw 40(%5), %%mm1 \n" " psubsw %%mm1, %%mm0 \n" " movq 16(%4), %%mm1 \n" " pmulhw 24(%5), %%mm1 \n" " paddsw %%mm1, %%mm0 \n" " movq 24(%4), %%mm1 \n" " pmulhw 8(%5), %%mm1 \n" " psubsw %%mm1, %%mm0 \n" " movq %%mm0, (%%eax,%%edx) \n" " movl %0, %%ecx \n" // dest #define LOOP \ " movq (%%ecx), %%mm0 \n" \ " pshufw $0x1b, 8(%%ecx), %%mm1 \n" \ " movq %%mm0, %%mm2 \n" \ " paddsw %%mm1, %%mm0 \n" /* s07 s16 s25 s34 */ \ " psubsw %%mm1, %%mm2 \n" /* d07 d16 d25 d34 */ \ \ " pshufw $0xbb, %%mm0, %%mm1 \n" /* s25 s34 s25 s34 */ \ " pshufw $0x44, %%mm0, %%mm0 \n" /* s07 s16 s07 s16 */ \ \ " pmullw 64(%5), %%mm1 \n" \ " paddsw %%mm1, %%mm0 \n" /* ss07s34 ss16s25 ds07s34 ds16s25 */ \ \ " pshufw $0x88, %%mm0, %%mm1 \n" /* ss07s34 ds07s34 ss07s34 ds07s34 */ \ " pshufw $0xdd, %%mm0, %%mm0 \n" /* ss16s25 ds16s25 ss16s25 ds16s25 */ \ \ " pmulhw 80(%5), %%mm1 \n" \ \ " pmullw 64(%5), %%mm0 \n" \ " pmulhw 88(%5), %%mm0 \n" \ \ " paddsw %%mm1, %%mm0 \n" \ \ " pshufw $0x00, %%mm2, %%mm3 \n" \ " pmulhw 96(%5), %%mm3 \n" \ " pshufw $0x55, %%mm2, %%mm1 \n" \ " pmulhw 104(%5), %%mm1 \n" \ " pmullw 112(%5), %%mm1 \n" \ " paddsw %%mm1, %%mm3 \n" \ " pshufw $0xaa, %%mm2, %%mm1 \n" \ " pmulhw 120(%5), %%mm1 \n" \ " pmullw 128(%5), %%mm1 \n" \ " paddsw %%mm1, %%mm3 \n" \ " pshufw $0xff, %%mm2, %%mm1 \n" \ " pmulhw 136(%5), %%mm1 \n" \ " pmullw 144(%5), %%mm1 \n" \ " paddsw %%mm1, %%mm3 \n" \ \ " movq %%mm0, %%mm1 \n" \ " punpckhwd %%mm3, %%mm1 \n" \ " punpcklwd %%mm3, %%mm0 \n" \ \ " movq %%mm0, (%%ecx) \n" \ " movq %%mm1, 8(%%ecx) \n" \ \ " add %3, %%eax \n" \ " add %2, %%ecx \n" LOOP LOOP LOOP LOOP LOOP LOOP LOOP LOOP " emms \n" " movl %6, %%ebx \n" : : "m" (dest), "m" (src), "m" (dstr), "m" (sstr), "r" (tmp), "r" (dct_mmx_constants), "m" (save_ebx) : "eax", "ecx", "edx"); } OIL_DEFINE_IMPL_FULL (fdct8x8s_s16_mmx, fdct8x8s_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #endif liboil-0.3.17/liboil/i386_amd64/yuv.c0000644000175000017500000000446110726401035013725 00000000000000 #include #include void packyuyv_mmx (uint32_t *d, uint8_t *s1_nx2, uint8_t *s2, uint8_t *s3, int n) { while(n&3) { uint8_t *dest = (uint8_t *)d; dest[0] = s1_nx2[0]; dest[2] = s1_nx2[1]; dest[1] = s2[0]; dest[3] = s3[0]; s1_nx2+=2; s2++; s3++; d++; n--; } if (n > 0) { n >>= 2; __asm__ __volatile__ ("\n" "1:\n" " movd 0(%[s2]), %%mm0\n" " punpcklbw 0(%[s3]), %%mm0\n" " movq 0(%[s1]), %%mm1\n" " movq %%mm1, %%mm2\n" " punpcklbw %%mm0, %%mm1\n" " punpckhbw %%mm0, %%mm2\n" " movq %%mm1, 0(%[d])\n" " movq %%mm2, 8(%[d])\n" " add $4, %[s3]\n" " add $4, %[s2]\n" " add $8, %[s1]\n" " add $16, %[d]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [s1] "+r" (s1_nx2), [n] "+m" (n), [d] "+r" (d), [s2] "+r" (s2), [s3] "+r" (s3)); } } OIL_DEFINE_IMPL_FULL (packyuyv_mmx, packyuyv, OIL_IMPL_FLAG_MMX); void packyuyv_mmx2 (uint32_t *d, uint8_t *s1_nx2, uint8_t *s2, uint8_t *s3, int n) { while(n&7) { uint8_t *dest = (uint8_t *)d; dest[0] = s1_nx2[0]; dest[2] = s1_nx2[1]; dest[1] = s2[0]; dest[3] = s3[0]; s1_nx2+=2; s2++; s3++; d++; n--; } if (n > 0) { n >>= 3; __asm__ __volatile__ ("\n" "1:\n" " movq 0(%[s2]), %%mm0\n" " movq %%mm0, %%mm1\n" " punpcklbw 0(%[s3]), %%mm0\n" " punpckhbw 0(%[s3]), %%mm1\n" " movq 0(%[s1]), %%mm2\n" " punpcklbw %%mm0, %%mm2\n" " movq %%mm2, 0(%[d])\n" " movq 0(%[s1]), %%mm3\n" " punpckhbw %%mm0, %%mm3\n" " movq %%mm3, 8(%[d])\n" " movq 8(%[s1]), %%mm2\n" " punpcklbw %%mm1, %%mm2\n" " movq %%mm2, 16(%[d])\n" " movq 8(%[s1]), %%mm3\n" " punpckhbw %%mm1, %%mm3\n" " movq %%mm3, 24(%[d])\n" " add $8, %[s3]\n" " add $8, %[s2]\n" " add $16, %[s1]\n" " add $32, %[d]\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [s1] "+r" (s1_nx2), [n] "+m" (n), [d] "+r" (d), [s2] "+r" (s2), [s3] "+r" (s3)); } } OIL_DEFINE_IMPL_FULL (packyuyv_mmx2, packyuyv, OIL_IMPL_FLAG_MMX); liboil-0.3.17/liboil/i386_amd64/math.c0000644000175000017500000000534511131504056014033 00000000000000 #include #include void add_s16_mmx(int16_t *d1, int16_t *s1, int16_t *s2, int n) { while(n&3) { d1[0] = s1[0] + s2[0]; d1++; s1++; s2++; n--; } n>>=2; if (n==0) return; asm volatile ("\n" "1:\n" " movq 0(%2), %%mm0\n" " paddw 0(%1), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (add_s16_mmx, add_s16, OIL_IMPL_FLAG_MMX); void add_s16_u8_mmx(int16_t *d1, int16_t *s1, uint8_t *s2, int n) { while(n&7) { d1[0] = s1[0] + s2[0]; d1++; s1++; s2++; n--; } n>>=3; if (n==0) return; asm volatile ("\n" " pxor %%mm7, %%mm7\n" "1:\n" " movq 0(%2), %%mm0\n" " movq 0(%2), %%mm1\n" " punpcklbw %%mm7, %%mm0\n" " punpckhbw %%mm7, %%mm1\n" " paddw 0(%1), %%mm0\n" " paddw 8(%1), %%mm1\n" " movq %%mm0, 0(%0)\n" " movq %%mm1, 8(%0)\n" " add $16, %0\n" " add $16, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (add_s16_u8_mmx, add_s16_u8, OIL_IMPL_FLAG_MMX); void subtract_s16_mmx(int16_t *d1, int16_t *s1, int16_t *s2, int n) { while(n&3) { d1[0] = s1[0] - s2[0]; d1++; s1++; s2++; n--; } n>>=2; if (n==0) return; asm volatile ("\n" "1:\n" " movq 0(%1), %%mm0\n" " psubw 0(%2), %%mm0\n" " movq %%mm0, 0(%0)\n" " add $8, %0\n" " add $8, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (subtract_s16_mmx, subtract_s16, OIL_IMPL_FLAG_MMX); void subtract_s16_u8_mmx(int16_t *d1, int16_t *s1, uint8_t *s2, int n) { while(n&7) { d1[0] = s1[0] - s2[0]; d1++; s1++; s2++; n--; } n>>=3; if (n==0) return; asm volatile ("\n" " pxor %%mm7, %%mm7\n" "1:\n" " movq 0(%2), %%mm0\n" " movq 0(%2), %%mm1\n" " punpcklbw %%mm7, %%mm0\n" " punpckhbw %%mm7, %%mm1\n" " movq 0(%1), %%mm2\n" " psubw %%mm0, %%mm2\n" " movq 8(%1), %%mm3\n" " psubw %%mm1, %%mm3\n" " movq %%mm2, 0(%0)\n" " movq %%mm3, 8(%0)\n" " add $16, %0\n" " add $16, %1\n" " add $8, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) ); } OIL_DEFINE_IMPL_FULL (subtract_s16_u8_mmx, subtract_s16_u8, OIL_IMPL_FLAG_MMX); liboil-0.3.17/liboil/i386_amd64/multiply_and_acc.c0000644000175000017500000001666711067011142016417 00000000000000 #include #include void multiply_and_acc_6xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1, int ss1, uint8_t *s2, int ss2, int n) { if (n==0) return; __asm__ __volatile__ ("\n" " pxor %%mm7, %%mm7\n" "1:\n" " movd 0(%2), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pmullw 0(%1), %%mm0\n" " paddw 0(%0), %%mm0\n" " movq %%mm0, 0(%0)\n" " movd 2(%2), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " pmullw 4(%1), %%mm1\n" " paddw 4(%0), %%mm1\n" " pshufw $0xee, %%mm1, %%mm1\n" " movd %%mm1, 8(%0)\n" " add %4, %0\n" " add %5, %1\n" " add %6, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (i1), "+r" (s1), "+r" (s2), "+m" (n) #ifdef __i386__ : "m" (is1), "m" (ss1), "m" (ss2) #else : "r" ((long)is1), "r" ((long)ss1), "r" ((long)ss2) #endif ); } OIL_DEFINE_IMPL_FULL (multiply_and_acc_6xn_s16_u8_mmx, multiply_and_acc_6xn_s16_u8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); void multiply_and_acc_8xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1, int ss1, uint8_t *s2, int ss2, int n) { if (n==0) return; __asm__ __volatile__ ("\n" " pxor %%mm7, %%mm7\n" "1:\n" " movd 0(%2), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pmullw 0(%1), %%mm0\n" " paddw 0(%0), %%mm0\n" " movq %%mm0, 0(%0)\n" " movd 4(%2), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " pmullw 8(%1), %%mm1\n" " paddw 8(%0), %%mm1\n" " movq %%mm1, 8(%0)\n" " add %4, %0\n" " add %5, %1\n" " add %6, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (i1), "+r" (s1), "+r" (s2), "+m" (n) #ifdef __i386__ : "m" (is1), "m" (ss1), "m" (ss2) #else : "r" ((long)is1), "r" ((long)ss1), "r" ((long)ss2) #endif ); } OIL_DEFINE_IMPL_FULL (multiply_and_acc_8xn_s16_u8_mmx, multiply_and_acc_8xn_s16_u8, OIL_IMPL_FLAG_MMX); void multiply_and_acc_16xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1, int ss1, uint8_t *s2, int ss2, int n) { if (n==0) return; __asm__ __volatile__ ("\n" " pxor %%mm7, %%mm7\n" "1:\n" " movd 0(%2), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pmullw 0(%1), %%mm0\n" " paddw 0(%0), %%mm0\n" " movq %%mm0, 0(%0)\n" " movd 4(%2), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " pmullw 8(%1), %%mm1\n" " paddw 8(%0), %%mm1\n" " movq %%mm1, 8(%0)\n" " movd 8(%2), %%mm2\n" " punpcklbw %%mm7, %%mm2\n" " pmullw 16(%1), %%mm2\n" " paddw 16(%0), %%mm2\n" " movq %%mm2, 16(%0)\n" " movd 12(%2), %%mm2\n" " punpcklbw %%mm7, %%mm2\n" " pmullw 24(%1), %%mm2\n" " paddw 24(%0), %%mm2\n" " movq %%mm2, 24(%0)\n" " add %4, %0\n" " add %5, %1\n" " add %6, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (i1), "+r" (s1), "+r" (s2), "+m" (n) #ifdef __i386__ : "m" (is1), "m" (ss1), "m" (ss2) #else : "r" ((long)is1), "r" ((long)ss1), "r" ((long)ss2) #endif ); } OIL_DEFINE_IMPL_FULL (multiply_and_acc_16xn_s16_u8_mmx, multiply_and_acc_16xn_s16_u8, OIL_IMPL_FLAG_MMX); void multiply_and_acc_24xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1, int ss1, uint8_t *s2, int ss2, int n) { if (n==0) return; __asm__ __volatile__ ("\n" " pxor %%mm7, %%mm7\n" "1:\n" " movd 0(%2), %%mm0\n" " punpcklbw %%mm7, %%mm0\n" " pmullw 0(%1), %%mm0\n" " paddw 0(%0), %%mm0\n" " movq %%mm0, 0(%0)\n" " movd 4(%2), %%mm1\n" " punpcklbw %%mm7, %%mm1\n" " pmullw 8(%1), %%mm1\n" " paddw 8(%0), %%mm1\n" " movq %%mm1, 8(%0)\n" " movd 8(%2), %%mm2\n" " punpcklbw %%mm7, %%mm2\n" " pmullw 16(%1), %%mm2\n" " paddw 16(%0), %%mm2\n" " movq %%mm2, 16(%0)\n" " movd 12(%2), %%mm2\n" " punpcklbw %%mm7, %%mm2\n" " pmullw 24(%1), %%mm2\n" " paddw 24(%0), %%mm2\n" " movq %%mm2, 24(%0)\n" " movd 16(%2), %%mm2\n" " punpcklbw %%mm7, %%mm2\n" " pmullw 32(%1), %%mm2\n" " paddw 32(%0), %%mm2\n" " movq %%mm2, 32(%0)\n" " movd 20(%2), %%mm2\n" " punpcklbw %%mm7, %%mm2\n" " pmullw 40(%1), %%mm2\n" " paddw 40(%0), %%mm2\n" " movq %%mm2, 40(%0)\n" " add %4, %0\n" " add %5, %1\n" " add %6, %2\n" " decl %3\n" " jnz 1b\n" " emms\n" : "+r" (i1), "+r" (s1), "+r" (s2), "+m" (n) #ifdef __i386__ : "m" (is1), "m" (ss1), "m" (ss2) #else : "r" ((long)is1), "r" ((long)ss1), "r" ((long)ss2) #endif ); } OIL_DEFINE_IMPL_FULL (multiply_and_acc_24xn_s16_u8_mmx, multiply_and_acc_24xn_s16_u8, OIL_IMPL_FLAG_MMX); #if 0 void mas2_add_s16_sse (int16_t *d1, int16_t *s1, int16_t *s2, int16_t *s3_2, int16_t *s4_2, int n) { int shift = s4_2[1]; while (n&7) { int x; x = s4_2[0] + s2[0]*s3_2[0] + s2[1]*s3_2[1]; x >>= s4_2[1]; d1[0] = s1[0] + x; d1++; s1++; s2++; n--; } if (n==0) return; n>>=3; asm volatile ("\n" " movzwl 0(%0), %%ecx\n" " movd %%ecx, %%xmm7\n" " pshuflw $0x00, %%xmm7, %%xmm7\n" " pshufd $0x00, %%xmm7, %%xmm7\n" " movzwl 2(%0), %%ecx\n" " movd %%ecx, %%xmm6\n" " pshuflw $0x00, %%xmm6, %%xmm6\n" " pshufd $0x00, %%xmm6, %%xmm6\n" " movzwl 0(%1), %%ecx\n" " movd %%ecx, %%xmm5\n" " pshuflw $0x44, %%xmm5, %%xmm5\n" " pshufd $0x00, %%xmm5, %%xmm5\n" :: "r" (s3_2), "r" (s4_2) : "ecx" ); asm volatile ("\n" "1:\n" " movdqu 0(%2), %%xmm0\n" // mm0 = s0, s1, s2, s3 " movdqu 0(%2), %%xmm1\n" // mm1 = s0, s1, s2, s3 " pmullw %%xmm7, %%xmm0\n" // mm0 = lo(s0*a0), lo(s1*a0), ... " pmulhw %%xmm7, %%xmm1\n" // mm1 = hi(s0*a0), hi(s1*a0), ... " movdqu %%xmm0, %%xmm2\n" // mm2 = lo(s0*a0), lo(s1*a0), ... " punpcklwd %%xmm1, %%xmm0\n" // mm0 = s0*a0, s1*a0 " punpckhwd %%xmm1, %%xmm2\n" // mm2 = s2*a0, s3*a0 " movdqu %%xmm2, %%xmm1\n" // mm1 = s2*a0, s3*a0 " movdqu 2(%2), %%xmm2\n" " movdqu 2(%2), %%xmm3\n" " pmullw %%xmm6, %%xmm2\n" " pmulhw %%xmm6, %%xmm3\n" " movdqu %%xmm2, %%xmm4\n" " punpcklwd %%xmm3, %%xmm2\n" // mm2 = s1*a1, s2*a1 " punpckhwd %%xmm3, %%xmm4\n" // mm4 = s3*a1, s4*a1 " movdqu %%xmm4, %%xmm3\n" // mm3 = s3*a1, s4*a1 " paddd %%xmm3, %%xmm1\n" // mm1 = s2*a0 + s3*a1, ... " paddd %%xmm2, %%xmm0\n" // mm0 = s0*a0 + s1*a1, ... " paddd %%xmm5, %%xmm1\n" // mm1 = s2*a0 + s3*a1 + offset, ... " paddd %%xmm5, %%xmm0\n" // mm0 = s0*a0 + s1*a1 + offset, ... " movd %4, %%xmm4\n" " psrad %%xmm4, %%xmm1\n" // mm1 = (s2*a0 + s3*a1 + offset)>>shift, ... " psrad %%xmm4, %%xmm0\n" // mm0 = (s0*a0 + s1*a1 + offset)>>shift, ... " packssdw %%xmm1, %%xmm0\n" " paddw 0(%1), %%xmm0\n" " movdqu %%xmm0, 0(%0)\n" " add $16, %0\n" " add $16, %1\n" " add $16, %2\n" " decl %3\n" " jnz 1b\n" : "+r" (d1), "+r" (s1), "+r" (s2), "+r" (n) : "r" (shift) ); } OIL_DEFINE_IMPL_FULL (mas2_add_s16_sse, mas2_add_s16, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #endif liboil-0.3.17/liboil/i386_amd64/Makefile.in0000644000175000017500000007741111332627672015023 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = liboil/i386_amd64 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libi386_amd64_la_LIBADD = am_libi386_amd64_la_OBJECTS = libi386_amd64_la-add2.lo \ libi386_amd64_la-addc.lo libi386_amd64_la-clamp.lo \ libi386_amd64_la-convert.lo libi386_amd64_la-copy.lo \ libi386_amd64_la-idct8x8_i386.lo libi386_amd64_la-mas.lo \ libi386_amd64_la-math.lo libi386_amd64_la-multiply_and_acc.lo \ libi386_amd64_la-mt19937.lo libi386_amd64_la-resample.lo \ libi386_amd64_la-sad8x8.lo libi386_amd64_la-sum.lo \ libi386_amd64_la-swab.lo libi386_amd64_la-yuv.lo libi386_amd64_la_OBJECTS = $(am_libi386_amd64_la_OBJECTS) libi386_amd64_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libi386_amd64_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libi386_amd64_la_SOURCES) DIST_SOURCES = $(libi386_amd64_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libi386_amd64.la libi386_amd64_la_SOURCES = \ add2.c \ addc.c \ clamp.c \ convert.c \ copy.c \ idct8x8_i386.c \ mas.c \ math.c \ multiply_and_acc.c \ mt19937.c \ resample.c \ sad8x8.c \ sum.c \ swab.c \ yuv.c libi386_amd64_la_CFLAGS = $(LIBOIL_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/i386_amd64/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/i386_amd64/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libi386_amd64.la: $(libi386_amd64_la_OBJECTS) $(libi386_amd64_la_DEPENDENCIES) $(libi386_amd64_la_LINK) $(libi386_amd64_la_OBJECTS) $(libi386_amd64_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_amd64_la-add2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_amd64_la-addc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_amd64_la-clamp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_amd64_la-convert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_amd64_la-copy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_amd64_la-idct8x8_i386.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_amd64_la-mas.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_amd64_la-math.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_amd64_la-mt19937.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_amd64_la-multiply_and_acc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_amd64_la-resample.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_amd64_la-sad8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_amd64_la-sum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_amd64_la-swab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libi386_amd64_la-yuv.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libi386_amd64_la-add2.lo: add2.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -MT libi386_amd64_la-add2.lo -MD -MP -MF $(DEPDIR)/libi386_amd64_la-add2.Tpo -c -o libi386_amd64_la-add2.lo `test -f 'add2.c' || echo '$(srcdir)/'`add2.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_amd64_la-add2.Tpo $(DEPDIR)/libi386_amd64_la-add2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='add2.c' object='libi386_amd64_la-add2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -c -o libi386_amd64_la-add2.lo `test -f 'add2.c' || echo '$(srcdir)/'`add2.c libi386_amd64_la-addc.lo: addc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -MT libi386_amd64_la-addc.lo -MD -MP -MF $(DEPDIR)/libi386_amd64_la-addc.Tpo -c -o libi386_amd64_la-addc.lo `test -f 'addc.c' || echo '$(srcdir)/'`addc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_amd64_la-addc.Tpo $(DEPDIR)/libi386_amd64_la-addc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='addc.c' object='libi386_amd64_la-addc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -c -o libi386_amd64_la-addc.lo `test -f 'addc.c' || echo '$(srcdir)/'`addc.c libi386_amd64_la-clamp.lo: clamp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -MT libi386_amd64_la-clamp.lo -MD -MP -MF $(DEPDIR)/libi386_amd64_la-clamp.Tpo -c -o libi386_amd64_la-clamp.lo `test -f 'clamp.c' || echo '$(srcdir)/'`clamp.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_amd64_la-clamp.Tpo $(DEPDIR)/libi386_amd64_la-clamp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clamp.c' object='libi386_amd64_la-clamp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -c -o libi386_amd64_la-clamp.lo `test -f 'clamp.c' || echo '$(srcdir)/'`clamp.c libi386_amd64_la-convert.lo: convert.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -MT libi386_amd64_la-convert.lo -MD -MP -MF $(DEPDIR)/libi386_amd64_la-convert.Tpo -c -o libi386_amd64_la-convert.lo `test -f 'convert.c' || echo '$(srcdir)/'`convert.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_amd64_la-convert.Tpo $(DEPDIR)/libi386_amd64_la-convert.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='convert.c' object='libi386_amd64_la-convert.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -c -o libi386_amd64_la-convert.lo `test -f 'convert.c' || echo '$(srcdir)/'`convert.c libi386_amd64_la-copy.lo: copy.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -MT libi386_amd64_la-copy.lo -MD -MP -MF $(DEPDIR)/libi386_amd64_la-copy.Tpo -c -o libi386_amd64_la-copy.lo `test -f 'copy.c' || echo '$(srcdir)/'`copy.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_amd64_la-copy.Tpo $(DEPDIR)/libi386_amd64_la-copy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy.c' object='libi386_amd64_la-copy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -c -o libi386_amd64_la-copy.lo `test -f 'copy.c' || echo '$(srcdir)/'`copy.c libi386_amd64_la-idct8x8_i386.lo: idct8x8_i386.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -MT libi386_amd64_la-idct8x8_i386.lo -MD -MP -MF $(DEPDIR)/libi386_amd64_la-idct8x8_i386.Tpo -c -o libi386_amd64_la-idct8x8_i386.lo `test -f 'idct8x8_i386.c' || echo '$(srcdir)/'`idct8x8_i386.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_amd64_la-idct8x8_i386.Tpo $(DEPDIR)/libi386_amd64_la-idct8x8_i386.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='idct8x8_i386.c' object='libi386_amd64_la-idct8x8_i386.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -c -o libi386_amd64_la-idct8x8_i386.lo `test -f 'idct8x8_i386.c' || echo '$(srcdir)/'`idct8x8_i386.c libi386_amd64_la-mas.lo: mas.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -MT libi386_amd64_la-mas.lo -MD -MP -MF $(DEPDIR)/libi386_amd64_la-mas.Tpo -c -o libi386_amd64_la-mas.lo `test -f 'mas.c' || echo '$(srcdir)/'`mas.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_amd64_la-mas.Tpo $(DEPDIR)/libi386_amd64_la-mas.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mas.c' object='libi386_amd64_la-mas.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -c -o libi386_amd64_la-mas.lo `test -f 'mas.c' || echo '$(srcdir)/'`mas.c libi386_amd64_la-math.lo: math.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -MT libi386_amd64_la-math.lo -MD -MP -MF $(DEPDIR)/libi386_amd64_la-math.Tpo -c -o libi386_amd64_la-math.lo `test -f 'math.c' || echo '$(srcdir)/'`math.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_amd64_la-math.Tpo $(DEPDIR)/libi386_amd64_la-math.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='math.c' object='libi386_amd64_la-math.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -c -o libi386_amd64_la-math.lo `test -f 'math.c' || echo '$(srcdir)/'`math.c libi386_amd64_la-multiply_and_acc.lo: multiply_and_acc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -MT libi386_amd64_la-multiply_and_acc.lo -MD -MP -MF $(DEPDIR)/libi386_amd64_la-multiply_and_acc.Tpo -c -o libi386_amd64_la-multiply_and_acc.lo `test -f 'multiply_and_acc.c' || echo '$(srcdir)/'`multiply_and_acc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_amd64_la-multiply_and_acc.Tpo $(DEPDIR)/libi386_amd64_la-multiply_and_acc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='multiply_and_acc.c' object='libi386_amd64_la-multiply_and_acc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -c -o libi386_amd64_la-multiply_and_acc.lo `test -f 'multiply_and_acc.c' || echo '$(srcdir)/'`multiply_and_acc.c libi386_amd64_la-mt19937.lo: mt19937.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -MT libi386_amd64_la-mt19937.lo -MD -MP -MF $(DEPDIR)/libi386_amd64_la-mt19937.Tpo -c -o libi386_amd64_la-mt19937.lo `test -f 'mt19937.c' || echo '$(srcdir)/'`mt19937.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_amd64_la-mt19937.Tpo $(DEPDIR)/libi386_amd64_la-mt19937.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mt19937.c' object='libi386_amd64_la-mt19937.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -c -o libi386_amd64_la-mt19937.lo `test -f 'mt19937.c' || echo '$(srcdir)/'`mt19937.c libi386_amd64_la-resample.lo: resample.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -MT libi386_amd64_la-resample.lo -MD -MP -MF $(DEPDIR)/libi386_amd64_la-resample.Tpo -c -o libi386_amd64_la-resample.lo `test -f 'resample.c' || echo '$(srcdir)/'`resample.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_amd64_la-resample.Tpo $(DEPDIR)/libi386_amd64_la-resample.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resample.c' object='libi386_amd64_la-resample.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -c -o libi386_amd64_la-resample.lo `test -f 'resample.c' || echo '$(srcdir)/'`resample.c libi386_amd64_la-sad8x8.lo: sad8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -MT libi386_amd64_la-sad8x8.lo -MD -MP -MF $(DEPDIR)/libi386_amd64_la-sad8x8.Tpo -c -o libi386_amd64_la-sad8x8.lo `test -f 'sad8x8.c' || echo '$(srcdir)/'`sad8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_amd64_la-sad8x8.Tpo $(DEPDIR)/libi386_amd64_la-sad8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sad8x8.c' object='libi386_amd64_la-sad8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -c -o libi386_amd64_la-sad8x8.lo `test -f 'sad8x8.c' || echo '$(srcdir)/'`sad8x8.c libi386_amd64_la-sum.lo: sum.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -MT libi386_amd64_la-sum.lo -MD -MP -MF $(DEPDIR)/libi386_amd64_la-sum.Tpo -c -o libi386_amd64_la-sum.lo `test -f 'sum.c' || echo '$(srcdir)/'`sum.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_amd64_la-sum.Tpo $(DEPDIR)/libi386_amd64_la-sum.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sum.c' object='libi386_amd64_la-sum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -c -o libi386_amd64_la-sum.lo `test -f 'sum.c' || echo '$(srcdir)/'`sum.c libi386_amd64_la-swab.lo: swab.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -MT libi386_amd64_la-swab.lo -MD -MP -MF $(DEPDIR)/libi386_amd64_la-swab.Tpo -c -o libi386_amd64_la-swab.lo `test -f 'swab.c' || echo '$(srcdir)/'`swab.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_amd64_la-swab.Tpo $(DEPDIR)/libi386_amd64_la-swab.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='swab.c' object='libi386_amd64_la-swab.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -c -o libi386_amd64_la-swab.lo `test -f 'swab.c' || echo '$(srcdir)/'`swab.c libi386_amd64_la-yuv.lo: yuv.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -MT libi386_amd64_la-yuv.lo -MD -MP -MF $(DEPDIR)/libi386_amd64_la-yuv.Tpo -c -o libi386_amd64_la-yuv.lo `test -f 'yuv.c' || echo '$(srcdir)/'`yuv.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libi386_amd64_la-yuv.Tpo $(DEPDIR)/libi386_amd64_la-yuv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='yuv.c' object='libi386_amd64_la-yuv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libi386_amd64_la_CFLAGS) $(CFLAGS) -c -o libi386_amd64_la-yuv.lo `test -f 'yuv.c' || echo '$(srcdir)/'`yuv.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/i386_amd64/copy.c0000644000175000017500000002413311131504056014050 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include static void copy_u8_i386_mmx (uint8_t *dest, uint8_t *src, int n) { ptrdiff_t i = 0; if (n&4) { *(uint32_t *)dest = *(uint32_t *)src; dest += 4; src += 4; n-=4; } while(n&0x7) { *dest++ = *src++; n--; } if (n) asm volatile ( "1:\n" " movq (%[src],%[i]), %%mm0\n" " movq %%mm0, (%[dest],%[i])\n" " add $8, %[i]\n" " decl %[n]\n" " jne 1b\n" " emms\n" : [dest] "+r" (dest), [src] "+r" (src), [i] "+r" (i) : [n] "c" (n>>3)); } OIL_DEFINE_IMPL_FULL (copy_u8_i386_mmx, copy_u8, OIL_IMPL_FLAG_MMX); static void copy_u8_mmx2 (uint8_t *dest, uint8_t *src, int n) { ptrdiff_t i = 0; while (n&0xc) { *(uint32_t *)dest = *(uint32_t *)src; dest += 4; src += 4; n-=4; } while(n&0xf) { *dest++ = *src++; n--; } if (n) asm volatile ( "1:\n" " movq (%[src],%[i]), %%mm0\n" " movq %%mm0, (%[dest],%[i])\n" " movq 8(%[src],%[i]), %%mm1\n" " movq %%mm1, 8(%[dest],%[i])\n" " add $16, %[i]\n" " decl %[n]\n" " jne 1b\n" " emms\n" : [dest] "+r" (dest), [src] "+r" (src), [i] "+r" (i) : [n] "c" (n>>4)); } OIL_DEFINE_IMPL_FULL (copy_u8_mmx2, copy_u8, OIL_IMPL_FLAG_MMX); #if 0 static void copy_u8_mmx3 (uint8_t *dest, uint8_t *src, int n) { /* make sure destination is cache-line aligned for output */ if (n < 64) { while (n>0) { *dest++ = *src++; n--; } return; } while (((unsigned long)dest) & 0x3) { *dest++ = *src++; n--; } while (((unsigned long)dest) & 0x3f) { *(uint32_t *)dest = *(uint32_t *)src; dest += 4; src += 4; n-=4; } if (n > 64) asm volatile ( " mov $0, %%eax\n" "1:\n" //" prefetchnta 128(%1,%%eax)\n" " movq (%1,%%eax), %%mm0\n" " movq 8(%1,%%eax), %%mm1\n" " movq 16(%1,%%eax), %%mm2\n" " movq 24(%1,%%eax), %%mm3\n" " movq 32(%1,%%eax), %%mm4\n" " movq 40(%1,%%eax), %%mm5\n" " movq 48(%1,%%eax), %%mm6\n" " movq 56(%1,%%eax), %%mm7\n" " movntq %%mm0, (%0,%%eax)\n" " movntq %%mm1, 8(%0,%%eax)\n" " movntq %%mm2, 16(%0,%%eax)\n" " movntq %%mm3, 24(%0,%%eax)\n" " movntq %%mm4, 32(%0,%%eax)\n" " movntq %%mm5, 40(%0,%%eax)\n" " movntq %%mm6, 48(%0,%%eax)\n" " movntq %%mm7, 56(%0,%%eax)\n" " add $64, %%eax\n" " decl %%ecx\n" " jne 1b\n" " sfence\n" " emms\n" : "+r" (dest), "+r" (src) : "c" (n>>6) : "eax"); dest += n&(~(0x3f)); src += n&(~(0x3f)); n &= 0x3f; while (n > 3) { *(uint32_t *)dest = *(uint32_t *)src; dest += 4; src += 4; n-=4; } while (n > 0) { *dest++ = *src++; n--; } } OIL_DEFINE_IMPL_FULL (copy_u8_mmx3, copy_u8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #endif #if 0 static void copy_u8_mmx4 (uint8_t *dest, uint8_t *src, int n) { /* make sure destination is cache-line aligned for output */ if (n < 32) { while (n>0) { *dest++ = *src++; n--; } return; } while (((unsigned long)dest) & 0x3) { *dest++ = *src++; n--; } while (((unsigned long)dest) & 0x1f) { *(uint32_t *)dest = *(uint32_t *)src; dest += 4; src += 4; n-=4; } if (n > 32) asm volatile ( " mov $0, %%eax\n" "1:\n" //" prefetchnta 128(%1,%%eax)\n" " movq (%1,%%eax), %%mm0\n" " movq 8(%1,%%eax), %%mm1\n" " movq 16(%1,%%eax), %%mm2\n" " movq 24(%1,%%eax), %%mm3\n" " movntq %%mm0, (%0,%%eax)\n" " movntq %%mm1, 8(%0,%%eax)\n" " movntq %%mm2, 16(%0,%%eax)\n" " movntq %%mm3, 24(%0,%%eax)\n" " add $32, %%eax\n" " decl %%ecx\n" " jne 1b\n" " sfence\n" " emms\n" : "+r" (dest), "+r" (src) : "c" (n>>5) : "eax"); dest += n&(~(0x1f)); src += n&(~(0x1f)); n &= 0x1f; while (n > 3) { *(uint32_t *)dest = *(uint32_t *)src; dest += 4; src += 4; n-=4; } while (n > 0) { *dest++ = *src++; n--; } } OIL_DEFINE_IMPL_FULL (copy_u8_mmx4, copy_u8, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_MMXEXT); #endif static void copy_u8_mmx5 (uint8_t *dest, uint8_t *src, int n) { ptrdiff_t i = 0; while (n&0xc) { *(uint32_t *)dest = *(uint32_t *)src; dest += 4; src += 4; n-=4; } while(n&0xf) { *dest++ = *src++; n--; } if (n) asm volatile ( "1:\n" " movq (%[src],%[i]), %%mm0\n" " movq 8(%[src],%[i]), %%mm1\n" " movq %%mm0, (%[dest],%[i])\n" " movq %%mm1, 8(%[dest],%[i])\n" " add $16, %[i]\n" " decl %[n]\n" " jne 1b\n" " emms\n" : [dest] "+r" (dest), [src] "+r" (src), [i] "+r" (i) : [n] "c" (n>>4)); } OIL_DEFINE_IMPL_FULL (copy_u8_mmx5, copy_u8, OIL_IMPL_FLAG_MMX); static void splat_u8_ns_i386_mmx (uint8_t *dest, const uint8_t *param, int n) { uint32_t p; while(n&7) { *dest = *param; dest++; n--; } if (n==0) return; n >>= 3; p = (*param<<24) | (*param<<16) | (*param<<8) | (*param); asm volatile ( " movd %2, %%mm0\n" " punpcklbw %%mm0, %%mm0\n" "1:\n" " movq %%mm0, (%0)\n" " add $8, %0\n" " decl %1\n" " jnz 1b\n" " emms\n" : "+r" (dest), "+r" (n), "+r" (p)); } OIL_DEFINE_IMPL_FULL (splat_u8_ns_i386_mmx, splat_u8_ns, OIL_IMPL_FLAG_MMX); static void splat_u8_ns_mmx2 (uint8_t *dest, const uint8_t *param, int n) { uint32_t p; while(n&15) { *dest = *param; dest++; n--; } if (n==0) return; n >>= 4; p = (*param<<24) | (*param<<16) | (*param<<8) | (*param); asm volatile ( " movd %2, %%mm0\n" " punpcklbw %%mm0, %%mm0\n" "1:\n" " movq %%mm0, (%0)\n" " movq %%mm0, 8(%0)\n" " add $16, %0\n" " decl %1\n" " jnz 1b\n" " emms\n" : "+r" (dest), "+r" (n), "+r" (p)); } OIL_DEFINE_IMPL_FULL(splat_u8_ns_mmx2, splat_u8_ns, OIL_IMPL_FLAG_MMX); static void splat_u8_ns_mmx2a (uint8_t *dest, const uint8_t *param, int n) { uint32_t p; ptrdiff_t tmp; p = *param; p |= p<<8; p |= p<<16; if (n<16) { while(n>0) { *dest = *param; dest++; n--; } return; } asm volatile ( " movd %2, %%mm0\n" " punpcklbw %%mm0, %%mm0\n" " movq %%mm0, (%0)\n" " movq %%mm0, 8(%0)\n" #ifdef __i386__ " mov %1, %[tmp]\n" #elif defined(__amd64__) /* ugh this is gross */ " mov %1, %%eax\n" " cltq\n" #else #error #endif " and $0xf, %[tmp]\n" " add %[tmp], %0\n" " shr $4, %1\n" "1:\n" " movq %%mm0, (%0)\n" " movq %%mm0, 8(%0)\n" " add $16, %0\n" " decl %1\n" " jnz 1b\n" " emms\n" : "+r" (dest), "+r" (n), "+r" (p), [tmp] "=a" (tmp) : ); } OIL_DEFINE_IMPL_FULL(splat_u8_ns_mmx2a, splat_u8_ns, OIL_IMPL_FLAG_MMX); static void splat_u16_ns_mmx (uint16_t *dest, const uint16_t *src, int n) { while(n&3) { *dest = *src; dest++; n--; } if (n==0) return; n >>= 2; asm volatile ( " movzwl 0(%[src]), %%ecx\n" " movd %%ecx, %%mm0\n" " pshufw $00, %%mm0, %%mm0\n" "1:\n" " movq %%mm0, (%[dest])\n" " add $8, %0\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [dest] "+r" (dest), [n] "+r" (n) : [src] "r" (src) : "ecx"); } OIL_DEFINE_IMPL_FULL (splat_u16_ns_mmx, splat_u16_ns, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); static void splat_u16_ns_mmx_2 (uint16_t *dest, const uint16_t *src, int n) { while(n&7) { *dest = *src; dest++; n--; } if (n==0) return; n >>= 3; asm volatile ( " movzwl 0(%[src]), %%ecx\n" " movd %%ecx, %%mm0\n" " pshufw $00, %%mm0, %%mm0\n" "1:\n" " movq %%mm0, 0(%[dest])\n" " movq %%mm0, 8(%[dest])\n" " add $16, %0\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [dest] "+r" (dest), [n] "+r" (n) : [src] "r" (src) : "ecx"); } OIL_DEFINE_IMPL_FULL (splat_u16_ns_mmx_2, splat_u16_ns, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); static void splat_u16_ns_mmx_3 (uint16_t *dest, const uint16_t *src, int n) { while(n&15) { *dest = *src; dest++; n--; } if (n==0) return; n >>= 4; asm volatile ( " movzwl 0(%[src]), %%ecx\n" " movd %%ecx, %%mm0\n" " pshufw $00, %%mm0, %%mm0\n" "1:\n" " movq %%mm0, 0(%[dest])\n" " movq %%mm0, 8(%[dest])\n" " movq %%mm0, 16(%[dest])\n" " movq %%mm0, 24(%[dest])\n" " add $32, %0\n" " decl %[n]\n" " jnz 1b\n" " emms\n" : [dest] "+r" (dest), [n] "+r" (n) : [src] "r" (src) : "ecx"); } OIL_DEFINE_IMPL_FULL (splat_u16_ns_mmx_3, splat_u16_ns, OIL_IMPL_FLAG_MMX|OIL_IMPL_FLAG_MMXEXT); liboil-0.3.17/liboil/md5/0000777000175000017500000000000011332637375012032 500000000000000liboil-0.3.17/liboil/md5/Makefile.am0000644000175000017500000000062610717203073013774 00000000000000 if USE_ALT_OPT opt_libs = libmd5_opt.la else opt_libs = endif noinst_LTLIBRARIES = libmd5.la $(opt_libs) noinst_HEADERS = md5.h c_sources = md5.c libmd5_la_SOURCES = \ $(c_sources) $(i386_sources) $(powerpc_sources) $(amd64_sources) libmd5_la_LIBADD = $(opt_libs) libmd5_la_CFLAGS = $(LIBOIL_CFLAGS) libmd5_opt_la_SOURCES = $(c_sources) libmd5_opt_la_CFLAGS = $(LIBOIL_CFLAGS) $(LIBOIL_OPT_CFLAGS) liboil-0.3.17/liboil/md5/md5.c0000644000175000017500000001351610717203073012573 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "md5.h" /** * oil_md5: * @i_4: * @s_16: * * Performs an MD5 checksum iteration. The iteration operates on * the 64 bytes contained in @s_16, and changes the hash contained * in @i_4. This only implements a portion of the MD5 algorithm. * The full MD5 algorithm requires initializing the hash * with a specific value and additional handling of bytes at the * end of the stream. * * See also the md5 example in the Liboil source code. * * FIXME: need a reference here */ OIL_DEFINE_CLASS (md5, "uint32_t *i_4, uint32_t *s_16"); #ifdef WORDS_BIGENDIAN #define uint32_to_host(a) \ ((((a)&0xff)<<24)|(((a)&0xff00)<<8)|(((a)&0xff0000)>>8)|(((a)>>24)&0xff)) #else #define uint32_to_host(a) (a) #endif #define F1(x, y, z) (z ^ (x & (y ^ z))) #define F2(x, y, z) F1(z, x, y) #define F3(x, y, z) (x ^ y ^ z) #define F4(x, y, z) (y ^ (x | ~z)) #define MD5STEP(f,w,x,y,z,in,offset,s) \ (w += f(x,y,z) + uint32_to_host(in) + offset, w = (w<>(32-s)) + x) static void md5_c(uint32_t *state, uint32_t *src) { uint32_t a,b,c,d; a = state[0]; b = state[1]; c = state[2]; d = state[3]; MD5STEP(F1, a, b, c, d, src[0], 0xd76aa478, 7); MD5STEP(F1, d, a, b, c, src[1], 0xe8c7b756, 12); MD5STEP(F1, c, d, a, b, src[2], 0x242070db, 17); MD5STEP(F1, b, c, d, a, src[3], 0xc1bdceee, 22); MD5STEP(F1, a, b, c, d, src[4], 0xf57c0faf, 7); MD5STEP(F1, d, a, b, c, src[5], 0x4787c62a, 12); MD5STEP(F1, c, d, a, b, src[6], 0xa8304613, 17); MD5STEP(F1, b, c, d, a, src[7], 0xfd469501, 22); MD5STEP(F1, a, b, c, d, src[8], 0x698098d8, 7); MD5STEP(F1, d, a, b, c, src[9], 0x8b44f7af, 12); MD5STEP(F1, c, d, a, b, src[10], 0xffff5bb1, 17); MD5STEP(F1, b, c, d, a, src[11], 0x895cd7be, 22); MD5STEP(F1, a, b, c, d, src[12], 0x6b901122, 7); MD5STEP(F1, d, a, b, c, src[13], 0xfd987193, 12); MD5STEP(F1, c, d, a, b, src[14], 0xa679438e, 17); MD5STEP(F1, b, c, d, a, src[15], 0x49b40821, 22); MD5STEP(F2, a, b, c, d, src[1], 0xf61e2562, 5); MD5STEP(F2, d, a, b, c, src[6], 0xc040b340, 9); MD5STEP(F2, c, d, a, b, src[11], 0x265e5a51, 14); MD5STEP(F2, b, c, d, a, src[0], 0xe9b6c7aa, 20); MD5STEP(F2, a, b, c, d, src[5], 0xd62f105d, 5); MD5STEP(F2, d, a, b, c, src[10], 0x02441453, 9); MD5STEP(F2, c, d, a, b, src[15], 0xd8a1e681, 14); MD5STEP(F2, b, c, d, a, src[4], 0xe7d3fbc8, 20); MD5STEP(F2, a, b, c, d, src[9], 0x21e1cde6, 5); MD5STEP(F2, d, a, b, c, src[14], 0xc33707d6, 9); MD5STEP(F2, c, d, a, b, src[3], 0xf4d50d87, 14); MD5STEP(F2, b, c, d, a, src[8], 0x455a14ed, 20); MD5STEP(F2, a, b, c, d, src[13], 0xa9e3e905, 5); MD5STEP(F2, d, a, b, c, src[2], 0xfcefa3f8, 9); MD5STEP(F2, c, d, a, b, src[7], 0x676f02d9, 14); MD5STEP(F2, b, c, d, a, src[12], 0x8d2a4c8a, 20); MD5STEP(F3, a, b, c, d, src[5], 0xfffa3942, 4); MD5STEP(F3, d, a, b, c, src[8], 0x8771f681, 11); MD5STEP(F3, c, d, a, b, src[11], 0x6d9d6122, 16); MD5STEP(F3, b, c, d, a, src[14], 0xfde5380c, 23); MD5STEP(F3, a, b, c, d, src[1], 0xa4beea44, 4); MD5STEP(F3, d, a, b, c, src[4], 0x4bdecfa9, 11); MD5STEP(F3, c, d, a, b, src[7], 0xf6bb4b60, 16); MD5STEP(F3, b, c, d, a, src[10], 0xbebfbc70, 23); MD5STEP(F3, a, b, c, d, src[13], 0x289b7ec6, 4); MD5STEP(F3, d, a, b, c, src[0], 0xeaa127fa, 11); MD5STEP(F3, c, d, a, b, src[3], 0xd4ef3085, 16); MD5STEP(F3, b, c, d, a, src[6], 0x04881d05, 23); MD5STEP(F3, a, b, c, d, src[9], 0xd9d4d039, 4); MD5STEP(F3, d, a, b, c, src[12], 0xe6db99e5, 11); MD5STEP(F3, c, d, a, b, src[15], 0x1fa27cf8, 16); MD5STEP(F3, b, c, d, a, src[2], 0xc4ac5665, 23); MD5STEP(F4, a, b, c, d, src[0], 0xf4292244, 6); MD5STEP(F4, d, a, b, c, src[7], 0x432aff97, 10); MD5STEP(F4, c, d, a, b, src[14], 0xab9423a7, 15); MD5STEP(F4, b, c, d, a, src[5], 0xfc93a039, 21); MD5STEP(F4, a, b, c, d, src[12], 0x655b59c3, 6); MD5STEP(F4, d, a, b, c, src[3], 0x8f0ccc92, 10); MD5STEP(F4, c, d, a, b, src[10], 0xffeff47d, 15); MD5STEP(F4, b, c, d, a, src[1], 0x85845dd1, 21); MD5STEP(F4, a, b, c, d, src[8], 0x6fa87e4f, 6); MD5STEP(F4, d, a, b, c, src[15], 0xfe2ce6e0, 10); MD5STEP(F4, c, d, a, b, src[6], 0xa3014314, 15); MD5STEP(F4, b, c, d, a, src[13], 0x4e0811a1, 21); MD5STEP(F4, a, b, c, d, src[4], 0xf7537e82, 6); MD5STEP(F4, d, a, b, c, src[11], 0xbd3af235, 10); MD5STEP(F4, c, d, a, b, src[2], 0x2ad7d2bb, 15); MD5STEP(F4, b, c, d, a, src[9], 0xeb86d391, 21); state[0] += a; state[1] += b; state[2] += c; state[3] += d; } OIL_DEFINE_IMPL_REF (md5_c, md5); liboil-0.3.17/liboil/md5/md5.h0000644000175000017500000000274010717203073012575 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_MD5_H_ #define _LIBOIL_MD5_H_ #include OIL_DECLARE_CLASS(md5); #endif liboil-0.3.17/liboil/md5/Makefile.in0000644000175000017500000004403611332627672014021 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = liboil/md5 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @USE_ALT_OPT_TRUE@am__DEPENDENCIES_1 = libmd5_opt.la libmd5_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__objects_1 = libmd5_la-md5.lo am_libmd5_la_OBJECTS = $(am__objects_1) libmd5_la_OBJECTS = $(am_libmd5_la_OBJECTS) libmd5_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmd5_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ libmd5_opt_la_LIBADD = am__objects_2 = libmd5_opt_la-md5.lo am_libmd5_opt_la_OBJECTS = $(am__objects_2) libmd5_opt_la_OBJECTS = $(am_libmd5_opt_la_OBJECTS) libmd5_opt_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmd5_opt_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_ALT_OPT_TRUE@am_libmd5_opt_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libmd5_la_SOURCES) $(libmd5_opt_la_SOURCES) DIST_SOURCES = $(libmd5_la_SOURCES) $(libmd5_opt_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @USE_ALT_OPT_FALSE@opt_libs = @USE_ALT_OPT_TRUE@opt_libs = libmd5_opt.la noinst_LTLIBRARIES = libmd5.la $(opt_libs) noinst_HEADERS = md5.h c_sources = md5.c libmd5_la_SOURCES = \ $(c_sources) $(i386_sources) $(powerpc_sources) $(amd64_sources) libmd5_la_LIBADD = $(opt_libs) libmd5_la_CFLAGS = $(LIBOIL_CFLAGS) libmd5_opt_la_SOURCES = $(c_sources) libmd5_opt_la_CFLAGS = $(LIBOIL_CFLAGS) $(LIBOIL_OPT_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/md5/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/md5/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmd5.la: $(libmd5_la_OBJECTS) $(libmd5_la_DEPENDENCIES) $(libmd5_la_LINK) $(libmd5_la_OBJECTS) $(libmd5_la_LIBADD) $(LIBS) libmd5_opt.la: $(libmd5_opt_la_OBJECTS) $(libmd5_opt_la_DEPENDENCIES) $(libmd5_opt_la_LINK) $(am_libmd5_opt_la_rpath) $(libmd5_opt_la_OBJECTS) $(libmd5_opt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmd5_la-md5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmd5_opt_la-md5.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libmd5_la-md5.lo: md5.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmd5_la_CFLAGS) $(CFLAGS) -MT libmd5_la-md5.lo -MD -MP -MF $(DEPDIR)/libmd5_la-md5.Tpo -c -o libmd5_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmd5_la-md5.Tpo $(DEPDIR)/libmd5_la-md5.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='md5.c' object='libmd5_la-md5.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmd5_la_CFLAGS) $(CFLAGS) -c -o libmd5_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c libmd5_opt_la-md5.lo: md5.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmd5_opt_la_CFLAGS) $(CFLAGS) -MT libmd5_opt_la-md5.lo -MD -MP -MF $(DEPDIR)/libmd5_opt_la-md5.Tpo -c -o libmd5_opt_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmd5_opt_la-md5.Tpo $(DEPDIR)/libmd5_opt_la-md5.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='md5.c' object='libmd5_opt_la-md5.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmd5_opt_la_CFLAGS) $(CFLAGS) -c -o libmd5_opt_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/liboilcpu-powerpc.c0000644000175000017500000001163111151571222015051 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #if defined(__linux__) #include #include #include #include #include #include #ifndef PPC_FEATURE_HAS_ALTIVEC /* From linux-2.6/include/asm-powerpc/cputable.h */ #define PPC_FEATURE_HAS_ALTIVEC 0x10000000 #endif #endif #if defined(__APPLE__) #include #include #endif #if defined(__FreeBSD__) #include #include #endif #if defined(__OpenBSD__) #include #include #include #endif /***** powerpc *****/ static unsigned long oil_profile_stamp_tb(void) { unsigned long ts; __asm__ __volatile__("mftb %0\n" : "=r" (ts)); return ts; } #if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__OpenBSD__) && !defined(__APPLE__) && !defined(__linux__) static void test_altivec (void * ignored) { asm volatile ("vor v0, v0, v0\n"); } #endif #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) static void oil_check_altivec_sysctl_freebsd (void) { int ret, av; size_t len; len = sizeof(av); ret = sysctlbyname("hw.altivec", &av, &len, NULL, 0); if (!ret && av) { oil_cpu_flags |= OIL_IMPL_FLAG_ALTIVEC; } } #endif #if defined(__OpenBSD__) static void oil_check_altivec_sysctl_openbsd (void) { int mib[2], av, ret; size_t len; mib[0] = CTL_MACHDEP; mib[1] = CPU_ALTIVEC; len = sizeof(av); ret = sysctl(mib, 2, &av, &len, NULL, 0); if (!ret && av) { oil_cpu_flags |= OIL_IMPL_FLAG_ALTIVEC; } } #endif #if defined(__APPLE__) static void oil_check_altivec_sysctl_darwin (void) { int ret, vu; size_t len; len = sizeof(vu); ret = sysctlbyname("hw.vectorunit", &vu, &len, NULL, 0); if (!ret && vu) { oil_cpu_flags |= OIL_IMPL_FLAG_ALTIVEC; } } #endif #if defined(__linux__) static void oil_check_altivec_proc_auxv (void) { static int available = -1; int new_avail = 0; unsigned long buf[64]; ssize_t count; int fd, i; /* Flags already set */ if (available != -1) { return; } fd = open("/proc/self/auxv", O_RDONLY); if (fd < 0) { goto out; } more: count = read(fd, buf, sizeof(buf)); if (count < 0) { goto out_close; } for (i=0; i < (count / sizeof(unsigned long)); i += 2) { if (buf[i] == AT_HWCAP) { new_avail = !!(buf[i+1] & PPC_FEATURE_HAS_ALTIVEC); goto out_close; } else if (buf[i] == AT_NULL) { goto out_close; } } if (count == sizeof(buf)) { goto more; } out_close: close(fd); out: available = new_avail; if (available) { oil_cpu_flags |= OIL_IMPL_FLAG_ALTIVEC; } } #endif #if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__OpenBSD__) && !defined(__APPLE__) && !defined(__linux__) static void oil_check_altivec_fault (void) { oil_fault_check_enable (); if (oil_fault_check_try(test_altivec, NULL)) { OIL_DEBUG ("cpu flag altivec"); oil_cpu_flags |= OIL_IMPL_FLAG_ALTIVEC; } oil_fault_check_disable (); } #endif void oil_cpu_detect_arch(void) { #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) oil_check_altivec_sysctl_freebsd(); #elif defined(__OpenBSD__) oil_check_altivec_sysctl_openbsd(); #elif defined(__APPLE__) oil_check_altivec_sysctl_darwin(); #elif defined(__linux__) oil_check_altivec_proc_auxv(); #else oil_check_altivec_fault(); #endif _oil_profile_stamp = oil_profile_stamp_tb; } liboil-0.3.17/liboil/liboilfunction.h0000644000175000017500000002374011151567413014452 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_FUNCTION_H_ #define _LIBOIL_FUNCTION_H_ #include #include /** * OIL_CHECK_PROTOTYPE: * @a: * * Macro used internally to implement the --enable-prototype-checking * configure option. */ #ifdef LIBOIL_STRICT_PROTOTYPES #include #define OIL_CHECK_PROTOTYPE(a) a #else #define OIL_CHECK_PROTOTYPE(a) #endif OIL_BEGIN_DECLS /** * OilImplFlag: * * Implementation flags. * * @OIL_IMPL_FLAG_REF: is the reference implementation for the class. * * @OIL_IMPL_FLAG_OPT: was compiled with alternate CFLAGS as specified * by --enable-alternate-optimization. * * @OIL_IMPL_FLAG_ASM: is written in assembly code. * * @OIL_IMPL_FLAG_DISABLED: is disabled. This can be set either in the * source code or during library initialization. * * @OIL_IMPL_FLAG_CMOV: uses the i386 instruction cmov or its variants. * * @OIL_IMPL_FLAG_MMX: uses MMX instructions. * * @OIL_IMPL_FLAG_SSE: uses SSE instructions. * * @OIL_IMPL_FLAG_MMXEXT: uses AMD's extended MMX instructions. These * are a subset of what Intel calls SSE2. If an implementation uses * only AMD's extended MMX instructions, it should set this flag, and * not @OIL_IMPL_FLAG_SSE2. * * @OIL_IMPL_FLAG_SSE2: uses SSE2 instructions. This flag implies * @OIL_IMPL_FLAG_SSE and @OIL_IMPL_FLAG_MMXEXT. * * @OIL_IMPL_FLAG_3DNOW: uses 3DNow! instructions. * * @OIL_IMPL_FLAG_3DNOWEXT: uses extended 3DNow! instructions. * * @OIL_IMPL_FLAG_SSE3: uses SSE3 instructions. This flag implies * @OIL_IMPL_FLAG_SSE2. * * @OIL_IMPL_FLAG_SSSE3: uses SSSE3 instructions. This flag implies * @OIL_IMPL_FLAG_SSE3. * * @OIL_IMPL_FLAG_ALTIVEC: uses Altivec instructions. * */ typedef enum { OIL_IMPL_FLAG_REF = (1<<0), OIL_IMPL_FLAG_OPT = (1<<1), OIL_IMPL_FLAG_ASM = (1<<2), OIL_IMPL_FLAG_DISABLED = (1<<3), OIL_IMPL_FLAG_CMOV = (1<<16), OIL_IMPL_FLAG_MMX = (1<<17), OIL_IMPL_FLAG_SSE = (1<<18), OIL_IMPL_FLAG_MMXEXT = (1<<19), OIL_IMPL_FLAG_SSE2 = (1<<20), OIL_IMPL_FLAG_3DNOW = (1<<21), OIL_IMPL_FLAG_3DNOWEXT = (1<<22), OIL_IMPL_FLAG_SSE3 = (1<<23), OIL_IMPL_FLAG_ALTIVEC = (1<<24), OIL_IMPL_FLAG_EDSP = (1<<25), OIL_IMPL_FLAG_ARM6 = (1<<26), OIL_IMPL_FLAG_VFP = (1<<27), OIL_IMPL_FLAG_SSSE3 = (1<<28) } OilImplFlag; #ifdef OIL_ENABLE_UNSTABLE_API /** * OIL_OPT_MANGLE: * * Used internally to implement the --enable-alternate-optimizations * configure option. */ /** * OIL_OPT_FLAG_MANGLE: * * Used internally to implement the --enable-alternate-optimizations * configure option. */ /** * OIL_NO_CLASSES: * * Used internally to implement the --enable-alternate-optimizations * configure option. */ /** * OIL_OPT_SUFFIX: * * Used internally to implement the --enable-alternate-optimizations * configure option. */ #ifndef OIL_OPT_MANGLE #define OIL_OPT_MANGLE(a) a #define OIL_OPT_FLAG_MANGLE(a) a #else #define OIL_NO_CLASSES #define OIL_OPT_FLAG_MANGLE(a) (((a)&(~OIL_IMPL_FLAG_REF)) | OIL_IMPL_FLAG_OPT) #endif #ifndef OIL_OPT_SUFFIX #define OIL_OPT_SUFFIX #endif /** * OilFunctionClass: * * An opaque structure representing a function class. * */ struct _OilFunctionClass { /*< private >*/ void (*func)(void); const char *name; const char *desc; OilTestFunction test_func; OilFunctionImpl *first_impl; OilFunctionImpl *reference_impl; OilFunctionImpl *chosen_impl; const char *prototype; }; /** * OilFunctionImpl: * * An opaque structure representing a function implementation. * */ struct _OilFunctionImpl { /*< private >*/ void *next; OilFunctionClass *klass; void (*func)(void); unsigned int flags; const char *name; double profile_ave; double profile_std; }; /** * OIL_GET: * @ptr: * @offset: * @type: * * Offsets @ptr by @offset number of bytes, and dereferences it * as type @type. Note that the offset is in bytes, and not in * the size of the pointer type. */ #define OIL_GET(ptr, offset, type) (*(type *)((uint8_t *)(ptr) + (offset)) ) /** * OIL_OFFSET: * @ptr: * @offset: * * Add @offset bytes to the pointer @ptr. */ #define OIL_OFFSET(ptr, offset) ((void *)((uint8_t *)(ptr) + (offset)) ) /** * OIL_INCREMENT: * @ptr: * @offset: * * Increments the pointer @ptr by @offset number of bytes. */ #define OIL_INCREMENT(ptr, offset) (ptr = (void *)((uint8_t *)ptr + (offset)) ) /** * OIL_CPU_FLAG_MASK: * * Mask describing which bits in #OilImplFlag depend on the current * CPU. */ #define OIL_CPU_FLAG_MASK 0xffff0000 /** * OIL_DECLARE_CLASS: * @klass: the name of a function class (without the oil_ prefix) * * Declares the Liboil function class @klass. */ #define OIL_DECLARE_CLASS(klass) \ extern OilFunctionClass _oil_function_class_ ## klass /** * SECTION:liboilmacros * @title: Macros * @short_description: Macros */ #ifndef OIL_NO_CLASSES /** * OIL_DEFINE_CLASS_FULL: * @klass: name of class to declare (without oil_ prefix) * @string: prototype of class * @test: test function * * Defines a #OilFunctionClass structure for @klass. Classes * defined this way will be automatically at Liboil initialization * time. */ #define OIL_DEFINE_CLASS_FULL(klass, string, test) \ OilFunctionClass _oil_function_class_ ## klass = { \ NULL, \ #klass , \ NULL, \ test, \ NULL, \ NULL, \ NULL, \ string \ }; \ OilFunctionClass *oil_function_class_ptr_ ## klass = \ &_oil_function_class_ ## klass #else #define OIL_DEFINE_CLASS_FULL(klass, string, test) \ OIL_DECLARE_CLASS(klass) #endif /** * OIL_DEFINE_CLASS: * @klass: name of class to declare (without oil_ prefix) * @string: prototype of class * * Defines a #OilFunctionClass structure for @klass. Classes * defined this way will be automatically at Liboil initialization * time. */ #define OIL_DEFINE_CLASS(klass, string) \ OIL_DEFINE_CLASS_FULL (klass, string, NULL) /** * OIL_DEFINE_IMPL_FULL: * @function: name of function * @klass: name of class to declare (without oil_ prefix) * @flags: implementation flags and CPU requirements * * Defines a #OilFunctionImpl structure for the function @function * and class @klass. CPU-dependent flags in @flags will indicate * that this implementation requires the given CPU flags. */ #define OIL_DEFINE_IMPL_FULL(function,klass,flags) \ OilFunctionImpl OIL_OPT_MANGLE(_oil_function_impl_ ## function) = { \ NULL, \ &_oil_function_class_ ## klass , \ (void (*)(void)) function, \ OIL_OPT_FLAG_MANGLE(flags), \ #function OIL_OPT_SUFFIX \ } \ OIL_CHECK_PROTOTYPE(;_oil_type_ ## klass _ignore_me_ ## function = function) /** * OIL_DEFINE_IMPL: * @function: name of function * @klass: name of class to declare (without oil_ prefix) * * Shorthand for defining a C implementation. See OIL_DEFINE_IMPL_FULL(). */ #define OIL_DEFINE_IMPL(function,klass) \ OIL_DEFINE_IMPL_FULL(function,klass,0) /** * OIL_DEFINE_IMPL_REF: * @function: name of function * @klass: name of class to declare (without oil_ prefix) * * Shorthand for defining a reference implementation. See OIL_DEFINE_IMPL_FULL(). */ #define OIL_DEFINE_IMPL_REF(function,klass) \ OIL_DEFINE_IMPL_FULL(function,klass,OIL_IMPL_FLAG_REF) /** * OIL_DEFINE_IMPL_ASM: * @function: name of function * @klass: name of class to declare (without oil_ prefix) * * Shorthand for defining an implementation written in inline * assembly code. See OIL_DEFINE_IMPL_FULL(). */ #define OIL_DEFINE_IMPL_ASM(function,klass) \ OIL_DEFINE_IMPL_FULL(function,klass,OIL_IMPL_FLAG_ASM) /** * OIL_DEFINE_IMPL_DEPENDS * @function: name of function * @klass: name of class to declare (without oil_ prefix) * @...: other classes this implementation uses * * Shorthand for defining an implementation that uses another Liboil * function class. This is not currently used. See * OIL_DEFINE_IMPL_FULL(). */ #define OIL_DEFINE_IMPL_DEPENDS(function,klass,...) \ OIL_DEFINE_IMPL_FULL(function,klass,0) void oil_optimize_all (void); void oil_optimize (const char *class_name); OilFunctionClass * oil_class_get_by_index (int i); OilFunctionClass *oil_class_get (const char *class_name); void oil_class_optimize (OilFunctionClass *klass); int oil_class_get_n_classes (void); OilFunctionImpl * oil_impl_get_by_index (int i); int oil_impl_is_runnable (OilFunctionImpl *impl); int oil_impl_is_usable (OilFunctionImpl *impl); void oil_class_choose_by_name (OilFunctionClass * klass, const char *name); void oil_class_register_impl_full (OilFunctionClass * klass, void (*func)(void), const char *name, unsigned int flags); void oil_class_register_impl (OilFunctionClass * klass, OilFunctionImpl *impl); void oil_class_register_impl_by_name (const char *klass_name, OilFunctionImpl *impl); void oil_init_no_optimize(void); #endif OIL_END_DECLS #endif liboil-0.3.17/liboil/dct/0000777000175000017500000000000011332637375012117 500000000000000liboil-0.3.17/liboil/dct/fdct8x8_f64.c0000644000175000017500000000750310717203073014141 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include /** * oil_fdct8x8_f64: * @d_8x8: * @dstr: * @s_8x8: * @sstr: * * Performs a 2-D Forward Discrete Cosine Transform on @s_8x8 and places * the result in @d_8x8. */ OIL_DEFINE_CLASS(fdct8x8_f64, "double *d_8x8, int dstr, double *s_8x8, int sstr"); static void fdct8x8_f64_ref(double *dest, int dstr, const double *src, int sstr) { static double fdct_coeff[8][8]; static int fdct_coeff_init = 0; int i,j,k,l; double tmp1,tmp2; if(!fdct_coeff_init){ double scale; for(i=0;i<8;i++){ scale = (i==0) ? sqrt(0.125) : 0.5; for(j=0;j<8;j++){ fdct_coeff[j][i] = scale * cos((M_PI/8)*i*(j+0.5)); } } fdct_coeff_init = 1; } for(i=0;i<8;i++){ for(j=0;j<8;j++){ tmp1 = 0; for(k=0;k<8;k++){ tmp2 = 0; for(l=0;l<8;l++){ tmp2 += fdct_coeff[l][j] * OIL_GET (src, sstr*k + l * sizeof(double), double); } tmp1 += fdct_coeff[k][i] * tmp2; } OIL_GET (dest, dstr*i + j*sizeof(double), double) = tmp1; } } } OIL_DEFINE_IMPL_REF (fdct8x8_f64_ref, fdct8x8_f64); static void fdct8x8_f64_ref2(double *dest, int dstr, const double *src, int sstr) { static double fdct_coeff[8][8]; static int fdct_coeff_init = 0; int i,j,k; double x; double tmp[64]; if(!fdct_coeff_init){ double scale; for(i=0;i<8;i++){ scale = (i==0) ? sqrt(0.125) : 0.5; for(j=0;j<8;j++){ fdct_coeff[j][i] = scale * cos((M_PI/8)*i*(j+0.5)); } } fdct_coeff_init = 1; } for(i=0;i<8;i++){ for(j=0;j<8;j++){ x = 0; for(k=0;k<8;k++){ x += fdct_coeff[k][j] * OIL_GET (src, sstr*i + k * sizeof(double), double); } tmp[8*i+j] = x; } } for(j=0;j<8;j++){ for(i=0;i<8;i++){ x = 0; for(k=0;k<8;k++){ x += fdct_coeff[k][i] * tmp[8*k + j]; } OIL_GET (dest,dstr*i+j*sizeof(double), double) = x; } } } OIL_DEFINE_IMPL (fdct8x8_f64_ref2, fdct8x8_f64); #ifdef oil_fdct8_f64 static void fdct8x8_f64_1d (double *dest, int dstr, const double *src, int sstr) { int i; double tmp[64]; for(i=0;i<8;i++){ oil_fdct8_f64(tmp + i*8, OIL_OFFSET(src,sstr*i), sizeof (double), sizeof(double)); } for(i=0;i<8;i++){ oil_fdct8_f64(dest + i, tmp + i, dstr, 8*sizeof(double)); } } OIL_DEFINE_IMPL (fdct8x8_f64_1d, fdct8x8_f64); #endif liboil-0.3.17/liboil/dct/dct12_f32.c0000644000175000017500000000711010717203073013553 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_mdct12_f64: * @d_6: * @s_12: * * Performs a Modified Discrete Cosine Transform (MDCT) * on the source array @s_12 and places the result in @d_6. */ OIL_DEFINE_CLASS (mdct12_f64, "double *d_6, double *s_12"); /** * oil_imdct12_f64: * @d_12: * @s_6: * * Performs a Inverse Modified Discrete Cosine Transform (IMDCT) * on the source array @s_6 and places the result in @d_12. */ OIL_DEFINE_CLASS (imdct12_f64, "double *d_12, double *s_6"); /** * oil_mdct36_f64: * @d_18: * @s_36: * * Performs a Modified Discrete Cosine Transform (MDCT) * on the source array @s_36 and places the result in @d_18. */ OIL_DEFINE_CLASS (mdct36_f64, "double *d_18, double *s_36"); /** * oil_imdct36_f64: * @d_36: * @s_18: * * Performs a Inverse Modified Discrete Cosine Transform (IMDCT) * on the source array @s_18 and places the result in @d_36. */ OIL_DEFINE_CLASS (imdct36_f64, "double *d_36, double *s_18"); static void mdct12_f64_ref(double *dest, const double *src) { int j, k; double x; int N = 6; for(j=0;j * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /******************************************************************** * * * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2003 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: last mod: $Id: fdct8x8theora.c,v 1.3 2005-12-16 17:30:40 ds Exp $ ********************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include static int32_t xC1S7 = 64277; static int32_t xC2S6 = 60547; static int32_t xC3S5 = 54491; static int32_t xC4S4 = 46341; static int32_t xC5S3 = 36410; static int32_t xC6S2 = 25080; static int32_t xC7S1 = 12785; #define SIGNBITDUPPED(X) ((signed )(((X) & 0x80000000)) >> 31) #define DOROUND(X) ( (SIGNBITDUPPED(X) & (0xffff)) + (X) ) /** * oil_fdct8x8theora: * @s_8x8: * @d_8x8: * * Calculates the FDCT transformation of @s_8x8 according to the Theora * specification and places the result in @d_8x8. * * Note that the source and destination arrays are reversed compared * to normal Liboil order. */ OIL_DEFINE_CLASS(fdct8x8theora, "int16_t *s_8x8, int16_t *d_8x8"); static void fdct8x8theora_ref(const int16_t *src, int16_t *dest) { int loop; int32_t is07, is12, is34, is56; int32_t is0734, is1256; int32_t id07, id12, id34, id56; int32_t irot_input_x, irot_input_y; int32_t icommon_product1; /* Re-used product (c4s4 * (s12 - s56)). */ int32_t icommon_product2; /* Re-used product (c4s4 * (d12 + d56)). */ int32_t temp1, temp2; /* intermediate variable for computation */ int32_t InterData[64]; int32_t *ip = InterData; int16_t * op = dest; for (loop = 0; loop < 8; loop++){ /* Pre calculate some common sums and differences. */ is07 = src[0] + src[7]; is12 = src[1] + src[2]; is34 = src[3] + src[4]; is56 = src[5] + src[6]; id07 = src[0] - src[7]; id12 = src[1] - src[2]; id34 = src[3] - src[4]; id56 = src[5] - src[6]; is0734 = is07 + is34; is1256 = is12 + is56; /* Pre-Calculate some common product terms. */ icommon_product1 = xC4S4*(is12 - is56); icommon_product1 = DOROUND(icommon_product1); icommon_product1>>=16; icommon_product2 = xC4S4*(id12 + id56); icommon_product2 = DOROUND(icommon_product2); icommon_product2>>=16; ip[0] = (xC4S4*(is0734 + is1256)); ip[0] = DOROUND(ip[0]); ip[0] >>= 16; ip[4] = (xC4S4*(is0734 - is1256)); ip[4] = DOROUND(ip[4]); ip[4] >>= 16; /* Define inputs to rotation for outputs 2 and 6 */ irot_input_x = id12 - id56; irot_input_y = is07 - is34; /* Apply rotation for outputs 2 and 6. */ temp1=xC6S2*irot_input_x; temp1=DOROUND(temp1); temp1>>=16; temp2=xC2S6*irot_input_y; temp2=DOROUND(temp2); temp2>>=16; ip[2] = temp1 + temp2; temp1=xC6S2*irot_input_y; temp1=DOROUND(temp1); temp1>>=16; temp2=xC2S6*irot_input_x ; temp2=DOROUND(temp2); temp2>>=16; ip[6] = temp1 -temp2 ; /* Define inputs to rotation for outputs 1 and 7 */ irot_input_x = icommon_product1 + id07; irot_input_y = -( id34 + icommon_product2 ); /* Apply rotation for outputs 1 and 7. */ temp1=xC1S7*irot_input_x; temp1=DOROUND(temp1); temp1>>=16; temp2=xC7S1*irot_input_y; temp2=DOROUND(temp2); temp2>>=16; ip[1] = temp1 - temp2; temp1=xC7S1*irot_input_x; temp1=DOROUND(temp1); temp1>>=16; temp2=xC1S7*irot_input_y ; temp2=DOROUND(temp2); temp2>>=16; ip[7] = temp1 + temp2 ; /* Define inputs to rotation for outputs 3 and 5 */ irot_input_x = id07 - icommon_product1; irot_input_y = id34 - icommon_product2; /* Apply rotation for outputs 3 and 5. */ temp1=xC3S5*irot_input_x; temp1=DOROUND(temp1); temp1>>=16; temp2=xC5S3*irot_input_y ; temp2=DOROUND(temp2); temp2>>=16; ip[3] = temp1 - temp2 ; temp1=xC5S3*irot_input_x; temp1=DOROUND(temp1); temp1>>=16; temp2=xC3S5*irot_input_y; temp2=DOROUND(temp2); temp2>>=16; ip[5] = temp1 + temp2; /* Increment data pointer for next row. */ src += 8 ; ip += 8; /* advance pointer to next row */ } /* Performed DCT on rows, now transform the columns */ ip = InterData; for (loop = 0; loop < 8; loop++){ /* Pre calculate some common sums and differences. */ is07 = ip[0 * 8] + ip[7 * 8]; is12 = ip[1 * 8] + ip[2 * 8]; is34 = ip[3 * 8] + ip[4 * 8]; is56 = ip[5 * 8] + ip[6 * 8]; id07 = ip[0 * 8] - ip[7 * 8]; id12 = ip[1 * 8] - ip[2 * 8]; id34 = ip[3 * 8] - ip[4 * 8]; id56 = ip[5 * 8] - ip[6 * 8]; is0734 = is07 + is34; is1256 = is12 + is56; /* Pre-Calculate some common product terms. */ icommon_product1 = xC4S4*(is12 - is56) ; icommon_product2 = xC4S4*(id12 + id56) ; icommon_product1 = DOROUND(icommon_product1); icommon_product2 = DOROUND(icommon_product2); icommon_product1>>=16; icommon_product2>>=16; temp1 = xC4S4*(is0734 + is1256) ; temp2 = xC4S4*(is0734 - is1256) ; temp1 = DOROUND(temp1); temp2 = DOROUND(temp2); temp1>>=16; temp2>>=16; op[0*8] = (int16_t) temp1; op[4*8] = (int16_t) temp2; /* Define inputs to rotation for outputs 2 and 6 */ irot_input_x = id12 - id56; irot_input_y = is07 - is34; /* Apply rotation for outputs 2 and 6. */ temp1=xC6S2*irot_input_x; temp1=DOROUND(temp1); temp1>>=16; temp2=xC2S6*irot_input_y; temp2=DOROUND(temp2); temp2>>=16; op[2*8] = (int16_t) (temp1 + temp2); temp1=xC6S2*irot_input_y; temp1=DOROUND(temp1); temp1>>=16; temp2=xC2S6*irot_input_x ; temp2=DOROUND(temp2); temp2>>=16; op[6*8] = (int16_t) (temp1 -temp2) ; /* Define inputs to rotation for outputs 1 and 7 */ irot_input_x = icommon_product1 + id07; irot_input_y = -( id34 + icommon_product2 ); /* Apply rotation for outputs 1 and 7. */ temp1=xC1S7*irot_input_x; temp1=DOROUND(temp1); temp1>>=16; temp2=xC7S1*irot_input_y; temp2=DOROUND(temp2); temp2>>=16; op[1*8] = (int16_t) (temp1 - temp2); temp1=xC7S1*irot_input_x; temp1=DOROUND(temp1); temp1>>=16; temp2=xC1S7*irot_input_y ; temp2=DOROUND(temp2); temp2>>=16; op[7*8] = (int16_t) (temp1 + temp2); /* Define inputs to rotation for outputs 3 and 5 */ irot_input_x = id07 - icommon_product1; irot_input_y = id34 - icommon_product2; /* Apply rotation for outputs 3 and 5. */ temp1=xC3S5*irot_input_x; temp1=DOROUND(temp1); temp1>>=16; temp2=xC5S3*irot_input_y ; temp2=DOROUND(temp2); temp2>>=16; op[3*8] = (int16_t) (temp1 - temp2) ; temp1=xC5S3*irot_input_x; temp1=DOROUND(temp1); temp1>>=16; temp2=xC3S5*irot_input_y; temp2=DOROUND(temp2); temp2>>=16; op[5*8] = (int16_t) (temp1 + temp2); /* Increment data pointer for next column. */ ip ++; op ++; } } OIL_DEFINE_IMPL_REF (fdct8x8theora_ref, fdct8x8theora); liboil-0.3.17/liboil/dct/idct8x8_c.c0000644000175000017500000001501111067011142013751 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2001,2002,2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include /** * SECTION:liboilfuncs-dct: * @title: Direct Cosine Transform * @short_description: DCT related functions */ #define BLOCK8x8_F64(ptr, stride, row, column) \ (*((double *)((unsigned char *)ptr + stride*row) + column)) #define BLOCK8x8_PTR_F64(ptr, stride, row, column) \ ((double *)((unsigned char *)ptr + stride*row) + column) #define BLOCK8x8_S16(ptr, stride, row, column) \ (*((int16_t *)((unsigned char *)ptr + stride*row) + column)) static void idct8x8_test (OilTest *test) { int16_t *data = oil_test_get_source_data (test, OIL_ARG_SRC1); int stride = oil_test_get_value (test, OIL_ARG_SSTR1); int i, j; for(j=0;j<8;j++){ for(i=0;i<8;i++){ OIL_GET(data, i*2 + j*stride, int16_t) = (oil_rand_s16() & 0xfff) - 2048; } } } /** * oil_idct8x8_f64: * @d_8x8: * @dstr: * @s_8x8: * @sstr: * * Performs a 2-D Inverse Discrete Cosine Transform on @s_8x8 and places * the result in @d_8x8. */ OIL_DEFINE_CLASS (idct8x8_f64, "double *d_8x8, int dstr, double *s_8x8, int sstr"); /** * oil_idct8x8lim10_f64: * @d_8x8: * @dstr: * @s_8x8: * @sstr: * * Performs a 2-D Inverse Discrete Cosine Transform on @s_8x8 and places * the result in @d_8x8. */ OIL_DEFINE_CLASS (idct8x8lim10_f64, "double *d_8x8, int dstr, double *s_8x8, int sstr"); /** * oil_idct8x8_s16: * @d_8x8: * @dstr: * @s_8x8: * @sstr: * * Performs a limited 2-D Inverse Discrete Cosine Transform on @s_8x8 * and places the result in @d_8x8. */ OIL_DEFINE_CLASS_FULL (idct8x8_s16, "int16_t *d_8x8, int dstr, int16_t *s_8x8, int sstr", idct8x8_test); /** * oil_idct8x8lim10_s16: * @d_8x8: * @dstr: * @s_8x8: * @sstr: * * Performs a limited 2-D Inverse Discrete Cosine Transform on @s_8x8 * and places the result in @d_8x8. The source 8x8 block must be non-zero * only in the 10 lowest-order components. */ OIL_DEFINE_CLASS (idct8x8lim10_s16, "int16_t *d_8x8, int dstr, int16_t *s_8x8, int sstr"); static void idct8x8_f64_ref (double *dest, int dstr, const double *src, int sstr) { static double idct_coeff[8][8]; static int idct_coeff_init = 0; int i,j,k,l; double tmp1,tmp2; if(!idct_coeff_init){ double scale; for(i=0;i<8;i++){ scale = (i==0) ? sqrt(0.125) : 0.5; for(j=0;j<8;j++){ idct_coeff[j][i] = scale * cos((M_PI/8)*i*(j+0.5)); } } idct_coeff_init = 1; } for(i=0;i<8;i++){ for(j=0;j<8;j++){ tmp1 = 0; for(k=0;k<8;k++){ tmp2 = 0; for(l=0;l<8;l++){ tmp2 += idct_coeff[j][l] * BLOCK8x8_F64(src,sstr,k,l); } tmp1 += idct_coeff[i][k] * tmp2; } BLOCK8x8_F64(dest,dstr,i,j) = tmp1; } } } OIL_DEFINE_IMPL_REF (idct8x8_f64_ref, idct8x8_f64); static void idct8x8lim10_f64_ref (double *dest, int dstr, const double *src, int sstr) { static double idct_coeff[8][8]; static int idct_coeff_init = 0; int i,j,k,l; double tmp1,tmp2; if(!idct_coeff_init){ double scale; for(i=0;i<8;i++){ scale = (i==0) ? sqrt(0.125) : 0.5; for(j=0;j<8;j++){ idct_coeff[j][i] = scale * cos((M_PI/8)*i*(j+0.5)); } } idct_coeff_init = 1; } for(i=0;i<8;i++){ for(j=0;j<8;j++){ tmp1 = 0; for(k=0;k<4;k++){ tmp2 = 0; for(l=0;l<4;l++){ tmp2 += idct_coeff[j][l] * BLOCK8x8_F64(src,sstr,k,l); } tmp1 += idct_coeff[i][k] * tmp2; } BLOCK8x8_F64(dest,dstr,i,j) = tmp1; } } } OIL_DEFINE_IMPL_REF (idct8x8lim10_f64_ref, idct8x8lim10_f64); #if defined(oil_idct8_f64) static void idct8x8_f64_c (double *dest, int dstr, const double *src, int sstr) { int i; double tmp[64]; int tmpstr = 8*sizeof(double); for(i=0;i<8;i++){ oil_idct8_f64( BLOCK8x8_PTR_F64(tmp,tmpstr,i,0), sizeof(double), BLOCK8x8_PTR_F64(src,sstr,i,0), sizeof(double)); } for(i=0;i<8;i++){ oil_idct8_f64( BLOCK8x8_PTR_F64(dest,dstr,0,i), dstr, BLOCK8x8_PTR_F64(tmp,tmpstr,0,i), tmpstr); } } OIL_DEFINE_IMPL_DEPENDS (idct8x8_f64_c, idct8x8_f64, idct8_f64); #endif #if defined(oil_conv8x8_f64_s16) && defined(oil_idct8x8_f64) && \ defined(oil_conv8x8_s16_f64) static void idct8x8_s16_ref (int16_t *dest, int dstr, const int16_t *src, int sstr) { double s[64], d[64]; oil_conv8x8_f64_s16 (s,8*sizeof(double),src,sstr); oil_idct8x8_f64 (d,8*sizeof(double),s,8*sizeof(double)); oil_conv8x8_s16_f64 (dest,dstr,d,8*sizeof(double)); } OIL_DEFINE_IMPL_REF (idct8x8_s16_ref, idct8x8_s16); #if 0 OIL_DEFINE_IMPL_DEPENDS (idct8x8_s16_ref, idct8x8_s16, conv8x8_f64_s16, idct8x8_f64, conv8x8_s16_f64); #endif #endif #if defined(oil_conv8x8_f64_s16) && defined(oil_idct8x8lim10_f64) && \ defined(oil_conv8x8_s16_f64) static void idct8x8lim10_s16_ref (int16_t *dest, int dstr, const int16_t *src, int sstr) { double s[64], d[64]; oil_conv8x8_f64_s16 (s,8*sizeof(double),src,sstr); oil_idct8x8lim10_f64 (d,8*sizeof(double),s,8*sizeof(double)); oil_conv8x8_s16_f64 (dest,dstr,d,8*sizeof(double)); } OIL_DEFINE_IMPL_REF (idct8x8lim10_s16_ref, idct8x8lim10_s16); #if 0 OIL_DEFINE_IMPL_DEPENDS (idct8x8_s16_ref, idct8x8_s16, conv8x8_f64_s16, idct8x8_f64, conv8x8_s16_f64); #endif #endif liboil-0.3.17/liboil/dct/dct.h0000644000175000017500000000333711067011142012743 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_DCT_H_ #define _LIBOIL_DCT_H_ #include #ifndef M_PI #define M_PI 3.14159265358979323846 #endif OIL_DECLARE_CLASS(dct12_f32); OIL_DECLARE_CLASS(dct36_f32); OIL_DECLARE_CLASS(fdct8_f64); OIL_DECLARE_CLASS(fdct8x8_f64); OIL_DECLARE_CLASS(fdct8x8s_s16); OIL_DECLARE_CLASS(idct8_f64); OIL_DECLARE_CLASS(imdct32_f32); #endif liboil-0.3.17/liboil/dct/idct8x8theora_ref.c0000644000175000017500000001204410717203073015520 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2001,2002,2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include static void idct8theora_s16_test (OilTest *test) { int i; int stride = test->params[OIL_ARG_SSTR1].value; uint16_t *ptr = (uint16_t *)oil_test_get_source_data(test,OIL_ARG_SRC1); for(i=0;i<8;i++){ OIL_GET(ptr, i*stride, int16_t) = oil_rand_s16() >> 3; //OIL_GET(ptr, i*stride, int16_t) = 0; } //OIL_GET(ptr, 0*stride, int16_t) = 100; } static void idct8x8theora_s16_test (OilTest *test) { int i; int j; int stride = test->params[OIL_ARG_SSTR1].value; uint16_t *ptr = (uint16_t *)oil_test_get_source_data(test,OIL_ARG_SRC1); for(i=0;i<8;i++){ for(j=0;j<8;j++){ OIL_GET(ptr, i*stride + j*2, int16_t) = oil_rand_s16() >> 3; } } } /** * oil_idct8theora_s16: * @d_8: * @dstr: * @s_8: * @sstr: * * Performs a Inverse Discrete Cosine Transform on @s_8 and places * the result in @d_8, as defined by the Theora specification. */ OIL_DEFINE_CLASS_FULL (idct8theora_s16, "int16_t *d_8, int dstr, int16_t *s_8, int sstr", idct8theora_s16_test); /** * oil_idct8x8theora_s16: * @d_8x8: * @dstr: * @s_8x8: * @sstr: * * Performs a Inverse Discrete Cosine Transform on @s_8x8 and places * the result in @d_8x8, as defined by the Theora specification. */ OIL_DEFINE_CLASS_FULL (idct8x8theora_s16, "int16_t *d_8x8, int dstr, int16_t *s_8x8, int sstr", idct8x8theora_s16_test); #define C1 64277 #define C2 60547 #define C3 54491 #define C4 46341 #define C5 36410 #define C6 25080 #define C7 12785 #define S7 64277 #define S6 60547 #define S5 54491 #define S4 46341 #define S3 36410 #define S2 25080 #define S1 12785 #define TRUNC(x) ((int16_t)x) #define MULT(a,b) (((a)*(b))>>16) static void idct8theora_s16_ref (int16_t *dest, int dstr, const int16_t *src, int sstr) { int32_t t[10]; int32_t r; #define Y(i) OIL_GET(src,sstr*(i),int16_t) #define X(i) OIL_GET(dest,sstr*(i),int16_t) /* the ordering here corresponds closely to the theora spec */ t[0] = MULT(C4, Y(0) + Y(4)); t[0] = TRUNC(t[0]); t[1] = MULT(C4, Y(0) - Y(4)); t[1] = TRUNC(t[1]); t[2] = MULT(C6, Y(2)) - MULT(S6, Y(6)); t[3] = MULT(S6, Y(2)) + MULT(C6, Y(6)); t[4] = MULT(C7, Y(1)) - MULT(S7, Y(7)); t[5] = MULT(C3, Y(5)) - MULT(S3, Y(3)); t[6] = MULT(S3, Y(5)) + MULT(C3, Y(3)); t[7] = MULT(S7, Y(1)) + MULT(C7, Y(7)); r = t[4] + t[5]; t[5] = MULT(C4, t[4] - t[5]); t[5] = TRUNC(t[5]); t[4] = r; r = t[7] + t[6]; t[6] = MULT(C4, t[7] - t[6]); t[6] = TRUNC(t[6]); t[7] = r; r = t[0] + t[3]; t[3] = t[0] - t[3]; t[0] = r; r = t[1] + t[2]; t[2] = t[1] - t[2]; t[1] = r; r = t[6] + t[5]; t[5] = t[6] - t[5]; t[6] = r; r = t[0] + t[7]; r = TRUNC(r); X(0) = r; r = t[1] + t[6]; r = TRUNC(r); X(1) = r; r = t[2] + t[5]; r = TRUNC(r); X(2) = r; r = t[3] + t[4]; r = TRUNC(r); X(3) = r; r = t[3] - t[4]; r = TRUNC(r); X(4) = r; r = t[2] - t[5]; r = TRUNC(r); X(5) = r; r = t[1] - t[6]; r = TRUNC(r); X(6) = r; r = t[0] - t[7]; r = TRUNC(r); X(7) = r; } OIL_DEFINE_IMPL_REF (idct8theora_s16_ref, idct8theora_s16); static void idct8x8theora_s16_ref (int16_t *dest, int dstr, const int16_t *src, int sstr) { int i; int16_t tmp[64]; for(i=0;i<8;i++){ idct8theora_s16_ref( OIL_OFFSET(tmp, 8*sizeof(int16_t) * i), sizeof(int16_t), OIL_OFFSET(src, sstr * i), sizeof(int16_t)); } for(i=0;i<8;i++){ idct8theora_s16_ref( OIL_OFFSET(dest, sizeof(int16_t) * i), dstr, OIL_OFFSET(tmp, sizeof(int16_t) * i), sizeof(int16_t) * 8); } } OIL_DEFINE_IMPL_REF (idct8x8theora_s16_ref, idct8x8theora_s16); liboil-0.3.17/liboil/dct/dct36_f32.c0000644000175000017500000000353310717203073013566 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include /** * oil_dct36_f32: * @d_36: * @dstr: * @s_36: * @sstr: * * FIXME: This function is broken. */ OIL_DEFINE_CLASS(dct36_f32, "float *d_36, int dstr, float *s_36, int sstr"); static void dct36_f32_ref(float *dest, int dstr, const float *src, int sstr) { #if 0 int i; for(i=0;i<36;i++){ dest[i] = src[i]; } #endif } OIL_DEFINE_IMPL_REF (dct36_f32_ref, dct36_f32); liboil-0.3.17/liboil/dct/imdct32_f32.c0000644000175000017500000000400310717203073014101 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_imdct32_f32: * @d_32: * @s_32: * * Performs a Inverse Modified Discrete Cosine Transform (IMDCT) * on the source array @s_32 and places the result in @d_32. */ OIL_DEFINE_CLASS (imdct32_f32, "float *d_32, float *s_32"); static void imdct32_f32_ref (float *dest, const float *src) { double x; int i,j; double coeff; for(i=0;i<32;i++){ x = 0; for(j=0;j<32;j++){ coeff = cos((M_PI/32)*i*(j+0.5)); x += coeff * src[j]; } dest[i] = x; } } OIL_DEFINE_IMPL_REF (imdct32_f32_ref, imdct32_f32); liboil-0.3.17/liboil/dct/fdct8_f64.c0000644000175000017500000001544510717203073013665 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_fdct8_f64: * @d_8: * @s_8: * @dstr: * @sstr: * * Performs a Forward Discrete Cosine Transform on @s_8 and places * the result in @d_8. */ OIL_DEFINE_CLASS (fdct8_f64, "double *d_8, double *s_8, int dstr, int sstr"); #define C0_9808 0.980785280 #define C0_9239 0.923879532 #define C0_8315 0.831469612 #define C0_7071 0.707106781 #define C0_5556 0.555570233 #define C0_3827 0.382683432 #define C0_1951 0.195090322 static void fdct8_f64_ref (double *dest, const double *src, int dstr, int sstr) { static double fdct_coeff[8][8]; static int fdct_coeff_init = 0; int i,j; double x; if(!fdct_coeff_init){ double scale; for(i=0;i<8;i++){ scale = (i==0) ? sqrt(0.125) : 0.5; for(j=0;j<8;j++){ fdct_coeff[j][i] = scale * cos((M_PI/8)*i*(j+0.5)); } } fdct_coeff_init = 1; } for(i=0;i<8;i++){ x = 0; for(j=0;j<8;j++){ x += fdct_coeff[j][i] * OIL_GET(src,sstr*j, double); } OIL_GET(dest,dstr*i, double) = x; } } OIL_DEFINE_IMPL_REF (fdct8_f64_ref, fdct8_f64); /* * This algorithm is roughly similar to a Fast-Fourier transform, * taking advantage of the symmeties of the base vectors. For * reference, the base vectors are (horizontally): * * 0: 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 * 1: 0.9808 0.8315 0.5556 0.1951 -0.1951 -0.5556 -0.8315 -0.9808 * 2: 0.9239 0.3827 -0.3827 -0.9239 -0.9239 -0.3827 0.3827 0.9239 * 3: 0.8315 -0.1951 -0.9808 -0.5556 0.5556 0.9808 0.1951 -0.8315 * 4: 0.7071 -0.7071 -0.7071 0.7071 0.7071 -0.7071 -0.7071 0.7071 * 5: 0.5556 -0.9808 0.1951 0.8315 -0.8315 -0.1951 0.9808 -0.5556 * 6: 0.3827 -0.9239 0.9239 -0.3827 -0.3827 0.9239 -0.9239 0.3827 * 7: 0.1951 -0.5556 0.8315 -0.9808 0.9808 -0.8315 0.5556 -0.1951 * * The symmetries of note: * - even vectors are symmetric around 4 (the middle) * - odd vectors are antisymmetric around 4 * - 0,4 are symmertic around 2 and 6 * - 2,6 are antisymmetic around 2 and 6 * * f0 = (x0 + x7) + (x1 + x6) + (x2 + x5) + (x3 + x4); * f1 = 0.9808*(x0 - x7) + 0.8315*(x1 - x6) + 0.5556*(x2 - x5) + 0.1951*(x3 - x4) * f2 = 0.9239*(x0 + x7) + 0.3827*(x1 + x6) - 0.3827*(x2 + x5) - 0.9239*(x3 + x4) * f3 = 0.8315*(x0 - x7) - 0.1951*(x1 - x6) - 0.9808*(x2 - x5) - 0.5556*(x3 - x4) * f4 = 0.7071*((x0 + x7) - (x1 + x6) - (x2 + x5) + (x3 + x4)) * f5 = 0.5556*(x0 - x7) - 0.9808*(x1 - x6) + 0.1951*(x2 - x5) + 0.8315*(x3 - x4) * f6 = 0.3827*(x0 + x7) - 0.9239*(x1 + x6) + 0.9239*(x2 + x5) - 0.3827*(x3 + x4) * f7 = 0.1951*(x0 - x7) - 0.5556*(x1 - x6) + 0.8315*(x2 - x5) - 0.9808*(x3 - x4) * * The even vectors can be further simplified: * * f0 = ((x0 + x7) + (x3 + x4)) + ((x1 + x6) + (x2 + x5)); * f2 = 0.9239*((x0 + x7) - (x3 + x4)) + 0.3827*((x1 + x6) - (x2 + x5)) * f4 = 0.7071*((x0 + x7) + (x3 + x4)) - 0.7071*((x1 + x6) + (x2 + x5)) * f6 = 0.3827*((x0 + x7) - (x3 + x4)) - 0.9239*((x1 + x6) - (x2 + x5)) * * Some implementations move some of the normalization to a later * stage of processing, saving a few multiplies which get absorbed * into later multiplies. However, this incurs a bit of error in * the integer versions of this function. Also, if the CPU has a * multiply-and-add function, you don't gain anything. */ static void fdct8_f64_fast(double *dest, const double *src, int dstr, int sstr) { double s07, s16, s25, s34; double d07, d16, d25, d34; double ss07s34, ds07s34, ss16s25, ds16s25; s07 = OIL_GET(src,sstr*0,double) + OIL_GET(src,sstr*7,double); d07 = OIL_GET(src,sstr*0,double) - OIL_GET(src,sstr*7,double); s16 = OIL_GET(src,sstr*1,double) + OIL_GET(src,sstr*6,double); d16 = OIL_GET(src,sstr*1,double) - OIL_GET(src,sstr*6,double); s25 = OIL_GET(src,sstr*2,double) + OIL_GET(src,sstr*5,double); d25 = OIL_GET(src,sstr*2,double) - OIL_GET(src,sstr*5,double); s34 = OIL_GET(src,sstr*3,double) + OIL_GET(src,sstr*4,double); d34 = OIL_GET(src,sstr*3,double) - OIL_GET(src,sstr*4,double); ss07s34 = s07 + s34; ds07s34 = s07 - s34; ss16s25 = s16 + s25; ds16s25 = s16 - s25; OIL_GET(dest,dstr*0,double) = 0.5*C0_7071*(ss07s34 + ss16s25); OIL_GET(dest,dstr*2,double) = 0.5*(C0_9239*ds07s34 + C0_3827*ds16s25); OIL_GET(dest,dstr*4,double) = 0.5*C0_7071*(ss07s34 - ss16s25); OIL_GET(dest,dstr*6,double) = 0.5*(C0_3827*ds07s34 - C0_9239*ds16s25); OIL_GET(dest,dstr*1,double) = 0.5*(C0_9808*d07 + C0_8315*d16 + C0_5556*d25 + C0_1951*d34); OIL_GET(dest,dstr*3,double) = 0.5*(C0_8315*d07 - C0_1951*d16 - C0_9808*d25 - C0_5556*d34); OIL_GET(dest,dstr*5,double) = 0.5*(C0_5556*d07 - C0_9808*d16 + C0_1951*d25 + C0_8315*d34); OIL_GET(dest,dstr*7,double) = 0.5*(C0_1951*d07 - C0_5556*d16 + C0_8315*d25 - C0_9808*d34); #if 0 z1 = (ds1 tmp12 + tmp13) * 0.707106781; OIL_GET(dest,dstr*2,double) = (tmp13 + z1)*(0.25*M_SQRT2)*0.765366864; OIL_GET(dest,dstr*6,double) = (tmp13 - z1)*(0.25*M_SQRT2)*1.847759066; tmp10 = tmp4 + tmp5; tmp11 = tmp5 + tmp6; tmp12 = tmp6 + tmp7; z5 = (tmp10 - tmp12) * 0.382683433; z2 = 0.541196100 * tmp10 + z5; z4 = 1.306562965 * tmp12 + z5; z3 = tmp11 * 0.707106781; z11 = tmp7 + z3; z13 = tmp7 - z3; OIL_GET(dest,dstr*5,double) = (z13 + z2)*(0.25*M_SQRT2)*1.2728; OIL_GET(dest,dstr*3,double) = (z13 - z2)*(0.25*M_SQRT2)*0.8504; OIL_GET(dest,dstr*1,double) = (z11 + z4)*(0.25*M_SQRT2)*0.7209; OIL_GET(dest,dstr*7,double) = (z11 - z4)*(0.25*M_SQRT2)*3.6245; #endif } OIL_DEFINE_IMPL (fdct8_f64_fast, fdct8_f64); liboil-0.3.17/liboil/dct/fdct8x8s_s16.c0000644000175000017500000000525510717203073014340 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #define C0_9808 0.980785280 #define C0_9239 0.923879532 #define C0_8315 0.831469612 #define C0_7071 0.707106781 #define C0_5556 0.555570233 #define C0_3827 0.382683432 #define C0_1951 0.195090322 /** * oil_fdct8x8s_s16: * @d_8x8: * @ds: * @s_8x8: * @ss: * * Performs a 2-D Forward Discrete Cosine Transform on @s_8x8 and places * the result in @d_8x8. * * This function uses an alternate scaling used by RTjpeg. */ OIL_DEFINE_CLASS(fdct8x8s_s16, "int16_t *d_8x8, int ds, int16_t *s_8x8, int ss"); #if defined(oil_fdct8x8_f64) && defined(oil_conv8x8_s16_f64) static void fdct8x8s_s16_ref (int16_t *dest, int dstr, const int16_t *src, int sstr) { double s[64], d[64]; double scale[8] = { 4*C0_7071, 4*C0_9808, 4*C0_9239, 4*C0_8315, 4*C0_7071, 4*C0_5556, 4*C0_3827, 4*C0_1951, }; int i,j; for(i=0;i<8;i++){ for(j=0;j<8;j++){ s[8*i+j] = OIL_GET (src,sstr*i+j*sizeof(int16_t), int16_t); } } oil_fdct8x8_f64(d,8*sizeof(double),s,8*sizeof(double)); for(i=0;i<8;i++){ for(j=0;j<8;j++){ d[8*i+j] *= scale[i] * scale[j]; } } oil_conv8x8_s16_f64(dest,dstr,d,8*sizeof(double)); } OIL_DEFINE_IMPL_REF (fdct8x8s_s16_ref, fdct8x8s_s16); #endif liboil-0.3.17/liboil/dct/Makefile.in0000644000175000017500000011475611332627672014115 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = liboil/dct DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @USE_ALT_OPT_TRUE@am__DEPENDENCIES_1 = libdct_opt.la libdct_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__objects_1 = libdct_la-dct12_f32.lo libdct_la-dct36_f32.lo \ libdct_la-fdct8_f64.lo libdct_la-fdct8x8_f64.lo \ libdct_la-fdct8x8s_s16.lo libdct_la-fdct8x8theora.lo \ libdct_la-idct8_f64.lo libdct_la-idct8x8_c.lo \ libdct_la-imdct32_f32.lo libdct_la-idct8x8theora_ref.lo am_libdct_la_OBJECTS = $(am__objects_1) libdct_la_OBJECTS = $(am_libdct_la_OBJECTS) libdct_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libdct_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ libdct_opt_la_LIBADD = am__objects_2 = libdct_opt_la-dct12_f32.lo libdct_opt_la-dct36_f32.lo \ libdct_opt_la-fdct8_f64.lo libdct_opt_la-fdct8x8_f64.lo \ libdct_opt_la-fdct8x8s_s16.lo libdct_opt_la-fdct8x8theora.lo \ libdct_opt_la-idct8_f64.lo libdct_opt_la-idct8x8_c.lo \ libdct_opt_la-imdct32_f32.lo \ libdct_opt_la-idct8x8theora_ref.lo am_libdct_opt_la_OBJECTS = $(am__objects_2) libdct_opt_la_OBJECTS = $(am_libdct_opt_la_OBJECTS) libdct_opt_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libdct_opt_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_ALT_OPT_TRUE@am_libdct_opt_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libdct_la_SOURCES) $(libdct_opt_la_SOURCES) DIST_SOURCES = $(libdct_la_SOURCES) $(libdct_opt_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @USE_ALT_OPT_FALSE@opt_libs = @USE_ALT_OPT_TRUE@opt_libs = libdct_opt.la noinst_LTLIBRARIES = libdct.la $(opt_libs) noinst_HEADERS = \ dct.h c_sources = \ dct12_f32.c \ dct36_f32.c \ fdct8_f64.c \ fdct8x8_f64.c \ fdct8x8s_s16.c \ fdct8x8theora.c \ idct8_f64.c \ idct8x8_c.c \ imdct32_f32.c \ idct8x8theora_ref.c libdct_la_SOURCES = \ $(c_sources) \ $(i386_sources) \ $(amd64_sources) libdct_la_CFLAGS = $(LIBOIL_CFLAGS) libdct_la_LIBADD = $(opt_libs) libdct_opt_la_SOURCES = $(c_sources) libdct_opt_la_CFLAGS = $(LIBOIL_CFLAGS) $(LIBOIL_OPT_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/dct/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/dct/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libdct.la: $(libdct_la_OBJECTS) $(libdct_la_DEPENDENCIES) $(libdct_la_LINK) $(libdct_la_OBJECTS) $(libdct_la_LIBADD) $(LIBS) libdct_opt.la: $(libdct_opt_la_OBJECTS) $(libdct_opt_la_DEPENDENCIES) $(libdct_opt_la_LINK) $(am_libdct_opt_la_rpath) $(libdct_opt_la_OBJECTS) $(libdct_opt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_la-dct12_f32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_la-dct36_f32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_la-fdct8_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_la-fdct8x8_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_la-fdct8x8s_s16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_la-fdct8x8theora.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_la-idct8_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_la-idct8x8_c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_la-idct8x8theora_ref.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_la-imdct32_f32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_opt_la-dct12_f32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_opt_la-dct36_f32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_opt_la-fdct8_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_opt_la-fdct8x8_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_opt_la-fdct8x8s_s16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_opt_la-fdct8x8theora.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_opt_la-idct8_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_opt_la-idct8x8_c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_opt_la-idct8x8theora_ref.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdct_opt_la-imdct32_f32.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libdct_la-dct12_f32.lo: dct12_f32.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -MT libdct_la-dct12_f32.lo -MD -MP -MF $(DEPDIR)/libdct_la-dct12_f32.Tpo -c -o libdct_la-dct12_f32.lo `test -f 'dct12_f32.c' || echo '$(srcdir)/'`dct12_f32.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_la-dct12_f32.Tpo $(DEPDIR)/libdct_la-dct12_f32.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dct12_f32.c' object='libdct_la-dct12_f32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -c -o libdct_la-dct12_f32.lo `test -f 'dct12_f32.c' || echo '$(srcdir)/'`dct12_f32.c libdct_la-dct36_f32.lo: dct36_f32.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -MT libdct_la-dct36_f32.lo -MD -MP -MF $(DEPDIR)/libdct_la-dct36_f32.Tpo -c -o libdct_la-dct36_f32.lo `test -f 'dct36_f32.c' || echo '$(srcdir)/'`dct36_f32.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_la-dct36_f32.Tpo $(DEPDIR)/libdct_la-dct36_f32.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dct36_f32.c' object='libdct_la-dct36_f32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -c -o libdct_la-dct36_f32.lo `test -f 'dct36_f32.c' || echo '$(srcdir)/'`dct36_f32.c libdct_la-fdct8_f64.lo: fdct8_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -MT libdct_la-fdct8_f64.lo -MD -MP -MF $(DEPDIR)/libdct_la-fdct8_f64.Tpo -c -o libdct_la-fdct8_f64.lo `test -f 'fdct8_f64.c' || echo '$(srcdir)/'`fdct8_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_la-fdct8_f64.Tpo $(DEPDIR)/libdct_la-fdct8_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fdct8_f64.c' object='libdct_la-fdct8_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -c -o libdct_la-fdct8_f64.lo `test -f 'fdct8_f64.c' || echo '$(srcdir)/'`fdct8_f64.c libdct_la-fdct8x8_f64.lo: fdct8x8_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -MT libdct_la-fdct8x8_f64.lo -MD -MP -MF $(DEPDIR)/libdct_la-fdct8x8_f64.Tpo -c -o libdct_la-fdct8x8_f64.lo `test -f 'fdct8x8_f64.c' || echo '$(srcdir)/'`fdct8x8_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_la-fdct8x8_f64.Tpo $(DEPDIR)/libdct_la-fdct8x8_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fdct8x8_f64.c' object='libdct_la-fdct8x8_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -c -o libdct_la-fdct8x8_f64.lo `test -f 'fdct8x8_f64.c' || echo '$(srcdir)/'`fdct8x8_f64.c libdct_la-fdct8x8s_s16.lo: fdct8x8s_s16.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -MT libdct_la-fdct8x8s_s16.lo -MD -MP -MF $(DEPDIR)/libdct_la-fdct8x8s_s16.Tpo -c -o libdct_la-fdct8x8s_s16.lo `test -f 'fdct8x8s_s16.c' || echo '$(srcdir)/'`fdct8x8s_s16.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_la-fdct8x8s_s16.Tpo $(DEPDIR)/libdct_la-fdct8x8s_s16.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fdct8x8s_s16.c' object='libdct_la-fdct8x8s_s16.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -c -o libdct_la-fdct8x8s_s16.lo `test -f 'fdct8x8s_s16.c' || echo '$(srcdir)/'`fdct8x8s_s16.c libdct_la-fdct8x8theora.lo: fdct8x8theora.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -MT libdct_la-fdct8x8theora.lo -MD -MP -MF $(DEPDIR)/libdct_la-fdct8x8theora.Tpo -c -o libdct_la-fdct8x8theora.lo `test -f 'fdct8x8theora.c' || echo '$(srcdir)/'`fdct8x8theora.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_la-fdct8x8theora.Tpo $(DEPDIR)/libdct_la-fdct8x8theora.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fdct8x8theora.c' object='libdct_la-fdct8x8theora.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -c -o libdct_la-fdct8x8theora.lo `test -f 'fdct8x8theora.c' || echo '$(srcdir)/'`fdct8x8theora.c libdct_la-idct8_f64.lo: idct8_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -MT libdct_la-idct8_f64.lo -MD -MP -MF $(DEPDIR)/libdct_la-idct8_f64.Tpo -c -o libdct_la-idct8_f64.lo `test -f 'idct8_f64.c' || echo '$(srcdir)/'`idct8_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_la-idct8_f64.Tpo $(DEPDIR)/libdct_la-idct8_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='idct8_f64.c' object='libdct_la-idct8_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -c -o libdct_la-idct8_f64.lo `test -f 'idct8_f64.c' || echo '$(srcdir)/'`idct8_f64.c libdct_la-idct8x8_c.lo: idct8x8_c.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -MT libdct_la-idct8x8_c.lo -MD -MP -MF $(DEPDIR)/libdct_la-idct8x8_c.Tpo -c -o libdct_la-idct8x8_c.lo `test -f 'idct8x8_c.c' || echo '$(srcdir)/'`idct8x8_c.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_la-idct8x8_c.Tpo $(DEPDIR)/libdct_la-idct8x8_c.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='idct8x8_c.c' object='libdct_la-idct8x8_c.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -c -o libdct_la-idct8x8_c.lo `test -f 'idct8x8_c.c' || echo '$(srcdir)/'`idct8x8_c.c libdct_la-imdct32_f32.lo: imdct32_f32.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -MT libdct_la-imdct32_f32.lo -MD -MP -MF $(DEPDIR)/libdct_la-imdct32_f32.Tpo -c -o libdct_la-imdct32_f32.lo `test -f 'imdct32_f32.c' || echo '$(srcdir)/'`imdct32_f32.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_la-imdct32_f32.Tpo $(DEPDIR)/libdct_la-imdct32_f32.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='imdct32_f32.c' object='libdct_la-imdct32_f32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -c -o libdct_la-imdct32_f32.lo `test -f 'imdct32_f32.c' || echo '$(srcdir)/'`imdct32_f32.c libdct_la-idct8x8theora_ref.lo: idct8x8theora_ref.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -MT libdct_la-idct8x8theora_ref.lo -MD -MP -MF $(DEPDIR)/libdct_la-idct8x8theora_ref.Tpo -c -o libdct_la-idct8x8theora_ref.lo `test -f 'idct8x8theora_ref.c' || echo '$(srcdir)/'`idct8x8theora_ref.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_la-idct8x8theora_ref.Tpo $(DEPDIR)/libdct_la-idct8x8theora_ref.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='idct8x8theora_ref.c' object='libdct_la-idct8x8theora_ref.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_la_CFLAGS) $(CFLAGS) -c -o libdct_la-idct8x8theora_ref.lo `test -f 'idct8x8theora_ref.c' || echo '$(srcdir)/'`idct8x8theora_ref.c libdct_opt_la-dct12_f32.lo: dct12_f32.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -MT libdct_opt_la-dct12_f32.lo -MD -MP -MF $(DEPDIR)/libdct_opt_la-dct12_f32.Tpo -c -o libdct_opt_la-dct12_f32.lo `test -f 'dct12_f32.c' || echo '$(srcdir)/'`dct12_f32.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_opt_la-dct12_f32.Tpo $(DEPDIR)/libdct_opt_la-dct12_f32.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dct12_f32.c' object='libdct_opt_la-dct12_f32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -c -o libdct_opt_la-dct12_f32.lo `test -f 'dct12_f32.c' || echo '$(srcdir)/'`dct12_f32.c libdct_opt_la-dct36_f32.lo: dct36_f32.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -MT libdct_opt_la-dct36_f32.lo -MD -MP -MF $(DEPDIR)/libdct_opt_la-dct36_f32.Tpo -c -o libdct_opt_la-dct36_f32.lo `test -f 'dct36_f32.c' || echo '$(srcdir)/'`dct36_f32.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_opt_la-dct36_f32.Tpo $(DEPDIR)/libdct_opt_la-dct36_f32.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dct36_f32.c' object='libdct_opt_la-dct36_f32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -c -o libdct_opt_la-dct36_f32.lo `test -f 'dct36_f32.c' || echo '$(srcdir)/'`dct36_f32.c libdct_opt_la-fdct8_f64.lo: fdct8_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -MT libdct_opt_la-fdct8_f64.lo -MD -MP -MF $(DEPDIR)/libdct_opt_la-fdct8_f64.Tpo -c -o libdct_opt_la-fdct8_f64.lo `test -f 'fdct8_f64.c' || echo '$(srcdir)/'`fdct8_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_opt_la-fdct8_f64.Tpo $(DEPDIR)/libdct_opt_la-fdct8_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fdct8_f64.c' object='libdct_opt_la-fdct8_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -c -o libdct_opt_la-fdct8_f64.lo `test -f 'fdct8_f64.c' || echo '$(srcdir)/'`fdct8_f64.c libdct_opt_la-fdct8x8_f64.lo: fdct8x8_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -MT libdct_opt_la-fdct8x8_f64.lo -MD -MP -MF $(DEPDIR)/libdct_opt_la-fdct8x8_f64.Tpo -c -o libdct_opt_la-fdct8x8_f64.lo `test -f 'fdct8x8_f64.c' || echo '$(srcdir)/'`fdct8x8_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_opt_la-fdct8x8_f64.Tpo $(DEPDIR)/libdct_opt_la-fdct8x8_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fdct8x8_f64.c' object='libdct_opt_la-fdct8x8_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -c -o libdct_opt_la-fdct8x8_f64.lo `test -f 'fdct8x8_f64.c' || echo '$(srcdir)/'`fdct8x8_f64.c libdct_opt_la-fdct8x8s_s16.lo: fdct8x8s_s16.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -MT libdct_opt_la-fdct8x8s_s16.lo -MD -MP -MF $(DEPDIR)/libdct_opt_la-fdct8x8s_s16.Tpo -c -o libdct_opt_la-fdct8x8s_s16.lo `test -f 'fdct8x8s_s16.c' || echo '$(srcdir)/'`fdct8x8s_s16.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_opt_la-fdct8x8s_s16.Tpo $(DEPDIR)/libdct_opt_la-fdct8x8s_s16.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fdct8x8s_s16.c' object='libdct_opt_la-fdct8x8s_s16.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -c -o libdct_opt_la-fdct8x8s_s16.lo `test -f 'fdct8x8s_s16.c' || echo '$(srcdir)/'`fdct8x8s_s16.c libdct_opt_la-fdct8x8theora.lo: fdct8x8theora.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -MT libdct_opt_la-fdct8x8theora.lo -MD -MP -MF $(DEPDIR)/libdct_opt_la-fdct8x8theora.Tpo -c -o libdct_opt_la-fdct8x8theora.lo `test -f 'fdct8x8theora.c' || echo '$(srcdir)/'`fdct8x8theora.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_opt_la-fdct8x8theora.Tpo $(DEPDIR)/libdct_opt_la-fdct8x8theora.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fdct8x8theora.c' object='libdct_opt_la-fdct8x8theora.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -c -o libdct_opt_la-fdct8x8theora.lo `test -f 'fdct8x8theora.c' || echo '$(srcdir)/'`fdct8x8theora.c libdct_opt_la-idct8_f64.lo: idct8_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -MT libdct_opt_la-idct8_f64.lo -MD -MP -MF $(DEPDIR)/libdct_opt_la-idct8_f64.Tpo -c -o libdct_opt_la-idct8_f64.lo `test -f 'idct8_f64.c' || echo '$(srcdir)/'`idct8_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_opt_la-idct8_f64.Tpo $(DEPDIR)/libdct_opt_la-idct8_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='idct8_f64.c' object='libdct_opt_la-idct8_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -c -o libdct_opt_la-idct8_f64.lo `test -f 'idct8_f64.c' || echo '$(srcdir)/'`idct8_f64.c libdct_opt_la-idct8x8_c.lo: idct8x8_c.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -MT libdct_opt_la-idct8x8_c.lo -MD -MP -MF $(DEPDIR)/libdct_opt_la-idct8x8_c.Tpo -c -o libdct_opt_la-idct8x8_c.lo `test -f 'idct8x8_c.c' || echo '$(srcdir)/'`idct8x8_c.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_opt_la-idct8x8_c.Tpo $(DEPDIR)/libdct_opt_la-idct8x8_c.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='idct8x8_c.c' object='libdct_opt_la-idct8x8_c.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -c -o libdct_opt_la-idct8x8_c.lo `test -f 'idct8x8_c.c' || echo '$(srcdir)/'`idct8x8_c.c libdct_opt_la-imdct32_f32.lo: imdct32_f32.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -MT libdct_opt_la-imdct32_f32.lo -MD -MP -MF $(DEPDIR)/libdct_opt_la-imdct32_f32.Tpo -c -o libdct_opt_la-imdct32_f32.lo `test -f 'imdct32_f32.c' || echo '$(srcdir)/'`imdct32_f32.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_opt_la-imdct32_f32.Tpo $(DEPDIR)/libdct_opt_la-imdct32_f32.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='imdct32_f32.c' object='libdct_opt_la-imdct32_f32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -c -o libdct_opt_la-imdct32_f32.lo `test -f 'imdct32_f32.c' || echo '$(srcdir)/'`imdct32_f32.c libdct_opt_la-idct8x8theora_ref.lo: idct8x8theora_ref.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -MT libdct_opt_la-idct8x8theora_ref.lo -MD -MP -MF $(DEPDIR)/libdct_opt_la-idct8x8theora_ref.Tpo -c -o libdct_opt_la-idct8x8theora_ref.lo `test -f 'idct8x8theora_ref.c' || echo '$(srcdir)/'`idct8x8theora_ref.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libdct_opt_la-idct8x8theora_ref.Tpo $(DEPDIR)/libdct_opt_la-idct8x8theora_ref.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='idct8x8theora_ref.c' object='libdct_opt_la-idct8x8theora_ref.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdct_opt_la_CFLAGS) $(CFLAGS) -c -o libdct_opt_la-idct8x8theora_ref.lo `test -f 'idct8x8theora_ref.c' || echo '$(srcdir)/'`idct8x8theora_ref.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/dct/idct8_f64.c0000644000175000017500000001031410717203073013656 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_idct8_f64: * @d_8: * @dstr: * @s_8: * @sstr: * * Performs a Inverse Discrete Cosine Transform on @s_8 and places * the result in @d_8. */ OIL_DEFINE_CLASS (idct8_f64, "double *d_8, int dstr, double *s_8, int sstr"); #define C0_9808 0.980785280 #define C0_9239 0.923879532 #define C0_8315 0.831469612 #define C0_7071 0.707106781 #define C0_5556 0.555570233 #define C0_3827 0.382683432 #define C0_1951 0.195090322 static void idct8_f64_ref(double *dest, int dstr, const double *src, int sstr) { static double idct_coeff[8][8]; static int idct_coeff_init = 0; int i,j; double x; if(!idct_coeff_init){ double scale; for(i=0;i<8;i++){ scale = (i==0) ? sqrt(0.125) : 0.5; for(j=0;j<8;j++){ idct_coeff[j][i] = scale * cos((M_PI/8)*i*(j+0.5)); } } idct_coeff_init = 1; } for(i=0;i<8;i++){ x = 0; for(j=0;j<8;j++){ x += idct_coeff[i][j] * OIL_GET (src, sstr*j, double); } OIL_GET (dest, dstr*i, double) = x; } } OIL_DEFINE_IMPL_REF (idct8_f64_ref, idct8_f64); static void idct8_f64_fastx(double *dest, int dstr, const double *src, int sstr) { double s07, s16, s25, s34; double d07, d16, d25, d34; double ss07s34, ss16s25; double ds07s34, ds16s25; ss07s34 = C0_7071*(OIL_GET(src,sstr*0, double) + OIL_GET(src,sstr*4, double)); ss16s25 = C0_7071*(OIL_GET(src,sstr*0, double) - OIL_GET(src,sstr*4, double)); ds07s34 = C0_9239* OIL_GET(src,sstr*2, double) + C0_3827* OIL_GET(src,sstr*6, double); ds16s25 = C0_3827* OIL_GET(src,sstr*2, double) - C0_9239* OIL_GET(src,sstr*6, double); s07 = ss07s34 + ds07s34; s34 = ss07s34 - ds07s34; s16 = ss16s25 + ds16s25; s25 = ss16s25 - ds16s25; d07 = C0_9808* OIL_GET(src,sstr*1, double) + C0_8315* OIL_GET(src,sstr*3, double) + C0_5556* OIL_GET(src,sstr*5, double) + C0_1951* OIL_GET(src,sstr*7, double); d16 = C0_8315* OIL_GET(src,sstr*1, double) - C0_1951* OIL_GET(src,sstr*3, double) - C0_9808* OIL_GET(src,sstr*5, double) - C0_5556* OIL_GET(src,sstr*7, double); d25 = C0_5556* OIL_GET(src,sstr*1, double) - C0_9808* OIL_GET(src,sstr*3, double) + C0_1951* OIL_GET(src,sstr*5, double) + C0_8315* OIL_GET(src,sstr*7, double); d34 = C0_1951* OIL_GET(src,sstr*1, double) - C0_5556* OIL_GET(src,sstr*3, double) + C0_8315* OIL_GET(src,sstr*5, double) - C0_9808* OIL_GET(src,sstr*7, double); OIL_GET(dest,dstr*0, double) = 0.5 * (s07 + d07); OIL_GET(dest,dstr*1, double) = 0.5 * (s16 + d16); OIL_GET(dest,dstr*2, double) = 0.5 * (s25 + d25); OIL_GET(dest,dstr*3, double) = 0.5 * (s34 + d34); OIL_GET(dest,dstr*4, double) = 0.5 * (s34 - d34); OIL_GET(dest,dstr*5, double) = 0.5 * (s25 - d25); OIL_GET(dest,dstr*6, double) = 0.5 * (s16 - d16); OIL_GET(dest,dstr*7, double) = 0.5 * (s07 - d07); } OIL_DEFINE_IMPL (idct8_f64_fastx, idct8_f64); liboil-0.3.17/liboil/liboiltest.c0000644000175000017500000004160211067011142013561 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #define MAX_PARAMS 20 /** * SECTION:liboiltest * @title:OilTest * @short_description: Test and profile function implementations. * */ static void oil_test_init_params (OilTest *test); static void fill_array (void *ptr, OilType type, int pre_n, int stride, int post_n); static double check_array (void *data, void *ref, OilType type, int pre_n, int stride, int post_n); static int check_holes (void *data, OilType type, int pre_n, int stride, int post_n, int guard); /** * oil_test_new: * @klass: an OilFunctionClass * * Creates a new OilTest for the OilFunctionClass represented by @klass. * * Returns: the new OilTest */ OilTest * oil_test_new (OilFunctionClass *klass) { OilTest *test; OilPrototype *proto; int i; if (klass == NULL) return NULL; proto = oil_prototype_from_string (klass->prototype); if (proto == NULL) return NULL; test = malloc (sizeof (OilTest)); memset (test, 0, sizeof (OilTest)); test->klass = klass; test->proto = proto; test->impl = klass->reference_impl; test->tolerance = 0.0; for (i=0;in_params;i++){ if (proto->params[i].parameter_type == OIL_ARG_UNKNOWN) { return NULL; } if (oil_type_is_floating_point(proto->params[i].type)) { test->tolerance = 0.001; } memcpy (&test->params[proto->params[i].parameter_type], &proto->params[i], sizeof(OilParameter)); } for (i=0;iparams[i].src_data = NULL; test->params[i].ref_data = NULL; test->params[i].test_data = NULL; test->params[i].test_header = OIL_TEST_HEADER; test->params[i].test_footer = OIL_TEST_FOOTER; } test->iterations = 10; test->n = 100; test->m = 100; return test; } /** * oil_test_free: * @test: the OilTest * * Frees memory associated with @test. */ void oil_test_free (OilTest *test) { int i; if (test->proto) { oil_prototype_free (test->proto); } for(i=0;iparams[i].src_data) { free (test->params[i].src_data); } if (test->params[i].ref_data) { free (test->params[i].ref_data); } if (test->params[i].test_data) { free (test->params[i].test_data); } } free(test); } /** * oil_test_set_impl: * @test: the OilTest * @impl: an OilFunctionImpl to set * * Sets the current implementation of @test to @impl. */ void oil_test_set_impl (OilTest *test, OilFunctionImpl *impl) { test->impl = impl; } /** * oil_test_set_iterations: * @test: the OilTest * @iterations: the number of iterations * * Sets the number of iterations of @test to @iterations. */ void oil_test_set_iterations (OilTest *test, int iterations) { test->iterations = iterations; } /** * oil_test_set_test_header: * @test: the OilTest * @p: the OilParameter to change the header for * @test_header: the number of bytes of guard header * * Sets the number of bytes of guard header for @p to @test_header. */ void oil_test_set_test_header (OilTest *test, OilParameter *p, int test_header) { p->test_header = test_header; } /** * oil_test_set_test_footer: * @test: the OilTest * @p: the OilParameter to change the footer for * @test_footer: the number of bytes of guard footer * * Sets the number of bytes of guard footer for @p to @test_footer. */ void oil_test_set_test_footer (OilTest *test, OilParameter *p, int test_footer) { p->test_footer = test_footer; } /** * oil_test_init: * @test: the OilTest * * Intializes @test. * * FIXME: needs work */ void oil_test_init (OilTest *test) { if (test->inited) { return; } oil_test_init_params(test); test->params[OIL_ARG_N].value = test->n; test->inited = 1; if (test->klass->test_func) { test->klass->test_func (test); } } static void oil_test_check_function (void * priv) { OilTest *test = priv; int i; int j; unsigned long args[MAX_PARAMS]; unsigned int pointer_mask; oil_test_init (test); OIL_LOG("calling function %s", test->impl->name); pointer_mask = 1; for(i=0;iproto->n_params;i++){ OilParameter *p; j = test->proto->params[i].parameter_type; p = &test->params[j]; pointer_mask <<= 1; OIL_LOG(" %s: 0x%08lx (%ld)", oil_arg_type_name (j), p->value, p->value); if (p->is_pointer) { pointer_mask |= 1; if (p->direction == 's') { args[i] = (unsigned long)p->src_data + p->test_header; } else if (p->direction == 'i') { memcpy (p->test_data, p->src_data, p->size); args[i] = (unsigned long)p->test_data + p->test_header; } else if (p->direction == 'd') { memset (p->test_data, p->guard, p->size); args[i] = (unsigned long)p->test_data + p->test_header; } else { OIL_ERROR ("not reached"); } } else { args[i] = p->value; } } oil_profile_init (&test->prof); for(i=0;iiterations;i++){ int k; for(k=0;kproto->n_params;k++){ OilParameter *p; j = test->proto->params[k].parameter_type; p = &test->params[j]; if (p->direction == 'i') { memcpy (p->test_data, p->src_data, p->size); } } _oil_test_marshal_function (test->impl->func, args, test->proto->n_params, pointer_mask, &test->prof); } oil_profile_get_ave_std (&test->prof, &test->profile_ave, &test->profile_std); } /** * oil_test_check_ref: * @test: the OilTest * * Runs the test specified by @test on the reference function of the * class being tested. */ void oil_test_check_ref (OilTest *test) { int i; if (test->proto->n_params > MAX_PARAMS) { OIL_ERROR ("function class %s has too many parameters", test->klass->name); return; } if (test->klass->reference_impl == NULL) { OIL_ERROR ("function class %s has no reference implementation", test->klass->name); return; } test->impl = test->klass->reference_impl; oil_test_check_function (test); for(i=0;iparams[i]; if (p->is_pointer) { if (p->direction == 'i' || p->direction == 'd') { memcpy (p->ref_data, p->test_data, p->size); } } } test->tested_ref = 1; } static int check_guard (uint8_t *data, int n, int guard) { int i; for(i=0;iproto->n_params > MAX_PARAMS) { OIL_ERROR ("function has too many parameters"); return 0; } if (!test->inited || !test->tested_ref) { oil_test_check_ref(test); } test->impl = impl; ret = oil_fault_check_try (oil_test_check_function, test); if (!ret) { OIL_ERROR ("illegal instruction in %s", test->impl->name); test->profile_ave = 0; test->profile_std = 0; return 0; } x = 0; n = 0; for(i=0;iparams[i]; if (p->is_pointer) { if (p->direction == 'i' || p->direction == 'd') { x += check_array (p->test_data + p->test_header, p->ref_data + p->test_header, p->type, p->pre_n, p->stride, p->post_n); n += p->pre_n * p->post_n; if (!check_guard (p->test_data, p->test_header, p->guard)) { fail = 1; OIL_ERROR("function %s wrote before area for parameter %s", test->impl->name, p->parameter_name); } if (!check_guard ((uint8_t *)p->test_data + p->size - p->test_footer, p->test_footer, p->guard)) { fail = 1; OIL_ERROR("function %s wrote after area for parameter %s", test->impl->name, p->parameter_name); } if (!check_holes (p->test_data, p->type, p->pre_n, p->stride, p->post_n, p->guard)) { fail = 1; OIL_ERROR("function %s wrote in interstitial area for parameter %s", test->impl->name, p->parameter_name); } } } } OIL_DEBUG("sum of absolute differences %g for %d values", x, n); test->sum_abs_diff = x; test->n_points = n; if (x > test->tolerance * n || fail) { OIL_ERROR ("function %s in class %s failed check (%g > %g) || (outside=%d)", test->impl->name, test->klass->name, x, test->tolerance * n, fail); return 0; } return 1; } /** * oil_test_cleanup * @test: the OilTest * * Cleans up @test. * * FIXME: needs work */ void oil_test_cleanup (OilTest *test) { OilParameter *params = test->params; /* src1 */ if(params[OIL_ARG_SRC1].type) { if (!params[OIL_ARG_SSTR1].type) { params[OIL_ARG_SSTR1].value = oil_type_sizeof (params[OIL_ARG_SRC1].type); } } /* src2 */ if(params[OIL_ARG_SRC2].type) { if (!params[OIL_ARG_SSTR2].type) { params[OIL_ARG_SSTR2].value = oil_type_sizeof (params[OIL_ARG_SRC2].type); } } /* src3 */ if(params[OIL_ARG_SRC3].type) { if (!params[OIL_ARG_SSTR3].type) { params[OIL_ARG_SSTR3].value = oil_type_sizeof (params[OIL_ARG_SRC3].type); } } /* dest1 */ if(params[OIL_ARG_DEST1].type) { if (!params[OIL_ARG_DSTR1].type) { params[OIL_ARG_DSTR1].value = oil_type_sizeof (params[OIL_ARG_DEST1].type); } } /* dest2 */ if(params[OIL_ARG_DEST2].type) { if (!params[OIL_ARG_DSTR2].type) { params[OIL_ARG_DSTR2].value = oil_type_sizeof (params[OIL_ARG_DEST2].type); } } /* dest3 */ if(params[OIL_ARG_DEST3].type) { if (!params[OIL_ARG_DSTR3].type) { params[OIL_ARG_DSTR3].value = oil_type_sizeof (params[OIL_ARG_DEST3].type); } } } static void init_parameter (OilTest *test, OilParameter *p, OilParameter *ps) { if (!p->type) return; p->pre_n = p->prestride_length; if (p->prestride_var == 1) { p->pre_n += test->n; } if (p->prestride_var == 2) { p->pre_n += test->m; } if (ps->value) { p->stride = ps->value; } else { p->stride = oil_type_sizeof (p->type) * p->pre_n; ps->value = p->stride; } p->post_n = p->poststride_length; if (p->poststride_var == 1) { p->post_n += test->n; } if (p->poststride_var == 2) { p->post_n += test->m; } p->size = p->stride * p->post_n + p->test_header + p->test_footer; p->guard = oil_rand_u8(); if (p->direction == 'i' || p->direction == 's') { if (p->src_data) free (p->src_data); OIL_DEBUG("allocating %d bytes for src_data for %s", p->size, p->parameter_name); p->src_data = malloc (p->size); memset (p->src_data, p->guard, p->size); fill_array (p->src_data + p->test_header, p->type, p->pre_n, p->stride, p->post_n); } if (p->direction == 'i' || p->direction == 'd') { if (p->ref_data) free (p->ref_data); p->ref_data = malloc (p->size); memset (p->ref_data, p->guard, p->size); OIL_DEBUG("allocating %d bytes for ref_data and test_data for %s", p->size, p->parameter_name); if (p->test_data) free (p->test_data); p->test_data = malloc (p->size); memset (p->test_data, p->guard, p->size); } } static void oil_test_init_params (OilTest *test) { init_parameter (test, &test->params[OIL_ARG_DEST1], &test->params[OIL_ARG_DSTR1]); init_parameter (test, &test->params[OIL_ARG_DEST2], &test->params[OIL_ARG_DSTR2]); init_parameter (test, &test->params[OIL_ARG_DEST3], &test->params[OIL_ARG_DSTR3]); init_parameter (test, &test->params[OIL_ARG_SRC1], &test->params[OIL_ARG_SSTR1]); init_parameter (test, &test->params[OIL_ARG_SRC2], &test->params[OIL_ARG_SSTR2]); init_parameter (test, &test->params[OIL_ARG_SRC3], &test->params[OIL_ARG_SSTR3]); init_parameter (test, &test->params[OIL_ARG_SRC4], &test->params[OIL_ARG_SSTR4]); init_parameter (test, &test->params[OIL_ARG_SRC5], &test->params[OIL_ARG_SSTR5]); init_parameter (test, &test->params[OIL_ARG_INPLACE1], &test->params[OIL_ARG_ISTR1]); init_parameter (test, &test->params[OIL_ARG_INPLACE2], &test->params[OIL_ARG_ISTR2]); } static void fill_array (void *data, OilType type, int pre_n, int stride, int post_n) { int i; #define FILL(type,func) do {\ for(i=0;iparams[arg_type].src_data; ptr += test->params[arg_type].test_header; return ptr; } int oil_test_get_arg_pre_n (OilTest *test, OilArgType arg_type) { return test->params[arg_type].pre_n; } int oil_test_get_arg_post_n (OilTest *test, OilArgType arg_type) { return test->params[arg_type].post_n; } int oil_test_get_arg_stride (OilTest *test, OilArgType arg_type) { return test->params[arg_type].stride; } int oil_test_get_value (OilTest *test, OilArgType arg_type) { return test->params[arg_type].value; } liboil-0.3.17/liboil/utf8/0000777000175000017500000000000011332637376012234 500000000000000liboil-0.3.17/liboil/utf8/utf8.c0000644000175000017500000001016110717203073013166 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "utf8.h" /* * Little explanation: * 0x00-0x7f ASCII, one byte character * 0x80-0xbf continuation byte, not a valid start byte * 0xc0-0xdf 2-byte character * 0xe0-0xef 3-byte character * 0xf0-0xf7 4-byte character * 0xf8-0xff reserved (illegal at the present time) */ static void utf8_validate_test (OilTest *test) { int i; int n = test->n; uint8_t *ptr = oil_test_get_source_data (test, OIL_ARG_SRC1); int x; int extra_chars = 0; for (i=0;i= n-16) { /* if it's close to the end, we'll randomly drop in a bad * byte from either the 0x80-0xbf or 0xf8-0xff segments */ x = oil_rand_u8(); if (x < 16) { x = oil_rand_u8(); if (extra_chars>0) { /* this might not actually be a bad char */ ptr[i] = x; extra_chars--; } else { if (x & 0x80) { ptr[i] = 0x80 | (x&0x3f); } else { ptr[i] = 0xf8 | (x&0x07); } } continue; } } if (extra_chars > 0) { ptr[i] = 0x80 | (oil_rand_u8() & 0x3f); extra_chars--; } else { /* otherwise, we'll do a low probability of a multibyte char */ x = oil_rand_u8() & 0xf; if (x == 0) { ptr[i] = 0xc0 | (oil_rand_u8() & 0x1f); extra_chars = 1; } else if (x == 1) { ptr[i] = 0xe0 | (oil_rand_u8() & 0x0f); extra_chars = 2; } else if (x == 2) { ptr[i] = 0xf0 | (oil_rand_u8() & 0x07); extra_chars = 3; } else { ptr[i] = oil_rand_u8() & 0x7f; } } } } /** * oil_utf8_validate: * @d_1: * @s: * @n: * * Checks @s for valid UTF-8 characters. If the entire @s array * represents valid UTF-8 characters, @n is written to @d_1. * Otherwise, the index in the array of the beginning of the first * invalid UTF-8 character is written to @d_1. */ OIL_DEFINE_CLASS_FULL (utf8_validate, "int32_t *d_1, uint8_t *s, int n", utf8_validate_test); static void utf8_validate_ref (int32_t *d_1, uint8_t *s, int n) { int i; int extra_bytes; int mask; for(i=0;i= n) goto error; while(extra_bytes--) { i++; if ((s[i] & 0xc0) != 0x80) goto error; } } error: d_1[0] = i; } OIL_DEFINE_IMPL_REF (utf8_validate_ref, utf8_validate); liboil-0.3.17/liboil/utf8/utf8_fast.c0000644000175000017500000001522610717203073014212 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "liboil/utf8/utf8.h" #ifdef HAVE_UNALIGNED_ACCESS static void utf8_validate_fast (int32_t *d_1, uint8_t *s, int n) { int i; int extra_bytes; int mask; i=0; while (i= n) goto error; while(extra_bytes--) { i++; if ((s[i] & 0xc0) != 0x80) goto error; } i++; } error: d_1[0] = i; } OIL_DEFINE_IMPL (utf8_validate_fast, utf8_validate); #endif static void utf8_validate_fast2 (int32_t *d_1, uint8_t *s, int n) { int i; uint8_t x; i=0; while (i= n) goto error; i++; if ((s[i] & 0xc0) != 0x80) goto error; i++; continue; } x <<= 1; if (!(x & 0x80)) { if (i + 2 >= n) goto error; i++; if ((s[i] & 0xc0) != 0x80) goto error; i++; if ((s[i] & 0xc0) != 0x80) goto error; i++; continue; } x <<= 1; if (!(x & 0x80)) { if (i + 3 >= n) goto error; i++; if ((s[i] & 0xc0) != 0x80) goto error; i++; if ((s[i] & 0xc0) != 0x80) goto error; i++; if ((s[i] & 0xc0) != 0x80) goto error; i++; continue; } goto error; } error: d_1[0] = i; } OIL_DEFINE_IMPL (utf8_validate_fast2, utf8_validate); #ifdef HAVE_UNALIGNED_ACCESS static void utf8_validate_fast3 (int32_t *d_1, uint8_t *s, int n) { int i; uint8_t x; i=0; while (i= n) goto error; i++; if ((s[i] & 0xc0) != 0x80) goto error; i++; continue; } if (!(x & 0x10)) { if (i + 2 >= n) goto error; i++; if ((s[i] & 0xc0) != 0x80) goto error; i++; if ((s[i] & 0xc0) != 0x80) goto error; i++; continue; } if (!(x & 0x08)) { if (i + 3 >= n) goto error; i++; if ((s[i] & 0xc0) != 0x80) goto error; i++; if ((s[i] & 0xc0) != 0x80) goto error; i++; if ((s[i] & 0xc0) != 0x80) goto error; i++; continue; } goto error; } error: d_1[0] = i; } OIL_DEFINE_IMPL (utf8_validate_fast3, utf8_validate); #endif static uint8_t utf8_table[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 8, 8, 8, 8, 8, 8, 8, 8 }; static void utf8_validate_lookup (int32_t *d_1, uint8_t *s, int n) { int i; uint8_t x; i=0; while (i 0) { if (x == 8 || i + x >= n) goto error; while (x>0) { i++; if ((s[i] & 0xc0) != 0x80) goto error; x--; } } i++; } error: d_1[0] = i; } OIL_DEFINE_IMPL (utf8_validate_lookup, utf8_validate); #if 0 static void utf8_validate_asm1 (int32_t *d_1, uint8_t *s, int n) { uint8_t *tmp = s; asm ( "1:\n" " movb (%%eax), %%bl\n" " testb %%bl, %%bl\n" //" jns 3f\n" " js 2f\n" "3:\n" " addl $1, %%eax\n" " subl $1, %%ecx\n" " jne 1b\n" "2:\n" : "+a" (tmp), "+c" (n) : : "ebx" ); d_1[0] = tmp - s; } OIL_DEFINE_IMPL (utf8_validate_asm1, utf8_validate); static void utf8_validate_asm2 (int32_t *d_1, uint8_t *s, int n) { uint8_t *tmp = s; asm ( "1:\n" " testl $0x80808080, (%%eax)\n" " jne 2f\n" " testl $0x80808080, 4(%%eax)\n" " jne 2f\n" " testl $0x80808080, 8(%%eax)\n" " jne 2f\n" " testl $0x80808080, 12(%%eax)\n" " jne 2f\n" " addl $16, %%eax\n" " subl $16, %%ecx\n" " jge 1b\n" " jl 4f\n" "2:\n" " movb (%%eax), %%bl\n" " testb %%bl, %%bl\n" " js 4f\n" "3:\n" " addl $1, %%eax\n" " subl $1, %%ecx\n" " jne 1b\n" "4:\n" : "+a" (tmp), "+c" (n) : : "ebx" ); d_1[0] = tmp - s; } OIL_DEFINE_IMPL (utf8_validate_asm2, utf8_validate); #endif liboil-0.3.17/liboil/utf8/utf8.h0000644000175000017500000000275210717203073013202 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_MD5_H_ #define _LIBOIL_MD5_H_ #include OIL_DECLARE_CLASS(utf8_validate); #endif liboil-0.3.17/liboil/utf8/Makefile.am0000644000175000017500000000054710717203073014177 00000000000000 if USE_ALT_OPT opt_libs = libutf8_opt.la else opt_libs = endif noinst_LTLIBRARIES = libutf8.la $(opt_libs) noinst_HEADERS = utf8.h libutf8_la_SOURCES = \ utf8.c utf8_fast.c libutf8_la_LIBADD = $(opt_libs) libutf8_la_CFLAGS = $(LIBOIL_CFLAGS) libutf8_opt_la_SOURCES = $(libutf8_la_SOURCES) libutf8_opt_la_CFLAGS = $(LIBOIL_CFLAGS) $(LIBOIL_OPT_CFLAGS) liboil-0.3.17/liboil/utf8/Makefile.in0000644000175000017500000005035211332627674014222 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = liboil/utf8 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @USE_ALT_OPT_TRUE@am__DEPENDENCIES_1 = libutf8_opt.la libutf8_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libutf8_la_OBJECTS = libutf8_la-utf8.lo libutf8_la-utf8_fast.lo libutf8_la_OBJECTS = $(am_libutf8_la_OBJECTS) libutf8_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libutf8_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ libutf8_opt_la_LIBADD = am__objects_1 = libutf8_opt_la-utf8.lo libutf8_opt_la-utf8_fast.lo am_libutf8_opt_la_OBJECTS = $(am__objects_1) libutf8_opt_la_OBJECTS = $(am_libutf8_opt_la_OBJECTS) libutf8_opt_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libutf8_opt_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_ALT_OPT_TRUE@am_libutf8_opt_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libutf8_la_SOURCES) $(libutf8_opt_la_SOURCES) DIST_SOURCES = $(libutf8_la_SOURCES) $(libutf8_opt_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @USE_ALT_OPT_FALSE@opt_libs = @USE_ALT_OPT_TRUE@opt_libs = libutf8_opt.la noinst_LTLIBRARIES = libutf8.la $(opt_libs) noinst_HEADERS = utf8.h libutf8_la_SOURCES = \ utf8.c utf8_fast.c libutf8_la_LIBADD = $(opt_libs) libutf8_la_CFLAGS = $(LIBOIL_CFLAGS) libutf8_opt_la_SOURCES = $(libutf8_la_SOURCES) libutf8_opt_la_CFLAGS = $(LIBOIL_CFLAGS) $(LIBOIL_OPT_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/utf8/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/utf8/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libutf8.la: $(libutf8_la_OBJECTS) $(libutf8_la_DEPENDENCIES) $(libutf8_la_LINK) $(libutf8_la_OBJECTS) $(libutf8_la_LIBADD) $(LIBS) libutf8_opt.la: $(libutf8_opt_la_OBJECTS) $(libutf8_opt_la_DEPENDENCIES) $(libutf8_opt_la_LINK) $(am_libutf8_opt_la_rpath) $(libutf8_opt_la_OBJECTS) $(libutf8_opt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutf8_la-utf8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutf8_la-utf8_fast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutf8_opt_la-utf8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutf8_opt_la-utf8_fast.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libutf8_la-utf8.lo: utf8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutf8_la_CFLAGS) $(CFLAGS) -MT libutf8_la-utf8.lo -MD -MP -MF $(DEPDIR)/libutf8_la-utf8.Tpo -c -o libutf8_la-utf8.lo `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libutf8_la-utf8.Tpo $(DEPDIR)/libutf8_la-utf8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utf8.c' object='libutf8_la-utf8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutf8_la_CFLAGS) $(CFLAGS) -c -o libutf8_la-utf8.lo `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c libutf8_la-utf8_fast.lo: utf8_fast.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutf8_la_CFLAGS) $(CFLAGS) -MT libutf8_la-utf8_fast.lo -MD -MP -MF $(DEPDIR)/libutf8_la-utf8_fast.Tpo -c -o libutf8_la-utf8_fast.lo `test -f 'utf8_fast.c' || echo '$(srcdir)/'`utf8_fast.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libutf8_la-utf8_fast.Tpo $(DEPDIR)/libutf8_la-utf8_fast.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utf8_fast.c' object='libutf8_la-utf8_fast.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutf8_la_CFLAGS) $(CFLAGS) -c -o libutf8_la-utf8_fast.lo `test -f 'utf8_fast.c' || echo '$(srcdir)/'`utf8_fast.c libutf8_opt_la-utf8.lo: utf8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutf8_opt_la_CFLAGS) $(CFLAGS) -MT libutf8_opt_la-utf8.lo -MD -MP -MF $(DEPDIR)/libutf8_opt_la-utf8.Tpo -c -o libutf8_opt_la-utf8.lo `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libutf8_opt_la-utf8.Tpo $(DEPDIR)/libutf8_opt_la-utf8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utf8.c' object='libutf8_opt_la-utf8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutf8_opt_la_CFLAGS) $(CFLAGS) -c -o libutf8_opt_la-utf8.lo `test -f 'utf8.c' || echo '$(srcdir)/'`utf8.c libutf8_opt_la-utf8_fast.lo: utf8_fast.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutf8_opt_la_CFLAGS) $(CFLAGS) -MT libutf8_opt_la-utf8_fast.lo -MD -MP -MF $(DEPDIR)/libutf8_opt_la-utf8_fast.Tpo -c -o libutf8_opt_la-utf8_fast.lo `test -f 'utf8_fast.c' || echo '$(srcdir)/'`utf8_fast.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libutf8_opt_la-utf8_fast.Tpo $(DEPDIR)/libutf8_opt_la-utf8_fast.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='utf8_fast.c' object='libutf8_opt_la-utf8_fast.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libutf8_opt_la_CFLAGS) $(CFLAGS) -c -o libutf8_opt_la-utf8_fast.lo `test -f 'utf8_fast.c' || echo '$(srcdir)/'`utf8_fast.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/Makefile.am0000644000175000017500000001627011332624501013306 00000000000000 pkgincludedir = $(includedir)/liboil-@LIBOIL_MAJORMINOR@/liboil DIST_SUBDIRS = amd64 3dnow c colorspace conv copy dct fb i386 i386_amd64 jpeg math md5 mmx motovec powerpc powerpc_asm_blocks ref simdpack sse utf8 deprecated arm SUBDIRS = c colorspace conv copy dct jpeg math md5 ref simdpack utf8 deprecated EXTRA_DIST = README libs = if HAVE_I386 if HAVE_GCC_ASM SUBDIRS += i386 i386_amd64 libs += i386/libi386.la i386_amd64/libi386_amd64.la endif endif if HAVE_MMX_INTRINSICS SUBDIRS += mmx libs += mmx/libmmx.la endif if HAVE_SSE2_INTRINSICS SUBDIRS += fb sse libs += fb/libfb.la sse/libsse.la endif if HAVE_3DNOW_INTRINSICS #subdir_i386 += 3dnow #libs_i386 += 3dnow/lib3dnow.la endif if HAVE_AMD64 if HAVE_GCC_ASM SUBDIRS += amd64 i386_amd64 libs += amd64/libamd64.la i386_amd64/libi386_amd64.la endif endif if HAVE_POWERPC if HAVE_GCC_ASM SUBDIRS += powerpc motovec libs += powerpc/libpowerpc.la motovec/libmotovec.la # motovec doesn't compile on snow leopard, and isn't useful elsewhere #SUBDIRS += motovec #libs += motovec/libmotovec.la if HAVE_ASM_BLOCKS SUBDIRS += powerpc_asm_blocks libs += powerpc/libpowerpc_asm_blocks.la endif endif endif if HAVE_ARM if HAVE_GCC_ASM SUBDIRS += arm libs += arm/libarm.la endif endif lib_LTLIBRARIES = liboil-@LIBOIL_MAJORMINOR@.la if USE_NEW_ABI lib_LTLIBRARIES += liboil-@LIBOIL_OLD_MAJORMINOR@.la endif buildnoinstdir = $(libdir) buildnoinst_LTLIBRARIES = liboiltmp1.la noinst_LTLIBRARIES = liboilfunctions.la noinst_PROGRAMS = build_prototypes build_prototypes_doc build_marshal \ build_class_decls build_trampolines build_prototypes_04 pkginclude_HEADERS = liboil.h liboilfunction.h liboildebug.h liboilfuncs.h \ liboiltypes.h liboilcpu.h liboilprototype.h liboilparameter.h \ liboilrandom.h liboilgcc.h liboiltest.h liboilprofile.h \ liboilinternal.h liboilclasses.h liboilfault.h liboilutils.h nodist_pkginclude_HEADERS = liboil-stdint.h if ENABLE_GTK_DOC nodist_noinst_HEADERS = liboilfuncs-doc.h else nodist_noinst_HEADERS = endif CLEANFILES = liboilarray.c liboilfuncs-doc.h DISTCLEANFILES = liboil-stdint.h liboilfunctions_la_SOURCES = \ null.c liboilfunctions_la_CFLAGS = $(LIBOIL_CFLAGS) liboilfunctions_la_LIBADD = \ c/lib_c.la \ colorspace/libcolorspace.la \ copy/libcopy.la \ dct/libdct.la \ $(libs) \ jpeg/libjpeg.la \ math/libmath.la \ md5/libmd5.la \ ref/libref.la \ simdpack/libsimdpack.la \ utf8/libutf8.la if USE_NEW_ABI else liboilfunctions_la_LIBADD += \ conv/libconv.la \ deprecated/libdeprecated.la endif liboilfunctions_la_LDFLAGS = \ -no-undefined liboiltmp1_la_SOURCES = \ liboiltmp.c liboiltmp1_la_LDFLAGS = \ -no-undefined \ -export-symbols-regex 'oil_' liboiltmp1_la_LIBADD = \ liboilfunctions.la \ $(LIBM) $(LIBRT) liboil_@LIBOIL_MAJORMINOR@_la_SOURCES = \ liboil.h \ liboilcolorspace.h \ liboilcpu.c \ liboildebug.c \ liboildebug.h \ liboilfault.c \ liboilfault.h \ liboilfuncs.h \ liboilfunction.c \ liboilfunction.h \ liboilmarshal.c \ liboilprofile.c \ liboilprofile.h \ liboilprototype.c \ liboilrandom.c \ liboiltest.c \ liboiltest.h \ liboiltypes.h \ liboilutils.c \ liboilutils.h if HAVE_I386 liboil_@LIBOIL_MAJORMINOR@_la_SOURCES += liboilcpu-x86.c else if HAVE_AMD64 liboil_@LIBOIL_MAJORMINOR@_la_SOURCES += liboilcpu-x86.c else if HAVE_POWERPC liboil_@LIBOIL_MAJORMINOR@_la_SOURCES += liboilcpu-powerpc.c else if HAVE_ARM liboil_@LIBOIL_MAJORMINOR@_la_SOURCES += liboilcpu-arm.c else liboil_@LIBOIL_MAJORMINOR@_la_SOURCES += liboilcpu-misc.c endif endif endif endif nodist_liboil_@LIBOIL_MAJORMINOR@_la_SOURCES = \ liboilarray.c if USE_NEW_ABI liboil_@LIBOIL_MAJORMINOR@_la_SOURCES += \ liboiltrampolines.c endif liboil_@LIBOIL_MAJORMINOR@_la_LIBADD = \ liboilfunctions.la \ $(LIBM) \ $(LIBRT) liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS = $(LIBOIL_CFLAGS) liboil_@LIBOIL_MAJORMINOR@_la_LDFLAGS = \ -no-undefined \ -version-info $(LIBOIL_LIBVERSION) \ -export-symbols-regex '^oil_' # This is required to use 'make -j2'. Automake doesn't seem to notice # that one of the dependencies is in this directory. build_prototypes_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la build_prototypes_SOURCES = build_prototypes.c build_prototypes_CFLAGS = $(LIBOIL_CFLAGS) build_prototypes_LDADD = $(LIBOIL_LIBS) build_prototypes_04_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la build_prototypes_04_SOURCES = build_prototypes_04.c build_prototypes_04_CFLAGS = $(LIBOIL_CFLAGS) build_prototypes_04_LDADD = $(LIBOIL_LIBS) build_class_decls_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la build_class_decls_SOURCES = build_class_decls.c build_class_decls_CFLAGS = $(LIBOIL_CFLAGS) build_class_decls_LDADD = $(LIBOIL_LIBS) build_prototypes_doc_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la build_prototypes_doc_SOURCES = build_prototypes_doc.c build_prototypes_doc_CFLAGS = $(LIBOIL_CFLAGS) build_prototypes_doc_LDADD = $(LIBOIL_LIBS) build_marshal_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la build_marshal_SOURCES = build_marshal.c build_marshal_CFLAGS = $(LIBOIL_CFLAGS) build_marshal_LDADD = $(LIBOIL_LIBS) build_trampolines_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la build_trampolines_SOURCES = build_trampolines.c build_trampolines_CFLAGS = $(LIBOIL_CFLAGS) build_trampolines_LDADD = $(LIBOIL_LIBS) liboilarray.c: liboiltmp1.la Makefile echo '/* This file is autogenerated. Do not edit */' >liboilarray.c.tmp echo >>liboilarray.c.tmp echo '#include ' >>liboilarray.c.tmp echo >>liboilarray.c.tmp grep '^_oil_function_class_' .libs/liboiltmp1.exp | \ sed -e 's/ DATA$$//' -e 's/ .*//' -e 's/.*/extern OilFunctionClass &;/' >>liboilarray.c.tmp echo >>liboilarray.c.tmp echo 'OilFunctionClass *_oil_function_class_array[] = {' >>liboilarray.c.tmp grep '^_oil_function_class_' .libs/liboiltmp1.exp | \ sed -e 's/ .*//' -e 's/.*/ \&&,/' >>liboilarray.c.tmp echo ' NULL' >>liboilarray.c.tmp echo '};' >>liboilarray.c.tmp echo >>liboilarray.c.tmp grep '^_oil_function_impl_' .libs/liboiltmp1.exp | \ sed -e 's/ .*//' -e 's/.*/extern OilFunctionImpl &;/' >>liboilarray.c.tmp echo >>liboilarray.c.tmp echo 'OilFunctionImpl *_oil_function_impl_array[] = {' >>liboilarray.c.tmp grep '^_oil_function_impl_' .libs/liboiltmp1.exp | \ sed -e 's/ .*//' -e 's/.*/ \&&,/' >>liboilarray.c.tmp echo ' NULL' >>liboilarray.c.tmp echo '};' >>liboilarray.c.tmp echo >>liboilarray.c.tmp cmp liboilarray.c.tmp liboilarray.c || mv liboilarray.c.tmp liboilarray.c liboilfuncs-doc.h: build_prototypes_doc$(EXEEXT) ./build_prototypes_doc$(EXEEXT) >liboilfuncs-doc.h update: build_prototypes$(EXEEXT) build_marshal$(EXEEXT) build_prototypes_doc$(EXEEXT) build_class_decls$(EXEEXT) build_trampolines$(EXTEXT) build_prototypes_04$(EXTEXT) ./build_prototypes$(EXEEXT) >liboilfuncs.h ./build_marshal$(EXEEXT) >liboilmarshal.c ./build_prototypes_doc$(EXEEXT) >liboilfuncs-doc.h ./build_class_decls$(EXEEXT) >liboilclasses.h ./build_trampolines$(EXTEXT) >liboiltrampolines.c ./build_prototypes_04$(EXTEXT) >liboilfuncs-04.h install-buildnoinstLTLIBRARIES: if USE_NEW_ABI liboil_@LIBOIL_OLD_MAJORMINOR@_la_SOURCES = liboil_@LIBOIL_OLD_MAJORMINOR@_la_LIBADD = \ deprecated/libdeprecated.la \ liboil-@LIBOIL_MAJORMINOR@.la liboil_@LIBOIL_OLD_MAJORMINOR@_la_LDFLAGS = \ -no-undefined \ -version-info $(LIBOIL_LIBVERSION) \ -export-symbols-regex '^oil_' endif liboil-0.3.17/liboil/liboilcpu.h0000644000175000017500000000340711066763263013420 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_CPU_H_ #define _LIBOIL_CPU_H_ #include OIL_BEGIN_DECLS unsigned int oil_cpu_get_flags (void); #ifdef OIL_ENABLE_UNSTABLE_API void _oil_cpu_init (void); double oil_cpu_get_ticks_per_second (void); double oil_cpu_get_frequency (void); OIL_EXPORT unsigned long oil_cpu_flags; OIL_EXPORT unsigned long (*_oil_profile_stamp)(void); #endif OIL_END_DECLS #endif liboil-0.3.17/liboil/copy/0000777000175000017500000000000011332637375012317 500000000000000liboil-0.3.17/liboil/copy/copy8x8.c0000644000175000017500000000540110717203073013707 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include OIL_DECLARE_CLASS (copy8x8_u8); #ifdef HAVE_UNALIGNED_ACCESS static void copy8x8_u8_ints (uint8_t *d1, int ds, const uint8_t *s1, int ss) { int j; for (j=0;j<8;j++){ ((uint32_t*)d1)[0] = ((uint32_t*)s1)[0]; ((uint32_t*)d1)[1] = ((uint32_t*)s1)[1]; d1+=ds; s1+=ss; } } OIL_DEFINE_IMPL (copy8x8_u8_ints, copy8x8_u8); #endif #ifdef HAVE_UNALIGNED_ACCESS static void copy8x8_u8_ints_unrolled (uint8_t *d1, int ds, const uint8_t *s1, int ss) { ((uint32_t*)d1)[0] = ((uint32_t*)s1)[0]; ((uint32_t*)d1)[1] = ((uint32_t*)s1)[1]; d1+=ds; s1+=ss; ((uint32_t*)d1)[0] = ((uint32_t*)s1)[0]; ((uint32_t*)d1)[1] = ((uint32_t*)s1)[1]; d1+=ds; s1+=ss; ((uint32_t*)d1)[0] = ((uint32_t*)s1)[0]; ((uint32_t*)d1)[1] = ((uint32_t*)s1)[1]; d1+=ds; s1+=ss; ((uint32_t*)d1)[0] = ((uint32_t*)s1)[0]; ((uint32_t*)d1)[1] = ((uint32_t*)s1)[1]; d1+=ds; s1+=ss; ((uint32_t*)d1)[0] = ((uint32_t*)s1)[0]; ((uint32_t*)d1)[1] = ((uint32_t*)s1)[1]; d1+=ds; s1+=ss; ((uint32_t*)d1)[0] = ((uint32_t*)s1)[0]; ((uint32_t*)d1)[1] = ((uint32_t*)s1)[1]; d1+=ds; s1+=ss; ((uint32_t*)d1)[0] = ((uint32_t*)s1)[0]; ((uint32_t*)d1)[1] = ((uint32_t*)s1)[1]; d1+=ds; s1+=ss; ((uint32_t*)d1)[0] = ((uint32_t*)s1)[0]; ((uint32_t*)d1)[1] = ((uint32_t*)s1)[1]; } OIL_DEFINE_IMPL (copy8x8_u8_ints_unrolled, copy8x8_u8); #endif liboil-0.3.17/liboil/copy/trans8x8_c.c0000644000175000017500000000703310717203073014371 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include OIL_DECLARE_CLASS (trans8x8_u16); static void trans8x8_u16_c1 (uint16_t *dest, int dstr, const uint16_t *src, int sstr) { int i; int j; uint16_t *d, *s; for(i=0;i<8;i++){ d = OIL_OFFSET(dest, 2*i); s = OIL_OFFSET(src, sstr*i); for(j=0;j<8;j++){ OIL_GET(d,dstr*j,uint16_t) = s[j]; } } } OIL_DEFINE_IMPL (trans8x8_u16_c1, trans8x8_u16); static void trans8x8_u16_c2 (uint16_t *dest, int dstr, const uint16_t *src, int sstr) { int i; uint16_t *d, *s; for(i=0;i<8;i++){ d = OIL_OFFSET(dest, 2*i); s = OIL_OFFSET(src, sstr*i); *d = *s; s++; d = OIL_OFFSET(d, dstr); *d = *s; s++; d = OIL_OFFSET(d, dstr); *d = *s; s++; d = OIL_OFFSET(d, dstr); *d = *s; s++; d = OIL_OFFSET(d, dstr); *d = *s; s++; d = OIL_OFFSET(d, dstr); *d = *s; s++; d = OIL_OFFSET(d, dstr); *d = *s; s++; d = OIL_OFFSET(d, dstr); *d = *s; s++; d = OIL_OFFSET(d, dstr); } } OIL_DEFINE_IMPL (trans8x8_u16_c2, trans8x8_u16); static void trans8x8_u16_c3 (uint16_t *dest, int dstr, const uint16_t *src, int sstr) { int i; uint16_t *d, *s; for(i=0;i<8;i++){ d = OIL_OFFSET(dest, 2*i); s = OIL_OFFSET(src, sstr*i); OIL_GET(d,dstr*0,uint16_t) = s[0]; OIL_GET(d,dstr*1,uint16_t) = s[1]; OIL_GET(d,dstr*2,uint16_t) = s[2]; OIL_GET(d,dstr*3,uint16_t) = s[3]; OIL_GET(d,dstr*4,uint16_t) = s[4]; OIL_GET(d,dstr*5,uint16_t) = s[5]; OIL_GET(d,dstr*6,uint16_t) = s[6]; OIL_GET(d,dstr*7,uint16_t) = s[7]; } } OIL_DEFINE_IMPL (trans8x8_u16_c3, trans8x8_u16); static void trans8x8_u16_c4 (uint16_t *dest, int dstr, const uint16_t *src, int sstr) { int i; uint16_t *d, *s; for(i=0;i<8;i++){ d = OIL_OFFSET(dest, 2*i); s = OIL_OFFSET(src, sstr*i); OIL_GET(d,dstr*0,uint16_t) = *s++; OIL_GET(d,dstr*1,uint16_t) = *s++; OIL_GET(d,dstr*2,uint16_t) = *s++; OIL_GET(d,dstr*3,uint16_t) = *s++; OIL_GET(d,dstr*4,uint16_t) = *s++; OIL_GET(d,dstr*5,uint16_t) = *s++; OIL_GET(d,dstr*6,uint16_t) = *s++; OIL_GET(d,dstr*7,uint16_t) = *s++; } } OIL_DEFINE_IMPL (trans8x8_u16_c4, trans8x8_u16); liboil-0.3.17/liboil/copy/Makefile.am0000644000175000017500000000070110717203073014253 00000000000000 if USE_ALT_OPT opt_libs = libcopy_opt.la else opt_libs = endif noinst_LTLIBRARIES = libcopy.la $(opt_libs) c_sources = \ copy.c \ copy8x8.c \ splat_ref.c \ trans8x8_c.c libcopy_la_SOURCES = \ $(c_sources) \ $(powerpc_sources) \ $(i386_sources) \ $(amd64_sources) libcopy_la_LIBADD = $(opt_libs) libcopy_la_CFLAGS = $(LIBOIL_CFLAGS) libcopy_opt_la_SOURCES = $(c_sources) libcopy_opt_la_CFLAGS = $(LIBOIL_CFLAGS) $(LIBOIL_OPT_CFLAGS) liboil-0.3.17/liboil/copy/splat_ref.c0000644000175000017500000000770110717203073014351 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2001,2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include OIL_DECLARE_CLASS(splat_u8); OIL_DECLARE_CLASS(splat_u32); OIL_DECLARE_CLASS(splat_u8_ns); OIL_DECLARE_CLASS(splat_u32_ns); static void splat_u32_unroll2 (uint32_t *dest, int dstr, const uint32_t *param, int n) { int i; if (n&1) { *dest = *param; OIL_INCREMENT(dest,dstr); } n >>= 1; for(i=0;i>= 1; for(i=0;i>= 2; for(i=0;i>= 2; p = (*param<<24) | (*param<<16) | (*param<<8) | (*param); while(n>0){ *(uint32_t *)dest = p; dest+=4; n--; } } OIL_DEFINE_IMPL(splat_u8_ns_int, splat_u8_ns); #endif #ifdef HAVE_UNALIGNED_ACCESS static void splat_u8_ns_int2 (uint8_t *dest, const uint8_t *param, int n) { uint32_t p; while(n&7) { *dest = *param; dest++; n--; } n >>= 3; p = (*param<<24) | (*param<<16) | (*param<<8) | (*param); while(n>0){ ((uint32_t *)dest)[0] = p; ((uint32_t *)dest)[1] = p; dest+=8; n--; } } OIL_DEFINE_IMPL(splat_u8_ns_int2, splat_u8_ns); #endif #ifdef HAVE_UNALIGNED_ACCESS static void splat_u8_ns_int4 (uint8_t *dest, const uint8_t *param, int n) { uint32_t p; while(n&15) { *dest = *param; dest++; n--; } n >>= 4; p = (*param<<24) | (*param<<16) | (*param<<8) | (*param); while(n>0){ ((uint32_t *)dest)[0] = p; ((uint32_t *)dest)[1] = p; ((uint32_t *)dest)[2] = p; ((uint32_t *)dest)[3] = p; dest+=16; n--; } } OIL_DEFINE_IMPL(splat_u8_ns_int4, splat_u8_ns); #endif liboil-0.3.17/liboil/copy/Makefile.in0000644000175000017500000006122111332627671014300 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = liboil/copy DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @USE_ALT_OPT_TRUE@am__DEPENDENCIES_1 = libcopy_opt.la libcopy_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__objects_1 = libcopy_la-copy.lo libcopy_la-copy8x8.lo \ libcopy_la-splat_ref.lo libcopy_la-trans8x8_c.lo am_libcopy_la_OBJECTS = $(am__objects_1) libcopy_la_OBJECTS = $(am_libcopy_la_OBJECTS) libcopy_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libcopy_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ libcopy_opt_la_LIBADD = am__objects_2 = libcopy_opt_la-copy.lo libcopy_opt_la-copy8x8.lo \ libcopy_opt_la-splat_ref.lo libcopy_opt_la-trans8x8_c.lo am_libcopy_opt_la_OBJECTS = $(am__objects_2) libcopy_opt_la_OBJECTS = $(am_libcopy_opt_la_OBJECTS) libcopy_opt_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libcopy_opt_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_ALT_OPT_TRUE@am_libcopy_opt_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libcopy_la_SOURCES) $(libcopy_opt_la_SOURCES) DIST_SOURCES = $(libcopy_la_SOURCES) $(libcopy_opt_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @USE_ALT_OPT_FALSE@opt_libs = @USE_ALT_OPT_TRUE@opt_libs = libcopy_opt.la noinst_LTLIBRARIES = libcopy.la $(opt_libs) c_sources = \ copy.c \ copy8x8.c \ splat_ref.c \ trans8x8_c.c libcopy_la_SOURCES = \ $(c_sources) \ $(powerpc_sources) \ $(i386_sources) \ $(amd64_sources) libcopy_la_LIBADD = $(opt_libs) libcopy_la_CFLAGS = $(LIBOIL_CFLAGS) libcopy_opt_la_SOURCES = $(c_sources) libcopy_opt_la_CFLAGS = $(LIBOIL_CFLAGS) $(LIBOIL_OPT_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/copy/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/copy/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcopy.la: $(libcopy_la_OBJECTS) $(libcopy_la_DEPENDENCIES) $(libcopy_la_LINK) $(libcopy_la_OBJECTS) $(libcopy_la_LIBADD) $(LIBS) libcopy_opt.la: $(libcopy_opt_la_OBJECTS) $(libcopy_opt_la_DEPENDENCIES) $(libcopy_opt_la_LINK) $(am_libcopy_opt_la_rpath) $(libcopy_opt_la_OBJECTS) $(libcopy_opt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcopy_la-copy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcopy_la-copy8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcopy_la-splat_ref.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcopy_la-trans8x8_c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcopy_opt_la-copy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcopy_opt_la-copy8x8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcopy_opt_la-splat_ref.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcopy_opt_la-trans8x8_c.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libcopy_la-copy.lo: copy.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_la_CFLAGS) $(CFLAGS) -MT libcopy_la-copy.lo -MD -MP -MF $(DEPDIR)/libcopy_la-copy.Tpo -c -o libcopy_la-copy.lo `test -f 'copy.c' || echo '$(srcdir)/'`copy.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcopy_la-copy.Tpo $(DEPDIR)/libcopy_la-copy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy.c' object='libcopy_la-copy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_la_CFLAGS) $(CFLAGS) -c -o libcopy_la-copy.lo `test -f 'copy.c' || echo '$(srcdir)/'`copy.c libcopy_la-copy8x8.lo: copy8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_la_CFLAGS) $(CFLAGS) -MT libcopy_la-copy8x8.lo -MD -MP -MF $(DEPDIR)/libcopy_la-copy8x8.Tpo -c -o libcopy_la-copy8x8.lo `test -f 'copy8x8.c' || echo '$(srcdir)/'`copy8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcopy_la-copy8x8.Tpo $(DEPDIR)/libcopy_la-copy8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy8x8.c' object='libcopy_la-copy8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_la_CFLAGS) $(CFLAGS) -c -o libcopy_la-copy8x8.lo `test -f 'copy8x8.c' || echo '$(srcdir)/'`copy8x8.c libcopy_la-splat_ref.lo: splat_ref.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_la_CFLAGS) $(CFLAGS) -MT libcopy_la-splat_ref.lo -MD -MP -MF $(DEPDIR)/libcopy_la-splat_ref.Tpo -c -o libcopy_la-splat_ref.lo `test -f 'splat_ref.c' || echo '$(srcdir)/'`splat_ref.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcopy_la-splat_ref.Tpo $(DEPDIR)/libcopy_la-splat_ref.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='splat_ref.c' object='libcopy_la-splat_ref.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_la_CFLAGS) $(CFLAGS) -c -o libcopy_la-splat_ref.lo `test -f 'splat_ref.c' || echo '$(srcdir)/'`splat_ref.c libcopy_la-trans8x8_c.lo: trans8x8_c.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_la_CFLAGS) $(CFLAGS) -MT libcopy_la-trans8x8_c.lo -MD -MP -MF $(DEPDIR)/libcopy_la-trans8x8_c.Tpo -c -o libcopy_la-trans8x8_c.lo `test -f 'trans8x8_c.c' || echo '$(srcdir)/'`trans8x8_c.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcopy_la-trans8x8_c.Tpo $(DEPDIR)/libcopy_la-trans8x8_c.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trans8x8_c.c' object='libcopy_la-trans8x8_c.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_la_CFLAGS) $(CFLAGS) -c -o libcopy_la-trans8x8_c.lo `test -f 'trans8x8_c.c' || echo '$(srcdir)/'`trans8x8_c.c libcopy_opt_la-copy.lo: copy.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_opt_la_CFLAGS) $(CFLAGS) -MT libcopy_opt_la-copy.lo -MD -MP -MF $(DEPDIR)/libcopy_opt_la-copy.Tpo -c -o libcopy_opt_la-copy.lo `test -f 'copy.c' || echo '$(srcdir)/'`copy.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcopy_opt_la-copy.Tpo $(DEPDIR)/libcopy_opt_la-copy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy.c' object='libcopy_opt_la-copy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_opt_la_CFLAGS) $(CFLAGS) -c -o libcopy_opt_la-copy.lo `test -f 'copy.c' || echo '$(srcdir)/'`copy.c libcopy_opt_la-copy8x8.lo: copy8x8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_opt_la_CFLAGS) $(CFLAGS) -MT libcopy_opt_la-copy8x8.lo -MD -MP -MF $(DEPDIR)/libcopy_opt_la-copy8x8.Tpo -c -o libcopy_opt_la-copy8x8.lo `test -f 'copy8x8.c' || echo '$(srcdir)/'`copy8x8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcopy_opt_la-copy8x8.Tpo $(DEPDIR)/libcopy_opt_la-copy8x8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy8x8.c' object='libcopy_opt_la-copy8x8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_opt_la_CFLAGS) $(CFLAGS) -c -o libcopy_opt_la-copy8x8.lo `test -f 'copy8x8.c' || echo '$(srcdir)/'`copy8x8.c libcopy_opt_la-splat_ref.lo: splat_ref.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_opt_la_CFLAGS) $(CFLAGS) -MT libcopy_opt_la-splat_ref.lo -MD -MP -MF $(DEPDIR)/libcopy_opt_la-splat_ref.Tpo -c -o libcopy_opt_la-splat_ref.lo `test -f 'splat_ref.c' || echo '$(srcdir)/'`splat_ref.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcopy_opt_la-splat_ref.Tpo $(DEPDIR)/libcopy_opt_la-splat_ref.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='splat_ref.c' object='libcopy_opt_la-splat_ref.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_opt_la_CFLAGS) $(CFLAGS) -c -o libcopy_opt_la-splat_ref.lo `test -f 'splat_ref.c' || echo '$(srcdir)/'`splat_ref.c libcopy_opt_la-trans8x8_c.lo: trans8x8_c.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_opt_la_CFLAGS) $(CFLAGS) -MT libcopy_opt_la-trans8x8_c.lo -MD -MP -MF $(DEPDIR)/libcopy_opt_la-trans8x8_c.Tpo -c -o libcopy_opt_la-trans8x8_c.lo `test -f 'trans8x8_c.c' || echo '$(srcdir)/'`trans8x8_c.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcopy_opt_la-trans8x8_c.Tpo $(DEPDIR)/libcopy_opt_la-trans8x8_c.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trans8x8_c.c' object='libcopy_opt_la-trans8x8_c.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcopy_opt_la_CFLAGS) $(CFLAGS) -c -o libcopy_opt_la-trans8x8_c.lo `test -f 'trans8x8_c.c' || echo '$(srcdir)/'`trans8x8_c.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/copy/copy.c0000644000175000017500000001005511131504056013334 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include OIL_DECLARE_CLASS (copy_u8); static void copy_u8_libc (uint8_t *dest, const uint8_t *src, int n) { memcpy (dest, src, n); } OIL_DEFINE_IMPL (copy_u8_libc, copy_u8); static void copy_u8_ptr (uint8_t *dest, const uint8_t *src, int n) { while(n--) { *dest++ = *src++; } } OIL_DEFINE_IMPL (copy_u8_ptr, copy_u8); #ifdef HAVE_UNALIGNED_ACCESS static void copy_u8_ints (uint8_t *dest, const uint8_t *src, int n) { int i; for(i=0;i<(n&3);i++){ *dest++ = *src++; } n >>= 2; for(i=0;i>= 3; for(i=0;i>= 3; while (n) { switch (n & 15) { default: case 0: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; case 15: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; case 14: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; case 13: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; case 12: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; case 11: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; case 10: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; case 9: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; case 8: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; case 7: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; case 6: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; case 5: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; case 4: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; case 3: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; case 2: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; case 1: *(uint64_t *)dest = *(uint64_t *)src; dest += 8; src += 8; } n = (n - 1) & ~(int)15; } } OIL_DEFINE_IMPL (copy_u8_llints_duff, copy_u8); #endif liboil-0.3.17/liboil/motovec/0000777000175000017500000000000011332637376013022 500000000000000liboil-0.3.17/liboil/motovec/vec_memset.S0000644000175000017500000004325410717203073015206 00000000000000//------------------------------------------------------------------ // file: vec_memset.S // AltiVec enabled version of memset and bzero and cacheable_memzero //------------------------------------------------------------------ //------------------------------------------------------------------ // Copyright Motorola, Inc. 2002 // ALL RIGHTS RESERVED // // You are hereby granted a copyright license to use, modify, and // distribute the SOFTWARE so long as this entire notice is retained // without alteration in any modified and/or redistributed versions, // and that such modified versions are clearly identified as such. // No licenses are granted by implication, estoppel or otherwise under // any patents or trademarks of Motorola, Inc. // // The SOFTWARE is provided on an "AS IS" basis and without warranty. // To the maximum extent permitted by applicable law, MOTOROLA DISCLAIMS // ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING IMPLIED // WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR // PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH // REGARD TO THE SOFTWARE (INCLUDING ANY MODIFIED VERSIONS // THEREOF) AND ANY ACCOMPANYING WRITTEN MATERIALS. // // To the maximum extent permitted by applicable law, IN NO EVENT SHALL // MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER // (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF // BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS // INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OF THE USE OR // INABILITY TO USE THE SOFTWARE. Motorola assumes no responsibility // for the maintenance and support of the SOFTWARE. //------------------------------------------------------------------ //------------------------------------------------------------------ // extern void *memset( void *ptr, int val, size_t len ); // Copies val into each of len characters beginning at ptr. // - Harbison&Steele 4th ed // (despite val being an int, this memset assumes it is never // more than a byte. That seems to be correct from all the // memset functions I've seen but I don't know if ANSI allows // anthing longer. Chuck Corley 12/21/02) // Returns: // void * ptr //------------------------------------------------------------------ //------------------------------------------------------------------ // extern void * bzero( char *ptr, int len); // Copies 0 into each of len characters at ptr. // - Harbison&Steele 4th ed // Returns: // void * ptr //------------------------------------------------------------------ // Revision History: // Rev 0.0 Original Chuck Corley 02/09/03 // Could benefit from changes added to memcpy // Rev 0.1 Revised per memcpy Rev 0.30 Chuck Corley 05/01/03 // // This is beta quality code; users are encouraged to make it faster. // ASSUMPTIONS: // Code is highly likely to be in the cache; data is not (streaming data) // Zero fill could be quite likely. // Moving fill byte from GPR to VR as below faster than stw->lvebx via stack #define VRSV 256 // VRSAVE spr // Don't use vectors for BC <= MIN_VEC. Works only if MIN_VEC >= 16 bytes. #define MIN_VEC 16 // Register useage #define Rt r0 // r0 when used as a temporary register #define DST r3 // entering: dest pointer; exiting: same dest pointer #define FILL r4 // entering: fill char then fill word #define BC r5 // entering: Byte_Count then remaining Byte_Count #define DBC r6// dst + byte count #define BK r7 // BC - 1 +/- (n*16) #define Fsh r8 // fill byte shifted right one nibble #define DM1 r9// dst -1 for byte-by-byte backwards initially #define D r9 // (dst+16)[0:27] - dst[28:31] #define DNX r9 // (dst+n*16)[28:31] #define BL r9 // second byte_kount index pointer #define DR r10 // (dst+16)[0:27] #define QW r10 // number of cache lines #define DBK r11 // (dst+byte_count-1) then (dst+byte_count-1)[28:31] #define RSV r12 // storage for VRSAVE register if used // Condition register use (not including temporary cr0) // cr0[2] = (FILL==0)? // cr1[0,2] = (BC == 0)? 1 : 0; (nothing to move) // then cr1[2] = (DST[28:31] == 0)? 1 : 0; (D0 left justified) // then cr1[2] = ((DBK = DST+BC-1)[28:31] = 0xF)? 1 : 0; (DN right justified) // cr6[2] = (QW == 0)? 1 : 0; // then cr6[1] = (QW > 4)? 1 : 0; (>4 vectors to move?) // then cr6[3] = (third store[27] == 1)? 1: 0; (cache line alignment) // then cr6[3] = (last store[27] == 1)? 1: 0; (last store odd?) // cr7[2] = (BC>MIN_VEC)?1:0; (BC big enough to warrant vectors) // then cr7[0:3] = (DST+16)[0:27]-DST (How many bytes (iff <16) in first vector?) // then cr7[0:3] = (DST+BC)[0:27] (How many bytes (iff <16) in last vector?) // Conditionalize the use of dcba. It will help if the data is // not in cache and hurt if it is. Generally, except for small // benchmarks repeated many times, we assume data is not in cache // (data streaming) and using dcba is a performance boost. // We use dcba which will noop to non-cacheable memory rather than // dcbz which will cause an aligment exception. #ifndef NO_DCBA #if defined(__GNUC__) || defined(__MWERKS__) || defined(_DIAB_TOOL) // gcc and codewarrior and diab don't assemble dcba #define DCBK .long 0x7c033dec // dcba r3,r7 or dcba DST,BK #else #ifdef __ghs__ .macro DCBK .long 0x7c033dec .endm #else #define DCBK dcba DST,BK #endif // __ghs__ #endif // __GNUC__ or __MWERKS__ #else #define DCBK nop #endif // NO_DCBA .text #ifdef __MWERKS__ .align 32 #else .align 5 #endif #ifdef LIBMOTOVEC .globl memset memset: #else .globl _vec_memset _vec_memset: #endif cmpi cr7,0,BC,MIN_VEC // IU1 Check for minimum byte count cmpi cr1,0,BC,0 // IU1 Eliminate zero byte count rlwinm. Fsh,FILL,28,28,3 // IU1 Is fill byte zero? and shift addi DM1,DST,-1 // IU1 Pre-bias and duplicate destination addi DR,DST,16 // IU1 Address of second dst vector add DBC,DST,BC // IU1 Address of last dst byte + 1 bgt cr7,v_memset // b if BC>MIN_VEC mtctr BC // for (i=1;i<=BC;i++) beqlr cr1 // return if BC = 0 Byte_set: stbu FILL,1(DM1) // LSU * ++(DST-1) = FILL bdnz Byte_set blr v_memset: // Byte count < MIN_VEC bytes will have been set by scalar code above, // so this will not deal with small block sets < MIN_VEC. // For systems using VRSAVE, define VRSAV=1 when compiling. For systems // that don't, make sure VRSAVE is undefined. #ifdef VRSAVE mfspr RSV,VRSV // IU2 Get current VRSAVE contents #endif rlwinm DR,DR,0,0,27 // IU1 (DST+16)[0:27] addi DBK,DBC,-1 // IU1 Address of last dst byte #ifdef VRSAVE oris Rt,RSV,0xe000 // IU1 Or in registers used by this routine #endif subf D,DST,DR // IU1 How many bytes in first destination? li BK,0 // IU1 Initialize byte kount index #ifdef VRSAVE mtspr VRSV,Rt // IU2 Save in VRSAVE before first vec op #endif vxor v0,v0,v0 // VIU Clear v0 subf QW,DR,DBK // IU1 Bytes of full vectors to move (-16) cmpi cr1,0,D,16 // IU1 Is D0 left justified? beq+ enter_bzero // b if FILL==0 lvsl v0,0,Fsh // LSU Move upper nibble to byte 0 of VR vspltisb v1,4 // VPU Splat 0x4 to every byte lvsl v2,0,FILL // LSU Move lower nibble to byte 0 of VR vslb v0,v0,v1 // VIU Move upper nibble to VR[0:3] vor v0,v0,v2 // VIU Form FILL byte in VR[0:7] vspltb v0,v0,0 // VPU Splat the fill byte to all bytes enter_bzero: mtcrf 0x01,D // IU2 Put bytes in 1st dst in cr7 rlwinm QW,QW,28,4,31 // IU1 Quad words remaining beq cr1,Left_just // b if D0 is left justified bns cr7,No_B_fwd // b if only even number of bytes to store stvebx v0,DST,BK // LSU store first byte at DST+0 addi BK,BK,1 // IU1 increment index No_B_fwd: bne cr7,No_H_fwd // b if only words to store stvehx v0,DST,BK // LSU store halfword at DST+0/1 addi BK,BK,2 // IU1 increment index No_H_fwd: bng cr7,No_W1_fwd // b if exactly zero or two words to store stvewx v0,DST,BK // LSU store word 1 of one or three addi BK,BK,4 // IU1 increment index No_W1_fwd: bnl cr7,No_W2_fwd // b if there was only one word to store stvewx v0,DST,BK // LSU store word 1 of two or 2 of three addi BK,BK,4 // IU1 increment index stvewx v0,DST,BK // LSU store word 2 of two or 3 of three b No_W2_fwd Left_just: stvx v0,0,DST // LSU Store 16 bytes at D0 No_W2_fwd: rlwinm Rt,DBK,0,28,31 // IU1 (DBK = DST+BC-1)[28:31] cmpi cr6,0,QW,0 // IU1 Any full vectors to move? li BK,16 // IU1 Re-initialize byte kount index cmpi cr1,0,Rt,0xF // IU1 Is DN right justified? ble cr6,Last_QW // b if no Quad words to do mtctr QW // IU2 for (i=0;i<=QW;i++) cmpi cr6,0,QW,4 // IU1 Check QW>4 QW_loop: stvx v0,DST,BK // LSU Store 16 fill bytes addi BK,BK,16 // IU1 Increment byte kount index bdnzf 25,QW_loop // b if 4 or less quad words to do add DNX,DST,BK // IU1 address of next store (DST+32 if QW>4) addi QW,QW,-1 // IU1 One more QW stored by now bgt cr6,GT_4QW_fwd // b if >4 quad words left Last_QW: // Next vector is the last; we're done. mtcrf 0x01,DBC // IU2 Put final vector byte count in cr7 beq cr1,Rt_just_fwd // b if last destination is right justified rlwinm DBK,DBK,0,0,27 // IU1 Round to QW addr of last byte li BL,0 // IU1 Initialize index pointer bnl cr7,Only_1W_fwd // b if there was only one or zero words to store stvewx v0,DBK,BL // LSU store word 1 of two or three addi BL,BL,4 // IU1 increment index stvewx v0,DBK,BL // LSU store word 2 of two or three addi BL,BL,4 // IU1 increment index Only_1W_fwd: bng cr7,Only_2W_fwd // b if there were only two or zero words to store stvewx v0,DBK,BL // LSU store word 3 of three if necessary addi BL,BL,4 // IU1 increment index Only_2W_fwd: bne cr7,Only_B_fwd // b if there are no half words to store stvehx v0,DBK,BL // LSU store one halfword if necessary addi BL,BL,2 // IU1 increment index Only_B_fwd: bns cr7,All_done_fwd // b if there are no bytes to store stvebx v0,DBK,BL // LSU store one byte if necessary b All_done_fwd Rt_just_fwd: stvx v0,DST,BK // LSU Store 16 bytes at D14 All_done_fwd: #ifdef VRSAVE mtspr VRSV,RSV // IU1 Restore VRSAVE #endif blr // Return destination address from entry #ifdef __MWERKS__ .align 16 #else .align 4 #endif GT_4QW_fwd: // Do once if nxt st is to odd half of cache line, else twice addi QW,QW,-1 // IU1 Keeping track of QWs stored mtcrf 0x02,DNX // IU2 cr6[3]=((DST+32)[27]==1)?1:0; addi DNX,DNX,16 // IU1 Update cr6 for next loop stvx v0,DST,BK // LSU Store 16 bytes at D2 addi BK,BK,16 // IU1 Increment byte count by 16 bdnzf 27,GT_4QW_fwd // b if next store is to lower (even) half of CL mtcrf 0x02,DBK // IU2 cr6[3]=((last store)[27]==1)?1:0; (odd?) bns cr6,B32_fwd // b if DST[27] == 0; i.e, final store is even // We need the ctr register to reflect an even byte count before entering // the next block - faster to decrement than to reload. bdnz B32_fwd // decrement counter for last QW store odd B32_fwd: // Should be at least 2 stores remaining and next 2 are cache aligned DCBK // LSU then Kill instead of RWITM stvx v0,DST,BK // LSU Store 16 bytes at D11 addi BK,BK,16 // IU1 Increment byte count bdz Nxt_loc_fwd // always decrement and branch to next instr Nxt_loc_fwd: stvx v0,DST,BK // LSU Store 16 bytes at D12 addi BK,BK,16 // IU1 Increment byte count bdnz B32_fwd // b if there are at least two more QWs to do bso cr6,One_even_QW // b if there is one even and one odd QW to store b Last_QW // b if last store is to even address // Come here with two more loads and two stores to do One_even_QW: stvx v0,DST,BK // LSU Store 16 bytes at D13 addi BK,BK,16 // IU1 Increment byte count b Last_QW // End of memset in AltiVec #define BCz r4 // in bzero r4 enters with byte count #ifdef __MWERKS__ .align 32 #else .align 5 #endif #ifdef LIBMOTOVEC .globl bzero bzero: #else .globl vec_bzero vec_bzero: #endif mr BC,BCz // IU1 arg[2] is BC here, not FILL li FILL,0 // IU1 for bzero FILL=0 #ifdef LIBMOTOVEC b memset #else b _vec_memset #endif // cacheable_memzero will employ dcbz to clear 32 bytes at a time // of cacheable memory. Like bzero, second entering argument will be BC. // Using this for non-cacheable memory will generate an alignment exception. .text #ifdef __MWERKS__ .align 32 #else .align 5 #endif #ifdef LIBMOTOVEC .globl cacheable_memzero cacheable_memzero: #else .globl vec_cacheable_memzero vec_cacheable_memzero: #endif mr BC,BCz // IU1 arg[2] is BC here, not FILL li FILL,0 // IU1 for bzero FILL=0 cmpi cr7,0,BC,MIN_VEC // IU1 Check for minimum byte count cmpi cr1,0,BC,0 // IU1 Eliminate zero byte count addi DM1,DST,-1 // IU1 Pre-bias and duplicate destination addi DR,DST,16 // IU1 Address of second dst vector add DBC,DST,BC // IU1 Address of last dst byte + 1 bgt cr7,c_v_memset // b if BC>MIN_VEC mtctr BC // for (i=1;i<=BC;i++) beqlr cr1 // return if BC = 0 c_Byte_set: stbu FILL,1(DM1) // LSU * ++(DST-1) = FILL bdnz c_Byte_set blr c_v_memset: // Byte count < MIN_VEC bytes will have been set by scalar code above, // so this will not deal with small block sets < MIN_VEC. // For systems using VRSAVE, define VRSAV=1 when compiling. For systems // that don't, make sure VRSAVE is undefined. #ifdef VRSAVE mfspr RSV,VRSV // IU2 Get current VRSAVE contents #endif rlwinm DR,DR,0,0,27 // IU1 (DST+16)[0:27] addi DBK,DBC,-1 // IU1 Address of last dst byte #ifdef VRSAVE oris Rt,RSV,0x8000 // IU1 Or in registers used by this routine #endif subf D,DST,DR // IU1 How many bytes in first destination? li BK,0 // IU1 Initialize byte kount index #ifdef VRSAVE mtspr VRSV,Rt // IU2 Save in VRSAVE before first vec op #endif vxor v0,v0,v0 // VIU Clear v0 subf QW,DR,DBK // IU1 Bytes of full vectors to move (-16) cmpi cr1,0,D,16 // IU1 Is D0 left justified? mtcrf 0x01,D // IU2 Put bytes in 1st dst in cr7 rlwinm QW,QW,28,4,31 // IU1 Quad words remaining beq cr1,c_Left_just // b if D0 is left justified bns cr7,c_No_B_fwd // b if only even number of bytes to store stvebx v0,DST,BK // LSU store first byte at DST+0 addi BK,BK,1 // IU1 increment index c_No_B_fwd: bne cr7,c_No_H_fwd // b if only words to store stvehx v0,DST,BK // LSU store halfword at DST+0/1 addi BK,BK,2 // IU1 increment index c_No_H_fwd: bng cr7,c_No_W1_fwd // b if exactly zero or two words to store stvewx v0,DST,BK // LSU store word 1 of one or three addi BK,BK,4 // IU1 increment index c_No_W1_fwd: bnl cr7,c_No_W2_fwd // b if there was only one word to store stvewx v0,DST,BK // LSU store word 1 of two or 2 of three addi BK,BK,4 // IU1 increment index stvewx v0,DST,BK // LSU store word 2 of two or 3 of three b c_No_W2_fwd c_Left_just: stvx v0,0,DST // LSU Store 16 bytes at D0 c_No_W2_fwd: rlwinm Rt,DBK,0,28,31 // IU1 (DBK = DST+BC-1)[28:31] cmpi cr6,0,QW,0 // IU1 Any full vectors to move? li BK,16 // IU1 Re-initialize byte kount index cmpi cr1,0,Rt,0xF // IU1 Is DN right justified? ble cr6,c_Last_QW // b if no Quad words to do mtctr QW // IU2 for (i=0;i<=QW;i++) cmpi cr6,0,QW,4 // IU1 Check QW>4 c_QW_loop: stvx v0,DST,BK // LSU Store 16 fill bytes addi BK,BK,16 // IU1 Increment byte kount index bdnzf 25,c_QW_loop // b if 4 or less quad words to do add DNX,DST,BK // IU1 address of next store (DST+32 if QW>4) addi QW,QW,-1 // IU1 One more QW stored by now bgt cr6,c_GT_4QW_fwd // b if >4 quad words left c_Last_QW: // Next vector is the last; we're done. mtcrf 0x01,DBC // IU2 Put final vector byte count in cr7 beq cr1,c_Rt_just_fwd // b if last destination is right justified rlwinm DBK,DBK,0,0,27 // IU1 Round to QW addr of last byte li BL,0 // IU1 Initialize index pointer bnl cr7,c_Only_1W_fwd // b if there was only one or zero words to store stvewx v0,DBK,BL // LSU store word 1 of two or three addi BL,BL,4 // IU1 increment index stvewx v0,DBK,BL // LSU store word 2 of two or three addi BL,BL,4 // IU1 increment index c_Only_1W_fwd: bng cr7,Only_2W_fwd // b if there were only two or zero words to store stvewx v0,DBK,BL // LSU store word 3 of three if necessary addi BL,BL,4 // IU1 increment index c_Only_2W_fwd: bne cr7,c_Only_B_fwd // b if there are no half words to store stvehx v0,DBK,BL // LSU store one halfword if necessary addi BL,BL,2 // IU1 increment index c_Only_B_fwd: bns cr7,c_All_done_fwd // b if there are no bytes to store stvebx v0,DBK,BL // LSU store one byte if necessary b c_All_done_fwd c_Rt_just_fwd: stvx v0,DST,BK // LSU Store 16 bytes at D14 c_All_done_fwd: #ifdef VRSAVE mtspr VRSV,RSV // IU1 Restore VRSAVE #endif blr // Return destination address from entry #ifdef __MWERKS__ .align 16 #else .align 4 #endif c_GT_4QW_fwd: // Do once if nxt st is to odd half of cache line, else twice addi QW,QW,-1 // IU1 Keeping track of QWs stored mtcrf 0x02,DNX // IU2 cr6[3]=((DST+32)[27]==1)?1:0; addi DNX,DNX,16 // IU1 Update cr6 for next loop stvx v0,DST,BK // LSU Store 16 bytes at D2 addi BK,BK,16 // IU1 Increment byte count by 16 bdnzf 27,c_GT_4QW_fwd // b if next store is to lower (even) half of CL mtcrf 0x02,DBK // IU2 cr6[3]=((last store)[27]==1)?1:0; (odd?) bns cr6,c_B32_fwd // b if DST[27] == 0; i.e, final store is even // We need the ctr register to reflect an even byte count before entering // the next block - faster to decrement than to reload. bdnz B32_fwd // decrement counter for last QW store odd c_B32_fwd: // Should be at least 2 stores remaining and next 2 are cache aligned dcbz DST,BK // LSU zero whole cache line bdz c_Nxt_loc_fwd // always decrement and branch to next instr c_Nxt_loc_fwd: addi BK,BK,32 // IU1 Increment byte count bdnz B32_fwd // b if there are at least two more QWs to do bso cr6,c_One_even_QW // b if there is one even and one odd QW to store b c_Last_QW // b if last store is to even address // Come here with two more loads and two stores to do c_One_even_QW: stvx v0,DST,BK // LSU Store 16 bytes at D13 addi BK,BK,16 // IU1 Increment byte count b c_Last_QW // End of cacheable_memzero in AltiVec liboil-0.3.17/liboil/motovec/vec_memcpy.S0000644000175000017500000007661310717203073015213 00000000000000//------------------------------------------------------------------ // file: vec_memcpy.S // AltiVec enabled version of memcpy and bcopy //------------------------------------------------------------------ //------------------------------------------------------------------ // Copyright Motorola, Inc. 2003 // ALL RIGHTS RESERVED // // You are hereby granted a copyright license to use, modify, and // distribute the SOFTWARE so long as this entire notice is retained // without alteration in any modified and/or redistributed versions, // and that such modified versions are clearly identified as such. // No licenses are granted by implication, estoppel or otherwise under // any patents or trademarks of Motorola, Inc. // // The SOFTWARE is provided on an "AS IS" basis and without warranty. // To the maximum extent permitted by applicable law, MOTOROLA DISCLAIMS // ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING IMPLIED // WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR // PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH // REGARD TO THE SOFTWARE (INCLUDING ANY MODIFIED VERSIONS // THEREOF) AND ANY ACCOMPANYING WRITTEN MATERIALS. // // To the maximum extent permitted by applicable law, IN NO EVENT SHALL // MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER // (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF // BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS // INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OF THE USE OR // INABILITY TO USE THE SOFTWARE. Motorola assumes no responsibility // for the maintenance and support of the SOFTWARE. //------------------------------------------------------------------ //------------------------------------------------------------------ // extern void * memcpy(void *dst, const void *src, size_t len); // Returns: // void *dst //------------------------------------------------------------------ //------------------------------------------------------------------ // extern void * memmove( void *dst, const void *src, size_t len ); // Copies len characters from src to dst and returns the value of // dst. Works correctly for overlapping memory regions. // - Harbison&Steele 4th ed (corrected as to return) // Returns: // void *dst //------------------------------------------------------------------ //------------------------------------------------------------------ // extern void * bcopy(const void *src, void *dst, size_t len); // Returns: // void *dst //------------------------------------------------------------------ // memcpy and memmove are combined into one entry point here because of // the similarity of operation and need to create fool-proof code. // The following conditions determine what is "fool proof": // // if: then single entry: // (DST-SRC)<0 && (SRC-DST)>=BC && BC>MIN_VEC will b to v_memcpy // (DST-SRC)<0 && (SRC-DST)< BC && BC>MIN_VEC must b to v_memcpy // (DST-SRC)<0 && BC0 && BC0 && (DST-SRC)< BC && BC>MIN_VEC must b to v_memmove // (DST-SRC)>0 && (SRC-DST)>=BC && BC>MIN_VEC will b to v_memmove // If you call memmove (or vec_memmove) and |DST-SRC|>=BC, // this code will branch to v_memcpy anyway for maximum performance. // Revision History: // Rev 0.0 Original Chuck Corley 02/03/03 // Can still add dst, 128B loop, and aligned option // Rev 0.01 Fixed JY's seg-fault violation CJC 02/17/03 // Rev 0.1 Added 128B loop and dst; cndtnlzd dcbz CJC 02/18/03 // (Creating separate path for QW aligned didn't help much) // Rev 0.11 Small code schdling; chngd dst for memmove CJC 02/23/03 // Rev 0.20 Eliminated alternate entry and cleanup CJC 02/27/03 // Rev 0.21 Inproved loop branch targets for v_mempcy CJC 03/01/03 // Rev 0.22 Experimented with dst (sent to H.) CJC 03/02/03 // Rev 0.23 Substituted dcba for dcbz (sent to JY) CJC 03/08/03 // Rev 0.24 Use two dst streams CJC 03/12/03 // Rev 0.25 Fix for all compilers, cleanup, and release with // libmotovec.a rev 0.10 CJC 03/14/03 // Rev 0.30 Fix for pre-empted destination (SNDF-DS) CJC 04/02/03 // // Between Rev 0.25 and 0.30 the code was revised to store elements of // source at destination when first and/or last vector are less than 16 // bytes. Areviewer at SNDF observed that loading the destination vector // for merging exposed the "uninvolved" destination bytes to incoherency // if an interrupt pre-empted this routine and modified the "uninvolved" // destination vector(s) while held in register for merging. It seems // like a low possibility but this revision is no longer subject to that // possibility. (It is also slightly faster than Rev 0.25.) // This is beta quality code; users are encouraged to make it faster. // ASSUMPTIONS: // Code is highly likely to be in the cache; data is not (streaming data) #define VRSV 256 // VRSAVE spr // Don't use vectors for BC <= MIN_VEC. Works only if MIN_VEC >= 16 bytes. #define MIN_VEC 16 // Don't use Big_loop in v_memcpy for |dst-src|<= minimum overlap. #define MIN_OVL 128 // Register useage #define Rt r0 // r0 when used as a temporary register #define DST r3 // entering: dst pointer; exiting: same dst pointer #define SRC r4 // entering: src ptr; then end of src range index (SRC+BC) in memmove #define BC r5 // entering: Byte_Count #define PCS r6 // save for partial checksum entering #define DMS r7 // dst - src initially #define BK r7 // BC - 1 +/- (n*16) // Codewarrior will put an unwelcome space as "lbzu r0,1(r7 )" // if you don't put the comment right after the r7. CJC 030314 #define SM1 r8// src -1 for byte-by-byte forwards initially #define S r8 // src[28:31] #define SMD r8 // src[0:27]-dst[0:27] #define STR r8 // data stream touch block & stride info for Big_loop #define DM1 r9// dst -1 for byte-by-byte forwards initially #define D r9 // dst[28:31] #define DNX r9 // (dst+n*16)[28:31] #define BL r9 // second byte_kount index pointer #define SBC r10// src + byte count initially then src[28:31] #define BLK r10 // temporary data stream touch block & stride info #define DR r10 // (dst+16)[0:27] #define QW r10 // number of quad words (vectors) #define DBC r11// dst + byte count initially #define BLL r11 // temporary data stream touch block & stride info #define SBK r11 // (src+byte_count-1) #define SBR r11 // (src+byte_count-1)[0:27] #define DBK r11 // (dst+byte_count-1) then (dst+byte_count-1)[28:31] #define BIG r11 // QW/8 or 128 byte loop count #define SP8 r11 // SRC + n*128 (8 QWs) for data streaming after first call #define RSV r12 // storage for VRSAVE register if used #define VS0 v0 // src vector for permuting #define VS1 v1 // src vector for permuting #define VP3 v2 // d - s permute register #define VPS0 v3 // permuted source vector to store #define VPS1 v4 // 2nd permuted source vector to store #define VPS2 v5 // additional permuted src in Big loop #define VS2 v6 // src vector for permuting #define VPS3 v6 // additional permuted src in Big loop #define VS3 v7 // additional src load in Big loop #define VPS4 v7 // additional permuted src in Big loop #define VS4 v8 // additional src load in Big loop #define VPS5 v8 // additional permuted src in Big loop #define VS5 v9 // additional src load in Big loop #define VPS6 v9 // additional permuted src in Big loop #define VS6 v10 // additional src load in Big loop #define VPS7 v10 // additional permuted src in Big loop #define VS7 v11 // additional src load in Big loop // Conditionalize the use of dcba. It will help if the data is // not in cache and hurt if it is. Generally, except for small // benchmarks repeated many times, we assume data is not in cache // (data streaming) and using dcbz is a performance boost. #ifndef NO_DCBA #if defined(__GNUC__) || defined(__MWERKS__) || defined(_DIAB_TOOL) // gcc and codewarrior and diab don't assemble dcba #define DCBK .long 0x7c033dec // dcba r3,r7 or dcba DST,BK #define DCBL .long 0x7c034dec // dcba r3,r9 or dcba DST,BL #else #ifdef __ghs__ .macro DCBK .long 0x7c033dec .endm .macro DCBL .long 0x7c034dec .endm #else #define DCBK dcba DST,BK #define DCBL dcba DST,BL #endif // __ghs__ #endif // __GNUC__ or __MWERKS__ #else #define DCBK nop #define DCBL nop #endif // NO_DCBA // Conditionalize the use of dst (data stream touch). It will help // if the data is not in cache and hurt if it is (though not as badly // as dcbz). Generally, except for small benchmarks repeated many times, // we assume data is not in cache (data streaming) and using dst is a // performance boost. #ifndef NO_DST #define STRM_B dst SBC,BLL,0 #define STRM_F dst SRC,BLK,0 #define STRM_1 dst SP8,STR,1 #else #define STRM_B nop #define STRM_F nop #define STRM_1 nop #endif // Condition register use // cr0[0:2] = (dst-src==0)? return: ((dst-src>0)? copy_bkwd, copy_fwd;); // then cr0[0:2] = (dst[28:31]-src[28:31]<0)? "shifting left", "shifting right"; // cr1[0,2] = (BC == 0)? 1 : 0; (nothing to move) // then cr1[2] = (DST[28:31] == 0)? 1 : 0; (D0 left justified) // then cr1[2] = ((DBK = DST+BC-1)[28:31] = 0xF)? 1 : 0; (DN right justified) // cr5[0,2] = (|DST-SRC|<=MIN_OVL)?1:0; (Overlap too small for Big loop?) // cr6[1,2] = (DST-SRC>=BC)?1:0; (Okay for v_memmove to copy forward?) // then cr6[2] = (QW == 0)? 1 : 0; (Any full vectors to move?) // then cr6[1] = (QW > 4)? 1 : 0; (>4 vectors to move?) // then cr6[3] = (third store[27] == 1)? 1: 0; (cache line alignment) // then cr6[3] = (last store[27] == 1)? 1: 0; (last store odd?) // cr7[2] = (BC>MIN_VEC)?1:0; (BC big enough to warrant vectors) // then cr7[0:3] = (DST+16)[0:27]-DST (How many bytes (iff <16) in first vector?) // then cr7[1] = (QW > 14)? 1 : 0; (>14 vectors to move?) // then cr7[0:3] = (DST+BC)[0:27] (How many bytes (iff <16) in last vector?) .text #ifdef __MWERKS__ .align 32 #else .align 5 #endif #ifdef LIBMOTOVEC .globl memmove memmove: nop // IU1 Compilers forget first label .globl memcpy memcpy: #else .globl vec_memmove vec_memmove: nop // IU1 Only way I know to preserve both labels .globl _vec_memcpy _vec_memcpy: #endif subf. DMS,SRC,DST // IU1 Compute dst-src difference cmpi cr1,0,BC,0 // IU1 Eliminate zero byte count moves cmpi cr7,0,BC,MIN_VEC // IU1 Check for minimum byte count addi SM1,SRC,-1 // IU1 Pre-bias and duplicate src for fwd addi DM1,DST,-1 // IU1 Pre-bias and duplicate destination add SBC,SRC,BC // IU1 Pre-bias and duplicate src for bkwd beqlr // return if DST = SRC add DBC,DST,BC // IU1 Pre-bias and duplicate destination subf Rt,DST,SRC // IU1 Form |DST-SRC| if DST-SRC<0 beqlr cr1 // return if BC = 0 bgt Cpy_bkwd // b if DST-SRC>0 (have to copy backward) cmpi cr5,0,Rt,MIN_OVL // IU1 (|DST-SRC|>128)?1:0; for v_memcpy bgt cr7,v_memcpy // b if BC>MIN_VEC (okay to copy vectors fwd) // Copy byte-by-byte forwards if DST-SRC<0 and BC<=MIN_VEC mtctr BC // i=BC; do ...;i--; while (i>0) Byte_cpy_fwd: lbzu Rt,1(SM1) // LSU * ++(DST-1) = * ++(SRC-1) stbu Rt,1(DM1) // LSU bdnz Byte_cpy_fwd blr nop // IU1 Improve next label as branch target Cpy_bkwd: cmpi cr5,0,DMS,MIN_OVL // IU1 ((DST-SRC)>128)?1:0; for v_memcpy cmp cr6,0,DMS,BC // IU1 cr6[1,2]=(DST-SRC>=BC)?1:0; bgt cr7,v_memmove // b if BC>MIN_VEC (copy vectors bkwd) // Copy byte-by-byte backwards if DST-SRC>0 and BC<=MIN_VEC mtctr BC // i=BC; do ...;i--; while (i>0) Byte_cpy_bwd: lbzu Rt,-1(SBC) // LSU * --(DST+BC) = * --(SRC+BC) stbu Rt,-1(DBC) // LSU Store it bdnz Byte_cpy_bwd blr #ifdef __MWERKS__ .align 16 #else .align 4 #endif v_memmove: // Byte count < MIN_VEC bytes will have been copied by scalar code above, // so this will not deal with small block moves < MIN_VEC. // For systems using VRSAVE, define VRSAVE=1 when compiling. For systems // that don't, make sure VRSAVE is undefined. #ifdef VRSAVE mfspr RSV,VRSV // IU2 Get current VRSAVE contents #endif rlwinm S,SRC,0,28,31 // IU1 Save src address bits s[28:31] rlwinm D,DST,0,28,31 // IU1 D = dst[28:31] bge cr6,MC_entry // b to v_memcpy if DST-SRC>=BC (fwd copy OK) #ifdef VRSAVE oris Rt,RSV,0xfff0 // IU1 Or in registers used by this routine #endif lis BLL,0x010c // IU1 Stream 12 blocks of 16 bytes subf. SMD,D,S // IU1 if S-D<0 essentially shifting right #ifdef VRSAVE mtspr VRSV,Rt // IU2 Save in VRSAVE before first vec op #endif lvsr VP3,0,DMS // LSU Permute vector for dst - src shft right ori BLL,BLL,0xffe0 // IU1 Stream stride -32B STRM_B // LSU Start data stream at SRC+BC addi SBK,SBC,-1 // IU1 Address of last src byte bgt Rt_shft // Bytes from upper vector = (s-d>0)?s-d:16+s-d; addi SMD,SMD,16 // IU1 Save 16-(d-s) Rt_shft: rlwinm SBR,SBK,0,0,27 // IU1 (SRC+BC-1)[0:27] addi BK,BC,-1 // IU1 Initialize byte index subf Rt,SBR,SBC // IU1 How many bytes in first source? add DBK,DST,BK // IU1 Address of last dst byte addi DR,DST,16 // IU1 Address of second dst vector subf. SMD,Rt,SMD // IU1 if bytes in 1st src>Bytes in 1st permute rlwinm Rt,DBK,0,28,31 // IU1 (DST+BC-1)[28:31] rlwinm DR,DR,0,0,27 // IU1 (DST+16)[0:27] // If there are more useful bytes in the upper vector of a permute pair than we // will get in the first permute, the first loaded vector needs to be in the // lower half of the permute pair. The upper half is a don't care then. blt Get_bytes_rt // b if shifting left (D-S>=0) lvx VS1,SRC,BK // LSU Get SN load started // Comments numbering source and destination assume single path through the // code executing each instruction once. For vec_memmove, an example would // be the call memmove(BASE+0x0F, BASE+0x2F, 82). N = 6 in that case. addi SRC,SRC,-16 // IU1 Decrement src base (to keep BK useful) Get_bytes_rt: // Come here to get VS0 & Don't care what VS1 is lvx VS0,SRC,BK // LSU Get SN-1 (SN if D-S<0) in lower vector subf QW,DR,DBK // IU1 Bytes of full vectors to move (-16) cmpi cr7,0,Rt,0xF // IU1 Is Dn right justified? cmpi cr1,0,D,0 // IU1 Is D0 left justified? rlwinm QW,QW,28,4,31 // IU1 Quad words remaining add Rt,DST,BC // IU1 Refresh the value of DST+BC cmpi cr6,0,QW,0 // IU1 Any full vectors to move? vperm VPS0,VS0,VS1,VP3 // VPU Align SN-1 and SN to DN vor VS1,VS0,VS0 // VIU1 Move lower vector to upper beq cr7,Rt_just // b if DN is right justified mtcrf 0x01,Rt // IU2 Put final vector byte count in cr7 rlwinm DBK,DBK,0,0,27 // IU1 Address of first byte of final vector li D,0 // IU1 Initialize an index pointer bnl cr7,Only_1W_bkwd // b if there was only one or zero words to store stvewx VPS0,DBK,D // LSU store word 1 of two or three addi D,D,4 // IU1 increment index stvewx VPS0,DBK,D // LSU store word 2 of two or three addi D,D,4 // IU1 increment index Only_1W_bkwd: bng cr7,Only_2W_bkwd // b if there were only two or zero words to store stvewx VPS0,DBK,D // LSU store word 3 of three if necessary addi D,D,4 // IU1 increment index Only_2W_bkwd: bne cr7,Only_B_bkwd // b if there are no half words to store stvehx VPS0,DBK,D // LSU store one halfword if necessary addi D,D,2 // IU1 increment index Only_B_bkwd: bns cr7,All_done_bkwd // b if there are no bytes to store stvebx VPS0,DBK,D // LSU store one byte if necessary b All_done_bkwd Rt_just: stvx VPS0,DST,BK // LSU Store 16 bytes at DN All_done_bkwd: addi BK,BK,-16 // IU1 Decrement destination byte count ble cr6,Last_load // b if no Quad words to do mtctr QW // IU2 for (i=0;i<=QW;i++)-execution serializng cmpi cr6,0,QW,4 // IU1 Check QW>4 QW_loop: lvx VS0,SRC,BK // LSU Get SN-2 (or SN-1 if ADJ==0) vperm VPS0,VS0,VS1,VP3 // VPU Align SN-2 and SN-1 to DN-1 vor VS1,VS0,VS0 // VIU1 Move lower vector to upper stvx VPS0,DST,BK // LSU Store 16 bytes at DN-1 addi BK,BK,-16 // IU1 Decrement byte kount bdnzf 25,QW_loop // b if 4 or less quad words to do add DNX,DST,BK // IU1 address of next store (DST+BC-1-16) bgt cr6,GT_4QW // b if >4 quad words left Last_load: // if D-S>=0, next load will be from same address as last blt No_ld_bkwd // b if shifting right (S-D>=0) addi SRC,SRC,16 // IU1 recorrect source if it was decremented No_ld_bkwd: lvx VS0,0,SRC // LSU Get last source SN-6 (guaranteed S0) // Current 16 bytes is the last; we're done. dss 0 // Data stream stop vperm VPS0,VS0,VS1,VP3 // VPU Align SN-6 and SN-5 to DN-6 subfic D,DST,16 // IU1 How many bytes in first destination? beq cr1,Lt_just // b if last destination is left justified mtcrf 0x01,D // IU2 Put byte count remaining in cr7 li D,0 // IU1 Initialize index pointer bns cr7,No_B_bkwd // b if only even number of bytes to store stvebx VPS0,DST,D // LSU store first byte at DST+0 addi D,D,1 // IU1 increment index No_B_bkwd: bne cr7,No_H_bkwd // b if only words to store stvehx VPS0,DST,D // LSU store halfword at DST+0/1 addi D,D,2 // IU1 increment index No_H_bkwd: bng cr7,No_W1_bkwd // b if exactly zero or two words to store stvewx VPS0,DST,D // LSU store word 1 of one or three addi D,D,4 // IU1 increment index No_W1_bkwd: bnl cr7,No_W2_bkwd // b if there was only one word to store stvewx VPS0,DST,D // LSU store word 1 of two or 2 of three addi D,D,4 // IU1 increment index stvewx VPS0,DST,D // LSU store word 2 of two or 3 of three b No_W2_bkwd Lt_just: stvx VPS0,0,DST // LSU Store 16 bytes at final dst addr D0 No_W2_bkwd: #ifdef VRSAVE mtspr VRSV,RSV // IU1 Restore VRSAVE #endif blr // Return destination address from entry GT_4QW: // Do once if next store is to even half of cache line, else twice lvx VS0,SRC,BK // LSU Get SN-3 (or SN-2) mtcrf 0x02,DNX // IU2 cr6[3]=((DST+BC-1)[27]==1)?1:0; vperm VPS0,VS0,VS1,VP3 // VPU Align SN-3 and SN-2 to Dn-2 vor VS1,VS0,VS0 // VIU1 Move lower vector to upper addi DNX,DNX,-16 // IU1 Prepare to update cr6 next loop stvx VPS0,DST,BK // LSU Store 16 bytes at DN-2 vor VS3,VS0,VS0 // VIU Make a copy of lower vector addi BK,BK,-16 // IU1 Decrement byte count by 16 bdnzt 27,GT_4QW // b if next store is to upper (odd) half of CL // At this point next store will be to even address. lis STR,0x102 // IU1 Stream 2 blocks of 16 bytes mtcrf 0x02,DST // IU2 cr6[3]=(DST[27]==1)?1:0; (DST odd?) addi BL,BK,-16 // IU1 Create an alternate byte count - 16 ori STR,STR,0xffe0 // IU1 Stream stride -32B addi SP8,SRC,-64 // IU1 Starting address for data stream touch bso cr6,B32_bkwd // b if DST[27] == 1; i.e, final store is odd bdnz B32_bkwd // decrement counter for last odd QW store B32_bkwd: // Should be at least 2 stores remaining and next 2 are cache aligned lvx VS2,SRC,BK // LSU Get SN-4 (or SN-3) addi SP8,SP8,-32 // IU1 Next starting address for data stream touch lvx VS1,SRC,BL // LSU Get SN-5 (or SN-4) vperm VPS0,VS2,VS3,VP3 // VPU Align SN-4 and SN-3 to DN-3 STRM_1 // LSU Stream 64 byte blocks ahead of loads DCBL // LSU allocate next cache line vperm VPS1,VS1,VS2,VP3 // VPU Align SN-5 and SN-4 to DN-4 vor VS3,VS1,VS1 // VIU1 Move SN-5 to SN-3 stvx VPS0,DST,BK // LSU Store 16 bytes at DN-3 addi BK,BL,-16 // IU1 Decrement byte count bdz Nxt_loc_bkwd // always decrement and branch to next instr Nxt_loc_bkwd: stvx VPS1,DST,BL // LSU Store 16 bytes at DN-4 addi BL,BK,-16 // IU1 Decrement alternate byte count bdnz B32_bkwd // b if there are at least two more QWs to do bns cr6,One_odd_QW // b if there was one more odd QW to store b Last_load // Come here with two more loads and two stores to do One_odd_QW: lvx VS1,SRC,BK // LSU Get SN-6 (or SN-5) vperm VPS1,VS1,VS3,VP3 // VPU Align SN-6 and SN-5 to DN-5 stvx VPS1,DST,BK // LSU Store 16 bytes at DN-5 b Last_load // End of memmove in AltiVec #ifdef __MWERKS__ .align 16 #else .align 4 #endif v_memcpy: // Byte count < MIN_VEC bytes will have been copied by scalar code above, // so this will not deal with small block moves < MIN_VEC. #ifdef VRSAVE mfspr RSV,VRSV // IU2 Get current VRSAVE contents #endif rlwinm S,SRC,0,28,31 // IU1 Save src address bits s[28:31] rlwinm D,DST,0,28,31 // IU1 D = dst[28:31] MC_entry: // enter here from memmove if DST-SRC>=BC; this should be faster #ifdef VRSAVE oris Rt,RSV,0xfff0 // IU1 Or in registers used by this routine #endif lis BLK,0x010c // IU1 Stream 12 blocks of 16 bytes subf. S,S,D // IU1 if D-S<0 essentially shifting left #ifdef VRSAVE mtspr VRSV,Rt // IU2 Save in VRSAVE before first vec op #endif lvsr VP3,0,DMS // LSU Permute vector for dst - src shft right ori BLK,BLK,32 // IU1 Stream stride 32B STRM_F // LSU Start data stream 0 at SRC addi DR,DST,16 // IU1 Address of second dst vector addi DBK,DBC,-1 // IU1 Address of last dst byte // If D-S<0 we are "kinda" shifting left with the right shift permute vector // loaded to VP3 and we need both S0 and S1 to permute. If D-S>=0 then the // first loaded vector needs to be in the upper half of the permute pair and // the lower half is a don't care then. bge Ld_bytes_rt // b if shifting right (D-S>=0) lvx VS0,0,SRC // LSU Get S0 load started // Comments numbering source and destination assume single path through the // code executing each instruction once. For vec_memcpy, an example would // be the call memcpy(BASE+0x1E, BASE+0x1F, 259). N = 16 in that case. addi SRC,SRC,16 // IU1 Increment src base (to keep BK useful) Ld_bytes_rt: // Come here to get VS1 & Don't care what VS0 is lvx VS1,0,SRC // LSU Get S1 (or S0 if D-S>=0) in upper vector rlwinm DR,DR,0,0,27 // IU1 (DST+16)[0:27] cmpi cr1,0,D,0 // IU1 Is D0 left justified? subf Rt,DST,DR // IU1 How many bytes in first destination? subf QW,DR,DBK // IU1 Bytes of full vectors to move (-16) li BK,0 // IU1 Initialize byte kount index mtcrf 0x01,Rt // IU2 Put bytes in 1st dst in cr7 rlwinm QW,QW,28,4,31 // IU1 Quad words remaining vperm VPS0,VS0,VS1,VP3 // VPU Align S0 and S1 to D0 vor VS0,VS1,VS1 // VIU1 Move upper vector to lower beq cr1,Left_just // b if D0 is left justified bns cr7,No_B_fwd // b if only even number of bytes to store stvebx VPS0,DST,BK // LSU store first byte at DST+0 addi BK,BK,1 // IU1 increment index No_B_fwd: bne cr7,No_H_fwd // b if only words to store stvehx VPS0,DST,BK // LSU store halfword at DST+0/1 addi BK,BK,2 // IU1 increment index No_H_fwd: bng cr7,No_W1_fwd // b if exactly zero or two words to store stvewx VPS0,DST,BK // LSU store word 1 of one or three addi BK,BK,4 // IU1 increment index No_W1_fwd: bnl cr7,No_W2_fwd // b if there was only one word to store stvewx VPS0,DST,BK // LSU store word 1 of two or 2 of three addi BK,BK,4 // IU1 increment index stvewx VPS0,DST,BK // LSU store word 2 of two or 3 of three b No_W2_fwd Left_just: stvx VPS0,0,DST // LSU Store 16 bytes at D0 No_W2_fwd: rlwinm Rt,DBK,0,28,31 // IU1 (DBK = DST+BC-1)[28:31] cmpi cr6,0,QW,0 // IU1 Any full vectors to move? li BK,16 // IU1 Re-initialize byte kount index cmpi cr1,0,Rt,0xF // IU1 Is DN right justified? cmpi cr7,0,QW,14 // IU1 Check QW>14 ble cr6,Last_ld_fwd // b if no Quad words to do mtctr QW // IU2 for (i=0;i<=QW;i++) cmpi cr6,0,QW,4 // IU1 Check QW>4 QW_fwd_loop: lvx VS1,SRC,BK // LSU Get S2 (or S1) vperm VPS0,VS0,VS1,VP3 // VPU Align S1 and S2 to D1 vor VS0,VS1,VS1 // VIU1 Move upper vector to lower stvx VPS0,DST,BK // LSU Store 16 bytes at D1(+n*16 where n<4) addi BK,BK,16 // IU1 Increment byte kount index bdnzf 25,QW_fwd_loop // b if 4 or less quad words to do add DNX,DST,BK // IU1 address of next store (DST+32 if QW>4) addi QW,QW,-1 // IU1 One more QW stored by now bgt cr6,GT_4QW_fwd // b if >4 quad words left Last_ld_fwd: // Next 16 bytes is the last; we're done. add DBC,DST,BC // IU1 Recompute address of last dst byte + 1 add SBC,SRC,BC // IU1 Recompute address of last src byte + 1 bge No_ld_fwd // b if shifting right (D-S>=0) addi SBC,SBC,-16 // IU1 if D-S>=0 we didn't add 16 to src No_ld_fwd: mtcrf 0x01,DBC // IU2 Put final vector byte count in cr7 addi DBK,DBC,-1 // IU1 Recompute address of last dst byte addi Rt,SBC,-1 // IU1 Recompute address of last src byte // If D-S<0 we have already loaded all the source vectors. // If D-S>=0 then the first loaded vector went to the upper half of the permute // pair and we need one more vector. (This may be a duplicate.) lvx VS1,0,Rt // LSU Get last source S14 (guaranteed SN) #ifndef NO_DST dss 0 // Data stream 0 stop dss 1 // Data stream 1 stop #endif vperm VPS0,VS0,VS1,VP3 // VPU Align S13 and S14 to D14 beq cr1,Rt_just_fwd // b if last destination is right justified rlwinm DBK,DBK,0,0,27 // IU1 Round to QW addr of last byte li D,0 // IU1 Initialize index pointer bnl cr7,Only_1W_fwd // b if there was only one or zero words to store stvewx VPS0,DBK,D // LSU store word 1 of two or three addi D,D,4 // IU1 increment index stvewx VPS0,DBK,D // LSU store word 2 of two or three addi D,D,4 // IU1 increment index Only_1W_fwd: bng cr7,Only_2W_fwd // b if there were only two or zero words to store stvewx VPS0,DBK,D // LSU store word 3 of three if necessary addi D,D,4 // IU1 increment index Only_2W_fwd: bne cr7,Only_B_fwd // b if there are no half words to store stvehx VPS0,DBK,D // LSU store one halfword if necessary addi D,D,2 // IU1 increment index Only_B_fwd: bns cr7,All_done_fwd // b if there are no bytes to store stvebx VPS0,DBK,D // LSU store one byte if necessary b All_done_fwd Rt_just_fwd: stvx VPS0,DST,BK // LSU Store 16 bytes at D14 All_done_fwd: #ifdef VRSAVE mtspr VRSV,RSV // IU1 Restore VRSAVE #endif blr // Return destination address from entry #ifdef __MWERKS__ .align 16 #else .align 4 #endif GT_4QW_fwd: // Do once if nxt st is to odd half of cache line, else twice lvx VS1,SRC,BK // LSU Get S3 (or S2) addi QW,QW,-1 // IU1 Keeping track of QWs stored mtcrf 0x02,DNX // IU2 cr6[3]=((DST+32)[27]==1)?1:0; addi DNX,DNX,16 // IU1 Update cr6 for next loop addi Rt,QW,-2 // IU1 Insure at least 2 QW left after big loop vperm VPS0,VS0,VS1,VP3 // VPU Align S2 and S3 to D2 vor VS0,VS1,VS1 // VIU1 Move upper vector to lower stvx VPS0,DST,BK // LSU Store 16 bytes at D2 addi BK,BK,16 // IU1 Increment byte count by 16 bdnzf 27,GT_4QW_fwd // b if next store is to lower (even) half of CL // At this point next store will be to even address. mtcrf 0x02,DBK // IU2 cr6[3]=((last store)[27]==1)?1:0; (odd?) lis STR,0x104 // IU1 Stream 4 blocks of 16 bytes addi BL,BK,16 // IU1 Create an alternate byte kount + 32 ori STR,STR,32 // IU1 Stream stride 32B #ifndef NO_BIG_LOOP rlwinm BIG,Rt,29,3,31 // IU1 QW/8 big loops to do rlwinm Rt,Rt,0,0,28 // IU1 How many QWs will be done in big loop bgt cr7,Big_loop // b if QW > 14 #endif No_big_loop: // We need the ctr register to reflect an even byte count before entering // the next block - faster to decrement than to reload. addi SP8,SRC,256 // IU1 Starting address for data stream touch xoris STR,STR,0x6 // IU1 Reset stream to 2 blocks of 16 bytes bns cr6,B32_fwd // b if DST[27] == 0; i.e, final store is even bdnz B32_fwd // decrement counter for last QW store odd B32_fwd: // Should be at least 2 stores remaining and next 2 are cache aligned lvx VS1,SRC,BK // LSU Get S12 addi SP8,SP8,32 // IU1 Next starting address for data stream touch lvx VS2,SRC,BL // LSU Get S13 vperm VPS1,VS0,VS1,VP3 // VPU Align S11 and S12 to D11 STRM_1 // LSU Stream 64 byte blocks ahead of loads DCBK // LSU then Kill instead of RWITM vperm VPS0,VS1,VS2,VP3 // VPU Align S12 and S13 to D12 vor VS0,VS2,VS2 // VIU1 Move S13 to S11 stvx VPS1,DST,BK // LSU Store 16 bytes at D11 addi BK,BL,16 // IU1 Increment byte count bdz Nxt_loc_fwd // always decrement and branch to next instr Nxt_loc_fwd: stvx VPS0,DST,BL // LSU Store 16 bytes at D12 addi BL,BK,16 // IU1 Increment alternate byte count bdnz B32_fwd // b if there are at least two more QWs to do bso cr6,One_even_QW // b if there is one even and one odd QW to store b Last_ld_fwd // b if last store is to even address // Come here with two more loads and two stores to do One_even_QW: lvx VS1,SRC,BK // LSU Get S14 (or S13 if if D-S>=0) vperm VPS0,VS0,VS1,VP3 // VPU Align S13 and S14 to D13 vor VS0,VS1,VS1 // VIU1 Move upper vector to lower stvx VPS0,DST,BK // LSU Store 16 bytes at D13 addi BK,BK,16 // IU1 Increment byte count b Last_ld_fwd #ifdef __MWERKS__ .align 16 #else .align 4 #endif Big_loop: subf QW,Rt,QW // IU1 Should be 2-7 QWs left after big loop blt cr5,No_big_loop // b back if |DST-SRC|<128; Big_loop won't work. mtctr BIG // IU2 loop for as many 128B loops as possible addi SP8,SRC,256 // IU1 Starting address for data stream touch Loop_of_128B: // Come here with QW>=10 and next store even; VS0 last load lvx VS1,SRC,BK // LSU Get S4 (or S3 if D-S>=0) addi BL,BK,32 // IU1 Increment Byte_Kount+16 by 32 addi SP8,SP8,128 // IU1 increment address for data stream touch lvx VS3,SRC,BL // LSU Get S6 (or S5) addi BL,BL,32 // IU1 Increment Byte_Kount+48 by 32 lvx VS5,SRC,BL // LSU Get S8 (or S7) addi BL,BL,32 // IU1 Increment Byte_Kount+80 by 32 lvx VS7,SRC,BL // LSU Get S10 (or S9) addi BL,BK,16 // IU1 Increment Byte_Kount+16 by 16 lvx VS2,SRC,BL // LSU Get S5 (or S4) addi BL,BL,32 // IU1 Increment Byte_Kount+32 by 32 lvx VS4,SRC,BL // LSU Get S7 (or S6) addi BL,BL,32 // IU1 Increment Byte_Kount+64 by 32 lvx VS6,SRC,BL // LSU Get S9 (or S8) addi BL,BL,32 // IU1 Increment Byte_Kount+96 by 32 vperm VPS0,VS0,VS1,VP3 // VPU lvx VS0,SRC,BL // LSU Get S11 (or S10) vperm VPS1,VS1,VS2,VP3 // VPU STRM_1 // LSU Stream 4 32B blocks, stride 32B DCBK // LSU then Kill instead of RWITM stvx VPS0,DST,BK // LSU Store D3 addi BK,BK,16 // IU1 Increment Byte_Kount+16 by 16 vperm VPS2,VS2,VS3,VP3 // VPU stvx VPS1,DST,BK // LSU Store D4 addi BK,BK,16 // IU1 Increment Byte_Kount+32 by 16 vperm VPS3,VS3,VS4,VP3 // VPU DCBK // LSU then Kill instead of RWITM stvx VPS2,DST,BK // LSU Store D5 addi BK,BK,16 // IU1 Increment Byte_Kount+48 by 16 vperm VPS4,VS4,VS5,VP3 // VPU stvx VPS3,DST,BK // LSU Store D6 addi BK,BK,16 // IU1 Increment Byte_Kount+64 by 16 vperm VPS5,VS5,VS6,VP3 // VPU DCBK // LSU then Kill instead of RWITM stvx VPS4,DST,BK // LSU Store D7 addi BK,BK,16 // IU1 Increment Byte_Kount+80 by 16 vperm VPS6,VS6,VS7,VP3 // VPU stvx VPS5,DST,BK // LSU Store D8 addi BK,BK,16 // IU1 Increment Byte_Kount+96 by 16 vperm VPS7,VS7,VS0,VP3 // VPU DCBK // LSU then Kill instead of RWITM stvx VPS6,DST,BK // LSU Store D9 addi BK,BK,16 // IU1 Increment Byte_Kount+112 by 16 stvx VPS7,DST,BK // LSU Store D10 addi BK,BK,16 // IU1 Increment Byte_Kount+128 by 16 bdnz Loop_of_128B // b if ctr > 0 (QW/8 still > 0) mtctr QW // IU1 Restore QW remaining to counter addi BL,BK,16 // IU1 Create an alternate byte kount + 16 bns cr6,B32_fwd // b if DST[27] == 0; i.e, final store is even bdnz B32_fwd // b and decrement counter for last QW store odd // One of the above branches should have taken // End of memcpy in AltiVec // bcopy works like memcpy, but the source and destination operands are reversed. // Following will just reverse the operands and branch to memcpy. #ifdef LIBMOTOVEC .globl bcopy bcopy: #else .globl vec_bcopy vec_bcopy: #endif mr Rt,DST // temp storage for what is really source address (r3) mr DST,SRC // swap destination address to r3 to match memcpy dst mr SRC,Rt // Complete swap of destination and source for memcpy #ifdef LIBMOTOVEC b memcpy // b to memcpy with correct args in r3 and r4 #else b _vec_memcpy // b to vec_memcpy with correct args in r3 and r4 #endif // End of bcopy in AltiVec liboil-0.3.17/liboil/motovec/Makefile.am0000644000175000017500000000032610717203073014760 00000000000000 noinst_LTLIBRARIES = libmotovec.la libmotovec_la_SOURCES = \ motovec.c \ vec_memcpy.S \ vec_memset.S libmotovec_la_LIBADD = libmotovec_la_CFLAGS = $(LIBOIL_CFLAGS) libmotovec_la_CCASFLAGS = $(LIBOIL_CFLAGS) liboil-0.3.17/liboil/motovec/motovec.c0000644000175000017500000000421310717203073014543 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include OIL_DECLARE_CLASS(copy_u8); OIL_DECLARE_CLASS(splat_u8_ns); #ifdef HAVE_SYMBOL_UNDERSCORE void *vec_memcpy(void *dest, void *src, int n); void *vec_memset(void *dest, int val, int n); #else void *_vec_memcpy(void *dest, void *src, int n); void *_vec_memset(void *dest, int val, int n); #define vec_memcpy _vec_memcpy #define vec_memset _vec_memset #endif static void copy_u8_motovec (uint8_t *dest, uint8_t *src, int n) { vec_memcpy(dest, src, n); } OIL_DEFINE_IMPL_FULL (copy_u8_motovec, copy_u8, OIL_IMPL_FLAG_ALTIVEC); static void splat_u8_ns_motovec (uint8_t *dest, uint8_t *src, int n) { vec_memset(dest, src[0], n); } OIL_DEFINE_IMPL_FULL (splat_u8_ns_motovec, splat_u8_ns, OIL_IMPL_FLAG_ALTIVEC); liboil-0.3.17/liboil/motovec/README0000644000175000017500000004462610717203073013617 00000000000000//------------------------------------------------------------------ // file: readme.txt // Readme to accompany libmotovec.a //------------------------------------------------------------------ Rev 0.30 release - 5/28/2003 by Chuck Corley This release includes two new files, string_vec.S and checksum_vec.s, which you could paste into the Linux kernel files: /arch/ppc/lib/string.S and /arch/ppc/lib/checksum.S if you wanted to employ AltiVec in the Linux kernel. We used the memcpy_vec and csum_partial_copy_generic_vec functions from these files only in the modified versions of /net/core/skbuf.c and /net/core/iovec.c to give us the networking performance boost in Linux described in the SNDF presentation "Accelerating Networking Data Movement Using the AltiVec® Technology" at www.motorola.com/sndf under Dallas-2003/Host Processors (H1110). Also see the white paper "Enhanced TCP/IP Performance with AltiVec Technology" at e-www.motorola.com/brdata/PDFDB/docs/ALTIVECTCPIPWP.pdf These files contain the following functions string.S contains: string_vec.S contains: memcpy memcpy_vec bcopy bcopy_vec memmove memmove_vec backwards_memcpy backwards_memcpy_vec memset memset_vec memcmp memcmp_vec memchr (coming soon) cacheable_memcpy cacheable_memcpy_vec cacheable_memzero cacheable_memzero_vec strcpy strcpy_vec strncpy (coming soon) strcat (coming soon) strcmp strcmp_vec strlen strlen_vec __copy_tofrom_user* __copy_tofrom_user_vec* __clear_user* __clear_user_vec* __strncpy_from_user* (coming soon) __strnlen_user* (coming soon) checksum.S contains: checksum_vec.S contains: csum_partial csum_partial_vec csum_partial_copy_generic* csum_partial_copy_generic_vec ip_fast_csum (unlikely to benefit) csum_tcpudp_magic (unlikely to benefit) *these functions have ex_table entries for handling memory access exceptions in the kernel. The AltiVec versions were functionally tested by hand. csum_partial_copy_generic_vec and csum_partial_vec previously assembled into libmotovec.a have been removed since they are in the file above. We are finding that selective use of the *_vec functions in the OS kernel is much "safer" than wholescale replacement of the libc library. libmotovec.a returns to being exclusively a performance-enhancing library of libc functions that can be safely linked with user application code to test the performance of AltiVec. My presentation for SDNF-Europe includes performance comparisons of the scalar versus vector versions of the above functions. It should be available on the SNDF website soon. It also includes an updated explanation of memcpy without the potential incoherency problem discussed below. So this release contains in libmotovec.a: memcpy.o from vec_memcpy.S Rev 0.30 dated 4/02/2003 bcopy.o from vec_memcpy.S Rev 0.30 dated 4/02/2003 memmove.o from vec_memcpy.S Rev 0.30 dated 4/02/2003 memset.o from vec_memset.S Rev 0.10 dated 5/01/2003 bzero.o from vec_memset.S Rev 0.10 dated 5/01/2003 strcmp.o from vec_strcmp.S Rev 0.00 dated 3/03/2002 strlen.o from vec_strlen.S Rev 0.00 dated 12/26/2002 And in string.s: memcpy_vec derived from vec_memcpy.S Rev 0.30 dated 4/02/2003 bcopy_vec derived from vec_memcpy.S Rev 0.30 memmove_vec derived from vec_memcpy.S Rev 0.30 backwards_memcpy_vec derived from vec_memcpy.S Rev 0.30 memset_vec derived from vec_memset.S Rev 0.10 dated 5/01/2003 memcmp_vec derived from vec_memcmp.S Rev 0.00 memchr (coming soon) cacheable_memcpy_vec derived from vec_memcpy.S Rev 0.30 cacheable_memzero_vec derived from vec_memset.S Rev 0.10 strcpy_vec derived from vec_strcpy.S Rev 0.10 strncpy_vec (coming soon) strcat_vec (coming soon) strcmp_vec derived from vec_strcmp.S Rev 0.00 (not released) strlen_vec derived from vec_strlen.S Rev 0.00 (not released) __copy_tofrom_user_vec* derived from vec_memcpy.S Rev 0.30 __clear_user_vec* derived from vec_memcpy.S Rev 0.30 __strncpy_from_user_vec* (coming soon) __strnlen_user_vec* (coming soon) *with ex_table and exception code And in checksum.s: csum_partial_vec derived from vec_csum.S Rev 0.0 dated 4/19/03 csum_partial_copy_generic_vec from vec_csum.S Rev 0.0 string_vec.S and checksum_vec.S are only known to assemble with gcc 2.95 and gcc 3.3+. Should work with other gcc compilers but may need editing to be compatible with non-gcc compilers. Rev 0.20 release - 5/12/2003 by Chuck Corley Thanks to all of you who attended SNDF. My presentation "Implementing and Using the Motorola AltiVec Libraries" is available for downloading at www.motorola.com/sndf under Dallas-2003/Host Processors (H1109). During the presentation DS from Lucent pointed out that the way I was bringing the beginning and ending destination Quad Words (vectors) into the registers for merging with the permuted source made the "uninvolved" destination bytes vulnerable to potential incoherency if some interrupting process changed those bytes while I was holding them in a register. While the possibility seemed small, I have rewritten the code to avoid this potential problem. The result actually is slightly faster than the original for small buffers. So this release contains: memcpy.o from vec_memcpy.S Rev 0.30 dated 4/02/2003 bcopy.o from vec_memcpy.S Rev 0.30 dated 4/02/2003 memmove.o from vec_memcpy.S Rev 0.30 dated 4/02/2003 memset.o from vec_memset.S Rev 0.10 dated 5/01/2003 bzero.o from vec_memset.S Rev 0.10 dated 5/01/2003 csum_partial_copy_generic_vec from vec_csum.S Rev 0.0 dated 4/19/03 csum_partial_vec from vec_csum.S Rev 0.0 dated 4/19/03 The latter two additions were assembled into libmotovec.a despite the fact they are not standard libc functions. Rather they are the Altivec enabled equivalents of functions by the same name from the linux source tree (Linux 2.4.17). While we are pursuing how to get these functions incorporated into Linux, here they are assembled and in source form if you are building your own version of linux. The use of an earlier version of csum_partial_copy_generic_vec and memcpy_vec is documented to speed up TCP/IP and UDP transfers in Jacob Pan's SNDF presentation "Accelerating Networking Data Movement Using AltiVec Technology" (H1110) available at the website above. csum_partial does not appear to be called with large enough buffer sizes in linux to warrant using the vectorized version. I am also releasing the source for memset and bzero in this release. strcpy, strlen, strncpy, strcmp, memcmp, strcat, and memchr are still on my list to do - soon. Rev 0.10 release - 3/13/2003 by Chuck Corley The presence of dcbz in the 32 byte loop of memcpy (or memmove) causes an alignment exception to non-cacheable memory (MPC7410 User's Manual p. 4-20 and MPC7450 User's Manual p. 4-25) so it was removed in this release. dcbz instructions were not present in memset in any of these releases. That fixed the alignment problem but hurt the performance some; then it was "rediscovered" that dcba would have been a better choice anyway as it does not cause an exception; it would just be noop'ed. So this release substitutes dcba for dcbz. This release contains improvements in memcpy that should be documented in an application note which is still not finished but are being pretty nicely documented for SNDF presentation H1109. The memcpy was further loop unrolled to provide a 128B loop for large buffers (>256 bytes) and the data stream touch instruction was added. It may still be possible to improve the tuning of the dst instruction, particularly in memmove, but this release is worthy of reving the number to the next significant revision. I've developed a new metric which will be explained at SNDF in Dallas, TX, March 23-26, 2003. As the number of bytes in a buffer gets larger, the memcpy routine settles into repetitions of the inner loop. 32 bytes were moved in the inner loop of Rev 0.0x and 128 bytes are moved in the inner loop of Rev 0.10. And the number of processor clocks per inner loop can be shown to approach the minimum possible. Therefore the new metric measures the incremental transfer rate for the inner loop after a reasonable number (>512) of bytes have been moved. This will not be the bytes transferred per second because there were some less efficient transfers at start-up but this is the transfer rate that the routine is asymptotically approaching as the buffer gets big (regularly testing to 1460 bytes). Here is that metric for several cases: Case 1: For gcc's lib c memcpy when buffers are not word aligned Case 2: For gcc's lib c memcpy when buffers are word aligned Case 3: For Rev 0.01 of memcpy with Altivec irrespective of alignment Case 4: For Rev 0.10 of memcpy with Altivec irrespective of alignment Numbers are provided for the cold DCache and warm DCache. Code is assumed to always be resident in the ICache as would be expected here where the inner loop has run multiple times. COLD DCACHE WARM DCACHE FOR THE MPC7410@400/100 Insts Clks MB/Sec Insts Clks MB/Sec Case 1: gcc_NWA (1 byte/loop) 6 6 71 6 3 133 Case 2: gcc_WA (16 B/loop) 12 62 103 12 8 800 Case 3: vec_memcpy Rev 0.01 12 60 213 12 7 1961 Case 4: vec_memcpy Rev 0.10 46 125 410 46 41 1250 COLD DCACHE WARM DCACHE FOR THE MPC7445@1GHz/133 Insts Clks MB/Sec Insts Clks MB/Sec Case 1: gcc_NWA 6 8 122 6 3 350 Case 2: gcc_WA 12 104 153 12 12 1333 Case 3: vec_memcpy Rev 0.01 12 110 292 12 7 4413 Case 4: vec_memcpy Rev 0.10 46 247 518 46 35 3666 Perhaps you notice that we are trading off Warm DCache performance to improve the Cold DCache case. There are other interesting tradeoffs in going from 32 byte inner loop to 128 bytes. And in using the dcba instruction - or not. In other words, the numbers for vec_memcpy above are not the highest possible in the Warm DCache case but they look like a good compromise which most benefits the Cold DCache case. More at SNDF (or eventually in the app note) ... I am releasing the source code to vec_memcpy.S with this release so if if you don't like the tradeoff above you can make your own selection. It successfully assembles for me with Codewarrior, Diab, Green Hills, gcc, and Metaware. It is nicely commented but could use more documentation. I will specifically be explaining it in SNDF presentation H1109. ************************************************************************* Rev 0.01 release - 2/17/2003 by Chuck Corley Fixed a problem at Last_ld_fwd: that caused a load beyond a page boundary and resulting segment fault in Linux. Last source load of SRC+BK in vec_memcpy could be > SRC+BC-1. Also found and fixed an error where the Quick and Dirty (QND) code that was in there for dst wasn't completely commented out. Plan to enable dst soon. Probably loop unroll to 128 bytes first though. ********************************************************************** Initial Release - 2/10/2003 by Chuck Corley Contains the libc functions: memcpy.o from vec_memcpy.S Rev 0.0 dated 2/09/2003 bcopy.o from vec_memcpy.S Rev 0.0 dated 2/09/2003 memmove.o from vec_memcpy.S Rev 0.0 dated 2/09/2003 memset.o from vec_memset.S Rev 0.0 dated 2/09/2003 bzero.o from vec_memset.S Rev 0.0 dated 2/09/2003 These functions are implemented in AltiVec but are still not as fast as we know how to make them. Watch this site for frequent revisions over the next several months. We are in the process of creating application notes to explain the source code and the performance associated with these library functions; watch this site for those application notes to be added. A logical deadline for completion of this work is the Smart Network Developers Forum in Dallas, TX, March 23-26, 2003, where we will be discussing this library, its performance, and application. We will also be adding the following libc functions in the very near future: strcpy strcmp strlen memcmp memchr strncpy We also have preliminary work completed on the following functions found in Linux and have to figure out how to distribute them: csum_partial csum_partial_generic __copy_tofrom_user page_copy We believe that these libraries will improve performance on Motorola G4 processors for applications that make heavy use of the included functions. On non-G4 microprocessors they will cause illegal operation exceptions because those processors do not support AltiVec. To use this library, you must: 1. Include it on the linker command line prior to the compiler's libc library. Examples: For gcc: powerpc-eabisim-ld -T../../spprt/gcc_dink.script -Qy -dn -Bstatic ../../spprt/gcc_obj/gcc_crt0.o ../../spprt/gcc_obj/dtime.o ../../spprt/gcc_obj/cache.o ../../spprt/gcc_obj/Support.o ../../spprt/gcc_obj/dinkusr.o ../../spprt/gcc_obj/perfmon.o gcc_obj/test_memmove.o c:\BMS\vec_lib\libmotovec\libmotovec.a c:/cygwin/Altivec/powerpc-eabisim\lib\libm.a --start-group -lsim -lc --end-group -o gccBM.elf For Diab: dld ../../spprt/diab_dink.dld ../../spprt/diab_obj/diab_crt0.o ../../spprt/diab_obj/dtime.o ../../spprt/diab_obj/cache.o ../../spprt/diab_obj/Support.o ../../spprt/diab_obj/dinkusr.o ../../spprt/diab_obj/perfmon.o diab_obj/test_memmove.o c:\BMS\vec_lib\libmotovec\libmotovec.a -Y P,c:/diab/5.0.3/PPCEH:c:/diab/5.0.3/PPCE/simple:c:/diab/5.0.3/PPCE:c:/diab/5.0.3/PPCEN -lc -lm -o diabBM.elf For Green Hills: elxr -T../../spprt/ghs_dink.lnk ../../spprt/ghs_obj/ghs_crt0.o ../../spprt/ghs_obj/dtime.o ../../spprt/ghs_obj/cache.o ../../spprt/ghs_obj/Support.o ../../spprt/ghs_obj/dinkusr.o ../../spprt/ghs_obj/perfmon.o ghs_obj/test_memmove.o c:\BMS\vec_lib\libmotovec\libmotovec.a -Lc:\GHS\ppc36\ppc -lansi -lsys -larch -lind -o ghsBM.elf For CodeWarrior: mwldeppc -lcf ../../spprt/cw_dink.lcf -nostdlib -fp fmadd -proc 7450 ../../spprt/cw_obj/cw_crt0.o ../../spprt/cw_obj/dtime.o ../../spprt/cw_obj/cache.o ../../spprt/cw_obj/Support.o ../../spprt/cw_obj/dinkusr.o ../../spprt/cw_obj/perfmon.o cw_obj/test_memmove.o c:\BMS\vec_lib\libmotovec\libmotovec.a -Lc:/"Program Files"/Metrowerks/CodeWarrior/PowerPC_EABI_Support/Runtime/Lib/ -lRuntime.PPCEABI.H.a -Lc:/"Program Files"/Metrowerks/CodeWarrior/PowerPC_EABI_Support/Msl/MSL_C/Ppc_eabi/Lib/ -lMSL_C.PPCEABI.bare.H.a -o cwBM.elf For Metaware: ldppc ../../spprt/mw_link.txt -Bnoheader -Bhardalign -dn -q -Qn ../../spprt/mw_obj/mw_crt0.o ../../spprt/mw_obj/dtime.o ../../spprt/mw_obj/cache.o ../../spprt/mw_obj/Support.o ../../spprt/mw_obj/dinkusr.o ../../spprt/mw_obj/perfmon.o mw_obj/test_memmove.o c:\BMS\vec_lib\libmotovec\libmotovec.a -Y P,c:/hcppc/lib/be/fp -lct -lmwt -o mwBM.elf 2. Enable AltiVec in the Machine State Processor (MSR) register of the target machine. Example: AltiVec_enable: mfmsr r4 // Get current MSR contents oris r4,r4,0x0200 // Set the AltiVec enable bit MSR[6] mtmsr r4 // Write to MSR isync // Context synchronizing instr after mtmsr 3. If the AltiVec vector register set is used in more than one context, the AltiVec registers must be saved and restored on context switches. The AltiVec EABI extensions define a register (SPR 256 - the VRSAVE register) which can be used to reduce the number of vector registers which have to be saved to only those in use. This library is currently compiled without that VRSAVE feature enabled, so all 32 vector registers will have to be saved and restored. We are currently thinking that this is a more efficient practice anyway and note that Linux and several RTOSes are taking that approach in saving and restoring the vector registers. We have observed very little performance difference in Linux for saving all of the AltiVec registers on a context switch versus saving only 8. And saving all of the registers is a less than 1% total impact on performance. 4. There is one worrisome problem with this library when run on the MPC745X microprocessors in the 60x bus mode. The MPC7450 Family User's Manual (Section 7.3) states that "The 60x bus protocol does not support a 16-byte bus transaction. Therefore, cache-inhibited AltiVec loads, stores, and write-through stores take an alignment exception. This requires a re-write of the alignment exception routines in software that supports AltiVec quad word access in 60x bus mode on the MPC745X." This says that if the user is attempting to use these routines in a cache-inhibited area of memory on a MPC745X in 60x bus mode, it will require special alignment exception handling software. We are currently implementing that software for the Linux OS. Alternatively, the user can restrict this library's use to areas of memory known to be cacheable. This library was built using gcc, but as shown in the examples of step 1 above, links and executes with Diab5.0, Green Hills 3.6, Codewarrior EPPC 6.1, and Metaware 4.5. The gcc archiver was used to create it in the following command lines: powerpc-eabisim-gcc -c -s -fvec -mcpu=750 -mregnames -I. -I./source -I../../spprt -Ic:/cygwin/Altivec\powerpc-eabisim\include -Ic:/cygwin/Altivec\lib\gcc-lib\powerpc-eabisim\gcc-2.95.2\include -o gcc_obj/vec_memcpy.o -D__GNUC__ -DLIBMOTOVEC ../vec_memcpy/Source/vec_memcpy.S -o gcc_obj/vec_memcpy.o powerpc-eabisim-gcc -c -s -fvec -mcpu=750 -mregnames -I. -I./source -I../../spprt -Ic:/cygwin/Altivec\powerpc-eabisim\include -Ic:/cygwin/Altivec\lib\gcc-lib\powerpc-eabisim\gcc-2.95.2\include -o gcc_obj/vec_memset.o -D__GNUC__ -DLIBMOTOVEC ../vec_memset/source/vec_memset.S -o gcc_obj/vec_memset.o powerpc-eabisim-ar -ru libmotovec.a gcc_obj/vec_memcpy.o gcc_obj/vec_memset.o Email questions or suggestions to risc10@email.sps.mot.com liboil-0.3.17/liboil/motovec/Makefile.in0000644000175000017500000005007011332627673015004 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = liboil/motovec DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmotovec_la_DEPENDENCIES = am_libmotovec_la_OBJECTS = libmotovec_la-motovec.lo \ libmotovec_la-vec_memcpy.lo libmotovec_la-vec_memset.lo libmotovec_la_OBJECTS = $(am_libmotovec_la_OBJECTS) libmotovec_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmotovec_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) LTCPPASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libmotovec_la_SOURCES) DIST_SOURCES = $(libmotovec_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmotovec.la libmotovec_la_SOURCES = \ motovec.c \ vec_memcpy.S \ vec_memset.S libmotovec_la_LIBADD = libmotovec_la_CFLAGS = $(LIBOIL_CFLAGS) libmotovec_la_CCASFLAGS = $(LIBOIL_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .S .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/motovec/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/motovec/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmotovec.la: $(libmotovec_la_OBJECTS) $(libmotovec_la_DEPENDENCIES) $(libmotovec_la_LINK) $(libmotovec_la_OBJECTS) $(libmotovec_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmotovec_la-motovec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmotovec_la-vec_memcpy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmotovec_la-vec_memset.Plo@am__quote@ .S.o: @am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ $< .S.obj: @am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .S.lo: @am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(LTCPPASCOMPILE) -c -o $@ $< libmotovec_la-vec_memcpy.lo: vec_memcpy.S @am__fastdepCCAS_TRUE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmotovec_la_CCASFLAGS) $(CCASFLAGS) -MT libmotovec_la-vec_memcpy.lo -MD -MP -MF $(DEPDIR)/libmotovec_la-vec_memcpy.Tpo -c -o libmotovec_la-vec_memcpy.lo `test -f 'vec_memcpy.S' || echo '$(srcdir)/'`vec_memcpy.S @am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/libmotovec_la-vec_memcpy.Tpo $(DEPDIR)/libmotovec_la-vec_memcpy.Plo @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='vec_memcpy.S' object='libmotovec_la-vec_memcpy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmotovec_la_CCASFLAGS) $(CCASFLAGS) -c -o libmotovec_la-vec_memcpy.lo `test -f 'vec_memcpy.S' || echo '$(srcdir)/'`vec_memcpy.S libmotovec_la-vec_memset.lo: vec_memset.S @am__fastdepCCAS_TRUE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmotovec_la_CCASFLAGS) $(CCASFLAGS) -MT libmotovec_la-vec_memset.lo -MD -MP -MF $(DEPDIR)/libmotovec_la-vec_memset.Tpo -c -o libmotovec_la-vec_memset.lo `test -f 'vec_memset.S' || echo '$(srcdir)/'`vec_memset.S @am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/libmotovec_la-vec_memset.Tpo $(DEPDIR)/libmotovec_la-vec_memset.Plo @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='vec_memset.S' object='libmotovec_la-vec_memset.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmotovec_la_CCASFLAGS) $(CCASFLAGS) -c -o libmotovec_la-vec_memset.lo `test -f 'vec_memset.S' || echo '$(srcdir)/'`vec_memset.S .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libmotovec_la-motovec.lo: motovec.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmotovec_la_CFLAGS) $(CFLAGS) -MT libmotovec_la-motovec.lo -MD -MP -MF $(DEPDIR)/libmotovec_la-motovec.Tpo -c -o libmotovec_la-motovec.lo `test -f 'motovec.c' || echo '$(srcdir)/'`motovec.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmotovec_la-motovec.Tpo $(DEPDIR)/libmotovec_la-motovec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='motovec.c' object='libmotovec_la-motovec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmotovec_la_CFLAGS) $(CFLAGS) -c -o libmotovec_la-motovec.lo `test -f 'motovec.c' || echo '$(srcdir)/'`motovec.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/liboilcpu-misc.c0000644000175000017500000000624011067011142014321 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include /***** alpha *****/ #if defined(__alpha__) static unsigned long oil_profile_stamp_alpha(void) { unsigned int ts; __asm__ __volatile__ ("rpcc %0\n" : "=r"(ts)); return ts; } static void oil_cpu_detect_alpha(void) { _oil_profile_stamp = oil_profile_stamp_alpha; } #endif /***** ia64 *****/ #if defined(__ia64__) static unsigned long oil_profile_stamp_ia64(void) { unsigned int ts; __asm__ __volatile__("mov %0=ar.itc\n" : "=r"(ts) :: "memory"); return ts; } static void oil_cpu_detect_ia64(void) { _oil_profile_stamp = oil_profile_stamp_ia64; } #endif /***** s390 *****/ #if defined(__s390__) static unsigned long oil_profile_stamp_s390(void) { uint64_t ts; __asm__ __volatile__ ("STCK %0(%0)\n" : : "r" (&ts)); return ts; } static void oil_cpu_detect_s390(void) { _oil_profile_stamp = oil_profile_stamp_s390; } #endif /***** mips *****/ #if defined(__mips__) #if 0 /* broken */ static unsigned long oil_profile_stamp_mips(void) { unsigned int ts; __asm__ __volatile__ ( " .set push \n" " .set reorder \n" " mfc0 %0,$9 \n" " .set pop \n" : "=m" (ts)); return ts; } #endif static void oil_cpu_detect_mips(void) { //_oil_profile_stamp = oil_profile_stamp_mips; } #endif void oil_cpu_detect_arch(void) { #ifdef __alpha__ oil_cpu_detect_alpha(); #endif #ifdef __ia64__ oil_cpu_detect_ia64(); #endif #ifdef __s390__ oil_cpu_detect_s390(); #endif #ifdef __mips__ oil_cpu_detect_mips(); #endif } liboil-0.3.17/liboil/liboilfuncs.h0000644000175000017500000035754511151567413013760 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* This file is automatically generated. Do not edit. */ #ifndef _LIBOIL_FUNCS_H_ #define _LIBOIL_FUNCS_H_ #include #ifdef __cplusplus extern "C" { #endif OIL_EXPORT OilFunctionClass *oil_function_class_ptr_abs_f32_f32; typedef void (*_oil_type_abs_f32_f32)(float * dest, int dstr, const float * src, int sstr, int n); #define oil_abs_f32_f32 ((_oil_type_abs_f32_f32)(*(void(**)(void))oil_function_class_ptr_abs_f32_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_abs_f64_f64; typedef void (*_oil_type_abs_f64_f64)(double * dest, int dstr, const double * src, int sstr, int n); #define oil_abs_f64_f64 ((_oil_type_abs_f64_f64)(*(void(**)(void))oil_function_class_ptr_abs_f64_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_abs_u16_s16; typedef void (*_oil_type_abs_u16_s16)(uint16_t * dest, int dstr, const int16_t * src, int sstr, int n); #define oil_abs_u16_s16 ((_oil_type_abs_u16_s16)(*(void(**)(void))oil_function_class_ptr_abs_u16_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_abs_u32_s32; typedef void (*_oil_type_abs_u32_s32)(uint32_t * dest, int dstr, const int32_t * src, int sstr, int n); #define oil_abs_u32_s32 ((_oil_type_abs_u32_s32)(*(void(**)(void))oil_function_class_ptr_abs_u32_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_abs_u8_s8; typedef void (*_oil_type_abs_u8_s8)(uint8_t * dest, int dstr, const int8_t * src, int sstr, int n); #define oil_abs_u8_s8 ((_oil_type_abs_u8_s8)(*(void(**)(void))oil_function_class_ptr_abs_u8_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_add2_rshift_add_s16; typedef void (*_oil_type_add2_rshift_add_s16)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_2, int n); #define oil_add2_rshift_add_s16 ((_oil_type_add2_rshift_add_s16)(*(void(**)(void))oil_function_class_ptr_add2_rshift_add_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_add2_rshift_sub_s16; typedef void (*_oil_type_add2_rshift_sub_s16)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_2, int n); #define oil_add2_rshift_sub_s16 ((_oil_type_add2_rshift_sub_s16)(*(void(**)(void))oil_function_class_ptr_add2_rshift_sub_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_add_const_rshift_s16; typedef void (*_oil_type_add_const_rshift_s16)(int16_t * d1, const int16_t * s1, const int16_t * s2_2, int n); #define oil_add_const_rshift_s16 ((_oil_type_add_const_rshift_s16)(*(void(**)(void))oil_function_class_ptr_add_const_rshift_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_add_f32; typedef void (*_oil_type_add_f32)(float * d, const float * s1, const float * s2, int n); #define oil_add_f32 ((_oil_type_add_f32)(*(void(**)(void))oil_function_class_ptr_add_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_add_f64; typedef void (*_oil_type_add_f64)(double * d, const double * s1, const double * s2, int n); #define oil_add_f64 ((_oil_type_add_f64)(*(void(**)(void))oil_function_class_ptr_add_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_add_s16; typedef void (*_oil_type_add_s16)(int16_t * d, const int16_t * src1, const int16_t * src2, int n); #define oil_add_s16 ((_oil_type_add_s16)(*(void(**)(void))oil_function_class_ptr_add_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_add_s16_u8; typedef void (*_oil_type_add_s16_u8)(int16_t * d, const int16_t * src1, const uint8_t * src2, int n); #define oil_add_s16_u8 ((_oil_type_add_s16_u8)(*(void(**)(void))oil_function_class_ptr_add_s16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_addc_rshift_s16; typedef void (*_oil_type_addc_rshift_s16)(int16_t * d1, const int16_t * s1, const int16_t * s2_2, int n); #define oil_addc_rshift_s16 ((_oil_type_addc_rshift_s16)(*(void(**)(void))oil_function_class_ptr_addc_rshift_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_addc_s16; typedef void (*_oil_type_addc_s16)(int16_t * d1, const int16_t * s1, const int16_t * s2_1, int n); #define oil_addc_s16 ((_oil_type_addc_s16)(*(void(**)(void))oil_function_class_ptr_addc_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_argb_paint_u8; typedef void (*_oil_type_argb_paint_u8)(uint8_t * i_4xn, const uint8_t * s1_4, const uint8_t * s2_n, int n); #define oil_argb_paint_u8 ((_oil_type_argb_paint_u8)(*(void(**)(void))oil_function_class_ptr_argb_paint_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_average2_u8; typedef void (*_oil_type_average2_u8)(uint8_t * d, int dstr, const uint8_t * s1, int sstr1, const uint8_t * s2, int sstr2, int n); #define oil_average2_u8 ((_oil_type_average2_u8)(*(void(**)(void))oil_function_class_ptr_average2_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_avg2_12xn_u8; typedef void (*_oil_type_avg2_12xn_u8)(uint8_t * d_12xn, int ds1, const uint8_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, int n); #define oil_avg2_12xn_u8 ((_oil_type_avg2_12xn_u8)(*(void(**)(void))oil_function_class_ptr_avg2_12xn_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_avg2_16xn_u8; typedef void (*_oil_type_avg2_16xn_u8)(uint8_t * d_16xn, int ds1, const uint8_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, int n); #define oil_avg2_16xn_u8 ((_oil_type_avg2_16xn_u8)(*(void(**)(void))oil_function_class_ptr_avg2_16xn_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_avg2_32xn_u8; typedef void (*_oil_type_avg2_32xn_u8)(uint8_t * d_32xn, int ds1, const uint8_t * s1_32xn, int ss1, const uint8_t * s2_32xn, int ss2, int n); #define oil_avg2_32xn_u8 ((_oil_type_avg2_32xn_u8)(*(void(**)(void))oil_function_class_ptr_avg2_32xn_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_avg2_8xn_u8; typedef void (*_oil_type_avg2_8xn_u8)(uint8_t * d_8xn, int ds1, const uint8_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, int n); #define oil_avg2_8xn_u8 ((_oil_type_avg2_8xn_u8)(*(void(**)(void))oil_function_class_ptr_avg2_8xn_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_ayuv2argb_u8; typedef void (*_oil_type_ayuv2argb_u8)(uint8_t * d_4xn, const uint8_t * s_4xn, int n); #define oil_ayuv2argb_u8 ((_oil_type_ayuv2argb_u8)(*(void(**)(void))oil_function_class_ptr_ayuv2argb_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_ayuv2uyvy; typedef void (*_oil_type_ayuv2uyvy)(uint32_t * d_n, const uint32_t * s_n, int n); #define oil_ayuv2uyvy ((_oil_type_ayuv2uyvy)(*(void(**)(void))oil_function_class_ptr_ayuv2uyvy)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_ayuv2yuyv; typedef void (*_oil_type_ayuv2yuyv)(uint32_t * d_n, const uint32_t * s_n, int n); #define oil_ayuv2yuyv ((_oil_type_ayuv2yuyv)(*(void(**)(void))oil_function_class_ptr_ayuv2yuyv)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_ayuv2yvyu; typedef void (*_oil_type_ayuv2yvyu)(uint32_t * d_n, const uint32_t * s_n, int n); #define oil_ayuv2yvyu ((_oil_type_ayuv2yvyu)(*(void(**)(void))oil_function_class_ptr_ayuv2yvyu)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamp_f32; typedef void (*_oil_type_clamp_f32)(float * dest, const float * src, int n, const float * s2_1, const float * s3_1); #define oil_clamp_f32 ((_oil_type_clamp_f32)(*(void(**)(void))oil_function_class_ptr_clamp_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamp_f64; typedef void (*_oil_type_clamp_f64)(double * dest, const double * src, int n, const double * s2_1, const double * s3_1); #define oil_clamp_f64 ((_oil_type_clamp_f64)(*(void(**)(void))oil_function_class_ptr_clamp_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamp_s16; typedef void (*_oil_type_clamp_s16)(int16_t * dest, const int16_t * src, int n, const int16_t * s2_1, const int16_t * s3_1); #define oil_clamp_s16 ((_oil_type_clamp_s16)(*(void(**)(void))oil_function_class_ptr_clamp_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamp_s32; typedef void (*_oil_type_clamp_s32)(int32_t * dest, const int32_t * src, int n, const int32_t * s2_1, const int32_t * s3_1); #define oil_clamp_s32 ((_oil_type_clamp_s32)(*(void(**)(void))oil_function_class_ptr_clamp_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamp_s8; typedef void (*_oil_type_clamp_s8)(int8_t * dest, const int8_t * src, int n, const int8_t * s2_1, const int8_t * s3_1); #define oil_clamp_s8 ((_oil_type_clamp_s8)(*(void(**)(void))oil_function_class_ptr_clamp_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamp_u16; typedef void (*_oil_type_clamp_u16)(uint16_t * dest, const uint16_t * src, int n, const uint16_t * s2_1, const uint16_t * s3_1); #define oil_clamp_u16 ((_oil_type_clamp_u16)(*(void(**)(void))oil_function_class_ptr_clamp_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamp_u32; typedef void (*_oil_type_clamp_u32)(uint32_t * dest, const uint32_t * src, int n, const uint32_t * s2_1, const uint32_t * s3_1); #define oil_clamp_u32 ((_oil_type_clamp_u32)(*(void(**)(void))oil_function_class_ptr_clamp_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamp_u8; typedef void (*_oil_type_clamp_u8)(uint8_t * dest, const uint8_t * src, int n, const uint8_t * s2_1, const uint8_t * s3_1); #define oil_clamp_u8 ((_oil_type_clamp_u8)(*(void(**)(void))oil_function_class_ptr_clamp_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamphigh_f32; typedef void (*_oil_type_clamphigh_f32)(float * dest, const float * src, int n, const float * s2_1); #define oil_clamphigh_f32 ((_oil_type_clamphigh_f32)(*(void(**)(void))oil_function_class_ptr_clamphigh_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamphigh_f64; typedef void (*_oil_type_clamphigh_f64)(double * dest, const double * src, int n, const double * s2_1); #define oil_clamphigh_f64 ((_oil_type_clamphigh_f64)(*(void(**)(void))oil_function_class_ptr_clamphigh_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamphigh_s16; typedef void (*_oil_type_clamphigh_s16)(int16_t * dest, const int16_t * src, int n, const int16_t * s2_1); #define oil_clamphigh_s16 ((_oil_type_clamphigh_s16)(*(void(**)(void))oil_function_class_ptr_clamphigh_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamphigh_s32; typedef void (*_oil_type_clamphigh_s32)(int32_t * dest, const int32_t * src, int n, const int32_t * s2_1); #define oil_clamphigh_s32 ((_oil_type_clamphigh_s32)(*(void(**)(void))oil_function_class_ptr_clamphigh_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamphigh_s8; typedef void (*_oil_type_clamphigh_s8)(int8_t * dest, const int8_t * src, int n, const int8_t * s2_1); #define oil_clamphigh_s8 ((_oil_type_clamphigh_s8)(*(void(**)(void))oil_function_class_ptr_clamphigh_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamphigh_u16; typedef void (*_oil_type_clamphigh_u16)(uint16_t * dest, const uint16_t * src, int n, const uint16_t * s2_1); #define oil_clamphigh_u16 ((_oil_type_clamphigh_u16)(*(void(**)(void))oil_function_class_ptr_clamphigh_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamphigh_u32; typedef void (*_oil_type_clamphigh_u32)(uint32_t * dest, const uint32_t * src, int n, const uint32_t * s2_1); #define oil_clamphigh_u32 ((_oil_type_clamphigh_u32)(*(void(**)(void))oil_function_class_ptr_clamphigh_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamphigh_u8; typedef void (*_oil_type_clamphigh_u8)(uint8_t * dest, const uint8_t * src, int n, const uint8_t * s2_1); #define oil_clamphigh_u8 ((_oil_type_clamphigh_u8)(*(void(**)(void))oil_function_class_ptr_clamphigh_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamplow_f32; typedef void (*_oil_type_clamplow_f32)(float * dest, const float * src, int n, const float * s2_1); #define oil_clamplow_f32 ((_oil_type_clamplow_f32)(*(void(**)(void))oil_function_class_ptr_clamplow_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamplow_f64; typedef void (*_oil_type_clamplow_f64)(double * dest, const double * src, int n, const double * s2_1); #define oil_clamplow_f64 ((_oil_type_clamplow_f64)(*(void(**)(void))oil_function_class_ptr_clamplow_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamplow_s16; typedef void (*_oil_type_clamplow_s16)(int16_t * dest, const int16_t * src, int n, const int16_t * s2_1); #define oil_clamplow_s16 ((_oil_type_clamplow_s16)(*(void(**)(void))oil_function_class_ptr_clamplow_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamplow_s32; typedef void (*_oil_type_clamplow_s32)(int32_t * dest, const int32_t * src, int n, const int32_t * s2_1); #define oil_clamplow_s32 ((_oil_type_clamplow_s32)(*(void(**)(void))oil_function_class_ptr_clamplow_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamplow_s8; typedef void (*_oil_type_clamplow_s8)(int8_t * dest, const int8_t * src, int n, const int8_t * s2_1); #define oil_clamplow_s8 ((_oil_type_clamplow_s8)(*(void(**)(void))oil_function_class_ptr_clamplow_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamplow_u16; typedef void (*_oil_type_clamplow_u16)(uint16_t * dest, const uint16_t * src, int n, const uint16_t * s2_1); #define oil_clamplow_u16 ((_oil_type_clamplow_u16)(*(void(**)(void))oil_function_class_ptr_clamplow_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamplow_u32; typedef void (*_oil_type_clamplow_u32)(uint32_t * dest, const uint32_t * src, int n, const uint32_t * s2_1); #define oil_clamplow_u32 ((_oil_type_clamplow_u32)(*(void(**)(void))oil_function_class_ptr_clamplow_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clamplow_u8; typedef void (*_oil_type_clamplow_u8)(uint8_t * dest, const uint8_t * src, int n, const uint8_t * s2_1); #define oil_clamplow_u8 ((_oil_type_clamplow_u8)(*(void(**)(void))oil_function_class_ptr_clamplow_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clip_f32; typedef void (*_oil_type_clip_f32)(float * dest, int dstr, const float * src, int sstr, int n, const float * s2_1, const float * s3_1); #define oil_clip_f32 ((_oil_type_clip_f32)(*(void(**)(void))oil_function_class_ptr_clip_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clip_f64; typedef void (*_oil_type_clip_f64)(double * dest, int dstr, const double * src, int sstr, int n, const double * s2_1, const double * s3_1); #define oil_clip_f64 ((_oil_type_clip_f64)(*(void(**)(void))oil_function_class_ptr_clip_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clip_s16; typedef void (*_oil_type_clip_s16)(int16_t * dest, int dstr, const int16_t * src, int sstr, int n, const int16_t * s2_1, const int16_t * s3_1); #define oil_clip_s16 ((_oil_type_clip_s16)(*(void(**)(void))oil_function_class_ptr_clip_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clip_s32; typedef void (*_oil_type_clip_s32)(int32_t * dest, int dstr, const int32_t * src, int sstr, int n, const int32_t * s2_1, const int32_t * s3_1); #define oil_clip_s32 ((_oil_type_clip_s32)(*(void(**)(void))oil_function_class_ptr_clip_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clip_s8; typedef void (*_oil_type_clip_s8)(int8_t * dest, int dstr, const int8_t * src, int sstr, int n, const int8_t * s2_1, const int8_t * s3_1); #define oil_clip_s8 ((_oil_type_clip_s8)(*(void(**)(void))oil_function_class_ptr_clip_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clip_u16; typedef void (*_oil_type_clip_u16)(uint16_t * dest, int dstr, const uint16_t * src, int sstr, int n, const uint16_t * s2_1, const uint16_t * s3_1); #define oil_clip_u16 ((_oil_type_clip_u16)(*(void(**)(void))oil_function_class_ptr_clip_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clip_u32; typedef void (*_oil_type_clip_u32)(uint32_t * dest, int dstr, const uint32_t * src, int sstr, int n, const uint32_t * s2_1, const uint32_t * s3_1); #define oil_clip_u32 ((_oil_type_clip_u32)(*(void(**)(void))oil_function_class_ptr_clip_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clip_u8; typedef void (*_oil_type_clip_u8)(uint8_t * dest, int dstr, const uint8_t * src, int sstr, int n, const uint8_t * s2_1, const uint8_t * s3_1); #define oil_clip_u8 ((_oil_type_clip_u8)(*(void(**)(void))oil_function_class_ptr_clip_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv8x8_u8_s16; typedef void (*_oil_type_clipconv8x8_u8_s16)(uint8_t * d_8x8, int dstr, const int16_t * s_8x8, int sstr); #define oil_clipconv8x8_u8_s16 ((_oil_type_clipconv8x8_u8_s16)(*(void(**)(void))oil_function_class_ptr_clipconv8x8_u8_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_s16_f32; typedef void (*_oil_type_clipconv_s16_f32)(int16_t * dest, int dstr, const float * src, int sstr, int n); #define oil_clipconv_s16_f32 ((_oil_type_clipconv_s16_f32)(*(void(**)(void))oil_function_class_ptr_clipconv_s16_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_s16_f64; typedef void (*_oil_type_clipconv_s16_f64)(int16_t * dest, int dstr, const double * src, int sstr, int n); #define oil_clipconv_s16_f64 ((_oil_type_clipconv_s16_f64)(*(void(**)(void))oil_function_class_ptr_clipconv_s16_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_s16_s32; typedef void (*_oil_type_clipconv_s16_s32)(int16_t * dest, int dstr, const int32_t * src, int sstr, int n); #define oil_clipconv_s16_s32 ((_oil_type_clipconv_s16_s32)(*(void(**)(void))oil_function_class_ptr_clipconv_s16_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_s16_u16; typedef void (*_oil_type_clipconv_s16_u16)(int16_t * dest, int dstr, const uint16_t * src, int sstr, int n); #define oil_clipconv_s16_u16 ((_oil_type_clipconv_s16_u16)(*(void(**)(void))oil_function_class_ptr_clipconv_s16_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_s16_u32; typedef void (*_oil_type_clipconv_s16_u32)(int16_t * dest, int dstr, const uint32_t * src, int sstr, int n); #define oil_clipconv_s16_u32 ((_oil_type_clipconv_s16_u32)(*(void(**)(void))oil_function_class_ptr_clipconv_s16_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_s32_f32; typedef void (*_oil_type_clipconv_s32_f32)(int32_t * dest, int dstr, const float * src, int sstr, int n); #define oil_clipconv_s32_f32 ((_oil_type_clipconv_s32_f32)(*(void(**)(void))oil_function_class_ptr_clipconv_s32_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_s32_f64; typedef void (*_oil_type_clipconv_s32_f64)(int32_t * dest, int dstr, const double * src, int sstr, int n); #define oil_clipconv_s32_f64 ((_oil_type_clipconv_s32_f64)(*(void(**)(void))oil_function_class_ptr_clipconv_s32_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_s32_u32; typedef void (*_oil_type_clipconv_s32_u32)(int32_t * dest, int dstr, const uint32_t * src, int sstr, int n); #define oil_clipconv_s32_u32 ((_oil_type_clipconv_s32_u32)(*(void(**)(void))oil_function_class_ptr_clipconv_s32_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_s8_f32; typedef void (*_oil_type_clipconv_s8_f32)(int8_t * dest, int dstr, const float * src, int sstr, int n); #define oil_clipconv_s8_f32 ((_oil_type_clipconv_s8_f32)(*(void(**)(void))oil_function_class_ptr_clipconv_s8_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_s8_f64; typedef void (*_oil_type_clipconv_s8_f64)(int8_t * dest, int dstr, const double * src, int sstr, int n); #define oil_clipconv_s8_f64 ((_oil_type_clipconv_s8_f64)(*(void(**)(void))oil_function_class_ptr_clipconv_s8_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_s8_s16; typedef void (*_oil_type_clipconv_s8_s16)(int8_t * dest, int dstr, const int16_t * src, int sstr, int n); #define oil_clipconv_s8_s16 ((_oil_type_clipconv_s8_s16)(*(void(**)(void))oil_function_class_ptr_clipconv_s8_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_s8_s32; typedef void (*_oil_type_clipconv_s8_s32)(int8_t * dest, int dstr, const int32_t * src, int sstr, int n); #define oil_clipconv_s8_s32 ((_oil_type_clipconv_s8_s32)(*(void(**)(void))oil_function_class_ptr_clipconv_s8_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_s8_u16; typedef void (*_oil_type_clipconv_s8_u16)(int8_t * dest, int dstr, const uint16_t * src, int sstr, int n); #define oil_clipconv_s8_u16 ((_oil_type_clipconv_s8_u16)(*(void(**)(void))oil_function_class_ptr_clipconv_s8_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_s8_u32; typedef void (*_oil_type_clipconv_s8_u32)(int8_t * dest, int dstr, const uint32_t * src, int sstr, int n); #define oil_clipconv_s8_u32 ((_oil_type_clipconv_s8_u32)(*(void(**)(void))oil_function_class_ptr_clipconv_s8_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_s8_u8; typedef void (*_oil_type_clipconv_s8_u8)(int8_t * dest, int dstr, const uint8_t * src, int sstr, int n); #define oil_clipconv_s8_u8 ((_oil_type_clipconv_s8_u8)(*(void(**)(void))oil_function_class_ptr_clipconv_s8_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_u16_f32; typedef void (*_oil_type_clipconv_u16_f32)(uint16_t * dest, int dstr, const float * src, int sstr, int n); #define oil_clipconv_u16_f32 ((_oil_type_clipconv_u16_f32)(*(void(**)(void))oil_function_class_ptr_clipconv_u16_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_u16_f64; typedef void (*_oil_type_clipconv_u16_f64)(uint16_t * dest, int dstr, const double * src, int sstr, int n); #define oil_clipconv_u16_f64 ((_oil_type_clipconv_u16_f64)(*(void(**)(void))oil_function_class_ptr_clipconv_u16_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_u16_s16; typedef void (*_oil_type_clipconv_u16_s16)(uint16_t * dest, int dstr, const int16_t * src, int sstr, int n); #define oil_clipconv_u16_s16 ((_oil_type_clipconv_u16_s16)(*(void(**)(void))oil_function_class_ptr_clipconv_u16_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_u16_s32; typedef void (*_oil_type_clipconv_u16_s32)(uint16_t * dest, int dstr, const int32_t * src, int sstr, int n); #define oil_clipconv_u16_s32 ((_oil_type_clipconv_u16_s32)(*(void(**)(void))oil_function_class_ptr_clipconv_u16_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_u16_u32; typedef void (*_oil_type_clipconv_u16_u32)(uint16_t * dest, int dstr, const uint32_t * src, int sstr, int n); #define oil_clipconv_u16_u32 ((_oil_type_clipconv_u16_u32)(*(void(**)(void))oil_function_class_ptr_clipconv_u16_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_u32_f32; typedef void (*_oil_type_clipconv_u32_f32)(uint32_t * dest, int dstr, const float * src, int sstr, int n); #define oil_clipconv_u32_f32 ((_oil_type_clipconv_u32_f32)(*(void(**)(void))oil_function_class_ptr_clipconv_u32_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_u32_f64; typedef void (*_oil_type_clipconv_u32_f64)(uint32_t * dest, int dstr, const double * src, int sstr, int n); #define oil_clipconv_u32_f64 ((_oil_type_clipconv_u32_f64)(*(void(**)(void))oil_function_class_ptr_clipconv_u32_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_u32_s32; typedef void (*_oil_type_clipconv_u32_s32)(uint32_t * dest, int dstr, const int32_t * src, int sstr, int n); #define oil_clipconv_u32_s32 ((_oil_type_clipconv_u32_s32)(*(void(**)(void))oil_function_class_ptr_clipconv_u32_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_u8_f32; typedef void (*_oil_type_clipconv_u8_f32)(uint8_t * dest, int dstr, const float * src, int sstr, int n); #define oil_clipconv_u8_f32 ((_oil_type_clipconv_u8_f32)(*(void(**)(void))oil_function_class_ptr_clipconv_u8_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_u8_f64; typedef void (*_oil_type_clipconv_u8_f64)(uint8_t * dest, int dstr, const double * src, int sstr, int n); #define oil_clipconv_u8_f64 ((_oil_type_clipconv_u8_f64)(*(void(**)(void))oil_function_class_ptr_clipconv_u8_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_u8_s16; typedef void (*_oil_type_clipconv_u8_s16)(uint8_t * dest, int dstr, const int16_t * src, int sstr, int n); #define oil_clipconv_u8_s16 ((_oil_type_clipconv_u8_s16)(*(void(**)(void))oil_function_class_ptr_clipconv_u8_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_u8_s32; typedef void (*_oil_type_clipconv_u8_s32)(uint8_t * dest, int dstr, const int32_t * src, int sstr, int n); #define oil_clipconv_u8_s32 ((_oil_type_clipconv_u8_s32)(*(void(**)(void))oil_function_class_ptr_clipconv_u8_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_u8_s8; typedef void (*_oil_type_clipconv_u8_s8)(uint8_t * dest, int dstr, const int8_t * src, int sstr, int n); #define oil_clipconv_u8_s8 ((_oil_type_clipconv_u8_s8)(*(void(**)(void))oil_function_class_ptr_clipconv_u8_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_u8_u16; typedef void (*_oil_type_clipconv_u8_u16)(uint8_t * dest, int dstr, const uint16_t * src, int sstr, int n); #define oil_clipconv_u8_u16 ((_oil_type_clipconv_u8_u16)(*(void(**)(void))oil_function_class_ptr_clipconv_u8_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_clipconv_u8_u32; typedef void (*_oil_type_clipconv_u8_u32)(uint8_t * dest, int dstr, const uint32_t * src, int sstr, int n); #define oil_clipconv_u8_u32 ((_oil_type_clipconv_u8_u32)(*(void(**)(void))oil_function_class_ptr_clipconv_u8_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_colorspace_argb; typedef void (*_oil_type_colorspace_argb)(uint32_t * d, const uint32_t * s, const int16_t * s2_24, int n); #define oil_colorspace_argb ((_oil_type_colorspace_argb)(*(void(**)(void))oil_function_class_ptr_colorspace_argb)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_colsad8x8_u8; typedef void (*_oil_type_colsad8x8_u8)(uint32_t * d_1, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2); #define oil_colsad8x8_u8 ((_oil_type_colsad8x8_u8)(*(void(**)(void))oil_function_class_ptr_colsad8x8_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_combine2_12xn_u8; typedef void (*_oil_type_combine2_12xn_u8)(uint8_t * d_12xn, int ds1, const uint8_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, const int16_t * s3_4, int n); #define oil_combine2_12xn_u8 ((_oil_type_combine2_12xn_u8)(*(void(**)(void))oil_function_class_ptr_combine2_12xn_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_combine2_16xn_u8; typedef void (*_oil_type_combine2_16xn_u8)(uint8_t * d_16xn, int ds1, const uint8_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, const int16_t * s3_4, int n); #define oil_combine2_16xn_u8 ((_oil_type_combine2_16xn_u8)(*(void(**)(void))oil_function_class_ptr_combine2_16xn_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_combine2_8xn_u8; typedef void (*_oil_type_combine2_8xn_u8)(uint8_t * d_8xn, int ds1, const uint8_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, const int16_t * s3_4, int n); #define oil_combine2_8xn_u8 ((_oil_type_combine2_8xn_u8)(*(void(**)(void))oil_function_class_ptr_combine2_8xn_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_combine4_12xn_u8; typedef void (*_oil_type_combine4_12xn_u8)(uint8_t * d_12xn, int ds1, const uint8_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, const uint8_t * s3_12xn, int ss3, const uint8_t * s4_12xn, int ss4, const int16_t * s5_6, int n); #define oil_combine4_12xn_u8 ((_oil_type_combine4_12xn_u8)(*(void(**)(void))oil_function_class_ptr_combine4_12xn_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_combine4_16xn_u8; typedef void (*_oil_type_combine4_16xn_u8)(uint8_t * d_16xn, int ds1, const uint8_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, const uint8_t * s3_16xn, int ss3, const uint8_t * s4_16xn, int ss4, const int16_t * s5_6, int n); #define oil_combine4_16xn_u8 ((_oil_type_combine4_16xn_u8)(*(void(**)(void))oil_function_class_ptr_combine4_16xn_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_combine4_32xn_u8; typedef void (*_oil_type_combine4_32xn_u8)(uint8_t * d_32xn, int ds1, const uint8_t * s1_16xn, int ss1, const uint8_t * s2_32xn, int ss2, const uint8_t * s3_32xn, int ss3, const uint8_t * s4_32xn, int ss4, const int16_t * s5_6, int n); #define oil_combine4_32xn_u8 ((_oil_type_combine4_32xn_u8)(*(void(**)(void))oil_function_class_ptr_combine4_32xn_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_combine4_8xn_u8; typedef void (*_oil_type_combine4_8xn_u8)(uint8_t * d_8xn, int ds1, const uint8_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, const uint8_t * s3_8xn, int ss3, const uint8_t * s4_8xn, int ss4, const int16_t * s5_6, int n); #define oil_combine4_8xn_u8 ((_oil_type_combine4_8xn_u8)(*(void(**)(void))oil_function_class_ptr_combine4_8xn_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_compare_u8; typedef void (*_oil_type_compare_u8)(uint32_t * d_1, const uint8_t * s1, const uint8_t * s2, int n); #define oil_compare_u8 ((_oil_type_compare_u8)(*(void(**)(void))oil_function_class_ptr_compare_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_composite_add_argb; typedef void (*_oil_type_composite_add_argb)(uint32_t * i_n, const uint32_t * s1_n, int n); #define oil_composite_add_argb ((_oil_type_composite_add_argb)(*(void(**)(void))oil_function_class_ptr_composite_add_argb)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_composite_add_argb_const_src; typedef void (*_oil_type_composite_add_argb_const_src)(uint32_t * i_n, const uint32_t * s1_1, int n); #define oil_composite_add_argb_const_src ((_oil_type_composite_add_argb_const_src)(*(void(**)(void))oil_function_class_ptr_composite_add_argb_const_src)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_composite_add_u8; typedef void (*_oil_type_composite_add_u8)(uint8_t * i_n, const uint8_t * s1_n, int n); #define oil_composite_add_u8 ((_oil_type_composite_add_u8)(*(void(**)(void))oil_function_class_ptr_composite_add_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_composite_add_u8_const_src; typedef void (*_oil_type_composite_add_u8_const_src)(uint8_t * i_n, const uint8_t * s1_1, int n); #define oil_composite_add_u8_const_src ((_oil_type_composite_add_u8_const_src)(*(void(**)(void))oil_function_class_ptr_composite_add_u8_const_src)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_composite_in_argb; typedef void (*_oil_type_composite_in_argb)(uint32_t * d_n, const uint32_t * s1_n, const uint8_t * s2_n, int n); #define oil_composite_in_argb ((_oil_type_composite_in_argb)(*(void(**)(void))oil_function_class_ptr_composite_in_argb)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_composite_in_argb_const_mask; typedef void (*_oil_type_composite_in_argb_const_mask)(uint32_t * d_n, const uint32_t * s1_n, const uint8_t * s2_1, int n); #define oil_composite_in_argb_const_mask ((_oil_type_composite_in_argb_const_mask)(*(void(**)(void))oil_function_class_ptr_composite_in_argb_const_mask)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_composite_in_argb_const_src; typedef void (*_oil_type_composite_in_argb_const_src)(uint32_t * d_n, const uint32_t * s1_1, const uint8_t * s2_n, int n); #define oil_composite_in_argb_const_src ((_oil_type_composite_in_argb_const_src)(*(void(**)(void))oil_function_class_ptr_composite_in_argb_const_src)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_composite_in_over_argb; typedef void (*_oil_type_composite_in_over_argb)(uint32_t * i_n, const uint32_t * s1_n, const uint8_t * s2_n, int n); #define oil_composite_in_over_argb ((_oil_type_composite_in_over_argb)(*(void(**)(void))oil_function_class_ptr_composite_in_over_argb)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_composite_in_over_argb_const_mask; typedef void (*_oil_type_composite_in_over_argb_const_mask)(uint32_t * i_n, const uint32_t * s1_n, const uint8_t * s2_1, int n); #define oil_composite_in_over_argb_const_mask ((_oil_type_composite_in_over_argb_const_mask)(*(void(**)(void))oil_function_class_ptr_composite_in_over_argb_const_mask)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_composite_in_over_argb_const_src; typedef void (*_oil_type_composite_in_over_argb_const_src)(uint32_t * i_n, const uint32_t * s1_1, const uint8_t * s2_n, int n); #define oil_composite_in_over_argb_const_src ((_oil_type_composite_in_over_argb_const_src)(*(void(**)(void))oil_function_class_ptr_composite_in_over_argb_const_src)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_composite_over_argb; typedef void (*_oil_type_composite_over_argb)(uint32_t * i_n, const uint32_t * s1_n, int n); #define oil_composite_over_argb ((_oil_type_composite_over_argb)(*(void(**)(void))oil_function_class_ptr_composite_over_argb)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_composite_over_argb_const_src; typedef void (*_oil_type_composite_over_argb_const_src)(uint32_t * i_n, const uint32_t * s1_1, int n); #define oil_composite_over_argb_const_src ((_oil_type_composite_over_argb_const_src)(*(void(**)(void))oil_function_class_ptr_composite_over_argb_const_src)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_composite_over_u8; typedef void (*_oil_type_composite_over_u8)(uint8_t * i_n, const uint8_t * s1_n, int n); #define oil_composite_over_u8 ((_oil_type_composite_over_u8)(*(void(**)(void))oil_function_class_ptr_composite_over_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv8x8_f64_s16; typedef void (*_oil_type_conv8x8_f64_s16)(double * d_8x8, int dstr, const int16_t * s_8x8, int sstr); #define oil_conv8x8_f64_s16 ((_oil_type_conv8x8_f64_s16)(*(void(**)(void))oil_function_class_ptr_conv8x8_f64_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv8x8_s16_f64; typedef void (*_oil_type_conv8x8_s16_f64)(int16_t * d_8x8, int dstr, const double * s_8x8, int sstr); #define oil_conv8x8_s16_f64 ((_oil_type_conv8x8_s16_f64)(*(void(**)(void))oil_function_class_ptr_conv8x8_s16_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_f32_f64; typedef void (*_oil_type_conv_f32_f64)(float * dest, int dstr, const double * src, int sstr, int n); #define oil_conv_f32_f64 ((_oil_type_conv_f32_f64)(*(void(**)(void))oil_function_class_ptr_conv_f32_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_f32_s16; typedef void (*_oil_type_conv_f32_s16)(float * dest, int dstr, const int16_t * src, int sstr, int n); #define oil_conv_f32_s16 ((_oil_type_conv_f32_s16)(*(void(**)(void))oil_function_class_ptr_conv_f32_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_f32_s32; typedef void (*_oil_type_conv_f32_s32)(float * dest, int dstr, const int32_t * src, int sstr, int n); #define oil_conv_f32_s32 ((_oil_type_conv_f32_s32)(*(void(**)(void))oil_function_class_ptr_conv_f32_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_f32_s8; typedef void (*_oil_type_conv_f32_s8)(float * dest, int dstr, const int8_t * src, int sstr, int n); #define oil_conv_f32_s8 ((_oil_type_conv_f32_s8)(*(void(**)(void))oil_function_class_ptr_conv_f32_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_f32_u16; typedef void (*_oil_type_conv_f32_u16)(float * dest, int dstr, const uint16_t * src, int sstr, int n); #define oil_conv_f32_u16 ((_oil_type_conv_f32_u16)(*(void(**)(void))oil_function_class_ptr_conv_f32_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_f32_u32; typedef void (*_oil_type_conv_f32_u32)(float * dest, int dstr, const uint32_t * src, int sstr, int n); #define oil_conv_f32_u32 ((_oil_type_conv_f32_u32)(*(void(**)(void))oil_function_class_ptr_conv_f32_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_f32_u8; typedef void (*_oil_type_conv_f32_u8)(float * dest, int dstr, const uint8_t * src, int sstr, int n); #define oil_conv_f32_u8 ((_oil_type_conv_f32_u8)(*(void(**)(void))oil_function_class_ptr_conv_f32_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_f64_f32; typedef void (*_oil_type_conv_f64_f32)(double * dest, int dstr, const float * src, int sstr, int n); #define oil_conv_f64_f32 ((_oil_type_conv_f64_f32)(*(void(**)(void))oil_function_class_ptr_conv_f64_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_f64_s16; typedef void (*_oil_type_conv_f64_s16)(double * dest, int dstr, const int16_t * src, int sstr, int n); #define oil_conv_f64_s16 ((_oil_type_conv_f64_s16)(*(void(**)(void))oil_function_class_ptr_conv_f64_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_f64_s32; typedef void (*_oil_type_conv_f64_s32)(double * dest, int dstr, const int32_t * src, int sstr, int n); #define oil_conv_f64_s32 ((_oil_type_conv_f64_s32)(*(void(**)(void))oil_function_class_ptr_conv_f64_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_f64_s8; typedef void (*_oil_type_conv_f64_s8)(double * dest, int dstr, const int8_t * src, int sstr, int n); #define oil_conv_f64_s8 ((_oil_type_conv_f64_s8)(*(void(**)(void))oil_function_class_ptr_conv_f64_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_f64_u16; typedef void (*_oil_type_conv_f64_u16)(double * dest, int dstr, const uint16_t * src, int sstr, int n); #define oil_conv_f64_u16 ((_oil_type_conv_f64_u16)(*(void(**)(void))oil_function_class_ptr_conv_f64_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_f64_u32; typedef void (*_oil_type_conv_f64_u32)(double * dest, int dstr, const uint32_t * src, int sstr, int n); #define oil_conv_f64_u32 ((_oil_type_conv_f64_u32)(*(void(**)(void))oil_function_class_ptr_conv_f64_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_f64_u8; typedef void (*_oil_type_conv_f64_u8)(double * dest, int dstr, const uint8_t * src, int sstr, int n); #define oil_conv_f64_u8 ((_oil_type_conv_f64_u8)(*(void(**)(void))oil_function_class_ptr_conv_f64_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s16_f32; typedef void (*_oil_type_conv_s16_f32)(int16_t * dest, int dstr, const float * src, int sstr, int n); #define oil_conv_s16_f32 ((_oil_type_conv_s16_f32)(*(void(**)(void))oil_function_class_ptr_conv_s16_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s16_f64; typedef void (*_oil_type_conv_s16_f64)(int16_t * dest, int dstr, const double * src, int sstr, int n); #define oil_conv_s16_f64 ((_oil_type_conv_s16_f64)(*(void(**)(void))oil_function_class_ptr_conv_s16_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s16_s32; typedef void (*_oil_type_conv_s16_s32)(int16_t * dest, int dstr, const int32_t * src, int sstr, int n); #define oil_conv_s16_s32 ((_oil_type_conv_s16_s32)(*(void(**)(void))oil_function_class_ptr_conv_s16_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s16_s8; typedef void (*_oil_type_conv_s16_s8)(int16_t * dest, int dstr, const int8_t * src, int sstr, int n); #define oil_conv_s16_s8 ((_oil_type_conv_s16_s8)(*(void(**)(void))oil_function_class_ptr_conv_s16_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s16_u16; typedef void (*_oil_type_conv_s16_u16)(int16_t * dest, int dstr, const uint16_t * src, int sstr, int n); #define oil_conv_s16_u16 ((_oil_type_conv_s16_u16)(*(void(**)(void))oil_function_class_ptr_conv_s16_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s16_u32; typedef void (*_oil_type_conv_s16_u32)(int16_t * dest, int dstr, const uint32_t * src, int sstr, int n); #define oil_conv_s16_u32 ((_oil_type_conv_s16_u32)(*(void(**)(void))oil_function_class_ptr_conv_s16_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s16_u8; typedef void (*_oil_type_conv_s16_u8)(int16_t * dest, int dstr, const uint8_t * src, int sstr, int n); #define oil_conv_s16_u8 ((_oil_type_conv_s16_u8)(*(void(**)(void))oil_function_class_ptr_conv_s16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s32_f32; typedef void (*_oil_type_conv_s32_f32)(int32_t * dest, int dstr, const float * src, int sstr, int n); #define oil_conv_s32_f32 ((_oil_type_conv_s32_f32)(*(void(**)(void))oil_function_class_ptr_conv_s32_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s32_f64; typedef void (*_oil_type_conv_s32_f64)(int32_t * dest, int dstr, const double * src, int sstr, int n); #define oil_conv_s32_f64 ((_oil_type_conv_s32_f64)(*(void(**)(void))oil_function_class_ptr_conv_s32_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s32_s16; typedef void (*_oil_type_conv_s32_s16)(int32_t * dest, int dstr, const int16_t * src, int sstr, int n); #define oil_conv_s32_s16 ((_oil_type_conv_s32_s16)(*(void(**)(void))oil_function_class_ptr_conv_s32_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s32_s8; typedef void (*_oil_type_conv_s32_s8)(int32_t * dest, int dstr, const int8_t * src, int sstr, int n); #define oil_conv_s32_s8 ((_oil_type_conv_s32_s8)(*(void(**)(void))oil_function_class_ptr_conv_s32_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s32_u16; typedef void (*_oil_type_conv_s32_u16)(int32_t * dest, int dstr, const uint16_t * src, int sstr, int n); #define oil_conv_s32_u16 ((_oil_type_conv_s32_u16)(*(void(**)(void))oil_function_class_ptr_conv_s32_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s32_u32; typedef void (*_oil_type_conv_s32_u32)(int32_t * dest, int dstr, const uint32_t * src, int sstr, int n); #define oil_conv_s32_u32 ((_oil_type_conv_s32_u32)(*(void(**)(void))oil_function_class_ptr_conv_s32_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s32_u8; typedef void (*_oil_type_conv_s32_u8)(int32_t * dest, int dstr, const uint8_t * src, int sstr, int n); #define oil_conv_s32_u8 ((_oil_type_conv_s32_u8)(*(void(**)(void))oil_function_class_ptr_conv_s32_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s8_f32; typedef void (*_oil_type_conv_s8_f32)(int8_t * dest, int dstr, const float * src, int sstr, int n); #define oil_conv_s8_f32 ((_oil_type_conv_s8_f32)(*(void(**)(void))oil_function_class_ptr_conv_s8_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s8_f64; typedef void (*_oil_type_conv_s8_f64)(int8_t * dest, int dstr, const double * src, int sstr, int n); #define oil_conv_s8_f64 ((_oil_type_conv_s8_f64)(*(void(**)(void))oil_function_class_ptr_conv_s8_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s8_s16; typedef void (*_oil_type_conv_s8_s16)(int8_t * dest, int dstr, const int16_t * src, int sstr, int n); #define oil_conv_s8_s16 ((_oil_type_conv_s8_s16)(*(void(**)(void))oil_function_class_ptr_conv_s8_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s8_s32; typedef void (*_oil_type_conv_s8_s32)(int8_t * dest, int dstr, const int32_t * src, int sstr, int n); #define oil_conv_s8_s32 ((_oil_type_conv_s8_s32)(*(void(**)(void))oil_function_class_ptr_conv_s8_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s8_u16; typedef void (*_oil_type_conv_s8_u16)(int8_t * dest, int dstr, const uint16_t * src, int sstr, int n); #define oil_conv_s8_u16 ((_oil_type_conv_s8_u16)(*(void(**)(void))oil_function_class_ptr_conv_s8_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s8_u32; typedef void (*_oil_type_conv_s8_u32)(int8_t * dest, int dstr, const uint32_t * src, int sstr, int n); #define oil_conv_s8_u32 ((_oil_type_conv_s8_u32)(*(void(**)(void))oil_function_class_ptr_conv_s8_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_s8_u8; typedef void (*_oil_type_conv_s8_u8)(int8_t * dest, int dstr, const uint8_t * src, int sstr, int n); #define oil_conv_s8_u8 ((_oil_type_conv_s8_u8)(*(void(**)(void))oil_function_class_ptr_conv_s8_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u16_f32; typedef void (*_oil_type_conv_u16_f32)(uint16_t * dest, int dstr, const float * src, int sstr, int n); #define oil_conv_u16_f32 ((_oil_type_conv_u16_f32)(*(void(**)(void))oil_function_class_ptr_conv_u16_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u16_f64; typedef void (*_oil_type_conv_u16_f64)(uint16_t * dest, int dstr, const double * src, int sstr, int n); #define oil_conv_u16_f64 ((_oil_type_conv_u16_f64)(*(void(**)(void))oil_function_class_ptr_conv_u16_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u16_s16; typedef void (*_oil_type_conv_u16_s16)(uint16_t * dest, int dstr, const int16_t * src, int sstr, int n); #define oil_conv_u16_s16 ((_oil_type_conv_u16_s16)(*(void(**)(void))oil_function_class_ptr_conv_u16_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u16_s32; typedef void (*_oil_type_conv_u16_s32)(uint16_t * dest, int dstr, const int32_t * src, int sstr, int n); #define oil_conv_u16_s32 ((_oil_type_conv_u16_s32)(*(void(**)(void))oil_function_class_ptr_conv_u16_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u16_s8; typedef void (*_oil_type_conv_u16_s8)(uint16_t * dest, int dstr, const int8_t * src, int sstr, int n); #define oil_conv_u16_s8 ((_oil_type_conv_u16_s8)(*(void(**)(void))oil_function_class_ptr_conv_u16_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u16_u32; typedef void (*_oil_type_conv_u16_u32)(uint16_t * dest, int dstr, const uint32_t * src, int sstr, int n); #define oil_conv_u16_u32 ((_oil_type_conv_u16_u32)(*(void(**)(void))oil_function_class_ptr_conv_u16_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u16_u8; typedef void (*_oil_type_conv_u16_u8)(uint16_t * dest, int dstr, const uint8_t * src, int sstr, int n); #define oil_conv_u16_u8 ((_oil_type_conv_u16_u8)(*(void(**)(void))oil_function_class_ptr_conv_u16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u32_f32; typedef void (*_oil_type_conv_u32_f32)(uint32_t * dest, int dstr, const float * src, int sstr, int n); #define oil_conv_u32_f32 ((_oil_type_conv_u32_f32)(*(void(**)(void))oil_function_class_ptr_conv_u32_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u32_f64; typedef void (*_oil_type_conv_u32_f64)(uint32_t * dest, int dstr, const double * src, int sstr, int n); #define oil_conv_u32_f64 ((_oil_type_conv_u32_f64)(*(void(**)(void))oil_function_class_ptr_conv_u32_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u32_s16; typedef void (*_oil_type_conv_u32_s16)(uint32_t * dest, int dstr, const int16_t * src, int sstr, int n); #define oil_conv_u32_s16 ((_oil_type_conv_u32_s16)(*(void(**)(void))oil_function_class_ptr_conv_u32_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u32_s32; typedef void (*_oil_type_conv_u32_s32)(uint32_t * dest, int dstr, const int32_t * src, int sstr, int n); #define oil_conv_u32_s32 ((_oil_type_conv_u32_s32)(*(void(**)(void))oil_function_class_ptr_conv_u32_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u32_s8; typedef void (*_oil_type_conv_u32_s8)(uint32_t * dest, int dstr, const int8_t * src, int sstr, int n); #define oil_conv_u32_s8 ((_oil_type_conv_u32_s8)(*(void(**)(void))oil_function_class_ptr_conv_u32_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u32_u16; typedef void (*_oil_type_conv_u32_u16)(uint32_t * dest, int dstr, const uint16_t * src, int sstr, int n); #define oil_conv_u32_u16 ((_oil_type_conv_u32_u16)(*(void(**)(void))oil_function_class_ptr_conv_u32_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u32_u8; typedef void (*_oil_type_conv_u32_u8)(uint32_t * dest, int dstr, const uint8_t * src, int sstr, int n); #define oil_conv_u32_u8 ((_oil_type_conv_u32_u8)(*(void(**)(void))oil_function_class_ptr_conv_u32_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u8_f32; typedef void (*_oil_type_conv_u8_f32)(uint8_t * dest, int dstr, const float * src, int sstr, int n); #define oil_conv_u8_f32 ((_oil_type_conv_u8_f32)(*(void(**)(void))oil_function_class_ptr_conv_u8_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u8_f64; typedef void (*_oil_type_conv_u8_f64)(uint8_t * dest, int dstr, const double * src, int sstr, int n); #define oil_conv_u8_f64 ((_oil_type_conv_u8_f64)(*(void(**)(void))oil_function_class_ptr_conv_u8_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u8_s16; typedef void (*_oil_type_conv_u8_s16)(uint8_t * dest, int dstr, const int16_t * src, int sstr, int n); #define oil_conv_u8_s16 ((_oil_type_conv_u8_s16)(*(void(**)(void))oil_function_class_ptr_conv_u8_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u8_s32; typedef void (*_oil_type_conv_u8_s32)(uint8_t * dest, int dstr, const int32_t * src, int sstr, int n); #define oil_conv_u8_s32 ((_oil_type_conv_u8_s32)(*(void(**)(void))oil_function_class_ptr_conv_u8_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u8_s8; typedef void (*_oil_type_conv_u8_s8)(uint8_t * dest, int dstr, const int8_t * src, int sstr, int n); #define oil_conv_u8_s8 ((_oil_type_conv_u8_s8)(*(void(**)(void))oil_function_class_ptr_conv_u8_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u8_u16; typedef void (*_oil_type_conv_u8_u16)(uint8_t * dest, int dstr, const uint16_t * src, int sstr, int n); #define oil_conv_u8_u16 ((_oil_type_conv_u8_u16)(*(void(**)(void))oil_function_class_ptr_conv_u8_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_conv_u8_u32; typedef void (*_oil_type_conv_u8_u32)(uint8_t * dest, int dstr, const uint32_t * src, int sstr, int n); #define oil_conv_u8_u32 ((_oil_type_conv_u8_u32)(*(void(**)(void))oil_function_class_ptr_conv_u8_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s16_f32; typedef void (*_oil_type_convert_s16_f32)(int16_t * dest, const float * src, int n); #define oil_convert_s16_f32 ((_oil_type_convert_s16_f32)(*(void(**)(void))oil_function_class_ptr_convert_s16_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s16_f64; typedef void (*_oil_type_convert_s16_f64)(int16_t * dest, const double * src, int n); #define oil_convert_s16_f64 ((_oil_type_convert_s16_f64)(*(void(**)(void))oil_function_class_ptr_convert_s16_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s16_s32; typedef void (*_oil_type_convert_s16_s32)(int16_t * dest, const int32_t * src, int n); #define oil_convert_s16_s32 ((_oil_type_convert_s16_s32)(*(void(**)(void))oil_function_class_ptr_convert_s16_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s16_s8; typedef void (*_oil_type_convert_s16_s8)(int16_t * dest, const int8_t * src, int n); #define oil_convert_s16_s8 ((_oil_type_convert_s16_s8)(*(void(**)(void))oil_function_class_ptr_convert_s16_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s16_u16; typedef void (*_oil_type_convert_s16_u16)(int16_t * dest, const uint16_t * src, int n); #define oil_convert_s16_u16 ((_oil_type_convert_s16_u16)(*(void(**)(void))oil_function_class_ptr_convert_s16_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s16_u32; typedef void (*_oil_type_convert_s16_u32)(int16_t * dest, const uint32_t * src, int n); #define oil_convert_s16_u32 ((_oil_type_convert_s16_u32)(*(void(**)(void))oil_function_class_ptr_convert_s16_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s16_u8; typedef void (*_oil_type_convert_s16_u8)(int16_t * dest, const uint8_t * src, int n); #define oil_convert_s16_u8 ((_oil_type_convert_s16_u8)(*(void(**)(void))oil_function_class_ptr_convert_s16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s32_f64; typedef void (*_oil_type_convert_s32_f64)(int32_t * dest, const double * src, int n); #define oil_convert_s32_f64 ((_oil_type_convert_s32_f64)(*(void(**)(void))oil_function_class_ptr_convert_s32_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s32_s16; typedef void (*_oil_type_convert_s32_s16)(int32_t * dest, const int16_t * src, int n); #define oil_convert_s32_s16 ((_oil_type_convert_s32_s16)(*(void(**)(void))oil_function_class_ptr_convert_s32_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s32_s8; typedef void (*_oil_type_convert_s32_s8)(int32_t * dest, const int8_t * src, int n); #define oil_convert_s32_s8 ((_oil_type_convert_s32_s8)(*(void(**)(void))oil_function_class_ptr_convert_s32_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s32_u16; typedef void (*_oil_type_convert_s32_u16)(int32_t * dest, const uint16_t * src, int n); #define oil_convert_s32_u16 ((_oil_type_convert_s32_u16)(*(void(**)(void))oil_function_class_ptr_convert_s32_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s32_u32; typedef void (*_oil_type_convert_s32_u32)(int32_t * dest, const uint32_t * src, int n); #define oil_convert_s32_u32 ((_oil_type_convert_s32_u32)(*(void(**)(void))oil_function_class_ptr_convert_s32_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s32_u8; typedef void (*_oil_type_convert_s32_u8)(int32_t * dest, const uint8_t * src, int n); #define oil_convert_s32_u8 ((_oil_type_convert_s32_u8)(*(void(**)(void))oil_function_class_ptr_convert_s32_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s8_f32; typedef void (*_oil_type_convert_s8_f32)(int8_t * dest, const float * src, int n); #define oil_convert_s8_f32 ((_oil_type_convert_s8_f32)(*(void(**)(void))oil_function_class_ptr_convert_s8_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s8_f64; typedef void (*_oil_type_convert_s8_f64)(int8_t * dest, const double * src, int n); #define oil_convert_s8_f64 ((_oil_type_convert_s8_f64)(*(void(**)(void))oil_function_class_ptr_convert_s8_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s8_s16; typedef void (*_oil_type_convert_s8_s16)(int8_t * dest, const int16_t * src, int n); #define oil_convert_s8_s16 ((_oil_type_convert_s8_s16)(*(void(**)(void))oil_function_class_ptr_convert_s8_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s8_s32; typedef void (*_oil_type_convert_s8_s32)(int8_t * dest, const int32_t * src, int n); #define oil_convert_s8_s32 ((_oil_type_convert_s8_s32)(*(void(**)(void))oil_function_class_ptr_convert_s8_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s8_u16; typedef void (*_oil_type_convert_s8_u16)(int8_t * dest, const uint16_t * src, int n); #define oil_convert_s8_u16 ((_oil_type_convert_s8_u16)(*(void(**)(void))oil_function_class_ptr_convert_s8_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s8_u32; typedef void (*_oil_type_convert_s8_u32)(int8_t * dest, const uint32_t * src, int n); #define oil_convert_s8_u32 ((_oil_type_convert_s8_u32)(*(void(**)(void))oil_function_class_ptr_convert_s8_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_s8_u8; typedef void (*_oil_type_convert_s8_u8)(int8_t * dest, const uint8_t * src, int n); #define oil_convert_s8_u8 ((_oil_type_convert_s8_u8)(*(void(**)(void))oil_function_class_ptr_convert_s8_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u16_f32; typedef void (*_oil_type_convert_u16_f32)(uint16_t * dest, const float * src, int n); #define oil_convert_u16_f32 ((_oil_type_convert_u16_f32)(*(void(**)(void))oil_function_class_ptr_convert_u16_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u16_f64; typedef void (*_oil_type_convert_u16_f64)(uint16_t * dest, const double * src, int n); #define oil_convert_u16_f64 ((_oil_type_convert_u16_f64)(*(void(**)(void))oil_function_class_ptr_convert_u16_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u16_s16; typedef void (*_oil_type_convert_u16_s16)(uint16_t * dest, const int16_t * src, int n); #define oil_convert_u16_s16 ((_oil_type_convert_u16_s16)(*(void(**)(void))oil_function_class_ptr_convert_u16_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u16_s32; typedef void (*_oil_type_convert_u16_s32)(uint16_t * dest, const int32_t * src, int n); #define oil_convert_u16_s32 ((_oil_type_convert_u16_s32)(*(void(**)(void))oil_function_class_ptr_convert_u16_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u16_u32; typedef void (*_oil_type_convert_u16_u32)(uint16_t * dest, const uint32_t * src, int n); #define oil_convert_u16_u32 ((_oil_type_convert_u16_u32)(*(void(**)(void))oil_function_class_ptr_convert_u16_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u16_u8; typedef void (*_oil_type_convert_u16_u8)(uint16_t * dest, const uint8_t * src, int n); #define oil_convert_u16_u8 ((_oil_type_convert_u16_u8)(*(void(**)(void))oil_function_class_ptr_convert_u16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u32_f64; typedef void (*_oil_type_convert_u32_f64)(uint32_t * dest, const double * src, int n); #define oil_convert_u32_f64 ((_oil_type_convert_u32_f64)(*(void(**)(void))oil_function_class_ptr_convert_u32_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u32_s32; typedef void (*_oil_type_convert_u32_s32)(uint32_t * dest, const int32_t * src, int n); #define oil_convert_u32_s32 ((_oil_type_convert_u32_s32)(*(void(**)(void))oil_function_class_ptr_convert_u32_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u32_u16; typedef void (*_oil_type_convert_u32_u16)(uint32_t * dest, const uint16_t * src, int n); #define oil_convert_u32_u16 ((_oil_type_convert_u32_u16)(*(void(**)(void))oil_function_class_ptr_convert_u32_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u32_u8; typedef void (*_oil_type_convert_u32_u8)(uint32_t * dest, const uint8_t * src, int n); #define oil_convert_u32_u8 ((_oil_type_convert_u32_u8)(*(void(**)(void))oil_function_class_ptr_convert_u32_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u8_f32; typedef void (*_oil_type_convert_u8_f32)(uint8_t * dest, const float * src, int n); #define oil_convert_u8_f32 ((_oil_type_convert_u8_f32)(*(void(**)(void))oil_function_class_ptr_convert_u8_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u8_f64; typedef void (*_oil_type_convert_u8_f64)(uint8_t * dest, const double * src, int n); #define oil_convert_u8_f64 ((_oil_type_convert_u8_f64)(*(void(**)(void))oil_function_class_ptr_convert_u8_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u8_s16; typedef void (*_oil_type_convert_u8_s16)(uint8_t * dest, const int16_t * src, int n); #define oil_convert_u8_s16 ((_oil_type_convert_u8_s16)(*(void(**)(void))oil_function_class_ptr_convert_u8_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u8_s32; typedef void (*_oil_type_convert_u8_s32)(uint8_t * dest, const int32_t * src, int n); #define oil_convert_u8_s32 ((_oil_type_convert_u8_s32)(*(void(**)(void))oil_function_class_ptr_convert_u8_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u8_s8; typedef void (*_oil_type_convert_u8_s8)(uint8_t * dest, const int8_t * src, int n); #define oil_convert_u8_s8 ((_oil_type_convert_u8_s8)(*(void(**)(void))oil_function_class_ptr_convert_u8_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u8_u16; typedef void (*_oil_type_convert_u8_u16)(uint8_t * dest, const uint16_t * src, int n); #define oil_convert_u8_u16 ((_oil_type_convert_u8_u16)(*(void(**)(void))oil_function_class_ptr_convert_u8_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_convert_u8_u32; typedef void (*_oil_type_convert_u8_u32)(uint8_t * dest, const uint32_t * src, int n); #define oil_convert_u8_u32 ((_oil_type_convert_u8_u32)(*(void(**)(void))oil_function_class_ptr_convert_u8_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_copy8x8_u8; typedef void (*_oil_type_copy8x8_u8)(uint8_t * d_8x8, int ds, const uint8_t * s_8x8, int ss); #define oil_copy8x8_u8 ((_oil_type_copy8x8_u8)(*(void(**)(void))oil_function_class_ptr_copy8x8_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_copy_u8; typedef void (*_oil_type_copy_u8)(uint8_t * dest, const uint8_t * src, int n); #define oil_copy_u8 ((_oil_type_copy_u8)(*(void(**)(void))oil_function_class_ptr_copy_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_dct36_f32; typedef void (*_oil_type_dct36_f32)(float * d_36, int dstr, const float * s_36, int sstr); #define oil_dct36_f32 ((_oil_type_dct36_f32)(*(void(**)(void))oil_function_class_ptr_dct36_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_deinterleave; typedef void (*_oil_type_deinterleave)(int16_t * d_2xn, const int16_t * s_2xn, int n); #define oil_deinterleave ((_oil_type_deinterleave)(*(void(**)(void))oil_function_class_ptr_deinterleave)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_deinterleave2_s16; typedef void (*_oil_type_deinterleave2_s16)(int16_t * d1_n, int16_t * d2_n, const int16_t * s_2xn, int n); #define oil_deinterleave2_s16 ((_oil_type_deinterleave2_s16)(*(void(**)(void))oil_function_class_ptr_deinterleave2_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_dequantize8x8_s16; typedef void (*_oil_type_dequantize8x8_s16)(int16_t * d_8x8, int dstr, const int16_t * s1_8x8, int sstr1, const int16_t * s2_8x8, int sstr2); #define oil_dequantize8x8_s16 ((_oil_type_dequantize8x8_s16)(*(void(**)(void))oil_function_class_ptr_dequantize8x8_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_diff8x8_average_s16_u8; typedef void (*_oil_type_diff8x8_average_s16_u8)(int16_t * d_8x8, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2, const uint8_t * s3_8x8, int ss3); #define oil_diff8x8_average_s16_u8 ((_oil_type_diff8x8_average_s16_u8)(*(void(**)(void))oil_function_class_ptr_diff8x8_average_s16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_diff8x8_const128_s16_u8; typedef void (*_oil_type_diff8x8_const128_s16_u8)(int16_t * d_8x8, const uint8_t * s1_8x8, int ss1); #define oil_diff8x8_const128_s16_u8 ((_oil_type_diff8x8_const128_s16_u8)(*(void(**)(void))oil_function_class_ptr_diff8x8_const128_s16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_diff8x8_s16_u8; typedef void (*_oil_type_diff8x8_s16_u8)(int16_t * d_8x8, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2); #define oil_diff8x8_s16_u8 ((_oil_type_diff8x8_s16_u8)(*(void(**)(void))oil_function_class_ptr_diff8x8_s16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_diffsquaresum_f32; typedef void (*_oil_type_diffsquaresum_f32)(float * d_1, const float * src1, int sstr1, const float * src2, int sstr2, int n); #define oil_diffsquaresum_f32 ((_oil_type_diffsquaresum_f32)(*(void(**)(void))oil_function_class_ptr_diffsquaresum_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_diffsquaresum_f64; typedef void (*_oil_type_diffsquaresum_f64)(double * d_1, const double * src1, int sstr1, const double * src2, int sstr2, int n); #define oil_diffsquaresum_f64 ((_oil_type_diffsquaresum_f64)(*(void(**)(void))oil_function_class_ptr_diffsquaresum_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_divide_f32; typedef void (*_oil_type_divide_f32)(float * d, const float * s1, const float * s2, int n); #define oil_divide_f32 ((_oil_type_divide_f32)(*(void(**)(void))oil_function_class_ptr_divide_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_divide_f64; typedef void (*_oil_type_divide_f64)(double * d, const double * s1, const double * s2, int n); #define oil_divide_f64 ((_oil_type_divide_f64)(*(void(**)(void))oil_function_class_ptr_divide_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_err_inter8x8_u8; typedef void (*_oil_type_err_inter8x8_u8)(uint32_t * d_1, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2); #define oil_err_inter8x8_u8 ((_oil_type_err_inter8x8_u8)(*(void(**)(void))oil_function_class_ptr_err_inter8x8_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_err_inter8x8_u8_avg; typedef void (*_oil_type_err_inter8x8_u8_avg)(uint32_t * d_1, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, const uint8_t * s3_8x8, int ss2); #define oil_err_inter8x8_u8_avg ((_oil_type_err_inter8x8_u8_avg)(*(void(**)(void))oil_function_class_ptr_err_inter8x8_u8_avg)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_err_intra8x8_u8; typedef void (*_oil_type_err_intra8x8_u8)(uint32_t * d_1, const uint8_t * s1_8x8, int ss1); #define oil_err_intra8x8_u8 ((_oil_type_err_intra8x8_u8)(*(void(**)(void))oil_function_class_ptr_err_intra8x8_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_fdct8_f64; typedef void (*_oil_type_fdct8_f64)(double * d_8, const double * s_8, int dstr, int sstr); #define oil_fdct8_f64 ((_oil_type_fdct8_f64)(*(void(**)(void))oil_function_class_ptr_fdct8_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_fdct8x8_f64; typedef void (*_oil_type_fdct8x8_f64)(double * d_8x8, int dstr, const double * s_8x8, int sstr); #define oil_fdct8x8_f64 ((_oil_type_fdct8x8_f64)(*(void(**)(void))oil_function_class_ptr_fdct8x8_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_fdct8x8s_s16; typedef void (*_oil_type_fdct8x8s_s16)(int16_t * d_8x8, int ds, const int16_t * s_8x8, int ss); #define oil_fdct8x8s_s16 ((_oil_type_fdct8x8s_s16)(*(void(**)(void))oil_function_class_ptr_fdct8x8s_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_fdct8x8theora; typedef void (*_oil_type_fdct8x8theora)(const int16_t * s_8x8, int16_t * d_8x8); #define oil_fdct8x8theora ((_oil_type_fdct8x8theora)(*(void(**)(void))oil_function_class_ptr_fdct8x8theora)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_floor_f32; typedef void (*_oil_type_floor_f32)(float * d, const float * s, int n); #define oil_floor_f32 ((_oil_type_floor_f32)(*(void(**)(void))oil_function_class_ptr_floor_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_idct8_f64; typedef void (*_oil_type_idct8_f64)(double * d_8, int dstr, const double * s_8, int sstr); #define oil_idct8_f64 ((_oil_type_idct8_f64)(*(void(**)(void))oil_function_class_ptr_idct8_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_idct8theora_s16; typedef void (*_oil_type_idct8theora_s16)(int16_t * d_8, int dstr, const int16_t * s_8, int sstr); #define oil_idct8theora_s16 ((_oil_type_idct8theora_s16)(*(void(**)(void))oil_function_class_ptr_idct8theora_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_idct8x8_f64; typedef void (*_oil_type_idct8x8_f64)(double * d_8x8, int dstr, const double * s_8x8, int sstr); #define oil_idct8x8_f64 ((_oil_type_idct8x8_f64)(*(void(**)(void))oil_function_class_ptr_idct8x8_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_idct8x8_s16; typedef void (*_oil_type_idct8x8_s16)(int16_t * d_8x8, int dstr, const int16_t * s_8x8, int sstr); #define oil_idct8x8_s16 ((_oil_type_idct8x8_s16)(*(void(**)(void))oil_function_class_ptr_idct8x8_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_idct8x8lim10_f64; typedef void (*_oil_type_idct8x8lim10_f64)(double * d_8x8, int dstr, const double * s_8x8, int sstr); #define oil_idct8x8lim10_f64 ((_oil_type_idct8x8lim10_f64)(*(void(**)(void))oil_function_class_ptr_idct8x8lim10_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_idct8x8lim10_s16; typedef void (*_oil_type_idct8x8lim10_s16)(int16_t * d_8x8, int dstr, const int16_t * s_8x8, int sstr); #define oil_idct8x8lim10_s16 ((_oil_type_idct8x8lim10_s16)(*(void(**)(void))oil_function_class_ptr_idct8x8lim10_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_idct8x8theora_s16; typedef void (*_oil_type_idct8x8theora_s16)(int16_t * d_8x8, int dstr, const int16_t * s_8x8, int sstr); #define oil_idct8x8theora_s16 ((_oil_type_idct8x8theora_s16)(*(void(**)(void))oil_function_class_ptr_idct8x8theora_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_imdct12_f64; typedef void (*_oil_type_imdct12_f64)(double * d_12, const double * s_6); #define oil_imdct12_f64 ((_oil_type_imdct12_f64)(*(void(**)(void))oil_function_class_ptr_imdct12_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_imdct32_f32; typedef void (*_oil_type_imdct32_f32)(float * d_32, const float * s_32); #define oil_imdct32_f32 ((_oil_type_imdct32_f32)(*(void(**)(void))oil_function_class_ptr_imdct32_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_imdct36_f64; typedef void (*_oil_type_imdct36_f64)(double * d_36, const double * s_18); #define oil_imdct36_f64 ((_oil_type_imdct36_f64)(*(void(**)(void))oil_function_class_ptr_imdct36_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_interleave; typedef void (*_oil_type_interleave)(int16_t * d_2xn, const int16_t * s_2xn, int n); #define oil_interleave ((_oil_type_interleave)(*(void(**)(void))oil_function_class_ptr_interleave)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_interleave2_s16; typedef void (*_oil_type_interleave2_s16)(int16_t * d_2xn, const int16_t * s1_n, const int16_t * s2_n, int n); #define oil_interleave2_s16 ((_oil_type_interleave2_s16)(*(void(**)(void))oil_function_class_ptr_interleave2_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_inverse_f32; typedef void (*_oil_type_inverse_f32)(float * d, const float * s, int n); #define oil_inverse_f32 ((_oil_type_inverse_f32)(*(void(**)(void))oil_function_class_ptr_inverse_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_lift_add_135; typedef void (*_oil_type_lift_add_135)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, const int16_t * s5, int n); #define oil_lift_add_135 ((_oil_type_lift_add_135)(*(void(**)(void))oil_function_class_ptr_lift_add_135)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_lift_add_mult_shift12; typedef void (*_oil_type_lift_add_mult_shift12)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_1, int n); #define oil_lift_add_mult_shift12 ((_oil_type_lift_add_mult_shift12)(*(void(**)(void))oil_function_class_ptr_lift_add_mult_shift12)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_lift_add_shift1; typedef void (*_oil_type_lift_add_shift1)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n); #define oil_lift_add_shift1 ((_oil_type_lift_add_shift1)(*(void(**)(void))oil_function_class_ptr_lift_add_shift1)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_lift_add_shift2; typedef void (*_oil_type_lift_add_shift2)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n); #define oil_lift_add_shift2 ((_oil_type_lift_add_shift2)(*(void(**)(void))oil_function_class_ptr_lift_add_shift2)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_lift_sub_135; typedef void (*_oil_type_lift_sub_135)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, const int16_t * s5, int n); #define oil_lift_sub_135 ((_oil_type_lift_sub_135)(*(void(**)(void))oil_function_class_ptr_lift_sub_135)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_lift_sub_mult_shift12; typedef void (*_oil_type_lift_sub_mult_shift12)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_1, int n); #define oil_lift_sub_mult_shift12 ((_oil_type_lift_sub_mult_shift12)(*(void(**)(void))oil_function_class_ptr_lift_sub_mult_shift12)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_lift_sub_shift1; typedef void (*_oil_type_lift_sub_shift1)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n); #define oil_lift_sub_shift1 ((_oil_type_lift_sub_shift1)(*(void(**)(void))oil_function_class_ptr_lift_sub_shift1)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_lift_sub_shift2; typedef void (*_oil_type_lift_sub_shift2)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n); #define oil_lift_sub_shift2 ((_oil_type_lift_sub_shift2)(*(void(**)(void))oil_function_class_ptr_lift_sub_shift2)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_lshift_s16; typedef void (*_oil_type_lshift_s16)(int16_t * d1, const int16_t * s1, const int16_t * s2_1, int n); #define oil_lshift_s16 ((_oil_type_lshift_s16)(*(void(**)(void))oil_function_class_ptr_lshift_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mas10_u8; typedef void (*_oil_type_mas10_u8)(uint8_t * d, const uint8_t * s1_np9, const int16_t * s2_10, const int16_t * s3_2, int n); #define oil_mas10_u8 ((_oil_type_mas10_u8)(*(void(**)(void))oil_function_class_ptr_mas10_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mas10_u8_l15; typedef void (*_oil_type_mas10_u8_l15)(uint8_t * d, const uint8_t * s1_np9, const int16_t * s2_10, const int16_t * s3_2, int n); #define oil_mas10_u8_l15 ((_oil_type_mas10_u8_l15)(*(void(**)(void))oil_function_class_ptr_mas10_u8_l15)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mas10_u8_sym_l15; typedef void (*_oil_type_mas10_u8_sym_l15)(uint8_t * d, const uint8_t * s1_np9, const int16_t * s2_10, const int16_t * s3_2, int n); #define oil_mas10_u8_sym_l15 ((_oil_type_mas10_u8_sym_l15)(*(void(**)(void))oil_function_class_ptr_mas10_u8_sym_l15)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mas12_addc_rshift_decim2_u8; typedef void (*_oil_type_mas12_addc_rshift_decim2_u8)(uint8_t * d, const uint8_t * s1_2xnp11, const int16_t * s2_12, const int16_t * s3_2, int n); #define oil_mas12_addc_rshift_decim2_u8 ((_oil_type_mas12_addc_rshift_decim2_u8)(*(void(**)(void))oil_function_class_ptr_mas12_addc_rshift_decim2_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mas2_across_add_s16; typedef void (*_oil_type_mas2_across_add_s16)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_2, const int16_t * s5_2, int n); #define oil_mas2_across_add_s16 ((_oil_type_mas2_across_add_s16)(*(void(**)(void))oil_function_class_ptr_mas2_across_add_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mas2_add_s16; typedef void (*_oil_type_mas2_add_s16)(int16_t * d, const int16_t * s1, const int16_t * s2_np1, const int16_t * s3_2, const int16_t * s4_2, int n); #define oil_mas2_add_s16 ((_oil_type_mas2_add_s16)(*(void(**)(void))oil_function_class_ptr_mas2_add_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mas4_across_add_s16; typedef void (*_oil_type_mas4_across_add_s16)(int16_t * d, const int16_t * s1, const int16_t * s2_nx4, int sstr2, const int16_t * s3_4, const int16_t * s4_2, int n); #define oil_mas4_across_add_s16 ((_oil_type_mas4_across_add_s16)(*(void(**)(void))oil_function_class_ptr_mas4_across_add_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mas4_add_s16; typedef void (*_oil_type_mas4_add_s16)(int16_t * d, const int16_t * s1, const int16_t * s2_np3, const int16_t * s3_4, const int16_t * s4_2, int n); #define oil_mas4_add_s16 ((_oil_type_mas4_add_s16)(*(void(**)(void))oil_function_class_ptr_mas4_add_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mas8_across_add_s16; typedef void (*_oil_type_mas8_across_add_s16)(int16_t * d, const int16_t * s1, const int16_t * s2_nx8, int sstr2, const int16_t * s3_8, const int16_t * s4_2, int n); #define oil_mas8_across_add_s16 ((_oil_type_mas8_across_add_s16)(*(void(**)(void))oil_function_class_ptr_mas8_across_add_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mas8_across_u8; typedef void (*_oil_type_mas8_across_u8)(uint8_t * d, const uint8_t * s1_nx8, int sstr1, const int16_t * s2_8, const int16_t * s3_2, int n); #define oil_mas8_across_u8 ((_oil_type_mas8_across_u8)(*(void(**)(void))oil_function_class_ptr_mas8_across_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mas8_add_s16; typedef void (*_oil_type_mas8_add_s16)(int16_t * d, const int16_t * s1, const int16_t * s2_np7, const int16_t * s3_8, const int16_t * s4_2, int n); #define oil_mas8_add_s16 ((_oil_type_mas8_add_s16)(*(void(**)(void))oil_function_class_ptr_mas8_add_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mas8_addc_rshift_decim2_u8; typedef void (*_oil_type_mas8_addc_rshift_decim2_u8)(uint8_t * d, const uint8_t * s1_2xnp9, const int16_t * s2_8, const int16_t * s3_2, int n); #define oil_mas8_addc_rshift_decim2_u8 ((_oil_type_mas8_addc_rshift_decim2_u8)(*(void(**)(void))oil_function_class_ptr_mas8_addc_rshift_decim2_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mas8_u8; typedef void (*_oil_type_mas8_u8)(uint8_t * d, const uint8_t * s1_np7, const int16_t * s2_8, const int16_t * s3_2, int n); #define oil_mas8_u8 ((_oil_type_mas8_u8)(*(void(**)(void))oil_function_class_ptr_mas8_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mas8_u8_l15; typedef void (*_oil_type_mas8_u8_l15)(uint8_t * d, const uint8_t * s1_np7, const int16_t * s2_8, const int16_t * s3_2, int n); #define oil_mas8_u8_l15 ((_oil_type_mas8_u8_l15)(*(void(**)(void))oil_function_class_ptr_mas8_u8_l15)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mas8_u8_sym_l15; typedef void (*_oil_type_mas8_u8_sym_l15)(uint8_t * d, const uint8_t * s1_np7, const int16_t * s2_8, const int16_t * s3_2, int n); #define oil_mas8_u8_sym_l15 ((_oil_type_mas8_u8_sym_l15)(*(void(**)(void))oil_function_class_ptr_mas8_u8_sym_l15)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_maximum_f32; typedef void (*_oil_type_maximum_f32)(float * d, const float * s1, const float * s2, int n); #define oil_maximum_f32 ((_oil_type_maximum_f32)(*(void(**)(void))oil_function_class_ptr_maximum_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_maximum_f64; typedef void (*_oil_type_maximum_f64)(float * d, const float * s1, const float * s2, int n); #define oil_maximum_f64 ((_oil_type_maximum_f64)(*(void(**)(void))oil_function_class_ptr_maximum_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_md5; typedef void (*_oil_type_md5)(uint32_t * i_4, const uint32_t * s_16); #define oil_md5 ((_oil_type_md5)(*(void(**)(void))oil_function_class_ptr_md5)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mdct12_f64; typedef void (*_oil_type_mdct12_f64)(double * d_6, const double * s_12); #define oil_mdct12_f64 ((_oil_type_mdct12_f64)(*(void(**)(void))oil_function_class_ptr_mdct12_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mdct36_f64; typedef void (*_oil_type_mdct36_f64)(double * d_18, const double * s_36); #define oil_mdct36_f64 ((_oil_type_mdct36_f64)(*(void(**)(void))oil_function_class_ptr_mdct36_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_merge_linear_argb; typedef void (*_oil_type_merge_linear_argb)(uint32_t * d_n, const uint32_t * s_n, const uint32_t * s2_n, const uint32_t * s3_1, int n); #define oil_merge_linear_argb ((_oil_type_merge_linear_argb)(*(void(**)(void))oil_function_class_ptr_merge_linear_argb)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_merge_linear_u8; typedef void (*_oil_type_merge_linear_u8)(uint8_t * d_n, const uint8_t * s_n, const uint8_t * s2_n, const uint32_t * s3_1, int n); #define oil_merge_linear_u8 ((_oil_type_merge_linear_u8)(*(void(**)(void))oil_function_class_ptr_merge_linear_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_minimum_f32; typedef void (*_oil_type_minimum_f32)(float * d, const float * s1, const float * s2, int n); #define oil_minimum_f32 ((_oil_type_minimum_f32)(*(void(**)(void))oil_function_class_ptr_minimum_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_minimum_f64; typedef void (*_oil_type_minimum_f64)(float * d, const float * s1, const float * s2, int n); #define oil_minimum_f64 ((_oil_type_minimum_f64)(*(void(**)(void))oil_function_class_ptr_minimum_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mix_u8; typedef void (*_oil_type_mix_u8)(uint8_t * dest, const uint8_t * src1, const uint8_t * src2, const uint8_t * src3, int n); #define oil_mix_u8 ((_oil_type_mix_u8)(*(void(**)(void))oil_function_class_ptr_mix_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mt19937; typedef void (*_oil_type_mt19937)(uint32_t * d_624, uint32_t * i_624); #define oil_mt19937 ((_oil_type_mt19937)(*(void(**)(void))oil_function_class_ptr_mt19937)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_mult8x8_s16; typedef void (*_oil_type_mult8x8_s16)(int16_t * d_8x8, const int16_t * s1_8x8, const int16_t * s2_8x8, int ds, int ss1, int ss2); #define oil_mult8x8_s16 ((_oil_type_mult8x8_s16)(*(void(**)(void))oil_function_class_ptr_mult8x8_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_multiply_and_acc_12xn_s16_u8; typedef void (*_oil_type_multiply_and_acc_12xn_s16_u8)(int16_t * i1_12xn, int is1, const int16_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, int n); #define oil_multiply_and_acc_12xn_s16_u8 ((_oil_type_multiply_and_acc_12xn_s16_u8)(*(void(**)(void))oil_function_class_ptr_multiply_and_acc_12xn_s16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_multiply_and_acc_16xn_s16_u8; typedef void (*_oil_type_multiply_and_acc_16xn_s16_u8)(int16_t * i1_16xn, int is1, const int16_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, int n); #define oil_multiply_and_acc_16xn_s16_u8 ((_oil_type_multiply_and_acc_16xn_s16_u8)(*(void(**)(void))oil_function_class_ptr_multiply_and_acc_16xn_s16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_multiply_and_acc_24xn_s16_u8; typedef void (*_oil_type_multiply_and_acc_24xn_s16_u8)(int16_t * i1_24xn, int is1, const int16_t * s1_24xn, int ss1, const uint8_t * s2_24xn, int ss2, int n); #define oil_multiply_and_acc_24xn_s16_u8 ((_oil_type_multiply_and_acc_24xn_s16_u8)(*(void(**)(void))oil_function_class_ptr_multiply_and_acc_24xn_s16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_multiply_and_acc_6xn_s16_u8; typedef void (*_oil_type_multiply_and_acc_6xn_s16_u8)(int16_t * i1_6xn, int is1, const int16_t * s1_6xn, int ss1, const uint8_t * s2_6xn, int ss2, int n); #define oil_multiply_and_acc_6xn_s16_u8 ((_oil_type_multiply_and_acc_6xn_s16_u8)(*(void(**)(void))oil_function_class_ptr_multiply_and_acc_6xn_s16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_multiply_and_acc_8xn_s16_u8; typedef void (*_oil_type_multiply_and_acc_8xn_s16_u8)(int16_t * i1_8xn, int is1, const int16_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, int n); #define oil_multiply_and_acc_8xn_s16_u8 ((_oil_type_multiply_and_acc_8xn_s16_u8)(*(void(**)(void))oil_function_class_ptr_multiply_and_acc_8xn_s16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_multiply_and_add_s16; typedef void (*_oil_type_multiply_and_add_s16)(int16_t * d, const int16_t * src1, const int16_t * src2, const int16_t * src3, int n); #define oil_multiply_and_add_s16 ((_oil_type_multiply_and_add_s16)(*(void(**)(void))oil_function_class_ptr_multiply_and_add_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_multiply_and_add_s16_u8; typedef void (*_oil_type_multiply_and_add_s16_u8)(int16_t * d, const int16_t * src1, const int16_t * src2, const uint8_t * src3, int n); #define oil_multiply_and_add_s16_u8 ((_oil_type_multiply_and_add_s16_u8)(*(void(**)(void))oil_function_class_ptr_multiply_and_add_s16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_multiply_f32; typedef void (*_oil_type_multiply_f32)(float * d, const float * s1, const float * s2, int n); #define oil_multiply_f32 ((_oil_type_multiply_f32)(*(void(**)(void))oil_function_class_ptr_multiply_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_multiply_f64; typedef void (*_oil_type_multiply_f64)(double * d, const double * s1, const double * s2, int n); #define oil_multiply_f64 ((_oil_type_multiply_f64)(*(void(**)(void))oil_function_class_ptr_multiply_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_multsum_f32; typedef void (*_oil_type_multsum_f32)(float * dest, const float * src1, int sstr1, const float * src2, int sstr2, int n); #define oil_multsum_f32 ((_oil_type_multsum_f32)(*(void(**)(void))oil_function_class_ptr_multsum_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_multsum_f64; typedef void (*_oil_type_multsum_f64)(double * dest, const double * src1, int sstr1, const double * src2, int sstr2, int n); #define oil_multsum_f64 ((_oil_type_multsum_f64)(*(void(**)(void))oil_function_class_ptr_multsum_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_negative_f32; typedef void (*_oil_type_negative_f32)(float * d, const float * s, int n); #define oil_negative_f32 ((_oil_type_negative_f32)(*(void(**)(void))oil_function_class_ptr_negative_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_null; typedef void (*_oil_type_null)(void); #define oil_null ((_oil_type_null)(*(void(**)(void))oil_function_class_ptr_null)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_packyuyv; typedef void (*_oil_type_packyuyv)(uint32_t * d, const uint8_t * s1_nx2, const uint8_t * s2, const uint8_t * s3, int n); #define oil_packyuyv ((_oil_type_packyuyv)(*(void(**)(void))oil_function_class_ptr_packyuyv)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_permute_f32; typedef void (*_oil_type_permute_f32)(float * dest, int dstr, const float * src1, int sstr1, const int32_t * src2, int sstr2, int n); #define oil_permute_f32 ((_oil_type_permute_f32)(*(void(**)(void))oil_function_class_ptr_permute_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_permute_f64; typedef void (*_oil_type_permute_f64)(double * dest, int dstr, const double * src1, int sstr1, const int32_t * src2, int sstr2, int n); #define oil_permute_f64 ((_oil_type_permute_f64)(*(void(**)(void))oil_function_class_ptr_permute_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_permute_s16; typedef void (*_oil_type_permute_s16)(int16_t * dest, int dstr, const int16_t * src1, int sstr1, const int32_t * src2, int sstr2, int n); #define oil_permute_s16 ((_oil_type_permute_s16)(*(void(**)(void))oil_function_class_ptr_permute_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_permute_s32; typedef void (*_oil_type_permute_s32)(int32_t * dest, int dstr, const int32_t * src1, int sstr1, const int32_t * src2, int sstr2, int n); #define oil_permute_s32 ((_oil_type_permute_s32)(*(void(**)(void))oil_function_class_ptr_permute_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_permute_s8; typedef void (*_oil_type_permute_s8)(int8_t * dest, int dstr, const int8_t * src1, int sstr1, const int32_t * src2, int sstr2, int n); #define oil_permute_s8 ((_oil_type_permute_s8)(*(void(**)(void))oil_function_class_ptr_permute_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_permute_u16; typedef void (*_oil_type_permute_u16)(uint16_t * dest, int dstr, const uint16_t * src1, int sstr1, const int32_t * src2, int sstr2, int n); #define oil_permute_u16 ((_oil_type_permute_u16)(*(void(**)(void))oil_function_class_ptr_permute_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_permute_u32; typedef void (*_oil_type_permute_u32)(uint32_t * dest, int dstr, const uint32_t * src1, int sstr1, const int32_t * src2, int sstr2, int n); #define oil_permute_u32 ((_oil_type_permute_u32)(*(void(**)(void))oil_function_class_ptr_permute_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_permute_u8; typedef void (*_oil_type_permute_u8)(uint8_t * dest, int dstr, const uint8_t * src1, int sstr1, const int32_t * src2, int sstr2, int n); #define oil_permute_u8 ((_oil_type_permute_u8)(*(void(**)(void))oil_function_class_ptr_permute_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_recon8x8_inter; typedef void (*_oil_type_recon8x8_inter)(uint8_t * d_8x8, int ds, const uint8_t * s1_8x8, int ss1, const int16_t * s2_8x8); #define oil_recon8x8_inter ((_oil_type_recon8x8_inter)(*(void(**)(void))oil_function_class_ptr_recon8x8_inter)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_recon8x8_inter2; typedef void (*_oil_type_recon8x8_inter2)(uint8_t * d_8x8, int ds, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2, const int16_t * s3_8x8); #define oil_recon8x8_inter2 ((_oil_type_recon8x8_inter2)(*(void(**)(void))oil_function_class_ptr_recon8x8_inter2)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_recon8x8_intra; typedef void (*_oil_type_recon8x8_intra)(uint8_t * d_8x8, int ds, const int16_t * s_8x8); #define oil_recon8x8_intra ((_oil_type_recon8x8_intra)(*(void(**)(void))oil_function_class_ptr_recon8x8_intra)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_resample_linear_argb; typedef void (*_oil_type_resample_linear_argb)(uint32_t * d_n, const uint32_t * s_2xn, int n, uint32_t * i_2); #define oil_resample_linear_argb ((_oil_type_resample_linear_argb)(*(void(**)(void))oil_function_class_ptr_resample_linear_argb)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_resample_linear_u8; typedef void (*_oil_type_resample_linear_u8)(uint8_t * d_n, const uint8_t * s_2xn, int n, uint32_t * i_2); #define oil_resample_linear_u8 ((_oil_type_resample_linear_u8)(*(void(**)(void))oil_function_class_ptr_resample_linear_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_rgb2bgr; typedef void (*_oil_type_rgb2bgr)(uint8_t * d_3xn, const uint8_t * s_3xn, int n); #define oil_rgb2bgr ((_oil_type_rgb2bgr)(*(void(**)(void))oil_function_class_ptr_rgb2bgr)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_rgb2rgba; typedef void (*_oil_type_rgb2rgba)(uint8_t * d_4xn, const uint8_t * s_3xn, int n); #define oil_rgb2rgba ((_oil_type_rgb2rgba)(*(void(**)(void))oil_function_class_ptr_rgb2rgba)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_rgb565_to_argb; typedef void (*_oil_type_rgb565_to_argb)(uint32_t * d, const uint16_t * s, int n); #define oil_rgb565_to_argb ((_oil_type_rgb565_to_argb)(*(void(**)(void))oil_function_class_ptr_rgb565_to_argb)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_rowsad8x8_u8; typedef void (*_oil_type_rowsad8x8_u8)(uint32_t * d_1, const uint8_t * s1_8x8, const uint8_t * s2_8x8); #define oil_rowsad8x8_u8 ((_oil_type_rowsad8x8_u8)(*(void(**)(void))oil_function_class_ptr_rowsad8x8_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_sad12x12_12xn_u8; typedef void (*_oil_type_sad12x12_12xn_u8)(uint32_t * d_n, const uint8_t * s1_12x12, int ss1, const uint8_t * s2_12xnp11, int ss2, int n); #define oil_sad12x12_12xn_u8 ((_oil_type_sad12x12_12xn_u8)(*(void(**)(void))oil_function_class_ptr_sad12x12_12xn_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_sad12x12_u8; typedef void (*_oil_type_sad12x12_u8)(uint32_t * d_1, const uint8_t * s1_12x12, int ss1, const uint8_t * s2_12x12, int ss2); #define oil_sad12x12_u8 ((_oil_type_sad12x12_u8)(*(void(**)(void))oil_function_class_ptr_sad12x12_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_sad16x16_16xn_u8; typedef void (*_oil_type_sad16x16_16xn_u8)(uint32_t * d_n, const uint8_t * s1_16x16, int ss1, const uint8_t * s2_16xnp15, int ss2, int n); #define oil_sad16x16_16xn_u8 ((_oil_type_sad16x16_16xn_u8)(*(void(**)(void))oil_function_class_ptr_sad16x16_16xn_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_sad16x16_u8; typedef void (*_oil_type_sad16x16_u8)(uint32_t * d_1, const uint8_t * s1_16x16, int ss1, const uint8_t * s2_16x16, int ss2); #define oil_sad16x16_u8 ((_oil_type_sad16x16_u8)(*(void(**)(void))oil_function_class_ptr_sad16x16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_sad8x8_8xn_u8; typedef void (*_oil_type_sad8x8_8xn_u8)(uint32_t * d_n, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8xnp7, int ss2, int n); #define oil_sad8x8_8xn_u8 ((_oil_type_sad8x8_8xn_u8)(*(void(**)(void))oil_function_class_ptr_sad8x8_8xn_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_sad8x8_f64; typedef void (*_oil_type_sad8x8_f64)(double * d_8x8, int ds, const double * s1_8x8, int ss1, const double * s2_8x8, int ss2); #define oil_sad8x8_f64 ((_oil_type_sad8x8_f64)(*(void(**)(void))oil_function_class_ptr_sad8x8_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_sad8x8_f64_2; typedef void (*_oil_type_sad8x8_f64_2)(double * d_1, const double * s1_8x8, int ss1, const double * s2_8x8, int ss2); #define oil_sad8x8_f64_2 ((_oil_type_sad8x8_f64_2)(*(void(**)(void))oil_function_class_ptr_sad8x8_f64_2)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_sad8x8_s16; typedef void (*_oil_type_sad8x8_s16)(uint32_t * d_8x8, int ds, const int16_t * s1_8x8, int ss1, const int16_t * s2_8x8, int ss2); #define oil_sad8x8_s16 ((_oil_type_sad8x8_s16)(*(void(**)(void))oil_function_class_ptr_sad8x8_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_sad8x8_s16_2; typedef void (*_oil_type_sad8x8_s16_2)(uint32_t * d_1, const int16_t * s1_8x8, int ss1, const int16_t * s2_8x8, int ss2); #define oil_sad8x8_s16_2 ((_oil_type_sad8x8_s16_2)(*(void(**)(void))oil_function_class_ptr_sad8x8_s16_2)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_sad8x8_u8; typedef void (*_oil_type_sad8x8_u8)(uint32_t * d_1, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2); #define oil_sad8x8_u8 ((_oil_type_sad8x8_u8)(*(void(**)(void))oil_function_class_ptr_sad8x8_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_sad8x8_u8_avg; typedef void (*_oil_type_sad8x8_u8_avg)(uint32_t * d_1, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, const uint8_t * s3_8x8, int ss2); #define oil_sad8x8_u8_avg ((_oil_type_sad8x8_u8_avg)(*(void(**)(void))oil_function_class_ptr_sad8x8_u8_avg)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalaradd_f32; typedef void (*_oil_type_scalaradd_f32)(float * d, int dstr, const float * s1, int sstr, const float * s2_1, int n); #define oil_scalaradd_f32 ((_oil_type_scalaradd_f32)(*(void(**)(void))oil_function_class_ptr_scalaradd_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalaradd_f32_ns; typedef void (*_oil_type_scalaradd_f32_ns)(float * d, const float * s1, const float * s2_1, int n); #define oil_scalaradd_f32_ns ((_oil_type_scalaradd_f32_ns)(*(void(**)(void))oil_function_class_ptr_scalaradd_f32_ns)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalaradd_f64; typedef void (*_oil_type_scalaradd_f64)(double * d, int dstr, const double * s1, int sstr, const double * s2_1, int n); #define oil_scalaradd_f64 ((_oil_type_scalaradd_f64)(*(void(**)(void))oil_function_class_ptr_scalaradd_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalaradd_s16; typedef void (*_oil_type_scalaradd_s16)(int16_t * d, int dstr, const int16_t * s1, int sstr, const int16_t * s2_1, int n); #define oil_scalaradd_s16 ((_oil_type_scalaradd_s16)(*(void(**)(void))oil_function_class_ptr_scalaradd_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalaradd_s32; typedef void (*_oil_type_scalaradd_s32)(int32_t * d, int dstr, const int32_t * s1, int sstr, const int32_t * s2_1, int n); #define oil_scalaradd_s32 ((_oil_type_scalaradd_s32)(*(void(**)(void))oil_function_class_ptr_scalaradd_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalaradd_s8; typedef void (*_oil_type_scalaradd_s8)(int8_t * d, int dstr, const int8_t * s1, int sstr, const int8_t * s2_1, int n); #define oil_scalaradd_s8 ((_oil_type_scalaradd_s8)(*(void(**)(void))oil_function_class_ptr_scalaradd_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalaradd_u16; typedef void (*_oil_type_scalaradd_u16)(uint16_t * d, int dstr, const uint16_t * s1, int sstr, const uint16_t * s2_1, int n); #define oil_scalaradd_u16 ((_oil_type_scalaradd_u16)(*(void(**)(void))oil_function_class_ptr_scalaradd_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalaradd_u32; typedef void (*_oil_type_scalaradd_u32)(uint32_t * d, int dstr, const uint32_t * s1, int sstr, const uint32_t * s2_1, int n); #define oil_scalaradd_u32 ((_oil_type_scalaradd_u32)(*(void(**)(void))oil_function_class_ptr_scalaradd_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalaradd_u8; typedef void (*_oil_type_scalaradd_u8)(uint8_t * d, int dstr, const uint8_t * s1, int sstr, const uint8_t * s2_1, int n); #define oil_scalaradd_u8 ((_oil_type_scalaradd_u8)(*(void(**)(void))oil_function_class_ptr_scalaradd_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalarmult_f32; typedef void (*_oil_type_scalarmult_f32)(float * d, int dstr, const float * s1, int sstr, const float * s2_1, int n); #define oil_scalarmult_f32 ((_oil_type_scalarmult_f32)(*(void(**)(void))oil_function_class_ptr_scalarmult_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalarmult_f64; typedef void (*_oil_type_scalarmult_f64)(double * d, int dstr, const double * s1, int sstr, const double * s2_1, int n); #define oil_scalarmult_f64 ((_oil_type_scalarmult_f64)(*(void(**)(void))oil_function_class_ptr_scalarmult_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalarmult_s16; typedef void (*_oil_type_scalarmult_s16)(int16_t * d, int dstr, const int16_t * s1, int sstr, const int16_t * s2_1, int n); #define oil_scalarmult_s16 ((_oil_type_scalarmult_s16)(*(void(**)(void))oil_function_class_ptr_scalarmult_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalarmult_s32; typedef void (*_oil_type_scalarmult_s32)(int32_t * d, int dstr, const int32_t * s1, int sstr, const int32_t * s2_1, int n); #define oil_scalarmult_s32 ((_oil_type_scalarmult_s32)(*(void(**)(void))oil_function_class_ptr_scalarmult_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalarmult_s8; typedef void (*_oil_type_scalarmult_s8)(int8_t * d, int dstr, const int8_t * s1, int sstr, const int8_t * s2_1, int n); #define oil_scalarmult_s8 ((_oil_type_scalarmult_s8)(*(void(**)(void))oil_function_class_ptr_scalarmult_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalarmult_u16; typedef void (*_oil_type_scalarmult_u16)(uint16_t * d, int dstr, const uint16_t * s1, int sstr, const uint16_t * s2_1, int n); #define oil_scalarmult_u16 ((_oil_type_scalarmult_u16)(*(void(**)(void))oil_function_class_ptr_scalarmult_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalarmult_u32; typedef void (*_oil_type_scalarmult_u32)(uint32_t * d, int dstr, const uint32_t * s1, int sstr, const uint32_t * s2_1, int n); #define oil_scalarmult_u32 ((_oil_type_scalarmult_u32)(*(void(**)(void))oil_function_class_ptr_scalarmult_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalarmult_u8; typedef void (*_oil_type_scalarmult_u8)(uint8_t * d, int dstr, const uint8_t * s1, int sstr, const uint8_t * s2_1, int n); #define oil_scalarmult_u8 ((_oil_type_scalarmult_u8)(*(void(**)(void))oil_function_class_ptr_scalarmult_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalarmultiply_f32_ns; typedef void (*_oil_type_scalarmultiply_f32_ns)(float * d, const float * s1, const float * s2_1, int n); #define oil_scalarmultiply_f32_ns ((_oil_type_scalarmultiply_f32_ns)(*(void(**)(void))oil_function_class_ptr_scalarmultiply_f32_ns)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scalarmultiply_f64_ns; typedef void (*_oil_type_scalarmultiply_f64_ns)(double * d, const double * s1, const double * s2_1, int n); #define oil_scalarmultiply_f64_ns ((_oil_type_scalarmultiply_f64_ns)(*(void(**)(void))oil_function_class_ptr_scalarmultiply_f64_ns)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_f32_s16; typedef void (*_oil_type_scaleconv_f32_s16)(float * dest, const int16_t * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_f32_s16 ((_oil_type_scaleconv_f32_s16)(*(void(**)(void))oil_function_class_ptr_scaleconv_f32_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_f32_s32; typedef void (*_oil_type_scaleconv_f32_s32)(float * dest, const int32_t * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_f32_s32 ((_oil_type_scaleconv_f32_s32)(*(void(**)(void))oil_function_class_ptr_scaleconv_f32_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_f32_s8; typedef void (*_oil_type_scaleconv_f32_s8)(float * dest, const int8_t * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_f32_s8 ((_oil_type_scaleconv_f32_s8)(*(void(**)(void))oil_function_class_ptr_scaleconv_f32_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_f32_u16; typedef void (*_oil_type_scaleconv_f32_u16)(float * dest, const uint16_t * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_f32_u16 ((_oil_type_scaleconv_f32_u16)(*(void(**)(void))oil_function_class_ptr_scaleconv_f32_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_f32_u32; typedef void (*_oil_type_scaleconv_f32_u32)(float * dest, const uint32_t * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_f32_u32 ((_oil_type_scaleconv_f32_u32)(*(void(**)(void))oil_function_class_ptr_scaleconv_f32_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_f32_u8; typedef void (*_oil_type_scaleconv_f32_u8)(float * dest, const uint8_t * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_f32_u8 ((_oil_type_scaleconv_f32_u8)(*(void(**)(void))oil_function_class_ptr_scaleconv_f32_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_f64_s16; typedef void (*_oil_type_scaleconv_f64_s16)(double * dest, const int16_t * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_f64_s16 ((_oil_type_scaleconv_f64_s16)(*(void(**)(void))oil_function_class_ptr_scaleconv_f64_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_f64_s32; typedef void (*_oil_type_scaleconv_f64_s32)(double * dest, const int32_t * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_f64_s32 ((_oil_type_scaleconv_f64_s32)(*(void(**)(void))oil_function_class_ptr_scaleconv_f64_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_f64_s8; typedef void (*_oil_type_scaleconv_f64_s8)(double * dest, const int8_t * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_f64_s8 ((_oil_type_scaleconv_f64_s8)(*(void(**)(void))oil_function_class_ptr_scaleconv_f64_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_f64_u16; typedef void (*_oil_type_scaleconv_f64_u16)(double * dest, const uint16_t * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_f64_u16 ((_oil_type_scaleconv_f64_u16)(*(void(**)(void))oil_function_class_ptr_scaleconv_f64_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_f64_u32; typedef void (*_oil_type_scaleconv_f64_u32)(double * dest, const uint32_t * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_f64_u32 ((_oil_type_scaleconv_f64_u32)(*(void(**)(void))oil_function_class_ptr_scaleconv_f64_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_f64_u8; typedef void (*_oil_type_scaleconv_f64_u8)(double * dest, const uint8_t * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_f64_u8 ((_oil_type_scaleconv_f64_u8)(*(void(**)(void))oil_function_class_ptr_scaleconv_f64_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_s16_f32; typedef void (*_oil_type_scaleconv_s16_f32)(int16_t * dest, const float * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_s16_f32 ((_oil_type_scaleconv_s16_f32)(*(void(**)(void))oil_function_class_ptr_scaleconv_s16_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_s16_f64; typedef void (*_oil_type_scaleconv_s16_f64)(int16_t * dest, const double * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_s16_f64 ((_oil_type_scaleconv_s16_f64)(*(void(**)(void))oil_function_class_ptr_scaleconv_s16_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_s32_f32; typedef void (*_oil_type_scaleconv_s32_f32)(int32_t * dest, const float * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_s32_f32 ((_oil_type_scaleconv_s32_f32)(*(void(**)(void))oil_function_class_ptr_scaleconv_s32_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_s32_f64; typedef void (*_oil_type_scaleconv_s32_f64)(int32_t * dest, const double * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_s32_f64 ((_oil_type_scaleconv_s32_f64)(*(void(**)(void))oil_function_class_ptr_scaleconv_s32_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_s8_f32; typedef void (*_oil_type_scaleconv_s8_f32)(int8_t * dest, const float * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_s8_f32 ((_oil_type_scaleconv_s8_f32)(*(void(**)(void))oil_function_class_ptr_scaleconv_s8_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_s8_f64; typedef void (*_oil_type_scaleconv_s8_f64)(int8_t * dest, const double * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_s8_f64 ((_oil_type_scaleconv_s8_f64)(*(void(**)(void))oil_function_class_ptr_scaleconv_s8_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_u16_f32; typedef void (*_oil_type_scaleconv_u16_f32)(uint16_t * dest, const float * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_u16_f32 ((_oil_type_scaleconv_u16_f32)(*(void(**)(void))oil_function_class_ptr_scaleconv_u16_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_u16_f64; typedef void (*_oil_type_scaleconv_u16_f64)(uint16_t * dest, const double * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_u16_f64 ((_oil_type_scaleconv_u16_f64)(*(void(**)(void))oil_function_class_ptr_scaleconv_u16_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_u32_f32; typedef void (*_oil_type_scaleconv_u32_f32)(uint32_t * dest, const float * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_u32_f32 ((_oil_type_scaleconv_u32_f32)(*(void(**)(void))oil_function_class_ptr_scaleconv_u32_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_u32_f64; typedef void (*_oil_type_scaleconv_u32_f64)(uint32_t * dest, const double * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_u32_f64 ((_oil_type_scaleconv_u32_f64)(*(void(**)(void))oil_function_class_ptr_scaleconv_u32_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_u8_f32; typedef void (*_oil_type_scaleconv_u8_f32)(uint8_t * dest, const float * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_u8_f32 ((_oil_type_scaleconv_u8_f32)(*(void(**)(void))oil_function_class_ptr_scaleconv_u8_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scaleconv_u8_f64; typedef void (*_oil_type_scaleconv_u8_f64)(uint8_t * dest, const double * src, int n, const double * s2_1, const double * s3_1); #define oil_scaleconv_u8_f64 ((_oil_type_scaleconv_u8_f64)(*(void(**)(void))oil_function_class_ptr_scaleconv_u8_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_scanlinescale2_u8; typedef void (*_oil_type_scanlinescale2_u8)(uint8_t * d, const uint8_t * s, int n); #define oil_scanlinescale2_u8 ((_oil_type_scanlinescale2_u8)(*(void(**)(void))oil_function_class_ptr_scanlinescale2_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_sign_f32; typedef void (*_oil_type_sign_f32)(float * d, const float * s, int n); #define oil_sign_f32 ((_oil_type_sign_f32)(*(void(**)(void))oil_function_class_ptr_sign_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_sincos_f64; typedef void (*_oil_type_sincos_f64)(double * dest1, double * dest2, int n, const double * s1_1, const double * s2_1); #define oil_sincos_f64 ((_oil_type_sincos_f64)(*(void(**)(void))oil_function_class_ptr_sincos_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_splat_u16_ns; typedef void (*_oil_type_splat_u16_ns)(uint16_t * dest, const uint16_t * s1_1, int n); #define oil_splat_u16_ns ((_oil_type_splat_u16_ns)(*(void(**)(void))oil_function_class_ptr_splat_u16_ns)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_splat_u32; typedef void (*_oil_type_splat_u32)(uint32_t * dest, int dstr, const uint32_t * s1_1, int n); #define oil_splat_u32 ((_oil_type_splat_u32)(*(void(**)(void))oil_function_class_ptr_splat_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_splat_u32_ns; typedef void (*_oil_type_splat_u32_ns)(uint32_t * dest, const uint32_t * s1_1, int n); #define oil_splat_u32_ns ((_oil_type_splat_u32_ns)(*(void(**)(void))oil_function_class_ptr_splat_u32_ns)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_splat_u8; typedef void (*_oil_type_splat_u8)(uint8_t * dest, int dstr, const uint8_t * s1_1, int n); #define oil_splat_u8 ((_oil_type_splat_u8)(*(void(**)(void))oil_function_class_ptr_splat_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_splat_u8_ns; typedef void (*_oil_type_splat_u8_ns)(uint8_t * dest, const uint8_t * s1_1, int n); #define oil_splat_u8_ns ((_oil_type_splat_u8_ns)(*(void(**)(void))oil_function_class_ptr_splat_u8_ns)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_split_135; typedef void (*_oil_type_split_135)(int16_t * d_2xn, const int16_t * s_2xn, int n); #define oil_split_135 ((_oil_type_split_135)(*(void(**)(void))oil_function_class_ptr_split_135)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_split_53; typedef void (*_oil_type_split_53)(int16_t * d_2xn, const int16_t * s_2xn, int n); #define oil_split_53 ((_oil_type_split_53)(*(void(**)(void))oil_function_class_ptr_split_53)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_split_approx97; typedef void (*_oil_type_split_approx97)(int16_t * d_2xn, const int16_t * s_2xn, int n); #define oil_split_approx97 ((_oil_type_split_approx97)(*(void(**)(void))oil_function_class_ptr_split_approx97)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_split_daub97; typedef void (*_oil_type_split_daub97)(int16_t * d_2xn, const int16_t * s_2xn, int n); #define oil_split_daub97 ((_oil_type_split_daub97)(*(void(**)(void))oil_function_class_ptr_split_daub97)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_squaresum_f32; typedef void (*_oil_type_squaresum_f32)(float * d, const float * s, int n); #define oil_squaresum_f32 ((_oil_type_squaresum_f32)(*(void(**)(void))oil_function_class_ptr_squaresum_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_squaresum_f64; typedef void (*_oil_type_squaresum_f64)(double * d, const double * s, int n); #define oil_squaresum_f64 ((_oil_type_squaresum_f64)(*(void(**)(void))oil_function_class_ptr_squaresum_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_squaresum_shifted_s16; typedef void (*_oil_type_squaresum_shifted_s16)(uint32_t * d, const int16_t * s, int n); #define oil_squaresum_shifted_s16 ((_oil_type_squaresum_shifted_s16)(*(void(**)(void))oil_function_class_ptr_squaresum_shifted_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_subtract_f32; typedef void (*_oil_type_subtract_f32)(float * d, const float * s1, const float * s2, int n); #define oil_subtract_f32 ((_oil_type_subtract_f32)(*(void(**)(void))oil_function_class_ptr_subtract_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_subtract_f64; typedef void (*_oil_type_subtract_f64)(double * d, const double * s1, const double * s2, int n); #define oil_subtract_f64 ((_oil_type_subtract_f64)(*(void(**)(void))oil_function_class_ptr_subtract_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_subtract_s16; typedef void (*_oil_type_subtract_s16)(int16_t * d, const int16_t * src1, const int16_t * src2, int n); #define oil_subtract_s16 ((_oil_type_subtract_s16)(*(void(**)(void))oil_function_class_ptr_subtract_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_subtract_s16_u8; typedef void (*_oil_type_subtract_s16_u8)(int16_t * d, const int16_t * src1, const uint8_t * src2, int n); #define oil_subtract_s16_u8 ((_oil_type_subtract_s16_u8)(*(void(**)(void))oil_function_class_ptr_subtract_s16_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_sum_f64; typedef void (*_oil_type_sum_f64)(double * d_1, const double * s, int sstr, int n); #define oil_sum_f64 ((_oil_type_sum_f64)(*(void(**)(void))oil_function_class_ptr_sum_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_sum_s16; typedef void (*_oil_type_sum_s16)(int16_t * d_1, const int16_t * s, int n); #define oil_sum_s16 ((_oil_type_sum_s16)(*(void(**)(void))oil_function_class_ptr_sum_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_swab_u16; typedef void (*_oil_type_swab_u16)(uint16_t * d_n, const uint16_t * s_n, int n); #define oil_swab_u16 ((_oil_type_swab_u16)(*(void(**)(void))oil_function_class_ptr_swab_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_swab_u32; typedef void (*_oil_type_swab_u32)(uint32_t * d_n, const uint32_t * s_n, int n); #define oil_swab_u32 ((_oil_type_swab_u32)(*(void(**)(void))oil_function_class_ptr_swab_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_synth_135; typedef void (*_oil_type_synth_135)(int16_t * d_2xn, const int16_t * s_2xn, int n); #define oil_synth_135 ((_oil_type_synth_135)(*(void(**)(void))oil_function_class_ptr_synth_135)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_synth_53; typedef void (*_oil_type_synth_53)(int16_t * d_2xn, const int16_t * s_2xn, int n); #define oil_synth_53 ((_oil_type_synth_53)(*(void(**)(void))oil_function_class_ptr_synth_53)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_synth_approx97; typedef void (*_oil_type_synth_approx97)(int16_t * d_2xn, const int16_t * s_2xn, int n); #define oil_synth_approx97 ((_oil_type_synth_approx97)(*(void(**)(void))oil_function_class_ptr_synth_approx97)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_synth_daub97; typedef void (*_oil_type_synth_daub97)(int16_t * d_2xn, const int16_t * s_2xn, int n); #define oil_synth_daub97 ((_oil_type_synth_daub97)(*(void(**)(void))oil_function_class_ptr_synth_daub97)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_tablelookup_u8; typedef void (*_oil_type_tablelookup_u8)(uint8_t * d, int ds, const uint8_t * s1, int ss1, const uint8_t * s2_256, int ss2, int n); #define oil_tablelookup_u8 ((_oil_type_tablelookup_u8)(*(void(**)(void))oil_function_class_ptr_tablelookup_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_testzero_u8; typedef void (*_oil_type_testzero_u8)(uint32_t * d_1, const uint8_t * s, int n); #define oil_testzero_u8 ((_oil_type_testzero_u8)(*(void(**)(void))oil_function_class_ptr_testzero_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_trans8x8_f64; typedef void (*_oil_type_trans8x8_f64)(double * d_8x8, int ds, const double * s_8x8, int ss); #define oil_trans8x8_f64 ((_oil_type_trans8x8_f64)(*(void(**)(void))oil_function_class_ptr_trans8x8_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_trans8x8_u16; typedef void (*_oil_type_trans8x8_u16)(uint16_t * d_8x8, int ds, const uint16_t * s_8x8, int ss); #define oil_trans8x8_u16 ((_oil_type_trans8x8_u16)(*(void(**)(void))oil_function_class_ptr_trans8x8_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_trans8x8_u32; typedef void (*_oil_type_trans8x8_u32)(uint32_t * d_8x8, int ds, const uint32_t * s_8x8, int ss); #define oil_trans8x8_u32 ((_oil_type_trans8x8_u32)(*(void(**)(void))oil_function_class_ptr_trans8x8_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_trans8x8_u8; typedef void (*_oil_type_trans8x8_u8)(uint8_t * d_8x8, int ds, const uint8_t * s_8x8, int ss); #define oil_trans8x8_u8 ((_oil_type_trans8x8_u8)(*(void(**)(void))oil_function_class_ptr_trans8x8_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_unpackyuyv; typedef void (*_oil_type_unpackyuyv)(uint8_t * d1_nx2, uint8_t * d2, uint8_t * d3, const uint32_t * s, int n); #define oil_unpackyuyv ((_oil_type_unpackyuyv)(*(void(**)(void))oil_function_class_ptr_unpackyuyv)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_unzigzag8x8_s16; typedef void (*_oil_type_unzigzag8x8_s16)(int16_t * d_8x8, int ds, const int16_t * s_8x8, int ss); #define oil_unzigzag8x8_s16 ((_oil_type_unzigzag8x8_s16)(*(void(**)(void))oil_function_class_ptr_unzigzag8x8_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_utf8_validate; typedef void (*_oil_type_utf8_validate)(int32_t * d_1, const uint8_t * s, int n); #define oil_utf8_validate ((_oil_type_utf8_validate)(*(void(**)(void))oil_function_class_ptr_utf8_validate)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_uyvy2ayuv; typedef void (*_oil_type_uyvy2ayuv)(uint32_t * d_n, const uint32_t * s_n, int n); #define oil_uyvy2ayuv ((_oil_type_uyvy2ayuv)(*(void(**)(void))oil_function_class_ptr_uyvy2ayuv)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_vectoradd_f32; typedef void (*_oil_type_vectoradd_f32)(float * d, int dstr, const float * s1, int sstr1, const float * s2, int sstr2, int n, const float * s3_1, const float * s4_1); #define oil_vectoradd_f32 ((_oil_type_vectoradd_f32)(*(void(**)(void))oil_function_class_ptr_vectoradd_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_vectoradd_f64; typedef void (*_oil_type_vectoradd_f64)(double * d, int dstr, const double * s1, int sstr1, const double * s2, int sstr2, int n, const double * s3_1, const double * s4_1); #define oil_vectoradd_f64 ((_oil_type_vectoradd_f64)(*(void(**)(void))oil_function_class_ptr_vectoradd_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_vectoradd_s16; typedef void (*_oil_type_vectoradd_s16)(int16_t * d, int dstr, const int16_t * s1, int sstr1, const int16_t * s2, int sstr2, int n, const int16_t * s3_1, const int16_t * s4_1); #define oil_vectoradd_s16 ((_oil_type_vectoradd_s16)(*(void(**)(void))oil_function_class_ptr_vectoradd_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_vectoradd_s32; typedef void (*_oil_type_vectoradd_s32)(int32_t * d, int dstr, const int32_t * s1, int sstr1, const int32_t * s2, int sstr2, int n, const int32_t * s3_1, const int32_t * s4_1); #define oil_vectoradd_s32 ((_oil_type_vectoradd_s32)(*(void(**)(void))oil_function_class_ptr_vectoradd_s32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_vectoradd_s8; typedef void (*_oil_type_vectoradd_s8)(int8_t * d, int dstr, const int8_t * s1, int sstr1, const int8_t * s2, int sstr2, int n, const int8_t * s3_1, const int8_t * s4_1); #define oil_vectoradd_s8 ((_oil_type_vectoradd_s8)(*(void(**)(void))oil_function_class_ptr_vectoradd_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_vectoradd_s_f32; typedef void (*_oil_type_vectoradd_s_f32)(float * d, int dstr, const float * s1, int sstr1, const float * s2, int sstr2, int n); #define oil_vectoradd_s_f32 ((_oil_type_vectoradd_s_f32)(*(void(**)(void))oil_function_class_ptr_vectoradd_s_f32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_vectoradd_s_f64; typedef void (*_oil_type_vectoradd_s_f64)(double * d, int dstr, const double * s1, int sstr1, const double * s2, int sstr2, int n); #define oil_vectoradd_s_f64 ((_oil_type_vectoradd_s_f64)(*(void(**)(void))oil_function_class_ptr_vectoradd_s_f64)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_vectoradd_s_s16; typedef void (*_oil_type_vectoradd_s_s16)(int16_t * d, int dstr, const int16_t * s1, int sstr1, const int16_t * s2, int sstr2, int n); #define oil_vectoradd_s_s16 ((_oil_type_vectoradd_s_s16)(*(void(**)(void))oil_function_class_ptr_vectoradd_s_s16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_vectoradd_s_s8; typedef void (*_oil_type_vectoradd_s_s8)(int8_t * d, int dstr, const int8_t * s1, int sstr1, const int8_t * s2, int sstr2, int n); #define oil_vectoradd_s_s8 ((_oil_type_vectoradd_s_s8)(*(void(**)(void))oil_function_class_ptr_vectoradd_s_s8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_vectoradd_s_u16; typedef void (*_oil_type_vectoradd_s_u16)(uint16_t * d, int dstr, const uint16_t * s1, int sstr1, const uint16_t * s2, int sstr2, int n); #define oil_vectoradd_s_u16 ((_oil_type_vectoradd_s_u16)(*(void(**)(void))oil_function_class_ptr_vectoradd_s_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_vectoradd_s_u8; typedef void (*_oil_type_vectoradd_s_u8)(uint8_t * d, int dstr, const uint8_t * s1, int sstr1, const uint8_t * s2, int sstr2, int n); #define oil_vectoradd_s_u8 ((_oil_type_vectoradd_s_u8)(*(void(**)(void))oil_function_class_ptr_vectoradd_s_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_vectoradd_u16; typedef void (*_oil_type_vectoradd_u16)(uint16_t * d, int dstr, const uint16_t * s1, int sstr1, const uint16_t * s2, int sstr2, int n, const uint16_t * s3_1, const uint16_t * s4_1); #define oil_vectoradd_u16 ((_oil_type_vectoradd_u16)(*(void(**)(void))oil_function_class_ptr_vectoradd_u16)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_vectoradd_u32; typedef void (*_oil_type_vectoradd_u32)(uint32_t * d, int dstr, const uint32_t * s1, int sstr1, const uint32_t * s2, int sstr2, int n, const uint32_t * s3_1, const uint32_t * s4_1); #define oil_vectoradd_u32 ((_oil_type_vectoradd_u32)(*(void(**)(void))oil_function_class_ptr_vectoradd_u32)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_vectoradd_u8; typedef void (*_oil_type_vectoradd_u8)(uint8_t * d, int dstr, const uint8_t * s1, int sstr1, const uint8_t * s2, int sstr2, int n, const uint8_t * s3_1, const uint8_t * s4_1); #define oil_vectoradd_u8 ((_oil_type_vectoradd_u8)(*(void(**)(void))oil_function_class_ptr_vectoradd_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_yuv2rgbx_sub2_u8; typedef void (*_oil_type_yuv2rgbx_sub2_u8)(uint8_t * d_4xn, const uint8_t * src1, const uint8_t * src2, const uint8_t * src3, int n); #define oil_yuv2rgbx_sub2_u8 ((_oil_type_yuv2rgbx_sub2_u8)(*(void(**)(void))oil_function_class_ptr_yuv2rgbx_sub2_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_yuv2rgbx_sub4_u8; typedef void (*_oil_type_yuv2rgbx_sub4_u8)(uint8_t * d_4xn, const uint8_t * src1, const uint8_t * src2, const uint8_t * src3, int n); #define oil_yuv2rgbx_sub4_u8 ((_oil_type_yuv2rgbx_sub4_u8)(*(void(**)(void))oil_function_class_ptr_yuv2rgbx_sub4_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_yuv2rgbx_u8; typedef void (*_oil_type_yuv2rgbx_u8)(uint8_t * d_4xn, const uint8_t * src1, const uint8_t * src2, const uint8_t * src3, int n); #define oil_yuv2rgbx_u8 ((_oil_type_yuv2rgbx_u8)(*(void(**)(void))oil_function_class_ptr_yuv2rgbx_u8)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_yuyv2ayuv; typedef void (*_oil_type_yuyv2ayuv)(uint32_t * d_n, const uint32_t * s_n, int n); #define oil_yuyv2ayuv ((_oil_type_yuyv2ayuv)(*(void(**)(void))oil_function_class_ptr_yuyv2ayuv)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_yvyu2ayuv; typedef void (*_oil_type_yvyu2ayuv)(uint32_t * d_n, const uint32_t * s_n, int n); #define oil_yvyu2ayuv ((_oil_type_yvyu2ayuv)(*(void(**)(void))oil_function_class_ptr_yvyu2ayuv)) OIL_EXPORT OilFunctionClass *oil_function_class_ptr_zigzag8x8_s16; typedef void (*_oil_type_zigzag8x8_s16)(int16_t * d_8x8, int ds, const int16_t * s_8x8, int ss); #define oil_zigzag8x8_s16 ((_oil_type_zigzag8x8_s16)(*(void(**)(void))oil_function_class_ptr_zigzag8x8_s16)) #ifdef __cplusplus } #endif #endif liboil-0.3.17/liboil/powerpc/0000777000175000017500000000000011332637376013025 500000000000000liboil-0.3.17/liboil/powerpc/clip.c0000644000175000017500000001037010717203073014022 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #ifdef ENABLE_BROKEN_IMPLS static void clip_s16_ppcasm (int16_t *dest, int dstr, int16_t *src, int sstr, int n, int16_t *low, int16_t *hi) { __asm__ __volatile__( " li r7, 0 \n" " mtctr %4 \n" "1: lhax r9,r7,%1 \n" " add r10,r9,%2 \n" " subfc r8,r9,%3 \n" " srawi r0,r10,31 \n" " srawi r11,r8,31 \n" " and r0,r0,r10 \n" " and r11,r11,r8 \n" " subf r9,r0,r9 \n" " add r9,r9,r11 \n" " sthx r9,r7,%0 \n" " addi r7,r7,2 \n" " bdnz 1b \n" : : "b" (dest), "b" (src), "b" (-*low), "b" (*hi), "b" (n) : "7", "9", "10", "8", "11", "0", "ctr"); } OIL_DEFINE_IMPL_ASM (clip_s16_ppcasm, clip_s16); #endif #ifdef ENABLE_BROKEN_IMPLS static void clip_s16_ppcasm2 (int16_t *dest, int dstr, int16_t *src, int sstr, int n, int16_t *low, int16_t *hi) { src--; dest--; __asm__ __volatile__( " mtctr %4 \n" "1: lhau r9,2(%1) \n" " add r10,r9,%2 \n" " subfc r8,r9,%3 \n" " srawi r0,r10,31 \n" " srawi r11,r8,31 \n" " and r0,r0,r10 \n" " and r11,r11,r8 \n" " subf r9,r0,r9 \n" " add r9,r9,r11 \n" " sthu r9,2(%0) \n" " bdnz 1b \n" : : "b" (dest), "b" (src), "b" (-*low), "b" (*hi), "b" (n) : "9", "10", "8", "11", "0", "ctr"); } OIL_DEFINE_IMPL_ASM (clip_s16_ppcasm2, clip_s16); #endif #ifdef ENABLE_BROKEN_IMPLS /* This is just a basic weave of the previous function. It uses * a lot of registers and gets pretty hairy, so it would take some * work to make better. */ static void clip_s16_ppcasm3 (int16_t *dest, int dstr, int16_t *src, int sstr, int n, int16_t *low, int16_t *hi) { src--; dest--; n/=2; __asm__ __volatile__("\n" " mtctr %4 \n" "1: lhau r9,2(%1) \n" " add r10,r9,%2 \n" " lhau r19,2(%1) \n" " subfc r8,r9,%3 \n" " add r20,r19,%2 \n" " srawi r0,r10,31 \n" " subfc r18,r19,%3 \n" " srawi r11,r8,31 \n" " srawi r22,r20,31 \n" " and r0,r0,r10 \n" " srawi r21,r18,31 \n" " and r11,r11,r8 \n" " and r22,r22,r20 \n" " subf r9,r0,r9 \n" " and r21,r21,r18 \n" " add r9,r9,r11 \n" " subf r19,r22,r19 \n" " sthu r9,2(%0) \n" " add r19,r19,r21 \n" " sthu r19,2(%0) \n" " bdnz 1b \n" : : "b" (dest), "b" (src), "b" (-*low), "b" (*hi), "b" (n) : "8", "9", "10", "11", "0", "18", "19", "20", "21", "22", "ctr"); } OIL_DEFINE_IMPL_ASM (clip_s16_ppcasm3, clip_s16); #endif #ifdef HAVE_GCC_ASM_POWERPC_FPU #ifdef ENABLE_BROKEN_IMPLS static void clip_f64_ppcasm(f64 *dest, f64 *src, f64 low, f64 hi, int n) { f64 ftmp; dest--; src--; __asm__ __volatile__("\n" "1: lfdu 0,8(%1)\n" " addic. %2,%2,-1\n" " fsub 1,0,%3\n" " fsel 0,1,0,%3\n" " fsub 1,0,%4\n" " fsel 0,1,%4,0\n" " stfdu 0,8(%0)\n" " bge 1b\n" : "+b" (dest), "+b" (src), "+r" (n) : "f" (low), "f" (hi), "b" (&ftmp) : "32", "33", "11" ); } #endif #endif liboil-0.3.17/liboil/powerpc/multsum.c0000644000175000017500000000406710717203073014607 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #ifdef ENABLE_BROKEN_IMPLS /* This could probably be improved by unrolling */ static void multsum_f32_ppcasm(float *dest, float *src1, int sstr1, float *src2, int sstr2, int n) { asm __volatile__("\n" " lfs f0, 0(%0)\n" " lfs f1, 0(%1)\n" " fmuls f2, f0, f1\n" " addi %2, %2, -1\n" " mtctr %2\n" "1: lfsu f0, 4(%0)\n" " lfsu f1, 4(%1)\n" " fmadds f2,f0,f1,f2\n" " bdnz 1b\n" " stfs f2, 0(%3)\n" : "+b" (src1), "+b" (src2), "+b" (n) : "b" (dest) : "32", "33", "34", "ctr"); } OIL_DEFINE_IMPL_ASM (multsum_f32_ppcasm, multsum_f32); #endif liboil-0.3.17/liboil/powerpc/rgb2rgba.c0000644000175000017500000000350210717203073014562 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include OIL_DECLARE_CLASS (rgb2rgba); static void rgb2rgba_powerpcasm (uint8_t *dest, uint8_t* src, int n) { src -= 3; dest -= 4; asm volatile ( " mtctr %2 \n" "1: lwzu r10, 3(%1) \n" " ori r10, r10, 0xFF \n" " stwu r10, 4(%0) \n" " bdnz 1b \n" : "+b" (dest), "+b" (src) : "b" (n) : "10", "ctr"); } OIL_DEFINE_IMPL_ASM (rgb2rgba_powerpcasm, rgb2rgba); liboil-0.3.17/liboil/powerpc/Makefile.am0000644000175000017500000000042410717203073014762 00000000000000 noinst_LTLIBRARIES = libpowerpc.la sources = \ abs.c \ clip.c \ conv.c \ copy.c \ md5.c \ mix.c \ multsum.c \ resample.c \ rgb2bgr.c \ rgb2rgba.c \ sad8x8.c \ splat.c \ zigzag8x8.c libpowerpc_la_SOURCES = \ $(sources) libpowerpc_la_CFLAGS = $(LIBOIL_CFLAGS) liboil-0.3.17/liboil/powerpc/splat.c0000644000175000017500000000766210717203073014230 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include OIL_DECLARE_CLASS(splat_u8_ns); OIL_DECLARE_CLASS(splat_u32_ns); static void splat_u8_ns_altivec (uint8_t *dest, uint8_t *src, int n) { while(((unsigned long)dest & 0xf) && n>0) { *dest++ = *src; n--; } if (n/16) { asm volatile ( " mtctr %2\n" " li r11, 0\n" " lvsl v2, 0, %1\n" " lvx v0, 0, %1\n" " vperm v0, v0, v0, v2\n" " vspltb v0, v0, 0\n" "1:\n" " stvx v0, r11, %0\n" " addi r11, r11, 16\n" " bdnz+ 1b\n" " add %0, %0, r11\n" : "+b" (dest), "+b" (src) : "r" (n/16)); } n &= 0xf; while(n) { *dest++ = *src; n--; } } OIL_DEFINE_IMPL_FULL (splat_u8_ns_altivec, splat_u8_ns, OIL_IMPL_FLAG_ALTIVEC); static void splat_u8_ns_altivec2 (uint8_t *dest, uint8_t *src, int n) { while(((unsigned long)dest & 0xf) && n>0) { *dest++ = *src; n--; } if (n/64) { asm volatile ( " mtctr %2\n" " li r11, 0\n" " lvsl v2, 0, %1\n" " lvx v0, 0, %1\n" " vperm v0, v0, v0, v2\n" " vspltb v0, v0, 0\n" "1:\n" " stvx v0, r11, %0\n" " addi r11, r11, 16\n" " stvx v0, r11, %0\n" " addi r11, r11, 16\n" " stvx v0, r11, %0\n" " addi r11, r11, 16\n" " stvx v0, r11, %0\n" " addi r11, r11, 16\n" " bdnz+ 1b\n" " add %0, %0, r11\n" : "+b" (dest), "+b" (src) : "r" (n/64)); } n &= 0x3f; while(n) { *dest++ = *src; n--; } } OIL_DEFINE_IMPL_FULL (splat_u8_ns_altivec2, splat_u8_ns, OIL_IMPL_FLAG_ALTIVEC); /* With a little love, this could work with 4-byte unaligned dest, * but I'm not feeling loving today. */ static void splat_u32_ns_altivec (uint32_t *dest, uint32_t *src, int n) { while(((unsigned long)dest & 0xc) && n>0) { *dest++ = *src; n--; } if (n/4) { asm volatile ( " mtctr %2\n" " li r11, 0\n" " lvsl v2, 0, %1\n" " lvx v0, 0, %1\n" " vperm v0, v0, v0, v2\n" " vspltw v0, v0, 0\n" "1:\n" " stvx v0, r11, %0\n" " addi r11, r11, 16\n" " bdnz+ 1b\n" " add %0, %0, r11\n" : "+b" (dest), "+b" (src) : "r" (n/4)); } n &= 0x3; while(n) { *dest++ = *src; n--; } } OIL_DEFINE_IMPL_FULL (splat_u32_ns_altivec, splat_u32_ns, OIL_IMPL_FLAG_ALTIVEC); liboil-0.3.17/liboil/powerpc/rgb2bgr.c0000644000175000017500000001060411067011142014413 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include OIL_DECLARE_CLASS (rgb2bgr); static void rgb2bgr_ppc (uint8_t *dest, uint8_t* src, int n) { while (n&3) { uint8_t tmp; tmp = src[2]; dest[1] = src[1]; dest[2] = src[0]; dest[0] = tmp; dest += 3; src += 3; n--; } n /= 4; dest -= 4; src -= 4; asm volatile ( " mtctr %2 \n" "1: lwzu r10, 4(%1) \n" /* rgbr x */ " rotlwi r10, r10, 16 \n" /* brrg x */ " and r11, r10, %3 \n" /* -r-g .x */ " sub r10, r10, r11 \n" /* b-r- x. */ " andi. r12, r11, 0xFF \n" /* ---g ..x */ " rotlwi r12, r12, 16 \n" /* -g-- ..x */ " or r10, r10, r12 \n" /* bgr- x.. */ " lwzu r12, 4(%1) \n" /* gbrg ..x */ " and r9, r12, %4 \n" /* -br- ...x */ " sub r12, r12, r9 \n" /* g--g ..x. */ " rotlwi r9, r9, 16 \n" /* r--b ...x */ " andis. r11, r11, 0xFF \n" /* -r-- .x.. */ " or r12, r12, r11 \n" /* gr-g ..x. */ " andi. r11, r9, 0xFF \n" /* ---b .x.. */ " or r10, r10, r11 \n" /* bgrb x... */ " stwu r10, 4(%0) \n" " lwzu r10, 4(%1) \n" /* brgb x... */ " rotlwi r10, r10, 16 \n" /* gbbr x... */ " and r11, r10, %3 \n" /* -b-r .x.. */ " sub r10, r10, r11 \n" /* g-b- x... */ " andis. r9, r9, 0xFF00 \n" /* r--- ...x */ " or r11, r11, r9 \n" /* rb-r .x.. */ " andi. r9, r10, 0xFF00 \n" /* --b- ...x */ " or r12, r12, r9 \n" /* grbg ..x. */ " stwu r12, 4(%0) \n" " andis. r10, r10, 0xFF00 \n" /* g--- x... */ " rotlwi r10, r10, 16 \n" /* --g- x... */ " or r11, r11, r10 \n" /* rbgr .x.. */ " stwu r11, 4(%0) \n" " bdnz 1b \n" : "+b" (dest), "+b" (src) : "b" (n), "b" (0x00FF00FF), "b" (0x00FFFF00) : "10", "11", "12", "9", "ctr"); } OIL_DEFINE_IMPL_ASM (rgb2bgr_ppc, rgb2bgr); #ifdef HAVE_UNALIGNED_ACCESS /* This doesn't work on ppc64. */ static void rgb2bgr_ppc2 (uint8_t *dest, uint8_t* src, int n) { asm volatile ( " mtctr %2 \n" "1: lswi r10, %1, 3 \n" " addi %1, %1, 3 \n" " andis. r11, r10, 0xFF \n" " rotlwi r10, r10, 16 \n" " or r10, r10, r11 \n" " stswi r10, %0, 3 \n" " addi %0, %0, 3 \n" " bdnz 1b \n" : "+b" (dest), "+b" (src) : "b" (n) : "10", "11", "ctr"); } OIL_DEFINE_IMPL_ASM (rgb2bgr_ppc2, rgb2bgr); #endif static void rgb2bgr_ppc3 (uint8_t *dest, uint8_t* src, int n) { dest--; asm volatile ( " mtctr %2 \n" "1: lbz r10, 2(%1) \n" " stbu r10, 1(%0) \n" " lbz r10, 1(%1) \n" " stbu r10, 1(%0) \n" " lbz r10, 0(%1) \n" " stbu r10, 1(%0) \n" " addi %1, %1, 3 \n" " bdnz 1b \n" : "+b" (dest), "+b" (src) : "b" (n) : "10", "ctr"); } OIL_DEFINE_IMPL_ASM (rgb2bgr_ppc3, rgb2bgr); static void rgb2bgr_ppc4 (uint8_t *dest, uint8_t* src, int n) { dest--; src--; asm volatile ( " mtctr %2 \n" "1: lbzu r10, 1(%1) \n" " lbzu r11, 1(%1) \n" " lbzu r12, 1(%1) \n" " stbu r12, 1(%0) \n" " stbu r11, 1(%0) \n" " stbu r10, 1(%0) \n" " bdnz 1b \n" : "+b" (dest), "+b" (src) : "b" (n) : "10", "11", "12", "ctr"); } OIL_DEFINE_IMPL_ASM (rgb2bgr_ppc4, rgb2bgr); liboil-0.3.17/liboil/powerpc/sad8x8.c0000644000175000017500000001107010717203073014210 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #if 0 static void sad8x8_s16_a16_altivec (uint32_t *dest, int16_t *src1, int16_t *src2, int s1str, int s2str) { static uint32_t x[4] __attribute__ ((__aligned__ (16))); sl_altivec_load8_0(src1, s1str); sl_altivec_load8_8(src2, s2str); __asm__ __volatile__( "\n" "\tvspltisw 19, 0\n" "\tvspltisw 22, 0\n" "\tvminsh 16, 0, 8\n" "\tvmaxsh 17, 0, 8\n" "\tvsubuhm 18, 17, 16\n" "\tvmrghh 20, 19, 18\n" "\tvmrglh 21, 19, 18\n" "\tvsumsws 22, 20, 22\n" "\tvsumsws 22, 21, 22\n" "\tvminsh 16, 1, 9\n" "\tvmaxsh 17, 1, 9\n" "\tvsubuhm 18, 17, 16\n" "\tvmrghh 20, 19, 18\n" "\tvmrglh 21, 19, 18\n" "\tvsumsws 22, 20, 22\n" "\tvsumsws 22, 21, 22\n" "\tvminsh 16, 2, 10\n" "\tvmaxsh 17, 2, 10\n" "\tvsubuhm 18, 17, 16\n" "\tvmrghh 20, 19, 18\n" "\tvmrglh 21, 19, 18\n" "\tvsumsws 22, 20, 22\n" "\tvsumsws 22, 21, 22\n" "\tvminsh 16, 3, 11\n" "\tvmaxsh 17, 3, 11\n" "\tvsubuhm 18, 17, 16\n" "\tvmrghh 20, 19, 18\n" "\tvmrglh 21, 19, 18\n" "\tvsumsws 22, 20, 22\n" "\tvsumsws 22, 21, 22\n" "\tvminsh 16, 4, 12\n" "\tvmaxsh 17, 4, 12\n" "\tvsubuhm 18, 17, 16\n" "\tvmrghh 20, 19, 18\n" "\tvmrglh 21, 19, 18\n" "\tvsumsws 22, 20, 22\n" "\tvsumsws 22, 21, 22\n" "\tvminsh 16, 5, 13\n" "\tvmaxsh 17, 5, 13\n" "\tvsubuhm 18, 17, 16\n" "\tvmrghh 20, 19, 18\n" "\tvmrglh 21, 19, 18\n" "\tvsumsws 22, 20, 22\n" "\tvsumsws 22, 21, 22\n" "\tvminsh 16, 6, 14\n" "\tvmaxsh 17, 6, 14\n" "\tvsubuhm 18, 17, 16\n" "\tvmrghh 20, 19, 18\n" "\tvmrglh 21, 19, 18\n" "\tvsumsws 22, 20, 22\n" "\tvsumsws 22, 21, 22\n" "\tvminsh 16, 7, 15\n" "\tvmaxsh 17, 7, 15\n" "\tvsubuhm 18, 17, 16\n" "\tvmrghh 20, 19, 18\n" "\tvmrglh 21, 19, 18\n" "\tvsumsws 22, 20, 22\n" "\tvsumsws 22, 21, 22\n" "\tli 0, 0\n" "\tstvx 22, %0, 0\n" : : "r" (x) ); *dest = x[3]; } static void sad8x8_s16_l15_a16_altivec(uint32_t *dest, int16_t *src1, int16_t *src2, int s1str, int s2str) { static uint32_t x[4] __attribute__ ((__aligned__ (16))); sl_altivec_load8_0(src1, s1str); sl_altivec_load8_8(src2, s2str); __asm__ __volatile__( "\n" "\tvspltisw 19, 0\n" "\tvspltisw 22, 0\n" "\tvminsh 16, 0, 8\n" "\tvmaxsh 17, 0, 8\n" "\tvsubuhm 18, 17, 16\n" "\tvsum4shs 22, 18, 22\n" "\tvminsh 16, 1, 9\n" "\tvmaxsh 17, 1, 9\n" "\tvsubuhm 18, 17, 16\n" "\tvsum4shs 22, 18, 22\n" "\tvminsh 16, 2, 10\n" "\tvmaxsh 17, 2, 10\n" "\tvsubuhm 18, 17, 16\n" "\tvsum4shs 22, 18, 22\n" "\tvminsh 16, 3, 11\n" "\tvmaxsh 17, 3, 11\n" "\tvsubuhm 18, 17, 16\n" "\tvsum4shs 22, 18, 22\n" "\tvminsh 16, 4, 12\n" "\tvmaxsh 17, 4, 12\n" "\tvsubuhm 18, 17, 16\n" "\tvsum4shs 22, 18, 22\n" "\tvminsh 16, 5, 13\n" "\tvmaxsh 17, 5, 13\n" "\tvsubuhm 18, 17, 16\n" "\tvsum4shs 22, 18, 22\n" "\tvminsh 16, 6, 14\n" "\tvmaxsh 17, 6, 14\n" "\tvsubuhm 18, 17, 16\n" "\tvsum4shs 22, 18, 22\n" "\tvminsh 16, 7, 15\n" "\tvmaxsh 17, 7, 15\n" "\tvsubuhm 18, 17, 16\n" "\tvsum4shs 22, 18, 22\n" "\tvsumsws 22, 22, 19\n" "\tli 0, 0\n" "\tstvx 22, %0, 0\n" : : "r" (x) ); *dest = x[3]; } #endif liboil-0.3.17/liboil/powerpc/md5.c0000644000175000017500000004366610717203073013576 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #define F1(x, y, z) (z ^ (x & (y ^ z))) #define F2(x, y, z) F1(z, x, y) #define F3(x, y, z) (x ^ y ^ z) #define F4(x, y, z) (y ^ (x | ~z)) #define MD5STEP(f,w,x,y,z,in,s) \ (w += f(x,y,z) + in, w = (w<>(32-s)) + x) OIL_DECLARE_CLASS (md5); #ifdef ENABLE_BROKEN_IMPLS static void md5_asm1 (uint32_t *state, uint32_t *src) { uint32_t a,b,c,d; a = state[0]; b = state[1]; c = state[2]; d = state[3]; asm ( #define a "%0" #define b "%1" #define c "%2" #define d "%3" #define STEP1(r1,r2,r3,r4,offset,constant,rotate) \ " and r22, " r3 ", " r2 "\n" \ " andc r21, " r4 ", " r2 "\n" \ " or r22, r22, r21\n" \ " add " r1 ", " r1 ", r22\n" \ " li r20, " #offset "*4\n " \ " lwbrx r20, r20, %4\n" \ " add " r1 ", " r1 ", r20\n" \ " addis " r1 ", " r1 ", " #constant ">>16 + (" #constant ">>15)&1\n" \ " addi " r1 ", " r1 ", (" #constant "&0x7fff) - (" #constant"&0x8000)\n" \ " rlwinm " r1 ", " r1 ", " #rotate ", 0, 31\n" \ " add " r1 ", " r1 ", " r2 "\n" STEP1 (a, b, c, d, 0, 0xd76aa478, 7) STEP1 (d, a, b, c, 1, 0xe8c7b756, 12) STEP1 (c, d, a, b, 2, 0x242070db, 17) STEP1 (b, c, d, a, 3, 0xc1bdceee, 22) STEP1 (a, b, c, d, 4, 0xf57c0faf, 7) STEP1 (d, a, b, c, 5, 0x4787c62a, 12) STEP1 (c, d, a, b, 6, 0xa8304613, 17) STEP1 (b, c, d, a, 7, 0xfd469501, 22) STEP1 (a, b, c, d, 8, 0x698098d8, 7) STEP1 (d, a, b, c, 9, 0x8b44f7af, 12) STEP1 (c, d, a, b, 10, 0xffff5bb1, 17) STEP1 (b, c, d, a, 11, 0x895cd7be, 22) STEP1 (a, b, c, d, 12, 0x6b901122, 7) STEP1 (d, a, b, c, 13, 0xfd987193, 12) STEP1 (c, d, a, b, 14, 0xa679438e, 17) STEP1 (b, c, d, a, 15, 0x49b40821, 22) #undef STEP1 #define STEP2(r1,r2,r3,r4,offset,constant,rotate) \ " and r22, " r2 ", " r4 "\n" \ " andc r21, " r3 ", " r4 "\n" \ " or r22, r22, r21\n" \ " add " r1 ", " r1 ", r22\n" \ " li r20, " #offset "*4\n " \ " lwbrx r20, r20, %4\n" \ " add " r1 ", " r1 ", r20\n" \ " addis " r1 ", " r1 ", " #constant ">>16 + (" #constant ">>15)&1\n" \ " addi " r1 ", " r1 ", (" #constant "&0x7fff) - (" #constant"&0x8000)\n" \ " rlwinm " r1 ", " r1 ", " #rotate ", 0, 31\n" \ " add " r1 ", " r1 ", " r2 "\n" STEP2(a, b, c, d, 1, 0xf61e2562, 5) STEP2(d, a, b, c, 6, 0xc040b340, 9) STEP2(c, d, a, b, 11, 0x265e5a51, 14) STEP2(b, c, d, a, 0, 0xe9b6c7aa, 20) STEP2(a, b, c, d, 5, 0xd62f105d, 5) STEP2(d, a, b, c, 10, 0x02441453, 9) STEP2(c, d, a, b, 15, 0xd8a1e681, 14) STEP2(b, c, d, a, 4, 0xe7d3fbc8, 20) STEP2(a, b, c, d, 9, 0x21e1cde6, 5) STEP2(d, a, b, c, 14, 0xc33707d6, 9) STEP2(c, d, a, b, 3, 0xf4d50d87, 14) STEP2(b, c, d, a, 8, 0x455a14ed, 20) STEP2(a, b, c, d, 13, 0xa9e3e905, 5) STEP2(d, a, b, c, 2, 0xfcefa3f8, 9) STEP2(c, d, a, b, 7, 0x676f02d9, 14) STEP2(b, c, d, a, 12, 0x8d2a4c8a, 20) #undef STEP2 #define STEP3(r1,r2,r3,r4,offset,constant,rotate) \ " xor r22, " r2 ", " r3 "\n" \ " xor r22, r22, " r4 "\n" \ " add " r1 ", " r1 ", r22\n" \ " li r20, " #offset "*4\n " \ " lwbrx r20, r20, %4\n" \ " add " r1 ", " r1 ", r20\n" \ " addis " r1 ", " r1 ", " #constant ">>16 + (" #constant ">>15)&1\n" \ " addi " r1 ", " r1 ", (" #constant "&0x7fff) - (" #constant"&0x8000)\n" \ " rlwinm " r1 ", " r1 ", " #rotate ", 0, 31\n" \ " add " r1 ", " r1 ", " r2 "\n" STEP3 (a, b, c, d, 5, 0xfffa3942, 4) STEP3 (d, a, b, c, 8, 0x8771f681, 11) STEP3 (c, d, a, b, 11, 0x6d9d6122, 16) STEP3 (b, c, d, a, 14, 0xfde5380c, 23) STEP3 (a, b, c, d, 1, 0xa4beea44, 4) STEP3 (d, a, b, c, 4, 0x4bdecfa9, 11) STEP3 (c, d, a, b, 7, 0xf6bb4b60, 16) STEP3 (b, c, d, a, 10, 0xbebfbc70, 23) STEP3 (a, b, c, d, 13, 0x289b7ec6, 4) STEP3 (d, a, b, c, 0, 0xeaa127fa, 11) STEP3 (c, d, a, b, 3, 0xd4ef3085, 16) STEP3 (b, c, d, a, 6, 0x04881d05, 23) STEP3 (a, b, c, d, 9, 0xd9d4d039, 4) STEP3 (d, a, b, c, 12, 0xe6db99e5, 11) STEP3 (c, d, a, b, 15, 0x1fa27cf8, 16) STEP3 (b, c, d, a, 2, 0xc4ac5665, 23) #undef STEP3 #define STEP4(r1,r2,r3,r4,offset,constant,rotate) \ " orc r22, " r2 ", " r4 "\n" \ " xor r22, r22, " r3 "\n" \ " add " r1 ", " r1 ", r22\n" \ " li r20, " #offset "*4\n " \ " lwbrx r20, r20, %4\n" \ " add " r1 ", " r1 ", r20\n" \ " addis " r1 ", " r1 ", " #constant ">>16 + (" #constant ">>15)&1\n" \ " addi " r1 ", " r1 ", (" #constant "&0x7fff) - (" #constant"&0x8000)\n" \ " rlwinm " r1 ", " r1 ", " #rotate ", 0, 31\n" \ " add " r1 ", " r1 ", " r2 "\n" STEP4 (a, b, c, d, 0, 0xf4292244, 6) STEP4 (d, a, b, c, 7, 0x432aff97, 10) STEP4 (c, d, a, b, 14, 0xab9423a7, 15) STEP4 (b, c, d, a, 5, 0xfc93a039, 21) STEP4 (a, b, c, d, 12, 0x655b59c3, 6) STEP4 (d, a, b, c, 3, 0x8f0ccc92, 10) STEP4 (c, d, a, b, 10, 0xffeff47d, 15) STEP4 (b, c, d, a, 1, 0x85845dd1, 21) STEP4 (a, b, c, d, 8, 0x6fa87e4f, 6) STEP4 (d, a, b, c, 15, 0xfe2ce6e0, 10) STEP4 (c, d, a, b, 6, 0xa3014314, 15) STEP4 (b, c, d, a, 13, 0x4e0811a1, 21) STEP4 (a, b, c, d, 4, 0xf7537e82, 6) STEP4 (d, a, b, c, 11, 0xbd3af235, 10) STEP4 (c, d, a, b, 2, 0x2ad7d2bb, 15) STEP4 (b, c, d, a, 9, 0xeb86d391, 21) #undef STEP4 #undef a #undef b #undef c #undef d : "+b" (a), "+b" (b), "+b" (c), "+b" (d) : "b" (src) : "20", "21", "22"); state[0] += a; state[1] += b; state[2] += c; state[3] += d; } OIL_DEFINE_IMPL_ASM (md5_asm1, md5); static void md5_asm2 (uint32_t *state, uint32_t *src) { uint32_t a,b,c,d; a = state[0]; b = state[1]; c = state[2]; d = state[3]; asm ( #define a "%0" #define b "%1" #define c "%2" #define d "%3" #define STEP1(r1,r2,r3,r4,offset,constant,rotate) \ " li r20, " #offset "*4\n " \ " and r22, " r3 ", " r2 "\n" \ " andc r21, " r4 ", " r2 "\n" \ " or r22, r22, r21\n" \ " lwbrx r20, r20, %4\n" \ " add " r1 ", " r1 ", r22\n" \ " add " r1 ", " r1 ", r20\n" \ " addis " r1 ", " r1 ", " #constant ">>16 + (" #constant ">>15)&1\n" \ " addi " r1 ", " r1 ", (" #constant "&0x7fff) - (" #constant"&0x8000)\n" \ " rlwinm " r1 ", " r1 ", " #rotate ", 0, 31\n" \ " add " r1 ", " r1 ", " r2 "\n" STEP1 (a, b, c, d, 0, 0xd76aa478, 7) STEP1 (d, a, b, c, 1, 0xe8c7b756, 12) STEP1 (c, d, a, b, 2, 0x242070db, 17) STEP1 (b, c, d, a, 3, 0xc1bdceee, 22) STEP1 (a, b, c, d, 4, 0xf57c0faf, 7) STEP1 (d, a, b, c, 5, 0x4787c62a, 12) STEP1 (c, d, a, b, 6, 0xa8304613, 17) STEP1 (b, c, d, a, 7, 0xfd469501, 22) STEP1 (a, b, c, d, 8, 0x698098d8, 7) STEP1 (d, a, b, c, 9, 0x8b44f7af, 12) STEP1 (c, d, a, b, 10, 0xffff5bb1, 17) STEP1 (b, c, d, a, 11, 0x895cd7be, 22) STEP1 (a, b, c, d, 12, 0x6b901122, 7) STEP1 (d, a, b, c, 13, 0xfd987193, 12) STEP1 (c, d, a, b, 14, 0xa679438e, 17) STEP1 (b, c, d, a, 15, 0x49b40821, 22) #undef STEP1 #define STEP2(r1,r2,r3,r4,offset,constant,rotate) \ " li r20, " #offset "*4\n " \ " and r22, " r2 ", " r4 "\n" \ " andc r21, " r3 ", " r4 "\n" \ " or r22, r22, r21\n" \ " lwbrx r20, r20, %4\n" \ " add " r1 ", " r1 ", r22\n" \ " add " r1 ", " r1 ", r20\n" \ " addis " r1 ", " r1 ", " #constant ">>16 + (" #constant ">>15)&1\n" \ " addi " r1 ", " r1 ", (" #constant "&0x7fff) - (" #constant"&0x8000)\n" \ " rlwinm " r1 ", " r1 ", " #rotate ", 0, 31\n" \ " add " r1 ", " r1 ", " r2 "\n" STEP2(a, b, c, d, 1, 0xf61e2562, 5) STEP2(d, a, b, c, 6, 0xc040b340, 9) STEP2(c, d, a, b, 11, 0x265e5a51, 14) STEP2(b, c, d, a, 0, 0xe9b6c7aa, 20) STEP2(a, b, c, d, 5, 0xd62f105d, 5) STEP2(d, a, b, c, 10, 0x02441453, 9) STEP2(c, d, a, b, 15, 0xd8a1e681, 14) STEP2(b, c, d, a, 4, 0xe7d3fbc8, 20) STEP2(a, b, c, d, 9, 0x21e1cde6, 5) STEP2(d, a, b, c, 14, 0xc33707d6, 9) STEP2(c, d, a, b, 3, 0xf4d50d87, 14) STEP2(b, c, d, a, 8, 0x455a14ed, 20) STEP2(a, b, c, d, 13, 0xa9e3e905, 5) STEP2(d, a, b, c, 2, 0xfcefa3f8, 9) STEP2(c, d, a, b, 7, 0x676f02d9, 14) STEP2(b, c, d, a, 12, 0x8d2a4c8a, 20) #undef STEP2 #define STEP3(r1,r2,r3,r4,offset,constant,rotate) \ " li r20, " #offset "*4\n " \ " xor r22, " r2 ", " r3 "\n" \ " xor r22, r22, " r4 "\n" \ " lwbrx r20, r20, %4\n" \ " add " r1 ", " r1 ", r22\n" \ " add " r1 ", " r1 ", r20\n" \ " addis " r1 ", " r1 ", " #constant ">>16 + (" #constant ">>15)&1\n" \ " addi " r1 ", " r1 ", (" #constant "&0x7fff) - (" #constant"&0x8000)\n" \ " rlwinm " r1 ", " r1 ", " #rotate ", 0, 31\n" \ " add " r1 ", " r1 ", " r2 "\n" STEP3 (a, b, c, d, 5, 0xfffa3942, 4) STEP3 (d, a, b, c, 8, 0x8771f681, 11) STEP3 (c, d, a, b, 11, 0x6d9d6122, 16) STEP3 (b, c, d, a, 14, 0xfde5380c, 23) STEP3 (a, b, c, d, 1, 0xa4beea44, 4) STEP3 (d, a, b, c, 4, 0x4bdecfa9, 11) STEP3 (c, d, a, b, 7, 0xf6bb4b60, 16) STEP3 (b, c, d, a, 10, 0xbebfbc70, 23) STEP3 (a, b, c, d, 13, 0x289b7ec6, 4) STEP3 (d, a, b, c, 0, 0xeaa127fa, 11) STEP3 (c, d, a, b, 3, 0xd4ef3085, 16) STEP3 (b, c, d, a, 6, 0x04881d05, 23) STEP3 (a, b, c, d, 9, 0xd9d4d039, 4) STEP3 (d, a, b, c, 12, 0xe6db99e5, 11) STEP3 (c, d, a, b, 15, 0x1fa27cf8, 16) STEP3 (b, c, d, a, 2, 0xc4ac5665, 23) #undef STEP3 #define STEP4(r1,r2,r3,r4,offset,constant,rotate) \ " li r20, " #offset "*4\n " \ " orc r22, " r2 ", " r4 "\n" \ " xor r22, r22, " r3 "\n" \ " lwbrx r20, r20, %4\n" \ " add " r1 ", " r1 ", r22\n" \ " add " r1 ", " r1 ", r20\n" \ " addis " r1 ", " r1 ", " #constant ">>16 + (" #constant ">>15)&1\n" \ " addi " r1 ", " r1 ", (" #constant "&0x7fff) - (" #constant"&0x8000)\n" \ " rlwinm " r1 ", " r1 ", " #rotate ", 0, 31\n" \ " add " r1 ", " r1 ", " r2 "\n" STEP4 (a, b, c, d, 0, 0xf4292244, 6) STEP4 (d, a, b, c, 7, 0x432aff97, 10) STEP4 (c, d, a, b, 14, 0xab9423a7, 15) STEP4 (b, c, d, a, 5, 0xfc93a039, 21) STEP4 (a, b, c, d, 12, 0x655b59c3, 6) STEP4 (d, a, b, c, 3, 0x8f0ccc92, 10) STEP4 (c, d, a, b, 10, 0xffeff47d, 15) STEP4 (b, c, d, a, 1, 0x85845dd1, 21) STEP4 (a, b, c, d, 8, 0x6fa87e4f, 6) STEP4 (d, a, b, c, 15, 0xfe2ce6e0, 10) STEP4 (c, d, a, b, 6, 0xa3014314, 15) STEP4 (b, c, d, a, 13, 0x4e0811a1, 21) STEP4 (a, b, c, d, 4, 0xf7537e82, 6) STEP4 (d, a, b, c, 11, 0xbd3af235, 10) STEP4 (c, d, a, b, 2, 0x2ad7d2bb, 15) STEP4 (b, c, d, a, 9, 0xeb86d391, 21) #undef STEP4 #undef a #undef b #undef c #undef d : "+b" (a), "+b" (b), "+b" (c), "+b" (d) : "b" (src) : "20", "21", "22"); state[0] += a; state[1] += b; state[2] += c; state[3] += d; } OIL_DEFINE_IMPL_ASM (md5_asm2, md5); static void md5_asm3 (uint32_t *state, uint32_t *src) { uint32_t a,b,c,d; a = state[0]; b = state[1]; c = state[2]; d = state[3]; asm ( #define a "%0" #define b "%1" #define c "%2" #define d "%3" #define STEP1(r1,r2,r3,r4,offset,constant,rotate) \ " li r20, " #offset "*4\n " \ " and r22, " r3 ", " r2 "\n" \ " andc r21, " r4 ", " r2 "\n" \ " or r22, r22, r21\n" \ " lwbrx r20, r20, %4\n" \ " add " r1 ", " r1 ", r22\n" \ " lis r22, " #constant ">>16 + (" #constant ">>15)&1\n" \ " add " r1 ", " r1 ", r20\n" \ " addi r22, r22, (" #constant "&0x7fff) - (" #constant"&0x8000)\n" \ " add " r1 ", " r1 ", r22\n" \ " rlwinm " r1 ", " r1 ", " #rotate ", 0, 31\n" \ " add " r1 ", " r1 ", " r2 "\n" STEP1 (a, b, c, d, 0, 0xd76aa478, 7) STEP1 (d, a, b, c, 1, 0xe8c7b756, 12) STEP1 (c, d, a, b, 2, 0x242070db, 17) STEP1 (b, c, d, a, 3, 0xc1bdceee, 22) STEP1 (a, b, c, d, 4, 0xf57c0faf, 7) STEP1 (d, a, b, c, 5, 0x4787c62a, 12) STEP1 (c, d, a, b, 6, 0xa8304613, 17) STEP1 (b, c, d, a, 7, 0xfd469501, 22) STEP1 (a, b, c, d, 8, 0x698098d8, 7) STEP1 (d, a, b, c, 9, 0x8b44f7af, 12) STEP1 (c, d, a, b, 10, 0xffff5bb1, 17) STEP1 (b, c, d, a, 11, 0x895cd7be, 22) STEP1 (a, b, c, d, 12, 0x6b901122, 7) STEP1 (d, a, b, c, 13, 0xfd987193, 12) STEP1 (c, d, a, b, 14, 0xa679438e, 17) STEP1 (b, c, d, a, 15, 0x49b40821, 22) #undef STEP1 #define STEP2(r1,r2,r3,r4,offset,constant,rotate) \ " li r20, " #offset "*4\n " \ " and r22, " r2 ", " r4 "\n" \ " andc r21, " r3 ", " r4 "\n" \ " or r22, r22, r21\n" \ " lwbrx r20, r20, %4\n" \ " add " r1 ", " r1 ", r22\n" \ " lis r22, " #constant ">>16 + (" #constant ">>15)&1\n" \ " add " r1 ", " r1 ", r20\n" \ " addi r22, r22, (" #constant "&0x7fff) - (" #constant"&0x8000)\n" \ " add " r1 ", " r1 ", r22\n" \ " rlwinm " r1 ", " r1 ", " #rotate ", 0, 31\n" \ " add " r1 ", " r1 ", " r2 "\n" STEP2(a, b, c, d, 1, 0xf61e2562, 5) STEP2(d, a, b, c, 6, 0xc040b340, 9) STEP2(c, d, a, b, 11, 0x265e5a51, 14) STEP2(b, c, d, a, 0, 0xe9b6c7aa, 20) STEP2(a, b, c, d, 5, 0xd62f105d, 5) STEP2(d, a, b, c, 10, 0x02441453, 9) STEP2(c, d, a, b, 15, 0xd8a1e681, 14) STEP2(b, c, d, a, 4, 0xe7d3fbc8, 20) STEP2(a, b, c, d, 9, 0x21e1cde6, 5) STEP2(d, a, b, c, 14, 0xc33707d6, 9) STEP2(c, d, a, b, 3, 0xf4d50d87, 14) STEP2(b, c, d, a, 8, 0x455a14ed, 20) STEP2(a, b, c, d, 13, 0xa9e3e905, 5) STEP2(d, a, b, c, 2, 0xfcefa3f8, 9) STEP2(c, d, a, b, 7, 0x676f02d9, 14) STEP2(b, c, d, a, 12, 0x8d2a4c8a, 20) #undef STEP2 #define STEP3(r1,r2,r3,r4,offset,constant,rotate) \ " li r20, " #offset "*4\n " \ " xor r22, " r2 ", " r3 "\n" \ " lwbrx r20, r20, %4\n" \ " xor r22, r22, " r4 "\n" \ " add " r1 ", " r1 ", r22\n" \ " lis r21, " #constant ">>16 + (" #constant ">>15)&1\n" \ " add " r1 ", " r1 ", r20\n" \ " addi r21, r21, (" #constant "&0x7fff) - (" #constant"&0x8000)\n" \ " add " r1 ", " r1 ", r21\n" \ " rlwinm " r1 ", " r1 ", " #rotate ", 0, 31\n" \ " add " r1 ", " r1 ", " r2 "\n" STEP3 (a, b, c, d, 5, 0xfffa3942, 4) STEP3 (d, a, b, c, 8, 0x8771f681, 11) STEP3 (c, d, a, b, 11, 0x6d9d6122, 16) STEP3 (b, c, d, a, 14, 0xfde5380c, 23) STEP3 (a, b, c, d, 1, 0xa4beea44, 4) STEP3 (d, a, b, c, 4, 0x4bdecfa9, 11) STEP3 (c, d, a, b, 7, 0xf6bb4b60, 16) STEP3 (b, c, d, a, 10, 0xbebfbc70, 23) STEP3 (a, b, c, d, 13, 0x289b7ec6, 4) STEP3 (d, a, b, c, 0, 0xeaa127fa, 11) STEP3 (c, d, a, b, 3, 0xd4ef3085, 16) STEP3 (b, c, d, a, 6, 0x04881d05, 23) STEP3 (a, b, c, d, 9, 0xd9d4d039, 4) STEP3 (d, a, b, c, 12, 0xe6db99e5, 11) STEP3 (c, d, a, b, 15, 0x1fa27cf8, 16) STEP3 (b, c, d, a, 2, 0xc4ac5665, 23) #undef STEP3 #define STEP4(r1,r2,r3,r4,offset,constant,rotate) \ " li r20, " #offset "*4\n " \ " orc r22, " r2 ", " r4 "\n" \ " lwbrx r20, r20, %4\n" \ " xor r22, r22, " r3 "\n" \ " add " r1 ", " r1 ", r22\n" \ " lis r21, " #constant ">>16 + (" #constant ">>15)&1\n" \ " add " r1 ", " r1 ", r20\n" \ " addi r21, r21, (" #constant "&0x7fff) - (" #constant"&0x8000)\n" \ " add " r1 ", " r1 ", r21\n" \ " rlwinm " r1 ", " r1 ", " #rotate ", 0, 31\n" \ " add " r1 ", " r1 ", " r2 "\n" STEP4 (a, b, c, d, 0, 0xf4292244, 6) STEP4 (d, a, b, c, 7, 0x432aff97, 10) STEP4 (c, d, a, b, 14, 0xab9423a7, 15) STEP4 (b, c, d, a, 5, 0xfc93a039, 21) STEP4 (a, b, c, d, 12, 0x655b59c3, 6) STEP4 (d, a, b, c, 3, 0x8f0ccc92, 10) STEP4 (c, d, a, b, 10, 0xffeff47d, 15) STEP4 (b, c, d, a, 1, 0x85845dd1, 21) STEP4 (a, b, c, d, 8, 0x6fa87e4f, 6) STEP4 (d, a, b, c, 15, 0xfe2ce6e0, 10) STEP4 (c, d, a, b, 6, 0xa3014314, 15) STEP4 (b, c, d, a, 13, 0x4e0811a1, 21) STEP4 (a, b, c, d, 4, 0xf7537e82, 6) STEP4 (d, a, b, c, 11, 0xbd3af235, 10) STEP4 (c, d, a, b, 2, 0x2ad7d2bb, 15) STEP4 (b, c, d, a, 9, 0xeb86d391, 21) #undef STEP4 #undef a #undef b #undef c #undef d : "+b" (a), "+b" (b), "+b" (c), "+b" (d) : "b" (src) : "20", "21", "22"); state[0] += a; state[1] += b; state[2] += c; state[3] += d; } OIL_DEFINE_IMPL_ASM (md5_asm3, md5); #endif liboil-0.3.17/liboil/powerpc/resample.c0000644000175000017500000000576110717203073014713 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include OIL_DECLARE_CLASS (merge_linear_argb); #define ALIGN_UP(ptr,boundary) ((void *)(((unsigned long)ptr + boundary-1) & (~(boundary-1)))) #if 0 static uint16_t consts[8] __attribute__ ((__aligned__ (16))) = { 256, 256, 256, 256, 256, 256, 256, 256 }; #endif static void merge_linear_argb_powerpc (uint32_t *dest, uint32_t *src1, uint32_t *src2, uint32_t *src3, int n) { uint32_t tmp[48]; uint32_t *atmp; int i; atmp = ALIGN_UP(tmp,16); if (src3[0] == 0) { for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #ifdef ENABLE_BROKEN_IMPLS static void mix_u8_a16_altivec(uint8_t *dest, uint8_t *src1, uint8_t *src2, uint8_t *scale, int n) { static const uint8_t permute[] __attribute__ ((__aligned__ (16))) = { 0, 2, 4, 6, 8,10,12,14,16,18,20,22,24,26,28,30 }; const uint8_t *perm = permute; int i; for(i=(n&~0xf);i>8; } __asm__ __volatile__("\n" " li r12, 0 \n" " vxor v3, v3, v3 \n" " lvx v12, %4, r12 \n" " mtctr %5 \n" "1: lvx v0, %1, r12 \n" " lvx v1, %2, r12 \n" " lvx v2, %3, r12 \n" " vmrghb v4, v3, v0 \n" " vmrghb v5, v3, v1 \n" " vmrghb v6, v3, v2 \n" " vmrghb v7, v1, v3 \n" " vsubuhs v8, v7, v5 \n" " vsubshs v9, v4, v5 \n" " vmladduhm v10, v9, v6, v8 \n" " vmrglb v4, v3, v0 \n" " vmrglb v5, v3, v1 \n" " vmrglb v6, v3, v2 \n" " vmrglb v7, v1, v3 \n" " vsubuhs v8, v7, v5 \n" " vsubshs v9, v4, v5 \n" " vmladduhm v11, v9, v6, v8 \n" " vperm v0, v10, v11, v12 \n" " stvx v0, %0, r12 \n" " addi r12, r12, 16 \n" " bdnz 1b \n" : "+b" (dest), "+b" (src1), "+b" (src2), "+b" (scale), "+b" (perm) : "r" (n/16) : "12", "ctr"); } OIL_DEFINE_IMPL_FULL (mix_u8_a16_altivec, mix_u8, OIL_IMPL_FLAG_ALTIVEC); #endif liboil-0.3.17/liboil/powerpc/abs.c0000644000175000017500000000432110717203073013637 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #define ABS(x) ((x)>0 ? (x) : -(x)) #ifdef ENABLE_BROKEN_IMPLS static void abs_u16_s16_a16_altivec (uint16_t * dest, int dstr, int16_t * src, int sstr, int n) { int i; for (i = n & ~0x7; i < n; i++) { *dest = ABS (*src); OIL_INCREMENT (dest, dstr); OIL_INCREMENT (src, sstr); } n /= 8; __asm__ __volatile__ ("\n" " li r10, 0 \n" " vxor v2, v2, v2 \n" " mtctr %2 \n" "1: lvx v0,r10,%1 \n" " vsubshs v1, v2, v0 \n" " vmaxsh v1, v1, v0 \n" " stvx v1,r10,%0 \n" " addi r10, r10, 16 \n" " bdnz 1b \n":"+b" (dest), "+b" (src), "+b" (n) ::"10", "ctr"); } OIL_DEFINE_IMPL_FULL (abs_u16_s16_a16_altivec, abs_u16_s16, OIL_IMPL_FLAG_ALTIVEC); #endif liboil-0.3.17/liboil/powerpc/zigzag8x8.c0000644000175000017500000001452410717203073014743 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include /* Derivation: * zigzag_order in zigzag8z8_c.c is defined in terms of where the * elements are moving from. We rewrite the matrix in terms of * where the elements are moving _to_ (which is the same as * unzigzag_order): * * 0, 1, 5, 6, 14, 15, 27, 28, * 2, 4, 7, 13, 16, 26, 29, 42, * 3, 8, 12, 17, 25, 30, 41, 43, * 9, 11, 18, 24, 31, 40, 44, 53, * 10, 19, 23, 32, 39, 45, 52, 54, * 20, 22, 33, 38, 46, 51, 55, 60, * 21, 34, 37, 47, 50, 56, 59, 61, * 35, 36, 48, 49, 57, 58, 62, 63, * * If we shift each successive row to the right by one place, we * get: * * 0, 1, 5, 6, 14, 15, 27, 28, * 42, 2, 4, 7, 13, 16, 26, 29, * 41, 43, 3, 8, 12, 17, 25, 30, * 40, 44, 53, 9, 11, 18, 24, 31, * 39, 45, 52, 54, 10, 19, 23, 32, * 38, 46, 51, 55, 60, 20, 22, 33, * 47, 50, 56, 59, 61, 21, 34, 37, * 36, 48, 49, 57, 58, 62, 63, 35, * * And by transposing, * * 0, 42, 41, 40, 39, 38, 47, 36, * 1, 2, 43, 44, 45, 46, 50, 48, * 5, 4, 3, 53, 52, 51, 56, 49, * 6, 7, 8, 9, 54, 55, 59, 57, * 14, 13, 12, 11, 10, 60, 61, 58, * 15, 16, 17, 18, 19, 20, 21, 62, * 27, 26, 25, 24, 23, 22, 34, 63, * 28, 29, 30, 31, 32, 33, 37, 35, * * we see that groups of numbers tend to be collected on the same * line. In fact, aside from a few exceptions, rows on our final * matrix can be created simply by merging 2 rows of the above * matrix. For example, the first line can (almost) be created * by merging lines 2 (called 'a') and 3 ('b') above: * * xx, a0, a1, b2, b1, b0, xx, xx, * * (where 'xx' denotes elements that cannot be created. */ #if 0 /* 00 indicates that the element can't be handled by vperm, and needs * to be fixed up later. */ static const uint8_t mangle[128] __attribute__ ((__aligned__ (16))) = { 00,00, 2, 3, 0, 1,16,17,18,19,20,21,00,00,00,00, /* 1, 2 */ 2, 3, 0, 1,16,17,18,19,20,21,22,23,24,25,00,00, /* 3, 4 */ 8, 9, 6, 7, 4, 5, 2, 3, 0, 1,16,17,18,19,20,21, /* 5, 6 */ 6, 7, 8, 9,10,11,12,13,30,31,28,29,26,27,24,25, /* 6, 7 */ 6, 7, 4, 5, 2, 3, 0, 1,18,19,20,21,22,23,24,25, /* 7, 0 */ 10,11,12,13,14,15,30,31,28,29,26,27,24,25,22,23, /* 0, 1 */ 00,00, 6, 7, 8, 9,10,11,12,13,14,15,30,31,28,29, /* 2, 3 */ 00,00,00,00,10,11,12,13,14,15,30,31,28,29,00,00, /* 4, 5 */ }; static void zigzag8x8_s16_a16_altivec(int16_t *dest, int dstr, int16_t *src, int sstr) { __asm__ __volatile__( "lvx 0, %0, %1\n" "\tadd %0, %0, %3\n" "\tlvx 1, %0, %1\n" "\tadd %0, %0, %3\n" "\tlvx 2, %0, %1\n" "\tadd %0, %0, %3\n" "\tlvx 3, %0, %1\n" "\tadd %0, %0, %3\n" "\tlvx 4, %0, %1\n" "\tadd %0, %0, %3\n" "\tlvx 5, %0, %1\n" "\tadd %0, %0, %3\n" "\tlvx 6, %0, %1\n" "\tadd %0, %0, %3\n" "\tlvx 7, %0, %1\n" "\tadd %0, %0, %3\n" : "+b" (src) : "b" (0), "b" (8), "b" (sstr) ); /* "slide" vectors to right */ __asm__ __volatile__( "vsldoi 0,0,0,0\n" "vsldoi 1,1,1,14\n" "vsldoi 2,2,2,12\n" "vsldoi 3,3,3,10\n" "vsldoi 4,4,4,8\n" "vsldoi 5,5,5,6\n" "vsldoi 6,6,6,4\n" "vsldoi 7,7,7,2\n" ); /* transpose */ __asm__ __volatile__( "vmrghh 8, 0, 4\n" "\tvmrglh 9, 0, 4\n" "\tvmrghh 10, 1, 5\n" "\tvmrglh 11, 1, 5\n" "\tvmrghh 12, 2, 6\n" "\tvmrglh 13, 2, 6\n" "\tvmrghh 14, 3, 7\n" "\tvmrglh 15, 3, 7\n" "\tvmrghh 16, 8, 12\n" "\tvmrglh 17, 8, 12\n" "\tvmrghh 18, 9, 13\n" "\tvmrglh 19, 9, 13\n" "\tvmrghh 20, 10, 14\n" "\tvmrglh 21, 10, 14\n" "\tvmrghh 22, 11, 15\n" "\tvmrglh 23, 11, 15\n" "\tvmrghh 0, 16, 20\n" "\tvmrglh 1, 16, 20\n" "\tvmrghh 2, 17, 21\n" "\tvmrglh 3, 17, 21\n" "\tvmrghh 4, 18, 22\n" "\tvmrglh 5, 18, 22\n" "\tvmrghh 6, 19, 23\n" "\tvmrglh 7, 19, 23\n" ); sl_altivec_load8_8(mangle,16); __asm__ __volatile__( "\n" "\tvperm 16,1,2,8\n" "\tvperm 17,3,4,9\n" "\tvperm 18,5,6,10\n" "\tvperm 19,6,7,11\n" "\tvperm 20,7,0,12\n" "\tvperm 21,0,1,13\n" "\tvperm 22,2,3,14\n" "\tvperm 23,4,5,15\n" ); sl_altivec_store8_16(dest,16); /* fix up the elements that were missed */ block8x8_s16(dest,dstr,0,0) = block8x8_s16(src,sstr,0,0); block8x8_s16(dest,dstr,0,6) = block8x8_s16(src,sstr,3,0); block8x8_s16(dest,dstr,0,7) = block8x8_s16(src,sstr,2,1); block8x8_s16(dest,dstr,1,7) = block8x8_s16(src,sstr,5,0); block8x8_s16(dest,dstr,6,0) = block8x8_s16(src,sstr,2,7); block8x8_s16(dest,dstr,7,0) = block8x8_s16(src,sstr,5,6); block8x8_s16(dest,dstr,7,1) = block8x8_s16(src,sstr,4,7); block8x8_s16(dest,dstr,7,7) = block8x8_s16(src,sstr,7,7); } OIL_DEFINE_IMPL_FULL (zigzag8x8_s16_altivec, zigzag8x8_s16, OIL_FLAG_ALTIVEC); #endif liboil-0.3.17/liboil/powerpc/conv.c0000644000175000017500000002202410717203073014037 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2002,2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #define DEFINE_CLIPCONVERT_POWERPC(dsttype,srctype,minval,maxval,insn1,insn2) \ void clipconv_##dsttype##_##srctype##_powerpc(oil_type_##dsttype *dst, \ int dst_stride, oil_type_##srctype *src, int src_stride, int n) \ { \ double min = (minval); \ double max = (maxval); \ double ftmp; \ \ asm volatile( \ " sub %1,%1,%6 \n" \ " sub %0,%0,%7 \n" \ " mtctr %2 \n" \ insn1 \ " fsub f1,f0,%3 \n" \ " fsel f0,f1,f0,%3 \n" \ " fsub f1,f0,%4 \n" \ " fsel f0,f1,%4,f0 \n" \ " fctiw f1,f0 \n" \ " stfd f1,0(%5) \n" \ insn2 \ " bdnz 1b \n" \ : "+b" (dst), "+b" (src) \ : "b" (n), "f" (min), "f" (max), "b" (&ftmp), "r" (src_stride), \ "r" (dst_stride) \ : "32", "33", "11", "ctr" ); \ } \ OIL_DEFINE_IMPL_ASM(clipconv_##dsttype##_##srctype##_powerpc, \ clipconv_##dsttype##_##srctype); #define LFDUX "1: lfdux f0,%1,%6 \n" #define LFSUX "1: lfsux f0,%1,%6 \n" #define LBZ_STBUX \ " lbz r11,7(%5) \n" \ " stbux r11,%0,%7 \n" #define LHZ_STHUX \ " lhz r11,6(%5) \n" \ " sthux r11,%0,%7 \n" #define LWZ_STWUX \ " lwz r11,4(%5) \n" \ " stwux r11,%0,%7 \n" #ifdef HAVE_GCC_ASM_POWERPC_FPU DEFINE_CLIPCONVERT_POWERPC(s8,f32, -128.0, 127.0, LFSUX, LBZ_STBUX) DEFINE_CLIPCONVERT_POWERPC(u8,f32, 0.0, 255.0, LFSUX, LBZ_STBUX) DEFINE_CLIPCONVERT_POWERPC(s16,f32, -32768.0, 32767.0, LFSUX, LHZ_STHUX) DEFINE_CLIPCONVERT_POWERPC(u16,f32, 0.0, 65535.0, LFSUX, LHZ_STHUX) DEFINE_CLIPCONVERT_POWERPC(s32,f32, -2147483648.0, 2147483647.0, LFSUX, LWZ_STWUX) DEFINE_CLIPCONVERT_POWERPC(u32,f32, 0.0, 4294967295.0, LFSUX, LWZ_STWUX) DEFINE_CLIPCONVERT_POWERPC(s8,f64, -128.0, 127.0, LFDUX, LBZ_STBUX) DEFINE_CLIPCONVERT_POWERPC(u8,f64, 0.0, 255.0, LFDUX, LBZ_STBUX) DEFINE_CLIPCONVERT_POWERPC(s16,f64, -32768.0, 32767.0, LFDUX, LHZ_STHUX) DEFINE_CLIPCONVERT_POWERPC(u16,f64, 0.0, 65535.0, LFDUX, LHZ_STHUX) DEFINE_CLIPCONVERT_POWERPC(s32,f64, -2147483648.0, 2147483647.0, LFDUX, LWZ_STWUX) DEFINE_CLIPCONVERT_POWERPC(u32,f64, 0.0, 4294967295.0, LFDUX, LWZ_STWUX) #endif #if 0 SL_FUNC void _sl_clipconv_S8_F32__powerpc_altivec( int8_t *dst, int dst_stride, float *src, int src_stride, int n) { static uint8_t vec[16] __attribute__ ((__aligned__ (16))); int i; if(n&3){ double x; for(i=0;i<(n&3);i++){ x = rint(*src); if(x>127.0)x=127.0; if(x<-128.0)x=-128.0; *dst = x; (void *)src += src_stride; (void *)dst += dst_stride; } } n>>=2; for(i=0;i32767.0)x=32767.0; if(x<-32768.0)x=-32768.0; *dst = x; (void *)src += src_stride; (void *)dst += dst_stride; } } n>>=2; for(i=0;i2147483647.0)x=2147483647.0; if(x<-2147483648.0)x=-2147483648.0; *dst = x; (void *)src += src_stride; (void *)dst += dst_stride; } } n>>=2; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include OIL_DECLARE_CLASS(copy_u8); static void copy_u8_altivec (uint8_t *dest, uint8_t *src, int n) { while(((unsigned long)dest & 0xf) && n>0) { *dest++ = *src++; n--; } if (n/16) { if ((unsigned long)src & 0xf) { asm volatile ( " mtctr %2\n" " li r11, 0\n" " lvsl v2, 0, %1\n" " lvx v0, 0, %1\n" " addi %1, %1, 16\n" "1:\n" " lvx v1, r11, %1\n" " vperm v0, v0, v1, v2\n" " stvx v0, r11, %0\n" " vor v0, v1, v1\n" " addi r11, r11, 16\n" " bdnz+ 1b\n" " add %0, %0, r11\n" " add %1, %1, r11\n" " addi %1, %1, -16\n" : "+b" (dest), "+b" (src) : "r" (n/16)); } else { asm volatile ( " mtctr %2\n" " li r11, 0\n" "1:\n" " lvx v1, r11, %1\n" " stvx v1, r11, %0\n" " addi r11, r11, 16\n" " bdnz+ 1b\n" " add %0, %0, r11\n" " add %1, %1, r11\n" : "+b" (dest), "+b" (src) : "r" (n/16)); } } n &= 0xf; while(n) { *dest++ = *src++; n--; } } OIL_DEFINE_IMPL_FULL (copy_u8_altivec, copy_u8, OIL_IMPL_FLAG_ALTIVEC); static void copy_u8_altivec2 (uint8_t *dest, uint8_t *src, int n) { while((unsigned long)dest & 0xf && n>0) { *dest++ = *src++; n--; } if (n/64) { asm volatile ( " mtctr %2\n" " li r11, 0\n" " lvsl v5, 0, %1\n" " lvx v0, 0, %1\n" " addi %1, %1, 16\n" "1:\n" " lvx v1, r11, %1\n" " addi r11, r11, 16\n" " lvx v2, r11, %1\n" " addi r11, r11, 16\n" " lvx v3, r11, %1\n" " addi r11, r11, 16\n" " lvx v4, r11, %1\n" " addi r11, r11, -48\n" " vperm v0, v0, v1, v5\n" " vperm v1, v1, v2, v5\n" " vperm v2, v2, v3, v5\n" " vperm v3, v3, v4, v5\n" " stvx v0, r11, %0\n" " addi r11, r11, 16\n" " stvx v1, r11, %0\n" " addi r11, r11, 16\n" " stvx v2, r11, %0\n" " addi r11, r11, 16\n" " stvx v3, r11, %0\n" " addi r11, r11, 16\n" " vor v0, v4, v4\n" " bdnz+ 1b\n" " add %0, %0, r11\n" " add %1, %1, r11\n" " addi %1, %1, -16\n" : "+b" (dest), "+b" (src) : "r" (n/64)); } n &= 0x3f; while(n) { *dest++ = *src++; n--; } } OIL_DEFINE_IMPL_FULL (copy_u8_altivec2, copy_u8, OIL_IMPL_FLAG_ALTIVEC); liboil-0.3.17/liboil/fb/0000777000175000017500000000000011332637375011734 500000000000000liboil-0.3.17/liboil/fb/fbmmx.h0000644000175000017500000000533310717203073013124 00000000000000/* * Copyright © 2004 Red Hat, Inc. * Copyright © 2005 Trolltech AS * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Red Hat not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Red Hat makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. * * Author: Søren Sandmann (sandmann@redhat.com) * Lars Knoll (lars@trolltech.com) * * Based on work by Owen Taylor */ #define MmxNegate(x) _mm_xor_si64((x), mmx_4x00ff) #define MmxAlpha(x) _mm_shuffle_pi16 ((x), _MM_SHUFFLE(3, 3, 3, 3)); #define MmxTo(x) _mm_unpacklo_pi8 (_mm_cvtsi32_si64((x)), mmx_0) #define MmxFrom(x) (uint32_t)_mm_cvtsi64_si32(_mm_packs_pu16((x), mmx_0)) #define MmxAdd(x, y) _mm_adds_pu16 ((x), (y)) #define MmxMulAdd(x, a, y) do { \ x = _mm_mullo_pi16 (x, a); \ x = _mm_adds_pu16 (x, _mm_srli_pi16 (x, 8)); \ x = _mm_adds_pu16 (x, mmx_4x0080); \ x = _mm_srli_pi16 (x, 8); \ x = _mm_adds_pu16(x, y); \ } while (0) #define MmxMul(x, a) do { \ x = _mm_mullo_pi16 (x, a); \ x = _mm_adds_pu16 (x, _mm_srli_pi16 (x, 8)); \ x = _mm_adds_pu16 (x, mmx_4x0080); \ x = _mm_srli_pi16 (x, 8); \ } while (0) #define MmxAddMul(x, a, y, b) do { \ x = _mm_mullo_pi16 (x, a); \ y = _mm_mullo_pi16 (y, b); \ x = _mm_srli_pi16(x, 1); \ y = _mm_srli_pi16(y, 1); \ x = _mm_adds_pu16 (x, y); \ x = _mm_adds_pu16 (x, _mm_srli_pi16 (x, 8)); \ x = _mm_adds_pu16 (x, mmx_4x0080); \ x = _mm_srli_pi16 (x, 7); \ } while (0) liboil-0.3.17/liboil/fb/Makefile.am0000644000175000017500000000024411003511151013656 00000000000000 noinst_LTLIBRARIES = libfb.la noinst_HEADERS = \ fbmmx.h \ fbpict.h libfb_la_SOURCES = fbmmx.c libfb_la_CFLAGS = $(MMX_CFLAGS) $(SSE_CFLAGS) $(LIBOIL_CFLAGS) liboil-0.3.17/liboil/fb/fbpict.h0000644000175000017500000005134310717203073013264 00000000000000/* * $XFree86: xc/programs/Xserver/fb/fbpict.h,v 1.7 2001/07/18 10:15:02 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Keith Packard not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Keith Packard makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _FBPICT_H_ #define _FBPICT_H_ //#include "renderedge.h" #define FbIntMult(a,b,t) ( (t) = (a) * (b) + 0x80, ( ( ( (t)>>8 ) + (t) )>>8 ) ) #define FbIntDiv(a,b) (((CARD16) (a) * 255) / (b)) #define FbGet8(v,i) ((CARD16) (CARD8) ((v) >> i)) /* * There are two ways of handling alpha -- either as a single unified value or * a separate value for each component, hence each macro must have two * versions. The unified alpha version has a 'U' at the end of the name, * the component version has a 'C'. Similarly, functions which deal with * this difference will have two versions using the same convention. */ #define FbOverU(x,y,i,a,t) ((t) = FbIntMult(FbGet8(y,i),(a),(t)) + FbGet8(x,i),\ (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i)) #define FbOverC(x,y,i,a,t) ((t) = FbIntMult(FbGet8(y,i),FbGet8(a,i),(t)) + FbGet8(x,i),\ (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i)) #define FbInU(x,i,a,t) ((CARD32) FbIntMult(FbGet8(x,i),(a),(t)) << (i)) #define FbInC(x,i,a,t) ((CARD32) FbIntMult(FbGet8(x,i),FbGet8(a,i),(t)) << (i)) #define FbGen(x,y,i,ax,ay,t,u,v) ((t) = (FbIntMult(FbGet8(y,i),ay,(u)) + \ FbIntMult(FbGet8(x,i),ax,(v))),\ (CARD32) ((CARD8) ((t) | \ (0 - ((t) >> 8)))) << (i)) #define FbAdd(x,y,i,t) ((t) = FbGet8(x,i) + FbGet8(y,i), \ (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i)) #define Alpha(x) ((x) >> 24) #define Red(x) (((x) >> 16) & 0xff) #define Green(x) (((x) >> 8) & 0xff) #define Blue(x) ((x) & 0xff) #define fbComposeGetSolid(pict, bits, fmt) { \ FbBits *__bits__; \ FbStride __stride__; \ int __bpp__; \ int __xoff__,__yoff__; \ \ fbGetDrawable((pict)->pDrawable,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \ switch (__bpp__) { \ case 32: \ (bits) = *(CARD32 *) __bits__; \ break; \ case 24: \ (bits) = Fetch24 ((CARD8 *) __bits__); \ break; \ case 16: \ (bits) = *(CARD16 *) __bits__; \ (bits) = cvt0565to8888(bits); \ break; \ default: \ return; \ } \ /* If necessary, convert RGB <--> BGR. */ \ if (PICT_FORMAT_TYPE((pict)->format) != PICT_FORMAT_TYPE(fmt)) \ { \ (bits) = (((bits) & 0xff000000) | \ (((bits) & 0x00ff0000) >> 16) | \ (((bits) & 0x0000ff00) >> 0) | \ (((bits) & 0x000000ff) << 16)); \ } \ /* manage missing src alpha */ \ if ((pict)->pFormat->direct.alphaMask == 0) \ (bits) |= 0xff000000; \ } #define fbComposeGetStart(pict,x,y,type,stride,line,mul) {\ FbBits *__bits__; \ FbStride __stride__; \ int __bpp__; \ int __xoff__,__yoff__; \ \ fbGetDrawable((pict)->pDrawable,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \ (stride) = __stride__ * sizeof (FbBits) / sizeof (type); \ (line) = ((type *) __bits__) + (stride) * ((y) - __yoff__) + (mul) * ((x) - __xoff__); \ } #define cvt8888to0565(s) ((((s) >> 3) & 0x001f) | \ (((s) >> 5) & 0x07e0) | \ (((s) >> 8) & 0xf800)) #define cvt0565to8888(s) (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \ ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \ ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000))) #if IMAGE_BYTE_ORDER == MSBFirst #define Fetch24(a) ((unsigned long) (a) & 1 ? \ ((*(a) << 16) | *((CARD16 *) ((a)+1))) : \ ((*((CARD16 *) (a)) << 8) | *((a)+2))) #define Store24(a,v) ((unsigned long) (a) & 1 ? \ ((*(a) = (CARD8) ((v) >> 16)), \ (*((CARD16 *) ((a)+1)) = (CARD16) (v))) : \ ((*((CARD16 *) (a)) = (CARD16) ((v) >> 8)), \ (*((a)+2) = (CARD8) (v)))) #else #define Fetch24(a) ((unsigned long) (a) & 1 ? \ ((*(a)) | (*((CARD16 *) ((a)+1)) << 8)) : \ ((*((CARD16 *) (a))) | (*((a)+2) << 16))) #define Store24(a,v) ((unsigned long) (a) & 1 ? \ ((*(a) = (CARD8) (v)), \ (*((CARD16 *) ((a)+1)) = (CARD16) ((v) >> 8))) : \ ((*((CARD16 *) (a)) = (CARD16) (v)),\ (*((a)+2) = (CARD8) ((v) >> 16)))) #endif /* The methods below use some tricks to be able to do two color components at the same time. */ /* x_c = (x_c * a) / 255 */ #define FbByteMul(x, a) do { \ CARD32 t = (x & 0xff00ff) *a; \ t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8; \ t &= 0xff00ff; \ \ x = ((x >> 8) & 0xff00ff) * a; \ x = (x + ((x >> 8) & 0xff00ff) + 0x800080); \ x &= 0xff00ff00; \ x += t; \ } while (0) /* x_c = (x_c * a) / 255 + y */ #define FbByteMulAdd(x, a, y) do { \ CARD32 t = (x & 0xff00ff) * a; \ t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8; \ t &= 0xff00ff; \ t += y & 0xff00ff; \ t |= 0x1000100 - ((t >> 8) & 0xff00ff); \ t &= 0xff00ff; \ \ x = ((x >> 8) & 0xff00ff) * a; \ x = (x + ((x >> 8) & 0xff00ff) + 0x800080) >> 8; \ x &= 0xff00ff; \ x += (y >> 8) & 0xff00ff; \ x |= 0x1000100 - ((t >> 8) & 0xff00ff); \ x &= 0xff00ff; \ x <<= 8; \ x += t; \ } while (0) /* x_c = (x_c * a + y_c * b) / 255 */ #define FbByteAddMul(x, a, y, b) do { \ CARD32 t; \ CARD32 r = (x >> 24) * a + (y >> 24) * b; \ r += (r >> 8) + 0x80; \ r >>= 8; \ \ t = (x & 0xff00) * a + (y & 0xff00) * b; \ t += (t >> 8) + 0x8000; \ t >>= 16; \ \ t |= r << 16; \ t |= 0x1000100 - ((t >> 8) & 0xff00ff); \ t &= 0xff00ff; \ t <<= 8; \ \ r = ((x >> 16) & 0xff) * a + ((y >> 16) & 0xff) * b; \ r += (r >> 8) + 0x80; \ r >>= 8; \ \ x = (x & 0xff) * a + (y & 0xff) * b; \ x += (x >> 8) + 0x80; \ x >>= 8; \ x |= r << 16; \ x |= 0x1000100 - ((x >> 8) & 0xff00ff); \ x &= 0xff00ff; \ x |= t; \ } while (0) /* x_c = (x_c * a + y_c *b) / 256 */ #define FbByteAddMul_256(x, a, y, b) do { \ CARD32 t = (x & 0xff00ff) * a + (y & 0xff00ff) * b; \ t >>= 8; \ t &= 0xff00ff; \ \ x = ((x >> 8) & 0xff00ff) * a + ((y >> 8) & 0xff00ff) * b; \ x &= 0xff00ff00; \ x += t; \ } while (0) /* x_c = (x_c * a_c) / 255 */ #define FbByteMulC(x, a) do { \ CARD32 t; \ CARD32 r = (x & 0xff) * (a & 0xff); \ r |= (x & 0xff0000) * ((a >> 16) & 0xff); \ r = (r + ((r >> 8) & 0xff00ff) + 0x800080) >> 8; \ r &= 0xff00ff; \ \ x >>= 8; \ t = (x & 0xff) * ((a >> 8) & 0xff); \ t |= (x & 0xff0000) * (a >> 24); \ t = (t + ((t >> 8) & 0xff00ff) + 0x800080); \ x = r | (t & 0xff00ff00); \ \ } while (0) /* x_c = (x_c * a) / 255 + y */ #define FbByteMulAddC(x, a, y) do { \ CARD32 t; \ CARD32 r = (x & 0xff) * (a & 0xff); \ r |= (x & 0xff0000) * ((a >> 16) & 0xff); \ r = (r + ((r >> 8) & 0xff00ff) + 0x800080) >> 8; \ r &= 0xff00ff; \ r += y & 0xff00ff; \ r |= 0x1000100 - ((r >> 8) & 0xff00ff); \ r &= 0xff00ff; \ \ x >>= 8; \ t = (x & 0xff) * ((a >> 8) & 0xff); \ t |= (x & 0xff0000) * (a >> 24); \ t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8; \ t &= 0xff00ff; \ t += (y >> 8) & 0xff00ff; \ t |= 0x1000100 - ((t >> 8) & 0xff00ff); \ t &= 0xff00ff; \ x = r | (t << 8); \ } while (0) /* x_c = (x_c * a_c + y_c * b) / 255 */ #define FbByteAddMulC(x, a, y, b) do { \ CARD32 t; \ CARD32 r = (x >> 24) * (a >> 24) + (y >> 24) * b; \ r += (r >> 8) + 0x80; \ r >>= 8; \ \ t = (x & 0xff00) * ((a >> 8) & 0xff) + (y & 0xff00) * b; \ t += (t >> 8) + 0x8000; \ t >>= 16; \ \ t |= r << 16; \ t |= 0x1000100 - ((t >> 8) & 0xff00ff); \ t &= 0xff00ff; \ t <<= 8; \ \ r = ((x >> 16) & 0xff) * ((a >> 16) & 0xff) + ((y >> 16) & 0xff) * b; \ r += (r >> 8) + 0x80; \ r >>= 8; \ \ x = (x & 0xff) * (a & 0xff) + (y & 0xff) * b; \ x += (x >> 8) + 0x80; \ x >>= 8; \ x |= r << 16; \ x |= 0x1000100 - ((x >> 8) & 0xff00ff); \ x &= 0xff00ff; \ x |= t; \ } while (0) /* x_c = min(x_c + y_c, 255) */ #define FbByteAdd(x, y) do { \ CARD32 t; \ CARD32 r = (x & 0xff00ff) + (y & 0xff00ff); \ r |= 0x1000100 - ((r >> 8) & 0xff00ff); \ r &= 0xff00ff; \ \ t = ((x >> 8) & 0xff00ff) + ((y >> 8) & 0xff00ff); \ t |= 0x1000100 - ((t >> 8) & 0xff00ff); \ r |= (t & 0xff00ff) << 8; \ x = r; \ } while (0) #define div_255(x) (((x) + ((x) >> 8) + 0x80) >> 8) #if defined(__i386__) && defined(__GNUC__) #define FASTCALL __attribute__((regparm(3))) #else #define FASTCALL #endif #if defined(__GNUC__) #define INLINE __inline__ #else #define INLINE #endif typedef struct _FbComposeData { CARD8 op; PicturePtr src; PicturePtr mask; PicturePtr dest; INT16 xSrc; INT16 ySrc; INT16 xMask; INT16 yMask; INT16 xDest; INT16 yDest; CARD16 width; CARD16 height; } FbComposeData; #if 0 typedef FASTCALL void (*CombineMaskU) (CARD32 *src, const CARD32 *mask, int width); typedef FASTCALL void (*CombineFuncU) (CARD32 *dest, const CARD32 *src, int width); typedef FASTCALL void (*CombineFuncC) (CARD32 *dest, CARD32 *src, CARD32 *mask, int width); typedef struct _FbComposeFunctions { CombineFuncU *combineU; CombineFuncC *combineC; CombineMaskU combineMaskU; } FbComposeFunctions; /* fbcompose.c */ void fbCompositeGeneral (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); /* fbedge.c */ void fbRasterizeEdges (FbBits *buf, int bpp, int width, int stride, RenderEdge *l, RenderEdge *r, xFixed t, xFixed b); /* fbpict.c */ CARD32 fbOver (CARD32 x, CARD32 y); CARD32 fbOver24 (CARD32 x, CARD32 y); CARD32 fbIn (CARD32 x, CARD8 y); void fbCompositeSolidMask_nx8x8888 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void fbCompositeSolidMask_nx8x0888 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void fbCompositeSolidMask_nx8888x8888C (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void fbCompositeSolidMask_nx8x0565 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void fbCompositeSolidMask_nx8888x0565C (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void fbCompositeSrc_8888x8888 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void fbCompositeSrc_8888x0888 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void fbCompositeSrc_8888x0565 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void fbCompositeSrc_0565x0565 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void fbCompositeSrcAdd_8000x8000 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void fbCompositeSrcAdd_8888x8888 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void fbCompositeSrcAdd_1000x1000 (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void fbCompositeSolidMask_nx1xn (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void fbComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); /* fbtrap.c */ void fbAddTraps (PicturePtr pPicture, INT16 xOff, INT16 yOff, int ntrap, xTrap *traps); void fbRasterizeTrapezoid (PicturePtr alpha, xTrapezoid *trap, int x_off, int y_off); void fbAddTriangles (PicturePtr pPicture, INT16 xOff, INT16 yOff, int ntri, xTriangle *tris); #endif #endif /* _FBPICT_H_ */ liboil-0.3.17/liboil/fb/Makefile.in0000644000175000017500000004015311332627672013717 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = liboil/fb DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libfb_la_LIBADD = am_libfb_la_OBJECTS = libfb_la-fbmmx.lo libfb_la_OBJECTS = $(am_libfb_la_OBJECTS) libfb_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(libfb_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libfb_la_SOURCES) DIST_SOURCES = $(libfb_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libfb.la noinst_HEADERS = \ fbmmx.h \ fbpict.h libfb_la_SOURCES = fbmmx.c libfb_la_CFLAGS = $(MMX_CFLAGS) $(SSE_CFLAGS) $(LIBOIL_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/fb/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/fb/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libfb.la: $(libfb_la_OBJECTS) $(libfb_la_DEPENDENCIES) $(libfb_la_LINK) $(libfb_la_OBJECTS) $(libfb_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbmmx.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libfb_la-fbmmx.lo: fbmmx.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbmmx.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbmmx.Tpo -c -o libfb_la-fbmmx.lo `test -f 'fbmmx.c' || echo '$(srcdir)/'`fbmmx.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libfb_la-fbmmx.Tpo $(DEPDIR)/libfb_la-fbmmx.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fbmmx.c' object='libfb_la-fbmmx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbmmx.lo `test -f 'fbmmx.c' || echo '$(srcdir)/'`fbmmx.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/fb/fbmmx.c0000644000175000017500000015003111067011142013104 00000000000000/* * Copyright © 2004 Red Hat, Inc. * Copyright © 2004 Nicholas Miell * Copyright © 2005 Trolltech AS * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Red Hat not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Red Hat makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS * SOFTWARE. * * Author: Søren Sandmann (sandmann@redhat.com) * Minor Improvements: Nicholas Miell (nmiell@gmail.com) * MMX code paths for fbcompose.c by Lars Knoll (lars@trolltech.com) * * Based on work by Owen Taylor */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include /* for _mm_shuffle_pi16 and _MM_SHUFFLE */ typedef uint32_t CARD32; typedef uint16_t CARD16; typedef int16_t INT16; typedef uint8_t CARD8; typedef uint64_t ullong; typedef CARD32* PicturePtr; typedef CARD32* FbBits; typedef int FbStride; #include "fbmmx.h" #include "fbpict.h" #define CHECKPOINT() OIL_DECLARE_CLASS (composite_in_argb); OIL_DECLARE_CLASS (composite_in_argb_const_src); OIL_DECLARE_CLASS (composite_in_argb_const_mask); OIL_DECLARE_CLASS (composite_over_argb); OIL_DECLARE_CLASS (composite_over_argb_const_src); OIL_DECLARE_CLASS (composite_add_argb); OIL_DECLARE_CLASS (composite_add_argb_const_src); OIL_DECLARE_CLASS (composite_in_over_argb); OIL_DECLARE_CLASS (composite_in_over_argb_const_src); OIL_DECLARE_CLASS (composite_in_over_argb_const_mask); OIL_DECLARE_CLASS (composite_over_u8); OIL_DECLARE_CLASS (composite_add_u8); /* --------------- MMX code patch for fbcompose.c --------------------- */ #if 0 static void mmxCombineMaskU (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const uint32_t *end = mask + width; while (mask < end) { __m64 a = MmxTo(*mask); __m64 s = MmxTo(*src); a = MmxAlpha(a); MmxMul(s, a); *dest = MmxFrom(s); ++src; ++dest; ++mask; } _mm_empty(); } #endif #ifdef ENABLE_BROKEN_IMPLS static void mmxCombineOverU (uint32_t *dest, const uint32_t *src, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const __m64 mmx_4x00ff = (__m64) 0x00ff00ff00ff00ffULL; const uint32_t *end = dest + width; while (dest < end) { __m64 x, y, a; x = MmxTo(*src); y = MmxTo(*dest); a = MmxAlpha(x); a = MmxNegate(a); MmxMulAdd(y, a, x); *dest = MmxFrom(y); ++dest; ++src; } _mm_empty(); } OIL_DEFINE_IMPL_FULL(mmxCombineOverU, composite_over_argb, OIL_IMPL_FLAG_MMX); #endif #if 0 static FASTCALL void mmxCombineOverReverseU (CARD32 *dest, const CARD32 *src, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const __m64 mmx_4x00ff = (__m64) 0x00ff00ff00ff00ffULL; const CARD32 *end = dest + width; while (dest < end) { __m64 x, y, a; x = MmxTo(*dest); y = MmxTo(*src); a = MmxAlpha(x); a = MmxNegate(a); MmxMulAdd(y, a, x); *dest = MmxFrom(y); ++dest; ++src; } _mm_empty(); } #endif #if 0 static void mmxCombineInU (CARD32 *dest, const CARD32 *src, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const CARD32 *end = dest + width; while (dest < end) { __m64 x, a; x = MmxTo(*src); a = MmxTo(*dest); a = MmxAlpha(a); MmxMul(x, a); *dest = MmxFrom(x); ++dest; ++src; } _mm_empty(); } #endif #if 0 static FASTCALL void mmxCombineInReverseU (CARD32 *dest, const CARD32 *src, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const CARD32 *end = dest + width; while (dest < end) { __m64 x, a; x = MmxTo(*dest); a = MmxTo(*src); a = MmxAlpha(a); MmxMul(x, a); *dest = MmxFrom(x); ++dest; ++src; } _mm_empty(); } #endif #if 0 static FASTCALL void mmxCombineOutU (CARD32 *dest, const CARD32 *src, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const __m64 mmx_4x00ff = (__m64) 0x00ff00ff00ff00ffULL; const CARD32 *end = dest + width; while (dest < end) { __m64 x, a; x = MmxTo(*src); a = MmxTo(*dest); a = MmxAlpha(a); a = MmxNegate(a); MmxMul(x, a); *dest = MmxFrom(x); ++dest; ++src; } _mm_empty(); } #endif #if 0 static FASTCALL void mmxCombineOutReverseU (CARD32 *dest, const CARD32 *src, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const __m64 mmx_4x00ff = (__m64) 0x00ff00ff00ff00ffULL; const CARD32 *end = dest + width; while (dest < end) { __m64 x, a; x = MmxTo(*dest); a = MmxTo(*src); a = MmxAlpha(a); a = MmxNegate(a); MmxMul(x, a); *dest = MmxFrom(x); ++dest; ++src; } _mm_empty(); } static FASTCALL void mmxCombineAtopU (CARD32 *dest, const CARD32 *src, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const __m64 mmx_4x00ff = (__m64) 0x00ff00ff00ff00ffULL; const CARD32 *end = dest + width; while (dest < end) { __m64 s, da, d, sia; s = MmxTo(*src); d = MmxTo(*dest); sia = MmxAlpha(s); sia = MmxNegate(sia); da = MmxAlpha(d); MmxAddMul(s, da, d, sia); *dest = MmxFrom(s); ++dest; ++src; } _mm_empty(); } static FASTCALL void mmxCombineAtopReverseU (CARD32 *dest, const CARD32 *src, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const __m64 mmx_4x00ff = (__m64) 0x00ff00ff00ff00ffULL; const CARD32 *end; end = dest + width; while (dest < end) { __m64 s, dia, d, sa; s = MmxTo(*src); d = MmxTo(*dest); sa = MmxAlpha(s); dia = MmxAlpha(d); dia = MmxNegate(dia); MmxAddMul(s, dia, d, sa); *dest = MmxFrom(s); ++dest; ++src; } _mm_empty(); } static FASTCALL void mmxCombineXorU (CARD32 *dest, const CARD32 *src, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const __m64 mmx_4x00ff = (__m64) 0x00ff00ff00ff00ffULL; const CARD32 *end = dest + width; while (dest < end) { __m64 s, dia, d, sia; s = MmxTo(*src); d = MmxTo(*dest); sia = MmxAlpha(s); dia = MmxAlpha(d); sia = MmxNegate(sia); dia = MmxNegate(dia); MmxAddMul(s, dia, d, sia); *dest = MmxFrom(s); ++dest; ++src; } _mm_empty(); } #endif static void mmxCombineAddU (uint32_t *dest, const uint32_t *src, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const uint32_t *end = dest + width; while (dest < end) { __m64 s, d; s = MmxTo(*src); d = MmxTo(*dest); s = MmxAdd(s, d); *dest = MmxFrom(s); ++dest; ++src; } _mm_empty(); } OIL_DEFINE_IMPL_FULL(mmxCombineAddU, composite_add_argb, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_SSE); #if 0 static FASTCALL void mmxCombineSaturateU (CARD32 *dest, const CARD32 *src, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const CARD32 *end = dest + width; while (dest < end) { CARD32 s = *src; CARD32 d = *dest; __m64 ms = MmxTo(s); __m64 md = MmxTo(d); CARD32 sa = s >> 24; CARD32 da = ~d >> 24; if (sa > da) { __m64 msa = MmxTo(FbIntDiv(da, sa)); msa = MmxAlpha(msa); MmxMul(ms, msa); } MmxAdd(md, ms); *dest = MmxFrom(md); ++src; ++dest; } _mm_empty(); } static FASTCALL void mmxCombineSrcC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const CARD32 *end = src + width; while (src < end) { __m64 a = MmxTo(*mask); __m64 s = MmxTo(*src); MmxMul(s, a); *dest = MmxFrom(s); ++src; ++mask; ++dest; } _mm_empty(); } static FASTCALL void mmxCombineOverC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const __m64 mmx_4x00ff = (__m64) 0x00ff00ff00ff00ffULL; const CARD32 *end = src + width; while (src < end) { __m64 a = MmxTo(*mask); __m64 s = MmxTo(*src); __m64 d = MmxTo(*dest); __m64 sa = MmxAlpha(s); MmxMul(s, a); MmxMul(a, sa); a = MmxNegate(a); MmxMulAdd(d, a, s); *dest = MmxFrom(d); ++src; ++dest; ++mask; } _mm_empty(); } static FASTCALL void mmxCombineOverReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const __m64 mmx_4x00ff = (__m64) 0x00ff00ff00ff00ffULL; const CARD32 *end = src + width; while (src < end) { __m64 a = MmxTo(*mask); __m64 s = MmxTo(*src); __m64 d = MmxTo(*dest); __m64 da = MmxAlpha(d); da = MmxNegate(da); MmxMul(s, a); MmxMulAdd(s, da, d); *dest = MmxFrom(s); ++src; ++dest; ++mask; } _mm_empty(); } static FASTCALL void mmxCombineInC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const CARD32 *end = src + width; while (src < end) { __m64 a = MmxTo(*mask); __m64 s = MmxTo(*src); __m64 d = MmxTo(*dest); __m64 da = MmxAlpha(d); MmxMul(s, a); MmxMul(s, da); *dest = MmxFrom(s); ++src; ++dest; ++mask; } _mm_empty(); } static FASTCALL void mmxCombineInReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const CARD32 *end = src + width; while (src < end) { __m64 a = MmxTo(*mask); __m64 s = MmxTo(*src); __m64 d = MmxTo(*dest); __m64 sa = MmxAlpha(s); MmxMul(a, sa); MmxMul(d, a); *dest = MmxFrom(d); ++src; ++dest; ++mask; } _mm_empty(); } static FASTCALL void mmxCombineOutC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const __m64 mmx_4x00ff = (__m64) 0x00ff00ff00ff00ffULL; const CARD32 *end = src + width; while (src < end) { __m64 a = MmxTo(*mask); __m64 s = MmxTo(*src); __m64 d = MmxTo(*dest); __m64 da = MmxAlpha(d); da = MmxNegate(da); MmxMul(s, a); MmxMul(s, da); *dest = MmxFrom(s); ++src; ++dest; ++mask; } _mm_empty(); } static FASTCALL void mmxCombineOutReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const __m64 mmx_4x00ff = (__m64) 0x00ff00ff00ff00ffULL; const CARD32 *end = src + width; while (src < end) { __m64 a = MmxTo(*mask); __m64 s = MmxTo(*src); __m64 d = MmxTo(*dest); __m64 sa = MmxAlpha(s); MmxMul(a, sa); a = MmxNegate(a); MmxMul(d, a); *dest = MmxFrom(d); ++src; ++dest; ++mask; } _mm_empty(); } static FASTCALL void mmxCombineAtopC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const __m64 mmx_4x00ff = (__m64) 0x00ff00ff00ff00ffULL; const CARD32 *end = src + width; while (src < end) { __m64 a = MmxTo(*mask); __m64 s = MmxTo(*src); __m64 d = MmxTo(*dest); __m64 da = MmxAlpha(d); __m64 sa = MmxAlpha(s); MmxMul(s, a); MmxMul(a, sa); a = MmxNegate(a); MmxAddMul(d, a, s, da); *dest = MmxFrom(d); ++src; ++dest; ++mask; } _mm_empty(); } static FASTCALL void mmxCombineAtopReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const __m64 mmx_4x00ff = (__m64) 0x00ff00ff00ff00ffULL; const CARD32 *end = src + width; while (src < end) { __m64 a = MmxTo(*mask); __m64 s = MmxTo(*src); __m64 d = MmxTo(*dest); __m64 da = MmxAlpha(d); __m64 sa = MmxAlpha(s) MmxMul(s, a); MmxMul(a, sa); da = MmxNegate(da); MmxAddMul(d, a, s, da); *dest = MmxFrom(d); ++src; ++dest; ++mask; } _mm_empty(); } static FASTCALL void mmxCombineXorC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const __m64 mmx_4x00ff = (__m64) 0x00ff00ff00ff00ffULL; const CARD32 *end = src + width; while (src < end) { __m64 a = MmxTo(*mask); __m64 s = MmxTo(*src); __m64 d = MmxTo(*dest); __m64 da = MmxAlpha(d); __m64 sa = MmxAlpha(s); MmxMul(s, a); MmxMul(a, sa); da = MmxNegate(da); a = MmxNegate(a); MmxAddMul(d, a, s, da); *dest = MmxFrom(d); ++src; ++dest; ++mask; } _mm_empty(); } static FASTCALL void mmxCombineAddC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) { const __m64 mmx_0 = _mm_setzero_si64(); const __m64 mmx_4x0080 = (__m64) 0x0080008000800080ULL; const CARD32 *end = src + width; while (src < end) { __m64 a = MmxTo(*mask); __m64 s = MmxTo(*src); __m64 d = MmxTo(*dest); MmxMul(s, a); d = MmxAdd(s, d); *dest = MmxFrom(d); ++src; ++dest; ++mask; } _mm_empty(); } extern FbComposeFunctions composeFunctions; void fbComposeSetupMMX(void) { /* check if we have MMX support and initialize accordingly */ if (fbHaveMMX()) { composeFunctions.combineU[PictOpOver] = mmxCombineOverU; composeFunctions.combineU[PictOpOverReverse] = mmxCombineOverReverseU; composeFunctions.combineU[PictOpIn] = mmxCombineInU; composeFunctions.combineU[PictOpInReverse] = mmxCombineInReverseU; composeFunctions.combineU[PictOpOut] = mmxCombineOutU; composeFunctions.combineU[PictOpOutReverse] = mmxCombineOutReverseU; composeFunctions.combineU[PictOpAtop] = mmxCombineAtopU; composeFunctions.combineU[PictOpAtopReverse] = mmxCombineAtopReverseU; composeFunctions.combineU[PictOpXor] = mmxCombineXorU; composeFunctions.combineU[PictOpAdd] = mmxCombineAddU; composeFunctions.combineU[PictOpSaturate] = mmxCombineSaturateU; composeFunctions.combineC[PictOpSrc] = mmxCombineSrcC; composeFunctions.combineC[PictOpOver] = mmxCombineOverC; composeFunctions.combineC[PictOpOverReverse] = mmxCombineOverReverseC; composeFunctions.combineC[PictOpIn] = mmxCombineInC; composeFunctions.combineC[PictOpInReverse] = mmxCombineInReverseC; composeFunctions.combineC[PictOpOut] = mmxCombineOutC; composeFunctions.combineC[PictOpOutReverse] = mmxCombineOutReverseC; composeFunctions.combineC[PictOpAtop] = mmxCombineAtopC; composeFunctions.combineC[PictOpAtopReverse] = mmxCombineAtopReverseC; composeFunctions.combineC[PictOpXor] = mmxCombineXorC; composeFunctions.combineC[PictOpAdd] = mmxCombineAddC; composeFunctions.combineMaskU = mmxCombineMaskU; } } #endif /* ------------------ MMX code paths called from fbpict.c ----------------------- */ typedef union { __m64 m64; uint64_t ull; } m64_ull; typedef struct { m64_ull mmx_4x00ff; m64_ull mmx_4x0080; m64_ull mmx_565_rgb; m64_ull mmx_565_unpack_multiplier; m64_ull mmx_565_r; m64_ull mmx_565_g; m64_ull mmx_565_b; m64_ull mmx_mask_0; m64_ull mmx_mask_1; m64_ull mmx_mask_2; m64_ull mmx_mask_3; m64_ull mmx_full_alpha; m64_ull mmx_ffff0000ffff0000; m64_ull mmx_0000ffff00000000; m64_ull mmx_000000000000ffff; } MMXData; static const MMXData c = { .mmx_4x00ff.ull = 0x00ff00ff00ff00ffULL, .mmx_4x0080.ull = 0x0080008000800080ULL, .mmx_565_rgb.ull = 0x000001f0003f001fULL, .mmx_565_r.ull = 0x000000f800000000ULL, .mmx_565_g.ull = 0x0000000000fc0000ULL, .mmx_565_b.ull = 0x00000000000000f8ULL, .mmx_mask_0.ull = 0xffffffffffff0000ULL, .mmx_mask_1.ull = 0xffffffff0000ffffULL, .mmx_mask_2.ull = 0xffff0000ffffffffULL, .mmx_mask_3.ull = 0x0000ffffffffffffULL, .mmx_full_alpha.ull = 0x00ff000000000000ULL, .mmx_565_unpack_multiplier.ull = 0x0000008404100840ULL, .mmx_ffff0000ffff0000.ull = 0xffff0000ffff0000ULL, .mmx_0000ffff00000000.ull = 0x0000ffff00000000ULL, .mmx_000000000000ffff.ull = 0x000000000000ffffULL, }; #define MC(x) ((__m64) c.mmx_##x.m64) static __inline__ __m64 shift (__m64 v, int s) { if (s > 0) return _mm_slli_si64 (v, s); else if (s < 0) return _mm_srli_si64 (v, -s); else return v; } static __inline__ __m64 negate (__m64 mask) { return _mm_xor_si64 (mask, MC(4x00ff)); } static __inline__ __m64 pix_multiply (__m64 a, __m64 b) { __m64 res; res = _mm_mullo_pi16 (a, b); res = _mm_adds_pu16 (res, MC(4x0080)); res = _mm_adds_pu16 (res, _mm_srli_pi16 (res, 8)); res = _mm_srli_pi16 (res, 8); return res; } static __inline__ __m64 expand_alpha (__m64 pixel) { return _mm_shuffle_pi16 (pixel, _MM_SHUFFLE(3, 3, 3, 3)); } static __inline__ __m64 expand_alpha_rev (__m64 pixel) { return _mm_shuffle_pi16 (pixel, _MM_SHUFFLE(0, 0, 0, 0)); } static __inline__ __m64 invert_colors (__m64 pixel) { return _mm_shuffle_pi16 (pixel, _MM_SHUFFLE(3, 0, 1, 2)); } /* Notes about writing mmx code * * give memory operands as the second operand. If you give it as the * first, gcc will first load it into a register, then use that * register * * ie. use * * _mm_mullo_pi16 (x, mmx_constant); * * not * * _mm_mullo_pi16 (mmx_constant, x); * * Also try to minimize dependencies. i.e. when you need a value, try * to calculate it from a value that was calculated as early as * possible. */ static __inline__ __m64 over (__m64 src, __m64 srca, __m64 dest) { return _mm_adds_pu8 (src, pix_multiply(dest, negate(srca))); } static __inline__ __m64 over_rev_non_pre (__m64 src, __m64 dest) { __m64 srca = expand_alpha (src); __m64 srcfaaa = _mm_or_si64 (srca, MC(full_alpha)); return over(pix_multiply(invert_colors(src), srcfaaa), srca, dest); } static __inline__ __m64 in (__m64 src, __m64 mask) { return pix_multiply (src, mask); } static __inline__ __m64 in_over (__m64 src, __m64 srca, __m64 mask, __m64 dest) { return over(in(src, mask), pix_multiply(srca, mask), dest); } static __inline__ __m64 load8888 (CARD32 v) { return _mm_unpacklo_pi8 (_mm_cvtsi32_si64 (v), _mm_setzero_si64()); } static __inline__ __m64 pack8888 (__m64 lo, __m64 hi) { __m64 r; r = _mm_packs_pu16 (lo, hi); return r; } static __inline__ CARD32 store8888 (__m64 v) { return _mm_cvtsi64_si32(pack8888(v, _mm_setzero_si64())); } /* Expand 16 bits positioned at @pos (0-3) of a mmx register into * * 00RR00GG00BB * * --- Expanding 565 in the low word --- * * m = (m << (32 - 3)) | (m << (16 - 5)) | m; * m = m & (01f0003f001f); * m = m * (008404100840); * m = m >> 8; * * Note the trick here - the top word is shifted by another nibble to * avoid it bumping into the middle word */ static __inline__ __m64 expand565 (__m64 pixel, int pos) { __m64 p = pixel; __m64 t1, t2; /* move pixel to low 16 bit and zero the rest */ p = shift (shift (p, (3 - pos) * 16), -48); t1 = shift (p, 36 - 11); t2 = shift (p, 16 - 5); p = _mm_or_si64 (t1, p); p = _mm_or_si64 (t2, p); p = _mm_and_si64 (p, MC(565_rgb)); pixel = _mm_mullo_pi16 (p, MC(565_unpack_multiplier)); return _mm_srli_pi16 (pixel, 8); } static __inline__ __m64 expand8888 (__m64 in, int pos) { if (pos == 0) return _mm_unpacklo_pi8 (in, _mm_setzero_si64()); else return _mm_unpackhi_pi8 (in, _mm_setzero_si64()); } static __inline__ __m64 pack565 (__m64 pixel, __m64 target, int pos) { __m64 p = pixel; __m64 t = target; __m64 r, g, b; r = _mm_and_si64 (p, MC(565_r)); g = _mm_and_si64 (p, MC(565_g)); b = _mm_and_si64 (p, MC(565_b)); r = shift (r, - (32 - 8) + pos * 16); g = shift (g, - (16 - 3) + pos * 16); b = shift (b, - (0 + 3) + pos * 16); if (pos == 0) t = _mm_and_si64 (t, MC(mask_0)); else if (pos == 1) t = _mm_and_si64 (t, MC(mask_1)); else if (pos == 2) t = _mm_and_si64 (t, MC(mask_2)); else if (pos == 3) t = _mm_and_si64 (t, MC(mask_3)); p = _mm_or_si64 (r, t); p = _mm_or_si64 (g, p); return _mm_or_si64 (b, p); } #ifdef ENABLE_BROKEN_IMPLS /* broken. See Debian bug #340932 */ static void fbCompositeSolid_nx8888mmx (uint32_t *dst, uint32_t *src, int w) { __m64 vsrc, vsrca; vsrc = load8888 (*src); vsrca = expand_alpha (vsrc); while (w && (unsigned long)dst & 7) { *dst = store8888(over(vsrc, vsrca, load8888(*dst))); w--; dst++; } while (w >= 2) { __m64 vdest; __m64 dest0, dest1; vdest = *(__m64 *)dst; dest0 = over(vsrc, vsrca, expand8888(vdest, 0)); dest1 = over(vsrc, vsrca, expand8888(vdest, 1)); *(__m64 *)dst = pack8888(dest0, dest1); dst += 2; w -= 2; } while (w) { *dst = store8888(over(vsrc, vsrca, load8888(*dst))); w--; dst++; } _mm_empty(); } OIL_DEFINE_IMPL_FULL(fbCompositeSolid_nx8888mmx, composite_over_argb_const_src, OIL_IMPL_FLAG_MMX| OIL_IMPL_FLAG_MMXEXT); #endif #if 0 void fbCompositeSolid_nx0565mmx (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { CARD32 src; CARD16 *dstLine, *dst; CARD16 w; FbStride dstStride; __m64 vsrc, vsrca; CHECKPOINT(); fbComposeGetSolid(pSrc, src, pDst->format); if (src >> 24 == 0) return; fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1); vsrc = load8888 (src); vsrca = expand_alpha (vsrc); while (height--) { dst = dstLine; dstLine += dstStride; w = width; CHECKPOINT(); while (w && (unsigned long)dst & 7) { ullong d = *dst; __m64 vdest = expand565 ((__m64)d, 0); vdest = pack565(over(vsrc, vsrca, vdest), vdest, 0); *dst = (ullong)vdest; w--; dst++; } while (w >= 4) { __m64 vdest; vdest = *(__m64 *)dst; vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 0)), vdest, 0); vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 1)), vdest, 1); vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 2)), vdest, 2); vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 3)), vdest, 3); *(__m64 *)dst = vdest; dst += 4; w -= 4; } CHECKPOINT(); while (w) { ullong d = *dst; __m64 vdest = expand565 ((__m64)d, 0); vdest = pack565(over(vsrc, vsrca, vdest), vdest, 0); *dst = (ullong)vdest; w--; dst++; } } _mm_empty(); } #endif #if 0 static void fbCompositeSolidMask_nx8888x8888Cmmx (uint32_t *dst, uint32_t *src, uint8_t *mask, int w) { CARD32 src, srca; CARD32 *dstLine; CARD32 *maskLine; FbStride dstStride, maskStride; __m64 vsrc, vsrca; while (twidth && (unsigned long)q & 7) { CARD32 m = *(CARD32 *)p; if (m) { __m64 vdest = load8888(*q); vdest = in_over(vsrc, vsrca, load8888(m), vdest); *q = (ullong)pack8888(vdest, _mm_setzero_si64()); } twidth--; p++; q++; } while (twidth >= 2) { CARD32 m0, m1; m0 = *p; m1 = *(p + 1); if (m0 | m1) { __m64 dest0, dest1; __m64 vdest = *(__m64 *)q; dest0 = in_over(vsrc, vsrca, load8888(m0), expand8888 (vdest, 0)); dest1 = in_over(vsrc, vsrca, load8888(m1), expand8888 (vdest, 1)); *(__m64 *)q = pack8888(dest0, dest1); } p += 2; q += 2; twidth -= 2; } while (twidth) { CARD32 m = *(CARD32 *)p; if (m) { __m64 vdest = load8888(*q); vdest = in_over(vsrc, vsrca, load8888(m), vdest); *q = (ullong)pack8888(vdest, _mm_setzero_si64()); } twidth--; p++; q++; } _mm_empty(); } #endif #if 0 static void fbCompositeSrc_8888x8x8888mmx (uint32_t *dest, uint32_t *src, uint8_t *mask, int width) { mask = *maskLine << 24 | *maskLine << 16 | *maskLine << 8 | *maskLine; vmask = load8888 (mask); srca = MC(4x00ff); while (height--) { dst = dstLine; dstLine += dstStride; src = srcLine; srcLine += srcStride; w = width; while (w && (unsigned long)dst & 7) { __m64 s = load8888 (*src); __m64 d = load8888 (*dst); *dst = (ullong)pack8888 (in_over (s, srca, vmask, d), (__m64)_mm_setzero_si64()); w--; dst++; src++; } while (w >= 16) { __m64 vd0 = *(__m64 *)(dst + 0); __m64 vd1 = *(__m64 *)(dst + 2); __m64 vd2 = *(__m64 *)(dst + 4); __m64 vd3 = *(__m64 *)(dst + 6); __m64 vd4 = *(__m64 *)(dst + 8); __m64 vd5 = *(__m64 *)(dst + 10); __m64 vd6 = *(__m64 *)(dst + 12); __m64 vd7 = *(__m64 *)(dst + 14); __m64 vs0 = *(__m64 *)(src + 0); __m64 vs1 = *(__m64 *)(src + 2); __m64 vs2 = *(__m64 *)(src + 4); __m64 vs3 = *(__m64 *)(src + 6); __m64 vs4 = *(__m64 *)(src + 8); __m64 vs5 = *(__m64 *)(src + 10); __m64 vs6 = *(__m64 *)(src + 12); __m64 vs7 = *(__m64 *)(src + 14); vd0 = (__m64)pack8888 ( in_over (expand8888 (vs0, 0), srca, vmask, expand8888 (vd0, 0)), in_over (expand8888 (vs0, 1), srca, vmask, expand8888 (vd0, 1))); vd1 = (__m64)pack8888 ( in_over (expand8888 (vs1, 0), srca, vmask, expand8888 (vd1, 0)), in_over (expand8888 (vs1, 1), srca, vmask, expand8888 (vd1, 1))); vd2 = (__m64)pack8888 ( in_over (expand8888 (vs2, 0), srca, vmask, expand8888 (vd2, 0)), in_over (expand8888 (vs2, 1), srca, vmask, expand8888 (vd2, 1))); vd3 = (__m64)pack8888 ( in_over (expand8888 (vs3, 0), srca, vmask, expand8888 (vd3, 0)), in_over (expand8888 (vs3, 1), srca, vmask, expand8888 (vd3, 1))); vd4 = (__m64)pack8888 ( in_over (expand8888 (vs4, 0), srca, vmask, expand8888 (vd4, 0)), in_over (expand8888 (vs4, 1), srca, vmask, expand8888 (vd4, 1))); vd5 = (__m64)pack8888 ( in_over (expand8888 (vs5, 0), srca, vmask, expand8888 (vd5, 0)), in_over (expand8888 (vs5, 1), srca, vmask, expand8888 (vd5, 1))); vd6 = (__m64)pack8888 ( in_over (expand8888 (vs6, 0), srca, vmask, expand8888 (vd6, 0)), in_over (expand8888 (vs6, 1), srca, vmask, expand8888 (vd6, 1))); vd7 = (__m64)pack8888 ( in_over (expand8888 (vs7, 0), srca, vmask, expand8888 (vd7, 0)), in_over (expand8888 (vs7, 1), srca, vmask, expand8888 (vd7, 1))); *(__m64 *)(dst + 0) = vd0; *(__m64 *)(dst + 2) = vd1; *(__m64 *)(dst + 4) = vd2; *(__m64 *)(dst + 6) = vd3; *(__m64 *)(dst + 8) = vd4; *(__m64 *)(dst + 10) = vd5; *(__m64 *)(dst + 12) = vd6; *(__m64 *)(dst + 14) = vd7; w -= 16; dst += 16; src += 16; } while (w) { __m64 s = load8888 (*src); __m64 d = load8888 (*dst); *dst = (ullong)pack8888 (in_over (s, srca, vmask, d), (__m64)_mm_setzero_si64()); w--; dst++; src++; } } _mm_empty(); } void fbCompositeSrc_8888x8888mmx (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { CARD32 *dstLine, *dst; CARD32 *srcLine, *src; FbStride dstStride, srcStride; CARD16 w; __m64 srca; CHECKPOINT(); fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1); fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1); srca = MC (4x00ff); while (height--) { dst = dstLine; dstLine += dstStride; src = srcLine; srcLine += srcStride; w = width; while (w && (unsigned long)dst & 7) { __m64 s = load8888 (*src); __m64 d = load8888 (*dst); *dst = (ullong)pack8888 (over (s, expand_alpha (s), d), (__m64)_mm_setzero_si64()); w--; dst++; src++; } while (w >= 2) { __m64 vd = *(__m64 *)(dst + 0); __m64 vs = *(__m64 *)(src + 0); __m64 vs0 = expand8888 (vs, 0); __m64 vs1 = expand8888 (vs, 1); *(__m64 *)dst = (__m64)pack8888 ( over (vs0, expand_alpha (vs0), expand8888 (vd, 0)), over (vs1, expand_alpha (vs1), expand8888 (vd, 1))); w -= 2; dst += 2; src += 2; } while (w) { __m64 s = load8888 (*src); __m64 d = load8888 (*dst); *dst = (ullong)pack8888 (over (s, expand_alpha (s), d), (__m64)_mm_setzero_si64()); w--; dst++; src++; } } _mm_empty(); } void fbCompositeSolidMask_nx8x8888mmx (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { CARD32 src, srca; CARD32 *dstLine, *dst; CARD8 *maskLine, *mask; FbStride dstStride, maskStride; CARD16 w; __m64 vsrc, vsrca; ullong srcsrc; CHECKPOINT(); fbComposeGetSolid(pSrc, src, pDst->format); srca = src >> 24; if (srca == 0) return; srcsrc = (unsigned long long)src << 32 | src; fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1); fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1); vsrc = load8888 (src); vsrca = expand_alpha (vsrc); while (height--) { dst = dstLine; dstLine += dstStride; mask = maskLine; maskLine += maskStride; w = width; CHECKPOINT(); while (w && (unsigned long)dst & 7) { ullong m = *mask; if (m) { __m64 vdest = in_over(vsrc, vsrca, expand_alpha_rev ((__m64)m), load8888(*dst)); *dst = (ullong)pack8888(vdest, _mm_setzero_si64()); } w--; mask++; dst++; } CHECKPOINT(); while (w >= 2) { ullong m0, m1; m0 = *mask; m1 = *(mask + 1); if (srca == 0xff && (m0 & m1) == 0xff) { *(unsigned long long *)dst = srcsrc; } else if (m0 | m1) { __m64 vdest; __m64 dest0, dest1; vdest = *(__m64 *)dst; dest0 = in_over(vsrc, vsrca, expand_alpha_rev ((__m64)m0), expand8888(vdest, 0)); dest1 = in_over(vsrc, vsrca, expand_alpha_rev ((__m64)m1), expand8888(vdest, 1)); *(__m64 *)dst = pack8888(dest0, dest1); } mask += 2; dst += 2; w -= 2; } CHECKPOINT(); while (w) { ullong m = *mask; if (m) { __m64 vdest = load8888(*dst); vdest = in_over(vsrc, vsrca, expand_alpha_rev ((__m64)m), vdest); *dst = (ullong)pack8888(vdest, _mm_setzero_si64()); } w--; mask++; dst++; } } _mm_empty(); } void fbCompositeSolidMask_nx8x0565mmx (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { CARD32 src, srca; CARD16 *dstLine, *dst; CARD8 *maskLine, *mask; FbStride dstStride, maskStride; CARD16 w; __m64 vsrc, vsrca; unsigned long long srcsrcsrcsrc, src16; CHECKPOINT(); fbComposeGetSolid(pSrc, src, pDst->format); srca = src >> 24; if (srca == 0) return; fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1); fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1); vsrc = load8888 (src); vsrca = expand_alpha (vsrc); src16 = (ullong)pack565(vsrc, _mm_setzero_si64(), 0); srcsrcsrcsrc = (ullong)src16 << 48 | (ullong)src16 << 32 | (ullong)src16 << 16 | (ullong)src16; while (height--) { dst = dstLine; dstLine += dstStride; mask = maskLine; maskLine += maskStride; w = width; CHECKPOINT(); while (w && (unsigned long)dst & 7) { ullong m = *mask; if (m) { ullong d = *dst; __m64 vd = (__m64)d; __m64 vdest = in_over(vsrc, vsrca, expand_alpha_rev ((__m64)m), expand565(vd, 0)); *dst = (ullong)pack565(vdest, _mm_setzero_si64(), 0); } w--; mask++; dst++; } CHECKPOINT(); while (w >= 4) { ullong m0, m1, m2, m3; m0 = *mask; m1 = *(mask + 1); m2 = *(mask + 2); m3 = *(mask + 3); if (srca == 0xff && (m0 & m1 & m2 & m3) == 0xff) { *(unsigned long long *)dst = srcsrcsrcsrc; } else if (m0 | m1 | m2 | m3) { __m64 vdest; __m64 vm0, vm1, vm2, vm3; vdest = *(__m64 *)dst; vm0 = (__m64)m0; vdest = pack565(in_over(vsrc, vsrca, expand_alpha_rev(vm0), expand565(vdest, 0)), vdest, 0); vm1 = (__m64)m1; vdest = pack565(in_over(vsrc, vsrca, expand_alpha_rev(vm1), expand565(vdest, 1)), vdest, 1); vm2 = (__m64)m2; vdest = pack565(in_over(vsrc, vsrca, expand_alpha_rev(vm2), expand565(vdest, 2)), vdest, 2); vm3 = (__m64)m3; vdest = pack565(in_over(vsrc, vsrca, expand_alpha_rev(vm3), expand565(vdest, 3)), vdest, 3); *(__m64 *)dst = vdest; } w -= 4; mask += 4; dst += 4; } CHECKPOINT(); while (w) { ullong m = *mask; if (m) { ullong d = *dst; __m64 vd = (__m64)d; __m64 vdest = in_over(vsrc, vsrca, expand_alpha_rev ((__m64)m), expand565(vd, 0)); *dst = (ullong)pack565(vdest, _mm_setzero_si64(), 0); } w--; mask++; dst++; } } _mm_empty(); } void fbCompositeSrc_8888RevNPx0565mmx (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { CARD16 *dstLine, *dst; CARD32 *srcLine, *src; FbStride dstStride, srcStride; CARD16 w; CHECKPOINT(); fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1); fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1); assert (pSrc->pDrawable == pMask->pDrawable); while (height--) { dst = dstLine; dstLine += dstStride; src = srcLine; srcLine += srcStride; w = width; CHECKPOINT(); while (w && (unsigned long)dst & 7) { __m64 vsrc = load8888 (*src); ullong d = *dst; __m64 vdest = expand565 ((__m64)d, 0); vdest = pack565(over_rev_non_pre(vsrc, vdest), vdest, 0); *dst = (ullong)vdest; w--; dst++; src++; } CHECKPOINT(); while (w >= 4) { CARD32 s0, s1, s2, s3; unsigned char a0, a1, a2, a3; s0 = *src; s1 = *(src + 1); s2 = *(src + 2); s3 = *(src + 3); a0 = (s0 >> 24); a1 = (s1 >> 24); a2 = (s2 >> 24); a3 = (s3 >> 24); if ((a0 & a1 & a2 & a3) == 0xFF) { __m64 vdest; vdest = pack565(invert_colors(load8888(s0)), _mm_setzero_si64(), 0); vdest = pack565(invert_colors(load8888(s1)), vdest, 1); vdest = pack565(invert_colors(load8888(s2)), vdest, 2); vdest = pack565(invert_colors(load8888(s3)), vdest, 3); *(__m64 *)dst = vdest; } else if (a0 | a1 | a2 | a3) { __m64 vdest = *(__m64 *)dst; vdest = pack565(over_rev_non_pre(load8888(s0), expand565(vdest, 0)), vdest, 0); vdest = pack565(over_rev_non_pre(load8888(s1), expand565(vdest, 1)), vdest, 1); vdest = pack565(over_rev_non_pre(load8888(s2), expand565(vdest, 2)), vdest, 2); vdest = pack565(over_rev_non_pre(load8888(s3), expand565(vdest, 3)), vdest, 3); *(__m64 *)dst = vdest; } w -= 4; dst += 4; src += 4; } CHECKPOINT(); while (w) { __m64 vsrc = load8888 (*src); ullong d = *dst; __m64 vdest = expand565 ((__m64)d, 0); vdest = pack565(over_rev_non_pre(vsrc, vdest), vdest, 0); *dst = (ullong)vdest; w--; dst++; src++; } } _mm_empty(); } /* "8888RevNP" is GdkPixbuf's format: ABGR, non premultiplied */ void fbCompositeSrc_8888RevNPx8888mmx (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { CARD32 *dstLine, *dst; CARD32 *srcLine, *src; FbStride dstStride, srcStride; CARD16 w; CHECKPOINT(); fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1); fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1); assert (pSrc->pDrawable == pMask->pDrawable); while (height--) { dst = dstLine; dstLine += dstStride; src = srcLine; srcLine += srcStride; w = width; while (w && (unsigned long)dst & 7) { __m64 s = load8888 (*src); __m64 d = load8888 (*dst); *dst = (ullong)pack8888 (over_rev_non_pre (s, d), _mm_setzero_si64()); w--; dst++; src++; } while (w >= 2) { ullong s0, s1; unsigned char a0, a1; __m64 d0, d1; s0 = *src; s1 = *(src + 1); a0 = (s0 >> 24); a1 = (s1 >> 24); if ((a0 & a1) == 0xFF) { d0 = invert_colors(load8888(s0)); d1 = invert_colors(load8888(s1)); *(__m64 *)dst = pack8888 (d0, d1); } else if (a0 | a1) { __m64 vdest = *(__m64 *)dst; d0 = over_rev_non_pre (load8888(s0), expand8888 (vdest, 0)); d1 = over_rev_non_pre (load8888(s1), expand8888 (vdest, 1)); *(__m64 *)dst = pack8888 (d0, d1); } w -= 2; dst += 2; src += 2; } while (w) { __m64 s = load8888 (*src); __m64 d = load8888 (*dst); *dst = (ullong)pack8888 (over_rev_non_pre (s, d), _mm_setzero_si64()); w--; dst++; src++; } } _mm_empty(); } void fbCompositeSolidMask_nx8888x0565Cmmx (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { CARD32 src, srca; CARD16 *dstLine; CARD32 *maskLine; FbStride dstStride, maskStride; __m64 vsrc, vsrca; CHECKPOINT(); fbComposeGetSolid(pSrc, src, pDst->format); srca = src >> 24; if (srca == 0) return; fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1); fbComposeGetStart (pMask, xMask, yMask, CARD32, maskStride, maskLine, 1); vsrc = load8888 (src); vsrca = expand_alpha (vsrc); while (height--) { int twidth = width; CARD32 *p = (CARD32 *)maskLine; CARD16 *q = (CARD16 *)dstLine; while (twidth && ((unsigned long)q & 7)) { CARD32 m = *(CARD32 *)p; if (m) { ullong d = *q; __m64 vdest = expand565 ((__m64)d, 0); vdest = pack565 (in_over (vsrc, vsrca, load8888 (m), vdest), vdest, 0); *q = (ullong)vdest; } twidth--; p++; q++; } while (twidth >= 4) { CARD32 m0, m1, m2, m3; m0 = *p; m1 = *(p + 1); m2 = *(p + 2); m3 = *(p + 3); if ((m0 | m1 | m2 | m3)) { __m64 vdest = *(__m64 *)q; vdest = pack565(in_over(vsrc, vsrca, load8888(m0), expand565(vdest, 0)), vdest, 0); vdest = pack565(in_over(vsrc, vsrca, load8888(m1), expand565(vdest, 1)), vdest, 1); vdest = pack565(in_over(vsrc, vsrca, load8888(m2), expand565(vdest, 2)), vdest, 2); vdest = pack565(in_over(vsrc, vsrca, load8888(m3), expand565(vdest, 3)), vdest, 3); *(__m64 *)q = vdest; } twidth -= 4; p += 4; q += 4; } while (twidth) { CARD32 m; m = *(CARD32 *)p; if (m) { ullong d = *q; __m64 vdest = expand565((__m64)d, 0); vdest = pack565 (in_over(vsrc, vsrca, load8888(m), vdest), vdest, 0); *q = (ullong)vdest; } twidth--; p++; q++; } maskLine += maskStride; dstLine += dstStride; } _mm_empty (); } #endif static void fbCompositeSrcAdd_8000x8000mmx (uint8_t *dst, uint8_t *src, int w) { int s; int d; int t; while (w && (unsigned long)dst & 7) { s = *src; d = *dst; t = d + s; s = t | (0 - (t >> 8)); *dst = s; dst++; src++; w--; } while (w >= 8) { *(__m64*)dst = _mm_adds_pu8(*(__m64*)src, *(__m64*)dst); dst += 8; src += 8; w -= 8; } while (w) { s = *src; d = *dst; t = d + s; s = t | (0 - (t >> 8)); *dst = s; dst++; src++; w--; } _mm_empty(); } OIL_DEFINE_IMPL_FULL (fbCompositeSrcAdd_8000x8000mmx, composite_add_u8, OIL_IMPL_FLAG_MMX); static void fbCompositeSrcAdd_8888x8888mmx (uint32_t *dst, uint32_t *src, int w) { while (w && (unsigned long)dst & 7) { *dst = _mm_cvtsi64_si32(_mm_adds_pu8(_mm_cvtsi32_si64(*src), _mm_cvtsi32_si64(*dst))); dst++; src++; w--; } while (w >= 2) { *(__m64 *)dst = _mm_adds_pu8(*(__m64*)src, *(__m64*)dst); dst += 2; src += 2; w -= 2; } if (w) { *dst = _mm_cvtsi64_si32(_mm_adds_pu8(_mm_cvtsi32_si64(*src), _mm_cvtsi32_si64(*dst))); } _mm_empty(); } OIL_DEFINE_IMPL_FULL (fbCompositeSrcAdd_8888x8888mmx, composite_add_argb, OIL_IMPL_FLAG_MMX | OIL_IMPL_FLAG_SSE); #if 0 #define GetStart(drw,x,y,type,stride,line,bpp) {\ FbBits *__bits__; \ FbStride __stride__; \ int __xoff__,__yoff__; \ \ fbGetDrawable((drw),__bits__,__stride__,bpp,__xoff__,__yoff__); \ (stride) = __stride__ * sizeof (FbBits) / sizeof (type); \ (line) = ((type *) __bits__) + (stride) * ((y) - __yoff__) + ((x) - __xoff__); \ } Bool fbSolidFillmmx (DrawablePtr pDraw, int x, int y, int width, int height, FbBits xor) { FbStride stride; int bpp; ullong fill; __m64 vfill; CARD32 byte_width; CARD8 *byte_line; FbBits *bits; int xoff, yoff; CHECKPOINT(); fbGetDrawable(pDraw, bits, stride, bpp, xoff, yoff); if (bpp == 16 && (xor >> 16 != (xor & 0xffff))) return FALSE; if (bpp != 16 && bpp != 32) return FALSE; if (bpp == 16) { stride = stride * sizeof (FbBits) / 2; byte_line = (CARD8 *)(((CARD16 *)bits) + stride * (y - yoff) + (x - xoff)); byte_width = 2 * width; stride *= 2; } else { stride = stride * sizeof (FbBits) / 4; byte_line = (CARD8 *)(((CARD32 *)bits) + stride * (y - yoff) + (x - xoff)); byte_width = 4 * width; stride *= 4; } fill = ((ullong)xor << 32) | xor; vfill = (__m64)fill; while (height--) { int w; CARD8 *d = byte_line; byte_line += stride; w = byte_width; while (w >= 2 && ((unsigned long)d & 3)) { *(CARD16 *)d = xor; w -= 2; d += 2; } while (w >= 4 && ((unsigned long)d & 7)) { *(CARD32 *)d = xor; w -= 4; d += 4; } while (w >= 64) { *(__m64*) (d + 0) = vfill; *(__m64*) (d + 8) = vfill; *(__m64*) (d + 16) = vfill; *(__m64*) (d + 24) = vfill; *(__m64*) (d + 32) = vfill; *(__m64*) (d + 40) = vfill; *(__m64*) (d + 48) = vfill; *(__m64*) (d + 56) = vfill; w -= 64; d += 64; } while (w >= 4) { *(CARD32 *)d = xor; w -= 4; d += 4; } if (w >= 2) { *(CARD16 *)d = xor; w -= 2; d += 2; } } _mm_empty(); return TRUE; } Bool fbCopyAreammx (DrawablePtr pSrc, DrawablePtr pDst, int src_x, int src_y, int dst_x, int dst_y, int width, int height) { FbBits * src_bits; FbStride src_stride; int src_bpp; int src_xoff; int src_yoff; FbBits * dst_bits; FbStride dst_stride; int dst_bpp; int dst_xoff; int dst_yoff; CARD8 * src_bytes; CARD8 * dst_bytes; int byte_width; fbGetDrawable(pSrc, src_bits, src_stride, src_bpp, src_xoff, src_yoff); fbGetDrawable(pDst, dst_bits, dst_stride, dst_bpp, dst_xoff, dst_yoff); if (src_bpp != 16 && src_bpp != 32) return FALSE; if (dst_bpp != 16 && dst_bpp != 32) return FALSE; if (src_bpp != dst_bpp) { return FALSE; } if (src_bpp == 16) { src_stride = src_stride * sizeof (FbBits) / 2; dst_stride = dst_stride * sizeof (FbBits) / 2; src_bytes = (CARD8 *)(((CARD16 *)src_bits) + src_stride * (src_y - src_yoff) + (src_x - src_xoff)); dst_bytes = (CARD8 *)(((CARD16 *)dst_bits) + dst_stride * (dst_y - dst_yoff) + (dst_x - dst_xoff)); byte_width = 2 * width; src_stride *= 2; dst_stride *= 2; } else { src_stride = src_stride * sizeof (FbBits) / 4; dst_stride = dst_stride * sizeof (FbBits) / 4; src_bytes = (CARD8 *)(((CARD32 *)src_bits) + src_stride * (src_y - src_yoff) + (src_x - src_xoff)); dst_bytes = (CARD8 *)(((CARD32 *)dst_bits) + dst_stride * (dst_y - dst_yoff) + (dst_x - dst_xoff)); byte_width = 4 * width; src_stride *= 4; dst_stride *= 4; } while (height--) { int w; CARD8 *s = src_bytes; CARD8 *d = dst_bytes; src_bytes += src_stride; dst_bytes += dst_stride; w = byte_width; while (w >= 2 && ((unsigned long)d & 3)) { *(CARD16 *)d = *(CARD16 *)s; w -= 2; s += 2; d += 2; } while (w >= 4 && ((unsigned long)d & 7)) { *(CARD32 *)d = *(CARD32 *)s; w -= 4; s += 4; d += 4; } while (w >= 64) { *(__m64 *)(d + 0) = *(__m64 *)(s + 0); *(__m64 *)(d + 8) = *(__m64 *)(s + 8); *(__m64 *)(d + 16) = *(__m64 *)(s + 16); *(__m64 *)(d + 24) = *(__m64 *)(s + 24); *(__m64 *)(d + 32) = *(__m64 *)(s + 32); *(__m64 *)(d + 40) = *(__m64 *)(s + 40); *(__m64 *)(d + 48) = *(__m64 *)(s + 48); *(__m64 *)(d + 56) = *(__m64 *)(s + 56); w -= 64; s += 64; d += 64; } while (w >= 4) { *(CARD32 *)d = *(CARD32 *)s; w -= 4; s += 4; d += 4; } if (w >= 2) { *(CARD16 *)d = *(CARD16 *)s; w -= 2; s += 2; d += 2; } } _mm_empty(); return TRUE; } void fbCompositeCopyAreammx (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { fbCopyAreammx (pSrc->pDrawable, pDst->pDrawable, xSrc, ySrc, xDst, yDst, width, height); } #if !defined(__amd64__) && !defined(__x86_64__) enum CPUFeatures { NoFeatures = 0, MMX = 0x1, MMX_Extensions = 0x2, SSE = 0x6, SSE2 = 0x8, CMOV = 0x10 }; static unsigned int detectCPUFeatures(void) { unsigned int result; char vendor[13]; vendor[0] = 0; vendor[12] = 0; /* see p. 118 of amd64 instruction set manual Vol3 */ __asm__ ("push %%ebx\n" "pushf\n" "pop %%eax\n" "mov %%eax, %%ebx\n" "xor $0x00200000, %%eax\n" "push %%eax\n" "popf\n" "pushf\n" "pop %%eax\n" "mov $0x0, %%edx\n" "xor %%ebx, %%eax\n" "jz skip\n" "mov $0x00000000, %%eax\n" "cpuid\n" "mov %%ebx, %1\n" "mov %%edx, %2\n" "mov %%ecx, %3\n" "mov $0x00000001, %%eax\n" "cpuid\n" "skip:\n" "pop %%ebx\n" "mov %%edx, %0\n" : "=r" (result), "=m" (vendor[0]), "=m" (vendor[4]), "=m" (vendor[8]) : : "%eax", "%ecx", "%edx" ); unsigned int features = 0; if (result) { /* result now contains the standard feature bits */ if (result & (1 << 15)) features |= CMOV; if (result & (1 << 23)) features |= MMX; if (result & (1 << 25)) features |= SSE; if (result & (1 << 26)) features |= SSE2; if ((result & MMX) && !(result & SSE) && (strcmp(vendor, "AuthenticAMD") == 0)) { /* check for AMD MMX extensions */ unsigned int result; __asm__("push %%ebx\n" "mov $0x80000000, %%eax\n" "cpuid\n" "xor %%edx, %%edx\n" "cmp $0x1, %%eax\n" "jge skip2\n" "mov $0x80000001, %%eax\n" "cpuid\n" "skip2:\n" "mov %%edx, %0\n" "pop %%ebx\n" : "=r" (result) : : "%eax", "%ecx", "%edx" ); if (result & (1<<22)) features |= MMX_Extensions; } } return features; } Bool fbHaveMMX (void) { static Bool initialized = FALSE; static Bool mmx_present; if (!initialized) { unsigned int features = detectCPUFeatures(); mmx_present = (features & (MMX|MMX_Extensions)) == (MMX|MMX_Extensions); initialized = TRUE; } return mmx_present; } #endif /* __amd64__ */ #endif liboil-0.3.17/liboil/liboilutils.h0000644000175000017500000000624511066763263013774 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2007 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_UTILS_H_ #define _LIBOIL_UTILS_H_ #include #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif typedef unsigned int oil_bool; #ifdef OIL_ENABLE_UNSTABLE_API #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) #define DIVIDE_ROUND_UP(a,b) (((a) + (b) - 1)/(b)) #ifndef MIN #define MIN(a,b) ((a)<(b) ? (a) : (b)) #endif #ifndef MAX #define MAX(a,b) ((a)>(b) ? (a) : (b)) #endif #ifndef CLAMP #define CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x))) #endif #define ROUND_UP_SHIFT(x,y) (((x) + (1<<(y)) - 1)>>(y)) #define ROUND_UP_POW2(x,y) (((x) + (1<<(y)) - 1)&((~0)<<(y))) #define ROUND_UP_2(x) ROUND_UP_POW2(x,1) #define ROUND_UP_4(x) ROUND_UP_POW2(x,2) #define ROUND_UP_8(x) ROUND_UP_POW2(x,3) #define ROUND_SHIFT(x,y) (((x) + (1<<((y)-1)))>>(y)) #endif #if defined(__GNUC__) && defined(__GNUC_MINOR__) #define OIL_GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) #else #define OIL_GNUC_PREREQ(maj, min) 0 #endif #if OIL_GNUC_PREREQ(3,3) && defined(__ELF__) #define OIL_INTERNAL __attribute__ ((visibility ("internal"))) #else #define OIL_INTERNAL #endif #ifdef __cplusplus #define OIL_BEGIN_DECLS extern "C" { #define OIL_END_DECLS } #else #define OIL_BEGIN_DECLS #define OIL_END_DECLS #endif #ifdef _MSC_VER #ifdef OIL_EXPORTS #define OIL_EXPORT __declspec(dllexport) extern #else #define OIL_EXPORT __declspec(dllimport) extern #endif #else /* not _MSC_VER */ #define OIL_EXPORT extern #endif OIL_BEGIN_DECLS #ifdef OIL_ENABLE_UNSTABLE_API int get_file_int (const char *file, int *value); char * get_file (const char *file); char * get_cpuinfo_line (char *cpuinfo, const char *tag); char * _strndup (const char *s, int n); char ** strsplit (char *s); char * get_tag_value (char *s, const char *tag); #endif OIL_END_DECLS #endif liboil-0.3.17/liboil/powerpc_asm_blocks/0000777000175000017500000000000011332637376015222 500000000000000liboil-0.3.17/liboil/powerpc_asm_blocks/Makefile.am0000644000175000017500000000034610717203073017162 00000000000000 noinst_LTLIBRARIES = libpowerpc_asm_blocks.la sources = \ fdct8x8theora_altivec.c \ recon8x8_ppc.c \ recon8x8_altivec.c libpowerpc_asm_blocks_la_SOURCES = \ $(sources) libpowerpc_asm_blocks_la_CFLAGS = $(LIBOIL_CFLAGS) liboil-0.3.17/liboil/powerpc_asm_blocks/fdct8x8theora_altivec.c0000644000175000017500000005254710717203073021506 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /******************************************************************** * * * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * * * * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2003 * * by the Xiph.Org Foundation http://www.xiph.org/ * * * ******************************************************************** function: last mod: $Id: fdct8x8theora_altivec.c,v 1.1 2005-11-03 07:00:23 ds Exp $ ********************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include extern vector signed short idctConst; extern vector unsigned char vPerm1; extern vector unsigned char vPerm2; extern vector unsigned char vPerm3; OIL_DECLARE_CLASS(fdct8x8theora); static void fdct8x8theora_altivec(int16_t *src, int16_t *dest) { (void) src; (void) dest; asm { lwz r10,vPerm1 xor r7,r7,r7 lwz r8,vPerm2 lwz r9,vPerm3 lvx v30,r10,r7 lvx v31,r8,r7 lvx v29,r9,r7 lwz r9,idctConst xor r7,r7,r7 xor r8,r8,r8 //trying cache hints // lis r8,0x1001 //Block Size = 16, Block Count = 1, Block Stride = 0 // dstst r5,r8,0 // dst r4,r8,1 // dst r3,r8,2 lvx v8,r9,r7 xor r8,r8,r8 lvx v10,r3,r8 //row 0 vsplth v0,v8,0 addi r8,r8,16 lvx v11,r3,r8 //row 1 vsplth v1,v8,1 addi r8,r8,16 lvx v12,r3,r8 //row 2 vsplth v2,v8,2 addi r8,r8,16 lvx v13,r3,r8 //row 3 vsplth v3,v8,3 addi r8,r8,16 lvx v14,r3,r8 //row 4 vsplth v4,v8,4 addi r8,r8,16 lvx v15,r3,r8 //row 5 vsplth v5,v8,5 addi r8,r8,16 lvx v16,r3,r8 //row 6 vsplth v6,v8,6 addi r8,r8,16 lvx v17,r3,r8 //row 7 vsplth v7,v8,7 // on entry //00 01 02 03 04 05 06 07 //10 11 12 13 14 15 16 17 //20 21 22 23 24 25 26 27 //30 31 32 33 34 35 36 37 //40 41 42 43 44 45 46 47 //50 51 52 53 54 55 56 57 //60 61 62 63 64 65 66 67 //70 71 72 73 74 75 76 77 //start of transpose vmrghh v18,v10,v11 vmrglh v19,v10,v11 vmrghh v20,v12,v13 vmrglh v21,v12,v13 vmrghh v22,v14,v15 vmrglh v23,v14,v15 vmrghh v24,v16,v17 vmrglh v25,v16,v17 vmrghw v8,v18,v20 vmrghw v9,v22,v24 vmrghw v26,v19,v21 vmrghw v27,v23,v25 vmrglw v18,v18,v20 vmrglw v22,v22,v24 vmrglw v19,v19,v21 vmrglw v23,v23,v25 vperm v10,v8,v9,v30 //00 10 20 30 40 50 60 70 vperm v11,v8,v9,v31 //01 11 21 31 41 51 61 71 vperm v12,v18,v22,v30 //02 12 22 32 42 52 62 72 vperm v13,v18,v22,v31 //03 13 23 33 43 53 63 73 vperm v20,v26,v27,v30 //04 14 24 34 44 54 64 74 vperm v21,v26,v27,v31 //05 15 25 35 45 55 65 75 vperm v22,v19,v23,v30 //06 16 26 36 46 56 66 76 vperm v23,v19,v23,v31 //07 17 27 37 47 57 67 77 //end of transpose //~~~~~~~~~~ start cut here vsubuhm v14,v10,v23 //id07 vsubuhm v15,v11,v12 //id12 vsubuhm v16,v13,v20 //id34 vsubuhm v17,v21,v22 //id56 vadduhm v10,v10,v23 //is07 vadduhm v11,v11,v12 //is12 vadduhm v12,v13,v20 //is34 vadduhm v13,v21,v22 //is56 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // some precalulations vspltish v28,15 vadduhm v18,v10,v12 //is0734 vadduhm v19,v11,v13 //is1256 vsubuhm v20,v11,v13 //(is12 - is56) vmulesh v22,v20,v4 vmulosh v23,v20,v4 vperm v8,v22,v23,v29 //(c4s4 * (is12 - is56)) - (is12 - is56) vadduhm v8,v8,v20 //c4s4 * (is12 - is56) vsrh v20,v20,v28 //get sign bit vadduhm v8,v8,v20 //add in sign bit aka icommon_product1 vadduhm v20,v15,v17 //(id12 + id56) vmulesh v22,v20,v4 vmulosh v23,v20,v4 vperm v9,v22,v23,v29 //(c4s4 * (is12 + is56)) - (is12 + is56) vadduhm v9,v9,v20 //c4s4 * (is12 + is56) vsrh v20,v20,v28 //get sign bit vadduhm v9,v9,v20 //add in sign bit aka icommon_product2 vsubuhm v20,v15,v17 //irot_input_x = id12 - id56 vsubuhm v21,v10,v12 //irot_input_y = is07 - is34 vadduhm v22,v14,v8 //irot_input_x = icommon_product1 + id07 vadduhm v23,v16,v9 //irot_input_y = icommon_product2 + id34 vxor v24,v24,v24 vsubuhm v23,v24,v23 //irot_input_y = -(icommon_product2 + id34) vsubuhm v24,v14,v8 //irot_input_x = id07 - icommon_product1 vsubuhm v25,v16,v9 //irot_input_y = id34 - icommon_product2 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ip[0], ip[4] vadduhm v8,v18,v19 //(is0734 + is1256) vsubuhm v9,v18,v19 //(is0734 - is1256) vmulesh v18,v8,v4 vmulosh v19,v8,v4 vperm v18,v18,v19,v29 //(c4s4 * (is0734 + is1256)) - (is0734 + is1256) vadduhm v18,v18,v8 //(c4s4 * (is0734 + is1256)) vsrh v8,v8,v28 vadduhm v10,v18,v8 //add in sign bit aka ip[0] vmulesh v18,v9,v4 vmulosh v19,v9,v4 vperm v18,v18,v19,v29 //(c4s4 * (is0734 + is1256)) - (is0734 + is1256) vadduhm v18,v18,v9 //(c4s4 * (is0734 + is1256)) vsrh v9,v9,v28 vadduhm v14,v18,v9 //add in sign bit aka ip[4] //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ip[2], ip[6] vmulesh v18,v20,v6 vmulosh v19,v20,v6 vperm v18,v18,v19,v29 //(c6s2 * (irot_input_x)) vsrh v8,v20,v28 vadduhm v8,v18,v8 //add in sign bit aka temp1 vmulesh v18,v21,v2 vmulosh v19,v21,v2 vperm v18,v18,v19,v29 //(c2s6 * (irot_input_y)) - irot_input_y vadduhm v18,v18,v21 //(c2s6 * (irot_input_y)) vsrh v9,v21,v28 vadduhm v9,v18,v9 //add in sign bit aka temp2 vadduhm v12,v8,v9 //ip[2] vmulesh v18,v21,v6 vmulosh v19,v21,v6 vperm v18,v18,v19,v29 //(c6s2 * (irot_input_y)) vsrh v8,v21,v28 vadduhm v8,v18,v8 //add in sign bit aka temp1 vmulesh v18,v20,v2 vmulosh v19,v20,v2 vperm v18,v18,v19,v29 //(c2s6 * (irot_input_x)) - irot_input_x vadduhm v18,v18,v20 //(c2s6 * (irot_input_x)) vsrh v9,v20,v28 vadduhm v9,v18,v9 //add in sign bit aka temp2 vsubuhm v16,v8,v9 //ip[6] //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ip[1], ip[7] vmulesh v18,v22,v1 vmulosh v19,v22,v1 vperm v18,v18,v19,v29 //(c1s7 * (irot_input_x)) - irot_input_x vadduhm v18,v18,v22 //(c1s7 * (irot_input_x)) vsrh v8,v22,v28 vadduhm v8,v18,v8 //add in sign bit aka temp1 vmulesh v18,v23,v7 vmulosh v19,v23,v7 vperm v18,v18,v19,v29 //(c7s1 * (irot_input_y)) vsrh v9,v23,v28 vadduhm v9,v18,v9 //add in sign bit aka temp2 vsubuhm v11,v8,v9 //ip[1] vmulesh v18,v22,v7 vmulosh v19,v22,v7 vperm v18,v18,v19,v29 //(c7s1 * (irot_input_x)) vsrh v8,v22,v28 vadduhm v8,v18,v8 //add in sign bit aka temp1 vmulesh v18,v23,v1 vmulosh v19,v23,v1 vperm v18,v18,v19,v29 //(c1s7 * (irot_input_y)) - irot_input_y vadduhm v18,v18,v23 //(c1s7 * (irot_input_7)) vsrh v9,v23,v28 vadduhm v9,v18,v9 //add in sign bit aka temp2 vadduhm v17,v8,v9 //ip[7] //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ip[3], ip[5] vmulesh v18,v24,v3 vmulosh v19,v24,v3 vperm v18,v18,v19,v29 //(c3s5 * (irot_input_x)) - irot_input_x vadduhm v18,v18,v24 //(c3s5 * (irot_input_x)) vsrh v8,v24,v28 vadduhm v8,v18,v8 //add in sign bit aka temp1 vmulesh v18,v25,v5 vmulosh v19,v25,v5 vperm v18,v18,v19,v29 //(c5s3 * (irot_input_y)) - irot_input_y vadduhm v18,v18,v25 //(c5s3 * (irot_input_y)) vsrh v9,v25,v28 vadduhm v9,v18,v9 //add in sign bit aka temp2 vsubuhm v13,v8,v9 //ip[3] vmulesh v18,v24,v5 vmulosh v19,v24,v5 vperm v18,v18,v19,v29 //(c5s3 * (irot_input_x)) - irot_input_x vadduhm v18,v18,v24 //(c5s3 * (irot_input_x)) vsrh v8,v24,v28 vadduhm v8,v18,v8 //add in sign bit aka temp1 vmulesh v18,v25,v3 vmulosh v19,v25,v3 vperm v18,v18,v19,v29 //(c3s5 * (irot_input_y)) - irot_input_y vadduhm v18,v18,v25 //(c3s5 * (irot_input_y)) vsrh v9,v25,v28 vadduhm v9,v18,v9 //add in sign bit aka temp2 vadduhm v15,v8,v9 //ip[5] //~~~~~~~~~~ end cut here //~~~~~~~~~~~~~~~ transpose back //start of transpose vmrghh v18,v10,v11 //00 01 10 11 20 21 30 31 vmrglh v19,v10,v11 //40 41 50 51 60 61 70 71 vmrghh v20,v12,v13 //02 03 12 13 22 23 32 33 vmrglh v21,v12,v13 //42 43 52 53 62 63 72 73 vmrghh v22,v14,v15 //04 05 14 15 24 25 34 35 vmrglh v23,v14,v15 //44 45 54 55 64 65 74 75 vmrghh v24,v16,v17 //06 07 16 17 26 27 36 37 vmrglh v25,v16,v17 //46 47 56 57 66 67 76 77 vmrghw v8,v18,v20 //00 01 02 03 10 11 12 13 vmrghw v9,v22,v24 //04 05 06 07 14 15 16 17 vmrghw v26,v19,v21 //40 41 42 43 50 51 52 53 vmrghw v27,v23,v25 //44 45 46 47 54 55 56 57 vmrglw v18,v18,v20 //20 21 22 23 30 31 32 33 vmrglw v22,v22,v24 //24 25 26 27 34 35 36 37 vmrglw v19,v19,v21 //60 61 62 63 70 71 72 73 vmrglw v23,v23,v25 //64 65 66 67 74 75 76 77 vperm v10,v8,v9,v30 //00 01 02 03 04 05 06 07 vperm v11,v8,v9,v31 //10 11 12 13 14 15 16 17 vperm v12,v18,v22,v30 //20 21 22 23 24 25 26 27 vperm v13,v18,v22,v31 //30 31 32 33 34 35 36 37 vperm v20,v26,v27,v30 //40 41 42 43 44 45 46 47 vperm v21,v26,v27,v31 //50 51 52 53 54 55 56 57 vperm v22,v19,v23,v30 //60 61 62 63 64 65 66 67 vperm v23,v19,v23,v31 //70 71 72 73 74 75 76 77 //end of transpose //~~~~~~~~~~ start cut here vsubuhm v14,v10,v23 //id07 vsubuhm v15,v11,v12 //id12 vsubuhm v16,v13,v20 //id34 vsubuhm v17,v21,v22 //id56 vadduhm v10,v10,v23 //is07 vadduhm v11,v11,v12 //is12 vadduhm v12,v13,v20 //is34 vadduhm v13,v21,v22 //is56 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // some precalulations vspltish v28,15 vadduhm v18,v10,v12 //is0734 vadduhm v19,v11,v13 //is1256 vsubuhm v20,v11,v13 //(is12 - is56) vmulesh v22,v20,v4 vmulosh v23,v20,v4 vperm v8,v22,v23,v29 //(c4s4 * (is12 - is56)) - (is12 - is56) vadduhm v8,v8,v20 //c4s4 * (is12 - is56) vsrh v20,v20,v28 //get sign bit vadduhm v8,v8,v20 //add in sign bit aka icommon_product1 vadduhm v20,v15,v17 //(id12 + id56) vmulesh v22,v20,v4 vmulosh v23,v20,v4 vperm v9,v22,v23,v29 //(c4s4 * (is12 + is56)) - (is12 + is56) vadduhm v9,v9,v20 //c4s4 * (is12 + is56) vsrh v20,v20,v28 //get sign bit vadduhm v9,v9,v20 //add in sign bit aka icommon_product2 vsubuhm v20,v15,v17 //irot_input_x = id12 - id56 vsubuhm v21,v10,v12 //irot_input_y = is07 - is34 vadduhm v22,v14,v8 //irot_input_x = icommon_product1 + id07 vadduhm v23,v16,v9 //irot_input_y = icommon_product2 + id34 vxor v24,v24,v24 vsubuhm v23,v24,v23 //irot_input_y = -(icommon_product2 + id34) vsubuhm v24,v14,v8 //irot_input_x = id07 - icommon_product1 vsubuhm v25,v16,v9 //irot_input_y = id34 - icommon_product2 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ip[0], ip[4] vadduhm v8,v18,v19 //(is0734 + is1256) vsubuhm v9,v18,v19 //(is0734 - is1256) vmulesh v18,v8,v4 vmulosh v19,v8,v4 vperm v18,v18,v19,v29 //(c4s4 * (is0734 + is1256)) - (is0734 + is1256) vadduhm v18,v18,v8 //(c4s4 * (is0734 + is1256)) vsrh v8,v8,v28 vadduhm v10,v18,v8 //add in sign bit aka ip[0] vmulesh v18,v9,v4 vmulosh v19,v9,v4 vperm v18,v18,v19,v29 //(c4s4 * (is0734 + is1256)) - (is0734 + is1256) vadduhm v18,v18,v9 //(c4s4 * (is0734 + is1256)) vsrh v9,v9,v28 vadduhm v14,v18,v9 //add in sign bit aka ip[4] //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ip[2], ip[6] vmulesh v18,v20,v6 vmulosh v19,v20,v6 vperm v18,v18,v19,v29 //(c6s2 * (irot_input_x)) vsrh v8,v20,v28 vadduhm v8,v18,v8 //add in sign bit aka temp1 vmulesh v18,v21,v2 vmulosh v19,v21,v2 vperm v18,v18,v19,v29 //(c2s6 * (irot_input_y)) - irot_input_y vadduhm v18,v18,v21 //(c2s6 * (irot_input_y)) vsrh v9,v21,v28 vadduhm v9,v18,v9 //add in sign bit aka temp2 vadduhm v12,v8,v9 //ip[2] vmulesh v18,v21,v6 vmulosh v19,v21,v6 vperm v18,v18,v19,v29 //(c6s2 * (irot_input_y)) vsrh v8,v21,v28 vadduhm v8,v18,v8 //add in sign bit aka temp1 vmulesh v18,v20,v2 vmulosh v19,v20,v2 vperm v18,v18,v19,v29 //(c2s6 * (irot_input_x)) - irot_input_x vadduhm v18,v18,v20 //(c2s6 * (irot_input_x)) vsrh v9,v20,v28 vadduhm v9,v18,v9 //add in sign bit aka temp2 vsubuhm v16,v8,v9 //ip[6] //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ip[1], ip[7] vmulesh v18,v22,v1 vmulosh v19,v22,v1 vperm v18,v18,v19,v29 //(c1s7 * (irot_input_x)) - irot_input_x vadduhm v18,v18,v22 //(c1s7 * (irot_input_x)) vsrh v8,v22,v28 vadduhm v8,v18,v8 //add in sign bit aka temp1 vmulesh v18,v23,v7 vmulosh v19,v23,v7 vperm v18,v18,v19,v29 //(c7s1 * (irot_input_y)) vsrh v9,v23,v28 vadduhm v9,v18,v9 //add in sign bit aka temp2 vsubuhm v11,v8,v9 //ip[1] vmulesh v18,v22,v7 vmulosh v19,v22,v7 vperm v18,v18,v19,v29 //(c7s1 * (irot_input_x)) vsrh v8,v22,v28 vadduhm v8,v18,v8 //add in sign bit aka temp1 vmulesh v18,v23,v1 vmulosh v19,v23,v1 vperm v18,v18,v19,v29 //(c1s7 * (irot_input_y)) - irot_input_y vadduhm v18,v18,v23 //(c1s7 * (irot_input_7)) vsrh v9,v23,v28 vadduhm v9,v18,v9 //add in sign bit aka temp2 vadduhm v17,v8,v9 //ip[7] //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ip[3], ip[5] vmulesh v18,v24,v3 vmulosh v19,v24,v3 vperm v18,v18,v19,v29 //(c3s5 * (irot_input_x)) - irot_input_x vadduhm v18,v18,v24 //(c3s5 * (irot_input_x)) vsrh v8,v24,v28 vadduhm v8,v18,v8 //add in sign bit aka temp1 vmulesh v18,v25,v5 vmulosh v19,v25,v5 vperm v18,v18,v19,v29 //(c5s3 * (irot_input_y)) - irot_input_y vadduhm v18,v18,v25 //(c5s3 * (irot_input_y)) vsrh v9,v25,v28 vadduhm v9,v18,v9 //add in sign bit aka temp2 vsubuhm v13,v8,v9 //ip[3] vmulesh v18,v24,v5 vmulosh v19,v24,v5 vperm v18,v18,v19,v29 //(c5s3 * (irot_input_x)) - irot_input_x vadduhm v18,v18,v24 //(c5s3 * (irot_input_x)) vsrh v8,v24,v28 vadduhm v8,v18,v8 //add in sign bit aka temp1 vmulesh v18,v25,v3 vmulosh v19,v25,v3 vperm v18,v18,v19,v29 //(c3s5 * (irot_input_y)) - irot_input_y vadduhm v18,v18,v25 //(c3s5 * (irot_input_y)) vsrh v9,v25,v28 vadduhm v9,v18,v9 //add in sign bit aka temp2 vadduhm v15,v8,v9 //ip[5] //~~~~~~~~~~ end cut here //~~~~~~~~~~ write to destination xor r8,r8,r8 stvx v10,r4,r8 addi r8,r8,16 stvx v11,r4,r8 addi r8,r8,16 stvx v12,r4,r8 addi r8,r8,16 stvx v13,r4,r8 addi r8,r8,16 stvx v14,r4,r8 addi r8,r8,16 stvx v15,r4,r8 addi r8,r8,16 stvx v16,r4,r8 addi r8,r8,16 stvx v17,r4,r8 } } OIL_DEFINE_IMPL_REF (fdct8x8theora_altivec, fdct8x8theora, OIL_IMPL_FLAG_ALTIVEC); liboil-0.3.17/liboil/powerpc_asm_blocks/recon8x8_altivec.c0000644000175000017500000004073710717203073020467 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* these functions are copied from http://svn.xiph.org/trunk/vp32/CoreLibs/CDXV/Vp31/Common/mac/OptFunctionsPPC.c */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include OIL_DECLARE_CLASS (recon8x8_intra); OIL_DECLARE_CLASS (recon8x8_inter); OIL_DECLARE_CLASS (recon8x8_inter2); static const __attribute__ ((aligned(8),used)) uint64_t V128 = 0x8080808080808080LL; static void /* r3, r4, r5 */ recon8x8_intra_altivec (uint8_t *dest, int16_t *change, int ds) { asm { //trying cache hints lis r6,0x0108 or r6,r6,r5 dstst r3,r6,0 vspltish v1,7 vspltish v8,1 xor r6,r6,r6 lvx v0,r4,r6 //get 8 shorts vslh v8,v8,v1 //now have 128 addi r6,r6,16 lvx v1,r4,r6 //get 8 shorts vaddshs v0,v0,v8 //+=128 addi r6,r6,16 lvx v2,r4,r6 //get 8 shorts vaddshs v1,v1,v8 //+=128 addi r6,r6,16 vpkshus v0,v0,v0 //convert to bytes lvx v3,r4,r6 //get 8 shorts vaddshs v2,v2,v8 //+=128 addi r6,r6,16 vpkshus v1,v1,v1 //convert to bytes lvx v4,r4,r6 //get 8 shorts vaddshs v3,v3,v8 //+=128 addi r6,r6,16 vpkshus v2,v2,v2 //convert to bytes lvx v5,r4,r6 //get 8 shorts vaddshs v4,v4,v8 //+=128 addi r6,r6,16 vpkshus v3,v3,v3 //convert to bytes lvx v6,r4,r6 //get 8 shorts vaddshs v5,v5,v8 //+=128 addi r6,r6,16 vpkshus v4,v4,v4 //convert to bytes lvx v7,r4,r6 //get 8 shorts xor r6,r6,r6 vaddshs v6,v6,v8 //+=128 vpkshus v5,v5,v5 //convert to bytes lvsr v9,r3,r6 //load alignment vector for stores vaddshs v7,v7,v8 //+=128 vpkshus v6,v6,v6 //convert to bytes vpkshus v7,v7,v7 //convert to bytes li r7,4 vperm v0,v0,v0,v9 stvewx v0,r3,r6 add r6,r6,r5 lvsr v9,r3,r6 //load alignment vector for stores stvewx v0,r3,r7 add r7,r7,r5 vperm v1,v1,v1,v9 stvewx v1,r3,r6 add r6,r6,r5 lvsr v9,r3,r6 //load alignment vector for stores stvewx v1,r3,r7 add r7,r7,r5 vperm v2,v2,v2,v9 stvewx v2,r3,r6 add r6,r6,r5 lvsr v9,r3,r6 //load alignment vector for stores stvewx v2,r3,r7 add r7,r7,r5 vperm v3,v3,v3,v9 stvewx v3,r3,r6 add r6,r6,r5 lvsr v9,r3,r6 //load alignment vector for stores stvewx v3,r3,r7 add r7,r7,r5 vperm v4,v4,v4,v9 stvewx v4,r3,r6 add r6,r6,r5 lvsr v9,r3,r6 //load alignment vector for stores stvewx v4,r3,r7 add r7,r7,r5 vperm v5,v5,v5,v9 stvewx v5,r3,r6 add r6,r6,r5 lvsr v9,r3,r6 //load alignment vector for stores stvewx v5,r3,r7 add r7,r7,r5 vperm v6,v6,v6,v9 stvewx v6,r3,r6 add r6,r6,r5 lvsr v9,r3,r6 //load alignment vector for stores stvewx v6,r3,r7 add r7,r7,r5 vperm v7,v7,v7,v9 stvewx v7,r3,r6 stvewx v7,r3,r7 } } OIL_DEFINE_IMPL_FULL (recon8x8_intra_altivec, recon8x8_intra, OIL_IMPL_FLAG_ALTIVEC); static void /* r3, r4, r5, r6 */ recon8x8_inter_altivec (uint8_t *dest, uint8_t *src, int16_t *change, int dss) { asm { //trying cache hints lis r7,0x0108 or r7,r7,r6 dstst r3,r7,0 xor r7,r7,r7 li r8,16 lvsl v8,r4,r7 //load alignment vector for refs vxor v9,v9,v9 lvx v10,r4,r7 //get 8 refs add r7,r7,r6 lvx v0,r4,r8 //need another 16 bytes for misaligned data -- 0 add r8,r8,r6 lvx v11,r4,r7 //get 8 refs vperm v10,v10,v0,v8 lvsl v8,r4,r7 //load alignment vector for refs add r7,r7,r6 lvx v1,r4,r8 //need another 16 bytes for misaligned data -- 1 add r8,r8,r6 lvx v12,r4,r7 //get 8 refs vperm v11,v11,v1,v8 lvsl v8,r4,r7 //load alignment vector for refs add r7,r7,r6 lvx v2,r4,r8 //need another 16 bytes for misaligned data -- 2 add r8,r8,r6 lvx v13,r4,r7 //get 8 refs vperm v12,v12,v2,v8 lvsl v8,r4,r7 //load alignment vector for refs add r7,r7,r6 lvx v3,r4,r8 //need another 16 bytes for misaligned data -- 3 add r8,r8,r6 lvx v14,r4,r7 //get 8 refs vperm v13,v13,v3,v8 lvsl v8,r4,r7 //load alignment vector for refs add r7,r7,r6 lvx v4,r4,r8 //need another 16 bytes for misaligned data -- 4 add r8,r8,r6 lvx v15,r4,r7 //get 8 refs vperm v14,v14,v4,v8 lvsl v8,r4,r7 //load alignment vector for refs add r7,r7,r6 lvx v5,r4,r8 //need another 16 bytes for misaligned data -- 5 add r8,r8,r6 lvx v16,r4,r7 //get 8 refs vperm v15,v15,v5,v8 lvsl v8,r4,r7 //load alignment vector for refs add r7,r7,r6 lvx v6,r4,r8 //need another 16 bytes for misaligned data -- 6 add r8,r8,r6 lvx v17,r4,r7 //get 8 refs vperm v16,v16,v6,v8 lvsl v8,r4,r7 //load alignment vector for refs xor r7,r7,r7 lvx v7,r4,r8 //need another 16 bytes for misaligned data -- 7 add r8,r8,r6 lvx v0,r5,r7 //get 8 shorts vperm v17,v17,v7,v8 addi r7,r7,16 lvx v1,r5,r7 //get 8 shorts vmrghb v10,v9,v10 //unsigned byte -> unsigned half addi r7,r7,16 lvx v2,r5,r7 //get 8 shorts vmrghb v11,v9,v11 //unsigned byte -> unsigned half vaddshs v0,v0,v10 addi r7,r7,16 lvx v3,r5,r7 //get 8 shorts vmrghb v12,v9,v12 //unsigned byte -> unsigned half vaddshs v1,v1,v11 addi r7,r7,16 lvx v4,r5,r7 //get 8 shorts vmrghb v13,v9,v13 //unsigned byte -> unsigned half vaddshs v2,v2,v12 addi r7,r7,16 lvx v5,r5,r7 //get 8 shorts vmrghb v14,v9,v14 //unsigned byte -> unsigned half vaddshs v3,v3,v13 addi r7,r7,16 lvx v6,r5,r7 //get 8 shorts vmrghb v15,v9,v15 //unsigned byte -> unsigned half vaddshs v4,v4,v14 addi r7,r7,16 lvx v7,r5,r7 //get 8 shorts vmrghb v16,v9,v16 //unsigned byte -> unsigned half vaddshs v5,v5,v15 vmrghb v17,v9,v17 //unsigned byte -> unsigned half vaddshs v6,v6,v16 vpkshus v0,v0,v0 vaddshs v7,v7,v17 vpkshus v1,v1,v1 xor r7,r7,r7 vpkshus v2,v2,v2 vpkshus v3,v3,v3 vpkshus v4,v4,v4 vpkshus v5,v5,v5 vpkshus v6,v6,v6 lvsr v9,r3,r7 //load alignment vector for stores vpkshus v7,v7,v7 li r8,4 vperm v0,v0,v0,v9 //adjust for writes stvewx v0,r3,r7 add r7,r7,r6 lvsr v9,r3,r7 //load alignment vector for stores stvewx v0,r3,r8 add r8,r8,r6 vperm v1,v1,v1,v9 stvewx v1,r3,r7 add r7,r7,r6 lvsr v9,r3,r7 //load alignment vector for stores stvewx v1,r3,r8 add r8,r8,r6 vperm v2,v2,v2,v9 stvewx v2,r3,r7 add r7,r7,r6 lvsr v9,r3,r7 //load alignment vector for stores stvewx v2,r3,r8 add r8,r8,r6 vperm v3,v3,v3,v9 stvewx v3,r3,r7 add r7,r7,r6 lvsr v9,r3,r7 //load alignment vector for stores stvewx v3,r3,r8 add r8,r8,r6 vperm v4,v4,v4,v9 stvewx v4,r3,r7 add r7,r7,r6 lvsr v9,r3,r7 //load alignment vector for stores stvewx v4,r3,r8 add r8,r8,r6 vperm v5,v5,v5,v9 stvewx v5,r3,r7 add r7,r7,r6 lvsr v9,r3,r7 //load alignment vector for stores stvewx v5,r3,r8 add r8,r8,r6 vperm v6,v6,v6,v9 stvewx v6,r3,r7 add r7,r7,r6 lvsr v9,r3,r7 //load alignment vector for stores stvewx v6,r3,r8 add r8,r8,r6 vperm v7,v7,v7,v9 stvewx v7,r3,r7 stvewx v7,r3,r8 } } OIL_DEFINE_IMPL_FULL (recon8x8_inter_altivec, recon8x8_inter, OIL_IMPL_FLAG_ALTIVEC); static void /* r3, r4, r5, r6, r7 */ recon8x8_inter2_altivec (uint8_t *dest, uint8_t *s1, uint8_t *s2, int16_t *change, int dsss) { asm { //trying cache hints lis r8,0x0108 or r8,r8,r7 dstst r3,r8,0 xor r8,r8,r8 li r9,16 lvsl v8,r4,r8 //load alignment vector for RefPtr1 vxor v9,v9,v9 lvx v10,r4,r8 //get 8 RefPtr1 -- 0 add r8,r8,r7 lvx v0,r4,r9 //need another 16 bytes for misaligned data -- 0 add r9,r9,r7 lvx v11,r4,r8 //get 8 RefPtr1 -- 1 vperm v10,v10,v0,v8 lvsl v8,r4,r8 //load alignment vector for RefPtr1 add r8,r8,r7 lvx v1,r4,r9 //need another 16 bytes for misaligned data -- 1 vmrghb v10,v9,v10 //unsigned byte -> unsigned half add r9,r9,r7 lvx v12,r4,r8 //get 8 RefPtr1 -- 2 vperm v11,v11,v1,v8 lvsl v8,r4,r8 //load alignment vector for RefPtr1 add r8,r8,r7 lvx v2,r4,r9 //need another 16 bytes for misaligned data -- 2 vmrghb v11,v9,v11 //unsigned byte -> unsigned half add r9,r9,r7 lvx v13,r4,r8 //get 8 RefPtr1 -- 3 vperm v12,v12,v2,v8 lvsl v8,r4,r8 //load alignment vector for RefPtr1 add r8,r8,r7 lvx v3,r4,r9 //need another 16 bytes for misaligned data -- 3 vmrghb v12,v9,v12 //unsigned byte -> unsigned half add r9,r9,r7 lvx v14,r4,r8 //get 8 RefPtr1 -- 4 vperm v13,v13,v3,v8 lvsl v8,r4,r8 //load alignment vector for RefPtr1 add r8,r8,r7 lvx v4,r4,r9 //need another 16 bytes for misaligned data -- 4 vmrghb v13,v9,v13 //unsigned byte -> unsigned half add r9,r9,r7 lvx v15,r4,r8 //get 8 RefPtr1 -- 5 vperm v14,v14,v4,v8 lvsl v8,r4,r8 //load alignment vector for RefPtr1 add r8,r8,r7 lvx v5,r4,r9 //need another 16 bytes for misaligned data -- 5 vmrghb v14,v9,v14 //unsigned byte -> unsigned half add r9,r9,r7 lvx v16,r4,r8 //get 8 RefPtr1 -- 6 vperm v15,v15,v5,v8 lvsl v8,r4,r8 //load alignment vector for RefPtr1 add r8,r8,r7 lvx v6,r4,r9 //need another 16 bytes for misaligned data -- 6 vmrghb v15,v9,v15 //unsigned byte -> unsigned half add r9,r9,r7 lvx v17,r4,r8 //get 8 RefPtr1 -- 7 vperm v16,v16,v6,v8 lvsl v8,r4,r8 //load alignment vector for RefPtr1 add r8,r8,r7 lvx v7,r4,r9 //need another 16 bytes for misaligned data -- 7 vmrghb v16,v9,v16 //unsigned byte -> unsigned half add r9,r9,r7 //-------- vperm v17,v17,v7,v8 xor r8,r8,r8 li r9,16 lvsl v18,r5,r8 //load alignment vector for RefPtr2 vmrghb v17,v9,v17 //unsigned byte -> unsigned half lvx v20,r5,r8 //get 8 RefPtr2 -- 0 add r8,r8,r7 lvx v0,r5,r9 //need another 16 bytes for misaligned data -- 0 add r9,r9,r7 lvx v21,r5,r8 //get 8 RefPtr2 -- 1 vperm v20,v20,v0,v18 lvsl v18,r5,r8 //load alignment vector for RefPtr2 add r8,r8,r7 lvx v1,r5,r9 //need another 16 bytes for misaligned data -- 1 vmrghb v20,v9,v20 //unsigned byte -> unsigned half add r9,r9,r7 lvx v22,r5,r8 //get 8 RefPtr2 -- 2 vperm v21,v21,v1,v18 lvsl v18,r5,r8 //load alignment vector for RefPtr2 add r8,r8,r7 lvx v2,r5,r9 //need another 16 bytes for misaligned data -- 2 vmrghb v21,v9,v21 //unsigned byte -> unsigned half vadduhm v10,v10,v20 add r9,r9,r7 lvx v23,r5,r8 //get 8 RefPtr2 -- 3 vperm v22,v22,v2,v18 lvsl v18,r5,r8 //load alignment vector for RefPtr2 add r8,r8,r7 lvx v3,r5,r9 //need another 16 bytes for misaligned data -- 3 vmrghb v22,v9,v22 //unsigned byte -> unsigned half vadduhm v11,v11,v21 add r9,r9,r7 lvx v24,r5,r8 //get 8 RefPtr2 -- 4 vperm v23,v23,v3,v18 lvsl v18,r5,r8 //load alignment vector for RefPtr2 add r8,r8,r7 lvx v4,r5,r9 //need another 16 bytes for misaligned data -- 4 vmrghb v23,v9,v23 //unsigned byte -> unsigned half vadduhm v12,v12,v22 add r9,r9,r7 lvx v25,r5,r8 //get 8 RefPtr2 -- 5 vperm v24,v24,v4,v18 lvsl v18,r5,r8 //load alignment vector for RefPtr2 add r8,r8,r7 lvx v5,r5,r9 //need another 16 bytes for misaligned data -- 5 vmrghb v24,v9,v24 //unsigned byte -> unsigned half vadduhm v13,v13,v23 add r9,r9,r7 lvx v26,r5,r8 //get 8 RefPtr2 -- 6 vperm v25,v25,v5,v18 lvsl v18,r5,r8 //load alignment vector for RefPtr2 add r8,r8,r7 lvx v6,r5,r9 //need another 16 bytes for misaligned data -- 6 vmrghb v25,v9,v25 //unsigned byte -> unsigned half vadduhm v14,v14,v24 add r9,r9,r7 lvx v27,r5,r8 //get 8 RefPtr2 -- 7 vperm v26,v26,v6,v18 lvsl v18,r5,r8 //load alignment vector for RefPtr2 add r8,r8,r7 lvx v7,r5,r9 //need another 16 bytes for misaligned data -- 7 vmrghb v26,v9,v26 //unsigned byte -> unsigned half vadduhm v15,v15,v25 add r9,r9,r7 vperm v27,v27,v7,v18 xor r8,r8,r8 vmrghb v27,v9,v27 //unsigned byte -> unsigned half vadduhm v16,v16,v26 vadduhm v17,v17,v27 vspltish v8,1 //-------- lvx v0,r6,r8 //get 8 shorts vsrh v10,v10,v8 addi r8,r8,16 lvx v1,r6,r8 //get 8 shorts vsrh v11,v11,v8 addi r8,r8,16 lvx v2,r6,r8 //get 8 shorts vsrh v12,v12,v8 addi r8,r8,16 lvx v3,r6,r8 //get 8 shorts vsrh v13,v13,v8 addi r8,r8,16 lvx v4,r6,r8 //get 8 shorts vsrh v14,v14,v8 addi r8,r8,16 lvx v5,r6,r8 //get 8 shorts vsrh v15,v15,v8 addi r8,r8,16 lvx v6,r6,r8 //get 8 shorts vsrh v16,v16,v8 addi r8,r8,16 lvx v7,r6,r8 //get 8 shorts vsrh v17,v17,v8 xor r8,r8,r8 //-------- lvsr v9,r3,r8 //load alignment vector for stores vaddshs v0,v0,v10 vaddshs v1,v1,v11 vpkshus v0,v0,v0 vaddshs v2,v2,v12 vpkshus v1,v1,v1 vaddshs v3,v3,v13 vpkshus v2,v2,v2 vaddshs v4,v4,v14 vpkshus v3,v3,v3 vaddshs v5,v5,v15 vpkshus v4,v4,v4 vaddshs v6,v6,v16 vpkshus v5,v5,v5 vaddshs v7,v7,v17 vpkshus v6,v6,v6 vpkshus v7,v7,v7 li r9,4 vperm v0,v0,v0,v9 //adjust for writes stvewx v0,r3,r8 add r8,r8,r7 lvsr v9,r3,r8 //load alignment vector for stores stvewx v0,r3,r9 add r9,r9,r7 vperm v1,v1,v1,v9 stvewx v1,r3,r8 add r8,r8,r7 lvsr v9,r3,r8 //load alignment vector for stores stvewx v1,r3,r9 add r9,r9,r7 vperm v2,v2,v2,v9 stvewx v2,r3,r8 add r8,r8,r7 lvsr v9,r3,r8 //load alignment vector for stores stvewx v2,r3,r9 add r9,r9,r7 vperm v3,v3,v3,v9 stvewx v3,r3,r8 add r8,r8,r7 lvsr v9,r3,r8 //load alignment vector for stores stvewx v3,r3,r9 add r9,r9,r7 vperm v4,v4,v4,v9 stvewx v4,r3,r8 add r8,r8,r7 lvsr v9,r3,r8 //load alignment vector for stores stvewx v4,r3,r9 add r9,r9,r7 vperm v5,v5,v5,v9 stvewx v5,r3,r8 add r8,r8,r7 lvsr v9,r3,r8 //load alignment vector for stores stvewx v5,r3,r9 add r9,r9,r7 vperm v6,v6,v6,v9 stvewx v6,r3,r8 add r8,r8,r7 lvsr v9,r3,r8 //load alignment vector for stores stvewx v6,r3,r9 add r9,r9,r7 vperm v7,v7,v7,v9 stvewx v7,r3,r8 stvewx v7,r3,r9 } } OIL_DEFINE_IMPL_FULL (recon8x8_inter2_altivec, recon8x8_inter2, OIL_IMPL_FLAG_ALTIVEC); liboil-0.3.17/liboil/powerpc_asm_blocks/Makefile.in0000644000175000017500000004676111332627673017220 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = liboil/powerpc_asm_blocks DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libpowerpc_asm_blocks_la_LIBADD = am__objects_1 = libpowerpc_asm_blocks_la-fdct8x8theora_altivec.lo \ libpowerpc_asm_blocks_la-recon8x8_ppc.lo \ libpowerpc_asm_blocks_la-recon8x8_altivec.lo am_libpowerpc_asm_blocks_la_OBJECTS = $(am__objects_1) libpowerpc_asm_blocks_la_OBJECTS = \ $(am_libpowerpc_asm_blocks_la_OBJECTS) libpowerpc_asm_blocks_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libpowerpc_asm_blocks_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libpowerpc_asm_blocks_la_SOURCES) DIST_SOURCES = $(libpowerpc_asm_blocks_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libpowerpc_asm_blocks.la sources = \ fdct8x8theora_altivec.c \ recon8x8_ppc.c \ recon8x8_altivec.c libpowerpc_asm_blocks_la_SOURCES = \ $(sources) libpowerpc_asm_blocks_la_CFLAGS = $(LIBOIL_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/powerpc_asm_blocks/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/powerpc_asm_blocks/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpowerpc_asm_blocks.la: $(libpowerpc_asm_blocks_la_OBJECTS) $(libpowerpc_asm_blocks_la_DEPENDENCIES) $(libpowerpc_asm_blocks_la_LINK) $(libpowerpc_asm_blocks_la_OBJECTS) $(libpowerpc_asm_blocks_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpowerpc_asm_blocks_la-fdct8x8theora_altivec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpowerpc_asm_blocks_la-recon8x8_altivec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpowerpc_asm_blocks_la-recon8x8_ppc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libpowerpc_asm_blocks_la-fdct8x8theora_altivec.lo: fdct8x8theora_altivec.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpowerpc_asm_blocks_la_CFLAGS) $(CFLAGS) -MT libpowerpc_asm_blocks_la-fdct8x8theora_altivec.lo -MD -MP -MF $(DEPDIR)/libpowerpc_asm_blocks_la-fdct8x8theora_altivec.Tpo -c -o libpowerpc_asm_blocks_la-fdct8x8theora_altivec.lo `test -f 'fdct8x8theora_altivec.c' || echo '$(srcdir)/'`fdct8x8theora_altivec.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpowerpc_asm_blocks_la-fdct8x8theora_altivec.Tpo $(DEPDIR)/libpowerpc_asm_blocks_la-fdct8x8theora_altivec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fdct8x8theora_altivec.c' object='libpowerpc_asm_blocks_la-fdct8x8theora_altivec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpowerpc_asm_blocks_la_CFLAGS) $(CFLAGS) -c -o libpowerpc_asm_blocks_la-fdct8x8theora_altivec.lo `test -f 'fdct8x8theora_altivec.c' || echo '$(srcdir)/'`fdct8x8theora_altivec.c libpowerpc_asm_blocks_la-recon8x8_ppc.lo: recon8x8_ppc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpowerpc_asm_blocks_la_CFLAGS) $(CFLAGS) -MT libpowerpc_asm_blocks_la-recon8x8_ppc.lo -MD -MP -MF $(DEPDIR)/libpowerpc_asm_blocks_la-recon8x8_ppc.Tpo -c -o libpowerpc_asm_blocks_la-recon8x8_ppc.lo `test -f 'recon8x8_ppc.c' || echo '$(srcdir)/'`recon8x8_ppc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpowerpc_asm_blocks_la-recon8x8_ppc.Tpo $(DEPDIR)/libpowerpc_asm_blocks_la-recon8x8_ppc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='recon8x8_ppc.c' object='libpowerpc_asm_blocks_la-recon8x8_ppc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpowerpc_asm_blocks_la_CFLAGS) $(CFLAGS) -c -o libpowerpc_asm_blocks_la-recon8x8_ppc.lo `test -f 'recon8x8_ppc.c' || echo '$(srcdir)/'`recon8x8_ppc.c libpowerpc_asm_blocks_la-recon8x8_altivec.lo: recon8x8_altivec.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpowerpc_asm_blocks_la_CFLAGS) $(CFLAGS) -MT libpowerpc_asm_blocks_la-recon8x8_altivec.lo -MD -MP -MF $(DEPDIR)/libpowerpc_asm_blocks_la-recon8x8_altivec.Tpo -c -o libpowerpc_asm_blocks_la-recon8x8_altivec.lo `test -f 'recon8x8_altivec.c' || echo '$(srcdir)/'`recon8x8_altivec.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libpowerpc_asm_blocks_la-recon8x8_altivec.Tpo $(DEPDIR)/libpowerpc_asm_blocks_la-recon8x8_altivec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='recon8x8_altivec.c' object='libpowerpc_asm_blocks_la-recon8x8_altivec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpowerpc_asm_blocks_la_CFLAGS) $(CFLAGS) -c -o libpowerpc_asm_blocks_la-recon8x8_altivec.lo `test -f 'recon8x8_altivec.c' || echo '$(srcdir)/'`recon8x8_altivec.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/powerpc_asm_blocks/recon8x8_ppc.c0000644000175000017500000002452110717203073017613 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* these functions are copied from http://svn.xiph.org/trunk/vp32/CoreLibs/CDXV/Vp31/Common/mac/OptFunctionsPPC.c */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include OIL_DECLARE_CLASS (recon8x8_intra); OIL_DECLARE_CLASS (recon8x8_inter); OIL_DECLARE_CLASS (recon8x8_inter2); static const __attribute__ ((aligned(8),used)) uint64_t V128 = 0x8080808080808080LL; #ifdef ENABLE_BROKEN_IMPLS static void /* r3, r4, r5 */ recon8x8_intra_ppc (uint8_t *dest, int16_t *change, int ds) { asm { lwz r0,0(r3) ;//preload cache mr r12,r4 addi r12,r12,128 ;//end ptr doLoop1: lha r7,0(r4) lha r8,2(r4) addi r7,r7,128 lha r9,4(r4) addi r8,r8,128 andi. r0,r7,0xff00 beq+ L1 srawi r0,r7,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r7,r0,0xff ;//now have 00 or ff L1: lha r10,6(r4) addi r9,r9,128 andi. r0,r8,0xff00 beq+ L2 srawi r0,r8,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r8,r0,0xff ;//now have 00 or ff L2: lha r31,8(r4) addi r10,r10,128 andi. r0,r9,0xff00 beq+ L3 srawi r0,r9,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r9,r0,0xff ;//now have 00 or ff L3: lha r30,10(r4) andi. r0,r10,0xff00 beq+ L4 srawi r0,r10,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r10,r0,0xff ;//now have 00 or ff L4: lha r29,12(r4) insrwi r10,r7,8,0 addi r31,r31,128 lwz r27,0(r3) ;//preload cache with dest addi r30,r30,128 andi. r0,r31,0xff00 beq+ L5 srawi r0,r31,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r31,r0,0xff ;//now have 00 or ff L5: lha r28,14(r4) addi r29,r29,128 andi. r0,r30,0xff00 beq+ L6 srawi r0,r30,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r30,r0,0xff ;//now have 00 or ff L6: addi r28,r28,128 andi. r0,r29,0xff00 beq+ L7 srawi r0,r29,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r29,r0,0xff ;//now have 00 or ff L7: insrwi r10,r8,8,8 andi. r0,r28,0xff00 beq+ L8 srawi r0,r28,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r28,r0,0xff ;//now have 00 or ff L8: insrwi r10,r9,8,16 insrwi r28,r31,8,0 stw r10,0(r3) insrwi r28,r30,8,8 addi r4,r4,16 cmpw r4,r12 insrwi r28,r29,8,16 stw r28,4(r3) add r3,r3,r5 ;//add in stride bne doLoop1 } } OIL_DEFINE_IMPL_FULL (recon8x8_intra_ppc, recon8x8_intra, OIL_IMPL_FLAG_ASM); #endif #ifdef ENABLE_BROKEN_IMPLS static void /* r3, r4, r5, r6 */ recon8x8_inter_ppc (uint8_t *dest, uint8_t *src, int16_t *change, int dss) { asm { mr r26,r4 mr r4,r5 ;//same reg usage as intra lwz r0,0(r3) ;//preload cache mr r12,r4 addi r12,r12,128 ;//end ptr mr r5,r6 ;//same reg usage as intra doLoop1: lha r7,0(r4) lbz r25,0(r26) lha r8,2(r4) add r7,r7,r25 lbz r25,1(r26) lha r9,4(r4) add r8,r8,r25 andi. r0,r7,0xff00 beq+ L1 srawi r0,r7,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r7,r0,0xff ;//now have 00 or ff L1: lbz r25,2(r26) lha r10,6(r4) add r9,r9,r25 andi. r0,r8,0xff00 beq+ L2 srawi r0,r8,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r8,r0,0xff ;//now have 00 or ff L2: lbz r25,3(r26) lha r31,8(r4) add r10,r10,r25 andi. r0,r9,0xff00 beq+ L3 srawi r0,r9,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r9,r0,0xff ;//now have 00 or ff L3: lha r30,10(r4) andi. r0,r10,0xff00 beq+ L4 srawi r0,r10,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r10,r0,0xff ;//now have 00 or ff L4: lbz r25,4(r26) lha r29,12(r4) insrwi r10,r7,8,0 add r31,r31,r25 lbz r25,5(r26) lwz r27,0(r3) ;//preload cache with dest add r30,r30,r25 andi. r0,r31,0xff00 beq+ L5 srawi r0,r31,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r31,r0,0xff ;//now have 00 or ff L5: lbz r25,6(r26) lha r28,14(r4) add r29,r29,r25 andi. r0,r30,0xff00 beq+ L6 srawi r0,r30,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r30,r0,0xff ;//now have 00 or ff L6: lbz r25,7(r26) add r26,r26,r5 add r28,r28,r25 andi. r0,r29,0xff00 beq+ L7 srawi r0,r29,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r29,r0,0xff ;//now have 00 or ff L7: insrwi r10,r8,8,8 andi. r0,r28,0xff00 beq+ L8 srawi r0,r28,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r28,r0,0xff ;//now have 00 or ff L8: insrwi r10,r9,8,16 insrwi r28,r31,8,0 stw r10,0(r3) insrwi r28,r30,8,8 addi r4,r4,16 cmpw r4,r12 insrwi r28,r29,8,16 stw r28,4(r3) add r3,r3,r5 ;//add in stride bne doLoop1 } } OIL_DEFINE_IMPL_FULL (recon8x8_inter_ppc, recon8x8_inter, OIL_IMPL_FLAG_ASM); #endif #ifdef ENABLE_BROKEN_IMPLS static void /* r3, r4, r5, r6, r7 */ recon8x8_inter2_ppc (uint8_t *dest, uint8_t *s1, uint8_t *s2, int16_t *change, int dsss) { asm { mr r26,r4 mr r4,r6 ;//same reg usage as intra lwz r0,0(r3) ;//preload cache mr r25,r5 mr r12,r4 addi r12,r12,128 ;//end ptr mr r5,r7 ;//same reg usage as intra li r24,0x0101 //li r23,0xfefe li r23,-258 insrwi r23,r23,16,0 ;//0xfefefefe insrwi r24,r24,16,0 ;//0x01010101 doLoop1: lwz r22,0(r26) ;//get 4 ref pels lwz r21,0(r25) ;//get 4 src pels lha r7,0(r4) and r20,r22,r21 lha r8,2(r4) and r21,r21,r23 ;//mask low bits and r22,r22,r23 ;//mask low bits srwi r21,r21,1 srwi r22,r22,1 and r20,r20,r24 ;//save low bits add r21,r21,r22 lwz r22,4(r26) ;//get 4 ref pels // or r20,r21,r20 ;//add in hot fudge add r20,r21,r20 ;//add in hot fudge //xor r20,r20,r20 lwz r21,4(r25) ;//get 4 src pels rlwinm r19,r20,8,24,31 rlwinm r18,r20,16,24,31 add r7,r7,r19 lha r9,4(r4) add r8,r8,r18 andi. r0,r7,0xff00 beq+ L1 srawi r0,r7,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r7,r0,0xff ;//now have 00 or ff L1: rlwinm r19,r20,24,24,31 rlwinm r18,r20,0,24,31 lha r10,6(r4) add r9,r9,r19 andi. r0,r8,0xff00 beq+ L2 srawi r0,r8,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r8,r0,0xff ;//now have 00 or ff L2: lha r31,8(r4) add r10,r10,r18 andi. r0,r9,0xff00 beq+ L3 srawi r0,r9,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r9,r0,0xff ;//now have 00 or ff L3: lha r30,10(r4) andi. r0,r10,0xff00 beq+ L4 srawi r0,r10,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r10,r0,0xff ;//now have 00 or ff L4: lha r29,12(r4) insrwi r10,r7,8,0 and r20,r22,r21 and r21,r21,r23 ;//mask low bits and r22,r22,r23 ;//mask low bits srwi r21,r21,1 srwi r22,r22,1 and r20,r20,r24 ;//save low bits add r21,r21,r22 // or r20,r21,r20 ;//add in hot fudge add r20,r21,r20 ;//add in hot fudge rlwinm r19,r20,8,24,31 rlwinm r18,r20,16,24,31 add r31,r31,r19 //xor r20,r20,r20 lwz r27,0(r3) ;//preload cache with dest add r30,r30,r18 andi. r0,r31,0xff00 beq+ L5 srawi r0,r31,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r31,r0,0xff ;//now have 00 or ff L5: rlwinm r19,r20,24,24,31 rlwinm r18,r20,0,24,31 lha r28,14(r4) add r29,r29,r19 andi. r0,r30,0xff00 beq+ L6 srawi r0,r30,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r30,r0,0xff ;//now have 00 or ff L6: add r26,r26,r5 ;//add stride to ref pels add r25,r25,r5 ;//add stride to src pels add r28,r28,r18 andi. r0,r29,0xff00 beq+ L7 srawi r0,r29,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r29,r0,0xff ;//now have 00 or ff L7: insrwi r10,r8,8,8 andi. r0,r28,0xff00 beq+ L8 srawi r0,r28,15 ;//generate ff or 00 xori r0,r0,0xff ;//flip the bits andi. r28,r0,0xff ;//now have 00 or ff L8: insrwi r10,r9,8,16 insrwi r28,r31,8,0 stw r10,0(r3) insrwi r28,r30,8,8 addi r4,r4,16 cmpw r4,r12 insrwi r28,r29,8,16 stw r28,4(r3) add r3,r3,r5 ;//add in stride bne doLoop1 } } OIL_DEFINE_IMPL_FULL (recon8x8_inter2_ppc, recon8x8_inter2, OIL_IMPL_FLAG_ASM); #endif liboil-0.3.17/liboil/simdpack/0000777000175000017500000000000011332637376013141 500000000000000liboil-0.3.17/liboil/simdpack/multsum.c0000644000175000017500000000716110717203073014721 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include static void multsum_f32_unroll2 (float *dest, float *src1, int sstr1, float *src2, int sstr2, int n) { int i; double sum1 = 0; double sum2 = 0; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include static void mix_u8_fast(uint8_t *dest, uint8_t *src1, uint8_t *src2, uint8_t *scale, int n) { while(n>0){ *dest++ = (*src1 * *scale + *src2 * (255 - *scale))>>8; src1++; src2++; scale++; n--; } } OIL_DEFINE_IMPL (mix_u8_fast, mix_u8); static void mix_u8_fast2 (uint8_t *dest, uint8_t *src1, uint8_t *src2, uint8_t *scale, int n) { while(n>0){ *dest++ = ((*src1 - *src2) * *scale + *src2 * 255)>>8; src1++; src2++; scale++; n--; } } OIL_DEFINE_IMPL (mix_u8_fast2, mix_u8); /* PowerPC likes this one */ static void mix_u8_fast3(uint8_t *dest, uint8_t *src1, uint8_t *src2, uint8_t *scale, int n) { int i; for(i=0;i>8; } } OIL_DEFINE_IMPL (mix_u8_fast3, mix_u8); static void mix_u8_unroll4(uint8_t *dest, uint8_t *src1, uint8_t *src2, uint8_t *scale, int n) { while(n&0x3){ *dest++ = (*src1 * *scale + *src2 * (255 - *scale))>>8; src1++; src2++; scale++; n--; } while(n>0){ *dest++ = (*src1 * *scale + *src2 * (255 - *scale))>>8; src1++; src2++; scale++; *dest++ = (*src1 * *scale + *src2 * (255 - *scale))>>8; src1++; src2++; scale++; *dest++ = (*src1 * *scale + *src2 * (255 - *scale))>>8; src1++; src2++; scale++; *dest++ = (*src1 * *scale + *src2 * (255 - *scale))>>8; src1++; src2++; scale++; n-=4; } } OIL_DEFINE_IMPL (mix_u8_unroll4, mix_u8); liboil-0.3.17/liboil/simdpack/scalarmult.c0000644000175000017500000001350310717203073015357 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #define SCALARMULT_DEFINE_UNROLL2(type) \ static void scalarmult_ ## type ## _unroll2( \ oil_type_ ## type *dest, int dstr, \ oil_type_ ## type *src, int sstr, \ oil_type_ ## type *val, int n) \ { \ if(n&1) { \ *dest = *src * *val; \ OIL_INCREMENT(dest, dstr); \ OIL_INCREMENT(src, sstr); \ } \ n /= 2; \ while(n>0){ \ *dest = *src * *val; \ OIL_INCREMENT(dest,dstr); \ OIL_INCREMENT(src,sstr); \ *dest = *src * *val; \ OIL_INCREMENT(dest,dstr); \ OIL_INCREMENT(src,sstr); \ n--; \ } \ } \ OIL_DEFINE_IMPL (scalarmult_ ## type ## _unroll2, scalarmult_ ## type); SCALARMULT_DEFINE_UNROLL2 (s8); SCALARMULT_DEFINE_UNROLL2 (u8); SCALARMULT_DEFINE_UNROLL2 (s16); SCALARMULT_DEFINE_UNROLL2 (u16); SCALARMULT_DEFINE_UNROLL2 (s32); SCALARMULT_DEFINE_UNROLL2 (u32); SCALARMULT_DEFINE_UNROLL2 (f32); SCALARMULT_DEFINE_UNROLL2 (f64); #define SCALARMULT_DEFINE_UNROLL2x(type) \ static void scalarmult_ ## type ## _unroll2x( \ oil_type_ ## type *dest, int dstr, \ oil_type_ ## type *src, int sstr, \ oil_type_ ## type *val, int n) \ { \ oil_type_ ## type *dest2; \ oil_type_ ## type *src2; \ int i; \ if(n&1) { \ *dest = *src * *val; \ OIL_INCREMENT(dest, dstr); \ OIL_INCREMENT(src, sstr); \ } \ src2 = OIL_OFFSET(src, sstr); \ dest2 = OIL_OFFSET(dest, dstr); \ n /= 2; \ sstr *= 2; \ dstr *= 2; \ for(i=0;i0){ \ *dest = *src * *val; \ OIL_INCREMENT(dest,dstr); \ OIL_INCREMENT(src,sstr); \ *dest = *src * *val; \ OIL_INCREMENT(dest,dstr); \ OIL_INCREMENT(src,sstr); \ *dest = *src * *val; \ OIL_INCREMENT(dest,dstr); \ OIL_INCREMENT(src,sstr); \ *dest = *src * *val; \ OIL_INCREMENT(dest,dstr); \ OIL_INCREMENT(src,sstr); \ n--; \ } \ } \ OIL_DEFINE_IMPL (scalarmult_ ## type ## _unroll4, scalarmult_ ## type); SCALARMULT_DEFINE_UNROLL4 (s8); SCALARMULT_DEFINE_UNROLL4 (u8); SCALARMULT_DEFINE_UNROLL4 (s16); SCALARMULT_DEFINE_UNROLL4 (u16); SCALARMULT_DEFINE_UNROLL4 (s32); SCALARMULT_DEFINE_UNROLL4 (u32); SCALARMULT_DEFINE_UNROLL4 (f32); SCALARMULT_DEFINE_UNROLL4 (f64); #define SCALARMULT_DEFINE_X(type) \ static void scalarmult_ ## type ## _x( \ oil_type_ ## type *dest, int dstr, \ oil_type_ ## type *src, int sstr, \ oil_type_ ## type *val, int n) \ { \ int i; \ for(i=0;i+1 * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include static void average2_u8_trick (uint8_t * dest, int dstr, uint8_t *src1, int sstr1, uint8_t *src2, int sstr2, int n) { unsigned int x, y, d; while (n&3) { *dest = (*src1 + *src2) >> 1; src1 += sstr1; src2 += sstr2; dest += dstr; n--; } while (n > 0) { x = (src1[0] << 24) | (src1[sstr1] << 16) | (src1[2 * sstr1] << 8) | (src1[3 * sstr1]); y = (src2[0] << 24) | (src2[sstr2] << 16) | (src2[2 * sstr2] << 8) | (src2[3 * sstr2]); d = (((x ^ y) & 0xfefefefe) >> 1) + (x & y); dest[0] = (d >> 24); dest[1*dstr] = (d >> 16); dest[2*dstr] = (d >> 8); dest[3*dstr] = (d >> 0); src1 += 4 * sstr1; src2 += 4 * sstr2; dest += 4 * dstr; n -= 4; } } OIL_DEFINE_IMPL (average2_u8_trick, average2_u8); static void average2_u8_fast (uint8_t * dest, int dstr, uint8_t *src1, int sstr1, uint8_t *src2, int sstr2, int n) { while (n > 0) { *dest = (*src1 + *src2) >> 1; src1 += sstr1; src2 += sstr2; dest += dstr; n--; } } OIL_DEFINE_IMPL (average2_u8_fast, average2_u8); static void average2_u8_unroll4 (uint8_t * dest, int dstr, uint8_t *src1, int sstr1, uint8_t *src2, int sstr2, int n) { while (n & 0x3) { *dest = (*src1 + *src2) >> 1; dest += dstr; src1 += sstr1; src2 += sstr2; n--; } while (n > 0) { *dest = (*src1 + *src2) >> 1; dest += dstr; src1 += sstr1; src2 += sstr2; *dest = (*src1 + *src2) >> 1; dest += dstr; src1 += sstr1; src2 += sstr2; *dest = (*src1 + *src2) >> 1; dest += dstr; src1 += sstr1; src2 += sstr2; *dest = (*src1 + *src2) >> 1; dest += dstr; src1 += sstr1; src2 += sstr2; n -= 4; } } OIL_DEFINE_IMPL (average2_u8_unroll4, average2_u8); liboil-0.3.17/liboil/simdpack/sincos_f64.c0000644000175000017500000000442310717203073015166 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /* XXX This gets more inaccurate as N increases */ static void sincos_f64_i20_fast(double *dest_sin, double *dest_cos, int n, double *offset, double *interval) { int i; double c,s,dc,ds,temp_s,temp_c; dest_sin[0] = s = sin(*offset); dest_cos[0] = c = cos(*offset); ds = sin(*interval); dc = cos(*interval); for(i=1;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include static void diffsquaresum_f64_i10_simple(double *dest, double *src1, int sstr1, double *src2, int sstr2, int n) { double sum = 0; double x; int i; for(i=0;i0){ x = *src1 - *src2; sum0 += x * x; OIL_INCREMENT (src1, sstr1); OIL_INCREMENT (src2, sstr2); n--; } *dest = sum0; } OIL_DEFINE_IMPL (diffsquaresum_f64_i10_fast, diffsquaresum_f64); static void diffsquaresum_f64_i10_unroll2(double *dest, double *src1, int sstr1, double *src2, int sstr2, int n) { double sum0 = 0; double sum1 = 0; double x; if(n&1){ x = *src1 - *src2; sum0 += x * x; OIL_INCREMENT (src1, sstr1); OIL_INCREMENT (src2, sstr2); n--; } while(n>0){ x = *src1 - *src2; sum0 += x * x; OIL_INCREMENT (src1, sstr1); OIL_INCREMENT (src2, sstr2); x = *src1 - *src2; sum1 += x * x; OIL_INCREMENT (src1, sstr1); OIL_INCREMENT (src2, sstr2); n-=2; } *dest = sum0 + sum1; } OIL_DEFINE_IMPL (diffsquaresum_f64_i10_unroll2, diffsquaresum_f64); static void diffsquaresum_f64_i10_unroll4(double *dest, double *src1, int sstr1, double *src2, int sstr2, int n) { double sum0 = 0; double sum1 = 0; double sum2 = 0; double sum3 = 0; double x; while(n&3){ x = *src1 - *src2; sum0 += x * x; OIL_INCREMENT (src1, sstr1); OIL_INCREMENT (src2, sstr2); n--; } while(n>0){ x = *src1 - *src2; sum0 += x * x; OIL_INCREMENT (src1, sstr1); OIL_INCREMENT (src2, sstr2); x = *src1 - *src2; sum1 += x * x; OIL_INCREMENT (src1, sstr1); OIL_INCREMENT (src2, sstr2); x = *src1 - *src2; sum2 += x * x; OIL_INCREMENT (src1, sstr1); OIL_INCREMENT (src2, sstr2); x = *src1 - *src2; sum3 += x * x; OIL_INCREMENT (src1, sstr1); OIL_INCREMENT (src2, sstr2); n-=4; } *dest = sum0 + sum1 + sum2 + sum3; } OIL_DEFINE_IMPL (diffsquaresum_f64_i10_unroll4, diffsquaresum_f64); liboil-0.3.17/liboil/simdpack/abs_misc.c0000644000175000017500000000656510717203073015002 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #define ABS(x) ((x)>0 ? (x) : -(x)) static void abs_u16_s16_unroll2 (uint16_t * dest, int dstr, int16_t * src, int sstr, int n) { while (n & 1) { *dest = ABS (*src); OIL_INCREMENT (dest, dstr); OIL_INCREMENT (src, sstr); n--; } while (n > 0) { *dest = ABS (*src); OIL_INCREMENT (dest, dstr); OIL_INCREMENT (src, sstr); *dest = ABS (*src); OIL_INCREMENT (dest, dstr); OIL_INCREMENT (src, sstr); n -= 2; } } OIL_DEFINE_IMPL (abs_u16_s16_unroll2, abs_u16_s16); static void abs_u16_s16_unroll4 (uint16_t * dest, int dstr, int16_t * src, int sstr, int n) { while (n & 3) { *dest = ABS (*src); OIL_INCREMENT (dest, dstr); OIL_INCREMENT (src, sstr); n--; } while (n > 0) { *dest = ABS (*src); OIL_INCREMENT (dest, dstr); OIL_INCREMENT (src, sstr); *dest = ABS (*src); OIL_INCREMENT (dest, dstr); OIL_INCREMENT (src, sstr); *dest = ABS (*src); OIL_INCREMENT (dest, dstr); OIL_INCREMENT (src, sstr); *dest = ABS (*src); OIL_INCREMENT (dest, dstr); OIL_INCREMENT (src, sstr); n -= 4; } } OIL_DEFINE_IMPL (abs_u16_s16_unroll4, abs_u16_s16); static void abs_u16_s16_fast (uint16_t * dest, int dstr, int16_t * src, int sstr, int n) { int i; int16_t x, y; for (i = 0; i < n; i++) { x = *src; y = ((x >> 15) & x); *dest = x - y - y; OIL_INCREMENT (dest, dstr); OIL_INCREMENT (src, sstr); } } OIL_DEFINE_IMPL (abs_u16_s16_fast, abs_u16_s16); /* Similar algorithm as clipping, but for absolute value. Note the stunt * pulled to get around 2*y rolling over. */ static void abs_u32_s32_fast (uint32_t * dest, int dstr, int32_t * src, int sstr, int n) { int i; int32_t x, y; for (i = 0; i < n; i++) { x = OIL_GET(src, i * sstr, int32_t); y = ((x >> 31) & x); OIL_GET(dest, i * dstr, uint32_t) = x - y - y; } } OIL_DEFINE_IMPL (abs_u32_s32_fast, abs_u32_s32); liboil-0.3.17/liboil/simdpack/sum_f64.c0000644000175000017500000000434610717203073014500 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include static void sum_f64_i10_simple (double *dest, double *src, int sstr, int n) { double sum = 0; int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include static void squaresum_f64_i10_simple(double *dest, double *src, int n) { double sum2 = 0; int i; for(i=0;i static void squaresum_f64_i10_multsum(double *dest, double *src, int n) { multsum_f64(dest,src,src,n); } #endif static void squaresum_f64_i10_unroll4a(double *dest, double *src, int n) { double sum1 = 0; double sum2 = 0; double sum3 = 0; double sum4 = 0; while(n&0x3){ sum1 += *src * *src; src++; n--; } while(n>0){ sum1 += *src * *src; src++; sum2 += *src * *src; src++; sum3 += *src * *src; src++; sum4 += *src * *src; src++; n-=4; } *dest = sum1 + sum2 + sum3 + sum4; } OIL_DEFINE_IMPL (squaresum_f64_i10_unroll4a, squaresum_f64); static void squaresum_f64_i10_unroll4(double *dest, double *src, int n) { double sum1 = 0; double sum2 = 0; double sum3 = 0; double sum4 = 0; int i; while(n&0x3){ sum1 += src[0]*src[0]; src++; n--; } for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _OIL_SIMDPACK_SIMDPACK_H_ #define _OIL_SIMDPACK_SIMDPACK_H_ OIL_DECLARE_CLASS(conv8x8_s16_f64); OIL_DECLARE_CLASS(conv8x8_f64_s16); OIL_DECLARE_CLASS(idct8x8_f64); OIL_DECLARE_CLASS(abs_u8_s8); OIL_DECLARE_CLASS(abs_u16_s16); OIL_DECLARE_CLASS(abs_u32_s32); OIL_DECLARE_CLASS(abs_f32_f32); OIL_DECLARE_CLASS(abs_f64_f64); OIL_DECLARE_CLASS(average2_u8); OIL_DECLARE_CLASS(clip_s8); OIL_DECLARE_CLASS(clip_u8); OIL_DECLARE_CLASS(clip_s16); OIL_DECLARE_CLASS(clip_u16); OIL_DECLARE_CLASS(clip_s32); OIL_DECLARE_CLASS(clip_u32); OIL_DECLARE_CLASS(clip_f32); OIL_DECLARE_CLASS(clip_f64); OIL_DECLARE_CLASS(dct12_f32); OIL_DECLARE_CLASS(dct36_f32); OIL_DECLARE_CLASS(diffsquaresum_f64); OIL_DECLARE_CLASS(downsample1x_f64); OIL_DECLARE_CLASS(fdct8_f64); OIL_DECLARE_CLASS(fdct8x8_f64); OIL_DECLARE_CLASS(fdct8x8s_s16); OIL_DECLARE_CLASS(get8x8_f64); OIL_DECLARE_CLASS(idct8_f64); OIL_DECLARE_CLASS(idct8x8_s16); OIL_DECLARE_CLASS(idct8x8s_s16); OIL_DECLARE_CLASS(imdct32_f32); OIL_DECLARE_CLASS(mix_u8); OIL_DECLARE_CLASS(mult8x8_s16); OIL_DECLARE_CLASS(multsum_f32); OIL_DECLARE_CLASS(multsum_f64); OIL_DECLARE_CLASS(permute_s8); OIL_DECLARE_CLASS(permute_u8); OIL_DECLARE_CLASS(permute_s16); OIL_DECLARE_CLASS(permute_u16); OIL_DECLARE_CLASS(permute_s32); OIL_DECLARE_CLASS(permute_u32); OIL_DECLARE_CLASS(permute_f32); OIL_DECLARE_CLASS(permute_f64); OIL_DECLARE_CLASS(sad8x8_f64); OIL_DECLARE_CLASS(sad8x8_s16); OIL_DECLARE_CLASS(scalaradd_s8); OIL_DECLARE_CLASS(scalaradd_u8); OIL_DECLARE_CLASS(scalaradd_s16); OIL_DECLARE_CLASS(scalaradd_u16); OIL_DECLARE_CLASS(scalaradd_s32); OIL_DECLARE_CLASS(scalaradd_u32); OIL_DECLARE_CLASS(scalaradd_f32); OIL_DECLARE_CLASS(scalaradd_f64); OIL_DECLARE_CLASS(scalarmult_s8); OIL_DECLARE_CLASS(scalarmult_u8); OIL_DECLARE_CLASS(scalarmult_s16); OIL_DECLARE_CLASS(scalarmult_u16); OIL_DECLARE_CLASS(scalarmult_s32); OIL_DECLARE_CLASS(scalarmult_u32); OIL_DECLARE_CLASS(scalarmult_f32); OIL_DECLARE_CLASS(scalarmult_f64); OIL_DECLARE_CLASS(sincos_f64); OIL_DECLARE_CLASS(squaresum_f64); OIL_DECLARE_CLASS(sum_f64); OIL_DECLARE_CLASS(trans8x8_s8); OIL_DECLARE_CLASS(trans8x8_u8); OIL_DECLARE_CLASS(trans8x8_s16); OIL_DECLARE_CLASS(trans8x8_u16); OIL_DECLARE_CLASS(trans8x8_s32); OIL_DECLARE_CLASS(trans8x8_u32); OIL_DECLARE_CLASS(trans8x8_f32); OIL_DECLARE_CLASS(trans8x8_f64); OIL_DECLARE_CLASS(vectoradd_s8); OIL_DECLARE_CLASS(vectoradd_u8); OIL_DECLARE_CLASS(vectoradd_s16); OIL_DECLARE_CLASS(vectoradd_u16); OIL_DECLARE_CLASS(vectoradd_s32); OIL_DECLARE_CLASS(vectoradd_u32); OIL_DECLARE_CLASS(vectoradd_f32); OIL_DECLARE_CLASS(vectoradd_f64); OIL_DECLARE_CLASS(zigzag8x8_s16); #endif liboil-0.3.17/liboil/simdpack/Makefile.in0000644000175000017500000012537411332627673015135 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @USE_NEW_ABI_FALSE@am__append_1 = \ @USE_NEW_ABI_FALSE@ abs_misc.c \ @USE_NEW_ABI_FALSE@ average2_u8.c \ @USE_NEW_ABI_FALSE@ clip_fast.c \ @USE_NEW_ABI_FALSE@ scalaradd.c \ @USE_NEW_ABI_FALSE@ scalarmult.c subdir = liboil/simdpack DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @USE_ALT_OPT_TRUE@am__DEPENDENCIES_1 = libsimdpack_opt1.la libsimdpack_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__libsimdpack_la_SOURCES_DIST = diffsquaresum_f64.c mix_u8.c \ multsum.c sincos_f64.c squaresum_f64.c sum_f64.c abs_misc.c \ average2_u8.c clip_fast.c scalaradd.c scalarmult.c @USE_NEW_ABI_FALSE@am__objects_1 = libsimdpack_la-abs_misc.lo \ @USE_NEW_ABI_FALSE@ libsimdpack_la-average2_u8.lo \ @USE_NEW_ABI_FALSE@ libsimdpack_la-clip_fast.lo \ @USE_NEW_ABI_FALSE@ libsimdpack_la-scalaradd.lo \ @USE_NEW_ABI_FALSE@ libsimdpack_la-scalarmult.lo am__objects_2 = libsimdpack_la-diffsquaresum_f64.lo \ libsimdpack_la-mix_u8.lo libsimdpack_la-multsum.lo \ libsimdpack_la-sincos_f64.lo libsimdpack_la-squaresum_f64.lo \ libsimdpack_la-sum_f64.lo $(am__objects_1) am_libsimdpack_la_OBJECTS = $(am__objects_2) libsimdpack_la_OBJECTS = $(am_libsimdpack_la_OBJECTS) libsimdpack_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libsimdpack_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ libsimdpack_opt1_la_LIBADD = am__libsimdpack_opt1_la_SOURCES_DIST = diffsquaresum_f64.c mix_u8.c \ multsum.c sincos_f64.c squaresum_f64.c sum_f64.c abs_misc.c \ average2_u8.c clip_fast.c scalaradd.c scalarmult.c @USE_NEW_ABI_FALSE@am__objects_3 = libsimdpack_opt1_la-abs_misc.lo \ @USE_NEW_ABI_FALSE@ libsimdpack_opt1_la-average2_u8.lo \ @USE_NEW_ABI_FALSE@ libsimdpack_opt1_la-clip_fast.lo \ @USE_NEW_ABI_FALSE@ libsimdpack_opt1_la-scalaradd.lo \ @USE_NEW_ABI_FALSE@ libsimdpack_opt1_la-scalarmult.lo am__objects_4 = libsimdpack_opt1_la-diffsquaresum_f64.lo \ libsimdpack_opt1_la-mix_u8.lo libsimdpack_opt1_la-multsum.lo \ libsimdpack_opt1_la-sincos_f64.lo \ libsimdpack_opt1_la-squaresum_f64.lo \ libsimdpack_opt1_la-sum_f64.lo $(am__objects_3) am_libsimdpack_opt1_la_OBJECTS = $(am__objects_4) libsimdpack_opt1_la_OBJECTS = $(am_libsimdpack_opt1_la_OBJECTS) libsimdpack_opt1_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ @USE_ALT_OPT_TRUE@am_libsimdpack_opt1_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libsimdpack_la_SOURCES) $(libsimdpack_opt1_la_SOURCES) DIST_SOURCES = $(am__libsimdpack_la_SOURCES_DIST) \ $(am__libsimdpack_opt1_la_SOURCES_DIST) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @USE_ALT_OPT_FALSE@opt_libs = @USE_ALT_OPT_TRUE@opt_libs = libsimdpack_opt1.la noinst_LTLIBRARIES = libsimdpack.la $(opt_libs) c_sources = diffsquaresum_f64.c mix_u8.c multsum.c sincos_f64.c \ squaresum_f64.c sum_f64.c $(am__append_1) libsimdpack_la_SOURCES = \ $(c_sources) $(i386_sources) $(powerpc_sources) $(amd64_sources) libsimdpack_la_LIBADD = \ $(opt_libs) libsimdpack_la_CFLAGS = $(LIBOIL_CFLAGS) noinst_HEADERS = \ simdpack.h libsimdpack_opt1_la_SOURCES = $(c_sources) libsimdpack_opt1_la_CFLAGS = $(LIBOIL_CFLAGS) \ $(LIBOIL_OPT_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/simdpack/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/simdpack/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libsimdpack.la: $(libsimdpack_la_OBJECTS) $(libsimdpack_la_DEPENDENCIES) $(libsimdpack_la_LINK) $(libsimdpack_la_OBJECTS) $(libsimdpack_la_LIBADD) $(LIBS) libsimdpack_opt1.la: $(libsimdpack_opt1_la_OBJECTS) $(libsimdpack_opt1_la_DEPENDENCIES) $(libsimdpack_opt1_la_LINK) $(am_libsimdpack_opt1_la_rpath) $(libsimdpack_opt1_la_OBJECTS) $(libsimdpack_opt1_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_la-abs_misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_la-average2_u8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_la-clip_fast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_la-diffsquaresum_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_la-mix_u8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_la-multsum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_la-scalaradd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_la-scalarmult.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_la-sincos_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_la-squaresum_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_la-sum_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_opt1_la-abs_misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_opt1_la-average2_u8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_opt1_la-clip_fast.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_opt1_la-diffsquaresum_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_opt1_la-mix_u8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_opt1_la-multsum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_opt1_la-scalaradd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_opt1_la-scalarmult.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_opt1_la-sincos_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_opt1_la-squaresum_f64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimdpack_opt1_la-sum_f64.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libsimdpack_la-diffsquaresum_f64.lo: diffsquaresum_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -MT libsimdpack_la-diffsquaresum_f64.lo -MD -MP -MF $(DEPDIR)/libsimdpack_la-diffsquaresum_f64.Tpo -c -o libsimdpack_la-diffsquaresum_f64.lo `test -f 'diffsquaresum_f64.c' || echo '$(srcdir)/'`diffsquaresum_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_la-diffsquaresum_f64.Tpo $(DEPDIR)/libsimdpack_la-diffsquaresum_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='diffsquaresum_f64.c' object='libsimdpack_la-diffsquaresum_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_la-diffsquaresum_f64.lo `test -f 'diffsquaresum_f64.c' || echo '$(srcdir)/'`diffsquaresum_f64.c libsimdpack_la-mix_u8.lo: mix_u8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -MT libsimdpack_la-mix_u8.lo -MD -MP -MF $(DEPDIR)/libsimdpack_la-mix_u8.Tpo -c -o libsimdpack_la-mix_u8.lo `test -f 'mix_u8.c' || echo '$(srcdir)/'`mix_u8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_la-mix_u8.Tpo $(DEPDIR)/libsimdpack_la-mix_u8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mix_u8.c' object='libsimdpack_la-mix_u8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_la-mix_u8.lo `test -f 'mix_u8.c' || echo '$(srcdir)/'`mix_u8.c libsimdpack_la-multsum.lo: multsum.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -MT libsimdpack_la-multsum.lo -MD -MP -MF $(DEPDIR)/libsimdpack_la-multsum.Tpo -c -o libsimdpack_la-multsum.lo `test -f 'multsum.c' || echo '$(srcdir)/'`multsum.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_la-multsum.Tpo $(DEPDIR)/libsimdpack_la-multsum.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='multsum.c' object='libsimdpack_la-multsum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_la-multsum.lo `test -f 'multsum.c' || echo '$(srcdir)/'`multsum.c libsimdpack_la-sincos_f64.lo: sincos_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -MT libsimdpack_la-sincos_f64.lo -MD -MP -MF $(DEPDIR)/libsimdpack_la-sincos_f64.Tpo -c -o libsimdpack_la-sincos_f64.lo `test -f 'sincos_f64.c' || echo '$(srcdir)/'`sincos_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_la-sincos_f64.Tpo $(DEPDIR)/libsimdpack_la-sincos_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sincos_f64.c' object='libsimdpack_la-sincos_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_la-sincos_f64.lo `test -f 'sincos_f64.c' || echo '$(srcdir)/'`sincos_f64.c libsimdpack_la-squaresum_f64.lo: squaresum_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -MT libsimdpack_la-squaresum_f64.lo -MD -MP -MF $(DEPDIR)/libsimdpack_la-squaresum_f64.Tpo -c -o libsimdpack_la-squaresum_f64.lo `test -f 'squaresum_f64.c' || echo '$(srcdir)/'`squaresum_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_la-squaresum_f64.Tpo $(DEPDIR)/libsimdpack_la-squaresum_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='squaresum_f64.c' object='libsimdpack_la-squaresum_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_la-squaresum_f64.lo `test -f 'squaresum_f64.c' || echo '$(srcdir)/'`squaresum_f64.c libsimdpack_la-sum_f64.lo: sum_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -MT libsimdpack_la-sum_f64.lo -MD -MP -MF $(DEPDIR)/libsimdpack_la-sum_f64.Tpo -c -o libsimdpack_la-sum_f64.lo `test -f 'sum_f64.c' || echo '$(srcdir)/'`sum_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_la-sum_f64.Tpo $(DEPDIR)/libsimdpack_la-sum_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sum_f64.c' object='libsimdpack_la-sum_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_la-sum_f64.lo `test -f 'sum_f64.c' || echo '$(srcdir)/'`sum_f64.c libsimdpack_la-abs_misc.lo: abs_misc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -MT libsimdpack_la-abs_misc.lo -MD -MP -MF $(DEPDIR)/libsimdpack_la-abs_misc.Tpo -c -o libsimdpack_la-abs_misc.lo `test -f 'abs_misc.c' || echo '$(srcdir)/'`abs_misc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_la-abs_misc.Tpo $(DEPDIR)/libsimdpack_la-abs_misc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='abs_misc.c' object='libsimdpack_la-abs_misc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_la-abs_misc.lo `test -f 'abs_misc.c' || echo '$(srcdir)/'`abs_misc.c libsimdpack_la-average2_u8.lo: average2_u8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -MT libsimdpack_la-average2_u8.lo -MD -MP -MF $(DEPDIR)/libsimdpack_la-average2_u8.Tpo -c -o libsimdpack_la-average2_u8.lo `test -f 'average2_u8.c' || echo '$(srcdir)/'`average2_u8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_la-average2_u8.Tpo $(DEPDIR)/libsimdpack_la-average2_u8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='average2_u8.c' object='libsimdpack_la-average2_u8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_la-average2_u8.lo `test -f 'average2_u8.c' || echo '$(srcdir)/'`average2_u8.c libsimdpack_la-clip_fast.lo: clip_fast.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -MT libsimdpack_la-clip_fast.lo -MD -MP -MF $(DEPDIR)/libsimdpack_la-clip_fast.Tpo -c -o libsimdpack_la-clip_fast.lo `test -f 'clip_fast.c' || echo '$(srcdir)/'`clip_fast.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_la-clip_fast.Tpo $(DEPDIR)/libsimdpack_la-clip_fast.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clip_fast.c' object='libsimdpack_la-clip_fast.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_la-clip_fast.lo `test -f 'clip_fast.c' || echo '$(srcdir)/'`clip_fast.c libsimdpack_la-scalaradd.lo: scalaradd.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -MT libsimdpack_la-scalaradd.lo -MD -MP -MF $(DEPDIR)/libsimdpack_la-scalaradd.Tpo -c -o libsimdpack_la-scalaradd.lo `test -f 'scalaradd.c' || echo '$(srcdir)/'`scalaradd.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_la-scalaradd.Tpo $(DEPDIR)/libsimdpack_la-scalaradd.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scalaradd.c' object='libsimdpack_la-scalaradd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_la-scalaradd.lo `test -f 'scalaradd.c' || echo '$(srcdir)/'`scalaradd.c libsimdpack_la-scalarmult.lo: scalarmult.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -MT libsimdpack_la-scalarmult.lo -MD -MP -MF $(DEPDIR)/libsimdpack_la-scalarmult.Tpo -c -o libsimdpack_la-scalarmult.lo `test -f 'scalarmult.c' || echo '$(srcdir)/'`scalarmult.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_la-scalarmult.Tpo $(DEPDIR)/libsimdpack_la-scalarmult.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scalarmult.c' object='libsimdpack_la-scalarmult.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_la-scalarmult.lo `test -f 'scalarmult.c' || echo '$(srcdir)/'`scalarmult.c libsimdpack_opt1_la-diffsquaresum_f64.lo: diffsquaresum_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -MT libsimdpack_opt1_la-diffsquaresum_f64.lo -MD -MP -MF $(DEPDIR)/libsimdpack_opt1_la-diffsquaresum_f64.Tpo -c -o libsimdpack_opt1_la-diffsquaresum_f64.lo `test -f 'diffsquaresum_f64.c' || echo '$(srcdir)/'`diffsquaresum_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_opt1_la-diffsquaresum_f64.Tpo $(DEPDIR)/libsimdpack_opt1_la-diffsquaresum_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='diffsquaresum_f64.c' object='libsimdpack_opt1_la-diffsquaresum_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_opt1_la-diffsquaresum_f64.lo `test -f 'diffsquaresum_f64.c' || echo '$(srcdir)/'`diffsquaresum_f64.c libsimdpack_opt1_la-mix_u8.lo: mix_u8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -MT libsimdpack_opt1_la-mix_u8.lo -MD -MP -MF $(DEPDIR)/libsimdpack_opt1_la-mix_u8.Tpo -c -o libsimdpack_opt1_la-mix_u8.lo `test -f 'mix_u8.c' || echo '$(srcdir)/'`mix_u8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_opt1_la-mix_u8.Tpo $(DEPDIR)/libsimdpack_opt1_la-mix_u8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mix_u8.c' object='libsimdpack_opt1_la-mix_u8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_opt1_la-mix_u8.lo `test -f 'mix_u8.c' || echo '$(srcdir)/'`mix_u8.c libsimdpack_opt1_la-multsum.lo: multsum.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -MT libsimdpack_opt1_la-multsum.lo -MD -MP -MF $(DEPDIR)/libsimdpack_opt1_la-multsum.Tpo -c -o libsimdpack_opt1_la-multsum.lo `test -f 'multsum.c' || echo '$(srcdir)/'`multsum.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_opt1_la-multsum.Tpo $(DEPDIR)/libsimdpack_opt1_la-multsum.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='multsum.c' object='libsimdpack_opt1_la-multsum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_opt1_la-multsum.lo `test -f 'multsum.c' || echo '$(srcdir)/'`multsum.c libsimdpack_opt1_la-sincos_f64.lo: sincos_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -MT libsimdpack_opt1_la-sincos_f64.lo -MD -MP -MF $(DEPDIR)/libsimdpack_opt1_la-sincos_f64.Tpo -c -o libsimdpack_opt1_la-sincos_f64.lo `test -f 'sincos_f64.c' || echo '$(srcdir)/'`sincos_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_opt1_la-sincos_f64.Tpo $(DEPDIR)/libsimdpack_opt1_la-sincos_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sincos_f64.c' object='libsimdpack_opt1_la-sincos_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_opt1_la-sincos_f64.lo `test -f 'sincos_f64.c' || echo '$(srcdir)/'`sincos_f64.c libsimdpack_opt1_la-squaresum_f64.lo: squaresum_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -MT libsimdpack_opt1_la-squaresum_f64.lo -MD -MP -MF $(DEPDIR)/libsimdpack_opt1_la-squaresum_f64.Tpo -c -o libsimdpack_opt1_la-squaresum_f64.lo `test -f 'squaresum_f64.c' || echo '$(srcdir)/'`squaresum_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_opt1_la-squaresum_f64.Tpo $(DEPDIR)/libsimdpack_opt1_la-squaresum_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='squaresum_f64.c' object='libsimdpack_opt1_la-squaresum_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_opt1_la-squaresum_f64.lo `test -f 'squaresum_f64.c' || echo '$(srcdir)/'`squaresum_f64.c libsimdpack_opt1_la-sum_f64.lo: sum_f64.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -MT libsimdpack_opt1_la-sum_f64.lo -MD -MP -MF $(DEPDIR)/libsimdpack_opt1_la-sum_f64.Tpo -c -o libsimdpack_opt1_la-sum_f64.lo `test -f 'sum_f64.c' || echo '$(srcdir)/'`sum_f64.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_opt1_la-sum_f64.Tpo $(DEPDIR)/libsimdpack_opt1_la-sum_f64.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sum_f64.c' object='libsimdpack_opt1_la-sum_f64.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_opt1_la-sum_f64.lo `test -f 'sum_f64.c' || echo '$(srcdir)/'`sum_f64.c libsimdpack_opt1_la-abs_misc.lo: abs_misc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -MT libsimdpack_opt1_la-abs_misc.lo -MD -MP -MF $(DEPDIR)/libsimdpack_opt1_la-abs_misc.Tpo -c -o libsimdpack_opt1_la-abs_misc.lo `test -f 'abs_misc.c' || echo '$(srcdir)/'`abs_misc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_opt1_la-abs_misc.Tpo $(DEPDIR)/libsimdpack_opt1_la-abs_misc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='abs_misc.c' object='libsimdpack_opt1_la-abs_misc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_opt1_la-abs_misc.lo `test -f 'abs_misc.c' || echo '$(srcdir)/'`abs_misc.c libsimdpack_opt1_la-average2_u8.lo: average2_u8.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -MT libsimdpack_opt1_la-average2_u8.lo -MD -MP -MF $(DEPDIR)/libsimdpack_opt1_la-average2_u8.Tpo -c -o libsimdpack_opt1_la-average2_u8.lo `test -f 'average2_u8.c' || echo '$(srcdir)/'`average2_u8.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_opt1_la-average2_u8.Tpo $(DEPDIR)/libsimdpack_opt1_la-average2_u8.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='average2_u8.c' object='libsimdpack_opt1_la-average2_u8.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_opt1_la-average2_u8.lo `test -f 'average2_u8.c' || echo '$(srcdir)/'`average2_u8.c libsimdpack_opt1_la-clip_fast.lo: clip_fast.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -MT libsimdpack_opt1_la-clip_fast.lo -MD -MP -MF $(DEPDIR)/libsimdpack_opt1_la-clip_fast.Tpo -c -o libsimdpack_opt1_la-clip_fast.lo `test -f 'clip_fast.c' || echo '$(srcdir)/'`clip_fast.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_opt1_la-clip_fast.Tpo $(DEPDIR)/libsimdpack_opt1_la-clip_fast.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clip_fast.c' object='libsimdpack_opt1_la-clip_fast.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_opt1_la-clip_fast.lo `test -f 'clip_fast.c' || echo '$(srcdir)/'`clip_fast.c libsimdpack_opt1_la-scalaradd.lo: scalaradd.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -MT libsimdpack_opt1_la-scalaradd.lo -MD -MP -MF $(DEPDIR)/libsimdpack_opt1_la-scalaradd.Tpo -c -o libsimdpack_opt1_la-scalaradd.lo `test -f 'scalaradd.c' || echo '$(srcdir)/'`scalaradd.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_opt1_la-scalaradd.Tpo $(DEPDIR)/libsimdpack_opt1_la-scalaradd.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scalaradd.c' object='libsimdpack_opt1_la-scalaradd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_opt1_la-scalaradd.lo `test -f 'scalaradd.c' || echo '$(srcdir)/'`scalaradd.c libsimdpack_opt1_la-scalarmult.lo: scalarmult.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -MT libsimdpack_opt1_la-scalarmult.lo -MD -MP -MF $(DEPDIR)/libsimdpack_opt1_la-scalarmult.Tpo -c -o libsimdpack_opt1_la-scalarmult.lo `test -f 'scalarmult.c' || echo '$(srcdir)/'`scalarmult.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsimdpack_opt1_la-scalarmult.Tpo $(DEPDIR)/libsimdpack_opt1_la-scalarmult.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scalarmult.c' object='libsimdpack_opt1_la-scalarmult.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimdpack_opt1_la_CFLAGS) $(CFLAGS) -c -o libsimdpack_opt1_la-scalarmult.lo `test -f 'scalarmult.c' || echo '$(srcdir)/'`scalarmult.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/simdpack/clip_fast.c0000644000175000017500000000617010717203073015156 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include /* This is a suprisingly fast implementation of clipping * in straight C. It would be difficult to do it faster in asm * without specialized opcodes. */ static void clip_s16_fast (int16_t *dest, int dstr, int16_t *src, int sstr, int n, int16_t *low, int16_t *hi) { int i; int32_t x; for(i=0;i>31)&(x-*low)) + (((*hi-x)>>31)&(*hi-x)); OIL_GET(dest,i*dstr, int16_t) = x; } } OIL_DEFINE_IMPL (clip_s16_fast, clip_s16); static void clip_s16_fast2 (int16_t *dest, int dstr, int16_t *src, int sstr, int n, int16_t *low, int16_t *hi) { int32_t x1, x2; if (n&1) { x1 = *src; OIL_INCREMENT(src,sstr); x1 -= (((x1-*low)>>31)&(x1-*low)); *dest = x1 + (((*hi-x1)>>31)&(*hi-x1)); OIL_INCREMENT(dest,dstr); n--; } while(n>0){ x1 = *src; OIL_INCREMENT(src,sstr); x2 = *src; OIL_INCREMENT(src,sstr); x1 -= (((x1-*low)>>31)&(x1-*low)); x2 -= (((x2-*low)>>31)&(x2-*low)); *dest = x1 + (((*hi-x1)>>31)&(*hi-x1)); OIL_INCREMENT(dest,dstr); *dest = x2 + (((*hi-x2)>>31)&(*hi-x2)); OIL_INCREMENT(dest,dstr); n-=2; } } OIL_DEFINE_IMPL (clip_s16_fast2, clip_s16); #if 0 /* broken */ /* This trick clips * the range min^(1<<31) to max^(1<<31) incorrectly with int32_t. * Thus the use of int64_t. */ static void clip_s32_fast (int32_t *dest, int dstr, int32_t *src, int sstr, int n, int32_t *low, int32_t *hi) { int i; int64_t x; for(i=0;i>63)&(x-*low)) + (((*hi-x)>>63)&(*hi-x)); OIL_GET(dest,i*dstr,int32_t) = x; } } OIL_DEFINE_IMPL (clip_s32_fast, clip_s32); #endif liboil-0.3.17/liboil/simdpack/scalaradd.c0000644000175000017500000001150410717203073015125 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #define SCALARADD_DEFINE_UNROLL2(type) \ static void scalaradd_ ## type ## _unroll2( \ oil_type_ ## type *dest, int dstr, \ oil_type_ ## type *src, int sstr, \ oil_type_ ## type *val, int n) \ { \ if(n&1) { \ *dest = *src + *val; \ OIL_INCREMENT(dest, dstr); \ OIL_INCREMENT(src, sstr); \ } \ n /= 2; \ while(n>0){ \ *dest = *src + *val; \ OIL_INCREMENT(dest,dstr); \ OIL_INCREMENT(src,sstr); \ *dest = *src + *val; \ OIL_INCREMENT(dest,dstr); \ OIL_INCREMENT(src,sstr); \ n--; \ } \ } \ OIL_DEFINE_IMPL (scalaradd_ ## type ## _unroll2, scalaradd_ ## type); SCALARADD_DEFINE_UNROLL2 (s8); SCALARADD_DEFINE_UNROLL2 (u8); SCALARADD_DEFINE_UNROLL2 (s16); SCALARADD_DEFINE_UNROLL2 (u16); SCALARADD_DEFINE_UNROLL2 (s32); SCALARADD_DEFINE_UNROLL2 (u32); SCALARADD_DEFINE_UNROLL2 (f32); SCALARADD_DEFINE_UNROLL2 (f64); #define SCALARADD_DEFINE_UNROLL2x(type) \ static void scalaradd_ ## type ## _unroll2x( \ oil_type_ ## type *dest, int dstr, \ oil_type_ ## type *src, int sstr, \ oil_type_ ## type *val, int n) \ { \ oil_type_ ## type *dest2; \ oil_type_ ## type *src2; \ int i; \ if(n&1) { \ *dest = *src + *val; \ OIL_INCREMENT(dest, dstr); \ OIL_INCREMENT(src, sstr); \ } \ src2 = OIL_OFFSET(src, sstr); \ dest2 = OIL_OFFSET(dest, dstr); \ n /= 2; \ sstr *= 2; \ dstr *= 2; \ for(i=0;i0){ \ *dest = *src + *val; \ OIL_INCREMENT(dest,dstr); \ OIL_INCREMENT(src,sstr); \ *dest = *src + *val; \ OIL_INCREMENT(dest,dstr); \ OIL_INCREMENT(src,sstr); \ *dest = *src + *val; \ OIL_INCREMENT(dest,dstr); \ OIL_INCREMENT(src,sstr); \ *dest = *src + *val; \ OIL_INCREMENT(dest,dstr); \ OIL_INCREMENT(src,sstr); \ n--; \ } \ } \ OIL_DEFINE_IMPL (scalaradd_ ## type ## _unroll4, scalaradd_ ## type); SCALARADD_DEFINE_UNROLL4 (s8); SCALARADD_DEFINE_UNROLL4 (u8); SCALARADD_DEFINE_UNROLL4 (s16); SCALARADD_DEFINE_UNROLL4 (u16); SCALARADD_DEFINE_UNROLL4 (s32); SCALARADD_DEFINE_UNROLL4 (u32); SCALARADD_DEFINE_UNROLL4 (f32); SCALARADD_DEFINE_UNROLL4 (f64); liboil-0.3.17/liboil/liboiltrampolines.c0000644000175000017500000051072411151566777015174 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* This file is automatically generated. Do not edit. */ #include #include #include #undef oil_abs_f32_f32 void oil_abs_f32_f32 (float * dest, int dstr, const float * src, int sstr, int n) { if (_oil_function_class_abs_f32_f32.func == NULL) { oil_class_optimize (&_oil_function_class_abs_f32_f32); } ((void (*)(float * dest, int dstr, const float * src, int sstr, int n))(_oil_function_class_abs_f32_f32.func))(dest, dstr, src, sstr, n); } #undef oil_abs_f64_f64 void oil_abs_f64_f64 (double * dest, int dstr, const double * src, int sstr, int n) { if (_oil_function_class_abs_f64_f64.func == NULL) { oil_class_optimize (&_oil_function_class_abs_f64_f64); } ((void (*)(double * dest, int dstr, const double * src, int sstr, int n))(_oil_function_class_abs_f64_f64.func))(dest, dstr, src, sstr, n); } #undef oil_abs_u16_s16 void oil_abs_u16_s16 (uint16_t * dest, int dstr, const int16_t * src, int sstr, int n) { if (_oil_function_class_abs_u16_s16.func == NULL) { oil_class_optimize (&_oil_function_class_abs_u16_s16); } ((void (*)(uint16_t * dest, int dstr, const int16_t * src, int sstr, int n))(_oil_function_class_abs_u16_s16.func))(dest, dstr, src, sstr, n); } #undef oil_abs_u32_s32 void oil_abs_u32_s32 (uint32_t * dest, int dstr, const int32_t * src, int sstr, int n) { if (_oil_function_class_abs_u32_s32.func == NULL) { oil_class_optimize (&_oil_function_class_abs_u32_s32); } ((void (*)(uint32_t * dest, int dstr, const int32_t * src, int sstr, int n))(_oil_function_class_abs_u32_s32.func))(dest, dstr, src, sstr, n); } #undef oil_abs_u8_s8 void oil_abs_u8_s8 (uint8_t * dest, int dstr, const int8_t * src, int sstr, int n) { if (_oil_function_class_abs_u8_s8.func == NULL) { oil_class_optimize (&_oil_function_class_abs_u8_s8); } ((void (*)(uint8_t * dest, int dstr, const int8_t * src, int sstr, int n))(_oil_function_class_abs_u8_s8.func))(dest, dstr, src, sstr, n); } #undef oil_add2_rshift_add_s16 void oil_add2_rshift_add_s16 (int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_2, int n) { if (_oil_function_class_add2_rshift_add_s16.func == NULL) { oil_class_optimize (&_oil_function_class_add2_rshift_add_s16); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_2, int n))(_oil_function_class_add2_rshift_add_s16.func))(d, s1, s2, s3, s4_2, n); } #undef oil_add2_rshift_sub_s16 void oil_add2_rshift_sub_s16 (int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_2, int n) { if (_oil_function_class_add2_rshift_sub_s16.func == NULL) { oil_class_optimize (&_oil_function_class_add2_rshift_sub_s16); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_2, int n))(_oil_function_class_add2_rshift_sub_s16.func))(d, s1, s2, s3, s4_2, n); } #undef oil_add_const_rshift_s16 void oil_add_const_rshift_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2_2, int n) { if (_oil_function_class_add_const_rshift_s16.func == NULL) { oil_class_optimize (&_oil_function_class_add_const_rshift_s16); } ((void (*)(int16_t * d1, const int16_t * s1, const int16_t * s2_2, int n))(_oil_function_class_add_const_rshift_s16.func))(d1, s1, s2_2, n); } #undef oil_add_f32 void oil_add_f32 (float * d, const float * s1, const float * s2, int n) { if (_oil_function_class_add_f32.func == NULL) { oil_class_optimize (&_oil_function_class_add_f32); } ((void (*)(float * d, const float * s1, const float * s2, int n))(_oil_function_class_add_f32.func))(d, s1, s2, n); } #undef oil_add_f64 void oil_add_f64 (double * d, const double * s1, const double * s2, int n) { if (_oil_function_class_add_f64.func == NULL) { oil_class_optimize (&_oil_function_class_add_f64); } ((void (*)(double * d, const double * s1, const double * s2, int n))(_oil_function_class_add_f64.func))(d, s1, s2, n); } #undef oil_add_s16 void oil_add_s16 (int16_t * d, const int16_t * src1, const int16_t * src2, int n) { if (_oil_function_class_add_s16.func == NULL) { oil_class_optimize (&_oil_function_class_add_s16); } ((void (*)(int16_t * d, const int16_t * src1, const int16_t * src2, int n))(_oil_function_class_add_s16.func))(d, src1, src2, n); } #undef oil_add_s16_u8 void oil_add_s16_u8 (int16_t * d, const int16_t * src1, const uint8_t * src2, int n) { if (_oil_function_class_add_s16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_add_s16_u8); } ((void (*)(int16_t * d, const int16_t * src1, const uint8_t * src2, int n))(_oil_function_class_add_s16_u8.func))(d, src1, src2, n); } #undef oil_addc_rshift_s16 void oil_addc_rshift_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2_2, int n) { if (_oil_function_class_addc_rshift_s16.func == NULL) { oil_class_optimize (&_oil_function_class_addc_rshift_s16); } ((void (*)(int16_t * d1, const int16_t * s1, const int16_t * s2_2, int n))(_oil_function_class_addc_rshift_s16.func))(d1, s1, s2_2, n); } #undef oil_addc_s16 void oil_addc_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2_1, int n) { if (_oil_function_class_addc_s16.func == NULL) { oil_class_optimize (&_oil_function_class_addc_s16); } ((void (*)(int16_t * d1, const int16_t * s1, const int16_t * s2_1, int n))(_oil_function_class_addc_s16.func))(d1, s1, s2_1, n); } #undef oil_argb_paint_u8 void oil_argb_paint_u8 (uint8_t * i_4xn, const uint8_t * s1_4, const uint8_t * s2_n, int n) { if (_oil_function_class_argb_paint_u8.func == NULL) { oil_class_optimize (&_oil_function_class_argb_paint_u8); } ((void (*)(uint8_t * i_4xn, const uint8_t * s1_4, const uint8_t * s2_n, int n))(_oil_function_class_argb_paint_u8.func))(i_4xn, s1_4, s2_n, n); } #undef oil_average2_u8 void oil_average2_u8 (uint8_t * d, int dstr, const uint8_t * s1, int sstr1, const uint8_t * s2, int sstr2, int n) { if (_oil_function_class_average2_u8.func == NULL) { oil_class_optimize (&_oil_function_class_average2_u8); } ((void (*)(uint8_t * d, int dstr, const uint8_t * s1, int sstr1, const uint8_t * s2, int sstr2, int n))(_oil_function_class_average2_u8.func))(d, dstr, s1, sstr1, s2, sstr2, n); } #undef oil_avg2_12xn_u8 void oil_avg2_12xn_u8 (uint8_t * d_12xn, int ds1, const uint8_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, int n) { if (_oil_function_class_avg2_12xn_u8.func == NULL) { oil_class_optimize (&_oil_function_class_avg2_12xn_u8); } ((void (*)(uint8_t * d_12xn, int ds1, const uint8_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, int n))(_oil_function_class_avg2_12xn_u8.func))(d_12xn, ds1, s1_12xn, ss1, s2_12xn, ss2, n); } #undef oil_avg2_16xn_u8 void oil_avg2_16xn_u8 (uint8_t * d_16xn, int ds1, const uint8_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, int n) { if (_oil_function_class_avg2_16xn_u8.func == NULL) { oil_class_optimize (&_oil_function_class_avg2_16xn_u8); } ((void (*)(uint8_t * d_16xn, int ds1, const uint8_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, int n))(_oil_function_class_avg2_16xn_u8.func))(d_16xn, ds1, s1_16xn, ss1, s2_16xn, ss2, n); } #undef oil_avg2_32xn_u8 void oil_avg2_32xn_u8 (uint8_t * d_32xn, int ds1, const uint8_t * s1_32xn, int ss1, const uint8_t * s2_32xn, int ss2, int n) { if (_oil_function_class_avg2_32xn_u8.func == NULL) { oil_class_optimize (&_oil_function_class_avg2_32xn_u8); } ((void (*)(uint8_t * d_32xn, int ds1, const uint8_t * s1_32xn, int ss1, const uint8_t * s2_32xn, int ss2, int n))(_oil_function_class_avg2_32xn_u8.func))(d_32xn, ds1, s1_32xn, ss1, s2_32xn, ss2, n); } #undef oil_avg2_8xn_u8 void oil_avg2_8xn_u8 (uint8_t * d_8xn, int ds1, const uint8_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, int n) { if (_oil_function_class_avg2_8xn_u8.func == NULL) { oil_class_optimize (&_oil_function_class_avg2_8xn_u8); } ((void (*)(uint8_t * d_8xn, int ds1, const uint8_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, int n))(_oil_function_class_avg2_8xn_u8.func))(d_8xn, ds1, s1_8xn, ss1, s2_8xn, ss2, n); } #undef oil_ayuv2argb_u8 void oil_ayuv2argb_u8 (uint8_t * d_4xn, const uint8_t * s_4xn, int n) { if (_oil_function_class_ayuv2argb_u8.func == NULL) { oil_class_optimize (&_oil_function_class_ayuv2argb_u8); } ((void (*)(uint8_t * d_4xn, const uint8_t * s_4xn, int n))(_oil_function_class_ayuv2argb_u8.func))(d_4xn, s_4xn, n); } #undef oil_ayuv2uyvy void oil_ayuv2uyvy (uint32_t * d_n, const uint32_t * s_n, int n) { if (_oil_function_class_ayuv2uyvy.func == NULL) { oil_class_optimize (&_oil_function_class_ayuv2uyvy); } ((void (*)(uint32_t * d_n, const uint32_t * s_n, int n))(_oil_function_class_ayuv2uyvy.func))(d_n, s_n, n); } #undef oil_ayuv2yuyv void oil_ayuv2yuyv (uint32_t * d_n, const uint32_t * s_n, int n) { if (_oil_function_class_ayuv2yuyv.func == NULL) { oil_class_optimize (&_oil_function_class_ayuv2yuyv); } ((void (*)(uint32_t * d_n, const uint32_t * s_n, int n))(_oil_function_class_ayuv2yuyv.func))(d_n, s_n, n); } #undef oil_ayuv2yvyu void oil_ayuv2yvyu (uint32_t * d_n, const uint32_t * s_n, int n) { if (_oil_function_class_ayuv2yvyu.func == NULL) { oil_class_optimize (&_oil_function_class_ayuv2yvyu); } ((void (*)(uint32_t * d_n, const uint32_t * s_n, int n))(_oil_function_class_ayuv2yvyu.func))(d_n, s_n, n); } #undef oil_clamp_f32 void oil_clamp_f32 (float * dest, const float * src, int n, const float * s2_1, const float * s3_1) { if (_oil_function_class_clamp_f32.func == NULL) { oil_class_optimize (&_oil_function_class_clamp_f32); } ((void (*)(float * dest, const float * src, int n, const float * s2_1, const float * s3_1))(_oil_function_class_clamp_f32.func))(dest, src, n, s2_1, s3_1); } #undef oil_clamp_f64 void oil_clamp_f64 (double * dest, const double * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_clamp_f64.func == NULL) { oil_class_optimize (&_oil_function_class_clamp_f64); } ((void (*)(double * dest, const double * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_clamp_f64.func))(dest, src, n, s2_1, s3_1); } #undef oil_clamp_s16 void oil_clamp_s16 (int16_t * dest, const int16_t * src, int n, const int16_t * s2_1, const int16_t * s3_1) { if (_oil_function_class_clamp_s16.func == NULL) { oil_class_optimize (&_oil_function_class_clamp_s16); } ((void (*)(int16_t * dest, const int16_t * src, int n, const int16_t * s2_1, const int16_t * s3_1))(_oil_function_class_clamp_s16.func))(dest, src, n, s2_1, s3_1); } #undef oil_clamp_s32 void oil_clamp_s32 (int32_t * dest, const int32_t * src, int n, const int32_t * s2_1, const int32_t * s3_1) { if (_oil_function_class_clamp_s32.func == NULL) { oil_class_optimize (&_oil_function_class_clamp_s32); } ((void (*)(int32_t * dest, const int32_t * src, int n, const int32_t * s2_1, const int32_t * s3_1))(_oil_function_class_clamp_s32.func))(dest, src, n, s2_1, s3_1); } #undef oil_clamp_s8 void oil_clamp_s8 (int8_t * dest, const int8_t * src, int n, const int8_t * s2_1, const int8_t * s3_1) { if (_oil_function_class_clamp_s8.func == NULL) { oil_class_optimize (&_oil_function_class_clamp_s8); } ((void (*)(int8_t * dest, const int8_t * src, int n, const int8_t * s2_1, const int8_t * s3_1))(_oil_function_class_clamp_s8.func))(dest, src, n, s2_1, s3_1); } #undef oil_clamp_u16 void oil_clamp_u16 (uint16_t * dest, const uint16_t * src, int n, const uint16_t * s2_1, const uint16_t * s3_1) { if (_oil_function_class_clamp_u16.func == NULL) { oil_class_optimize (&_oil_function_class_clamp_u16); } ((void (*)(uint16_t * dest, const uint16_t * src, int n, const uint16_t * s2_1, const uint16_t * s3_1))(_oil_function_class_clamp_u16.func))(dest, src, n, s2_1, s3_1); } #undef oil_clamp_u32 void oil_clamp_u32 (uint32_t * dest, const uint32_t * src, int n, const uint32_t * s2_1, const uint32_t * s3_1) { if (_oil_function_class_clamp_u32.func == NULL) { oil_class_optimize (&_oil_function_class_clamp_u32); } ((void (*)(uint32_t * dest, const uint32_t * src, int n, const uint32_t * s2_1, const uint32_t * s3_1))(_oil_function_class_clamp_u32.func))(dest, src, n, s2_1, s3_1); } #undef oil_clamp_u8 void oil_clamp_u8 (uint8_t * dest, const uint8_t * src, int n, const uint8_t * s2_1, const uint8_t * s3_1) { if (_oil_function_class_clamp_u8.func == NULL) { oil_class_optimize (&_oil_function_class_clamp_u8); } ((void (*)(uint8_t * dest, const uint8_t * src, int n, const uint8_t * s2_1, const uint8_t * s3_1))(_oil_function_class_clamp_u8.func))(dest, src, n, s2_1, s3_1); } #undef oil_clamphigh_f32 void oil_clamphigh_f32 (float * dest, const float * src, int n, const float * s2_1) { if (_oil_function_class_clamphigh_f32.func == NULL) { oil_class_optimize (&_oil_function_class_clamphigh_f32); } ((void (*)(float * dest, const float * src, int n, const float * s2_1))(_oil_function_class_clamphigh_f32.func))(dest, src, n, s2_1); } #undef oil_clamphigh_f64 void oil_clamphigh_f64 (double * dest, const double * src, int n, const double * s2_1) { if (_oil_function_class_clamphigh_f64.func == NULL) { oil_class_optimize (&_oil_function_class_clamphigh_f64); } ((void (*)(double * dest, const double * src, int n, const double * s2_1))(_oil_function_class_clamphigh_f64.func))(dest, src, n, s2_1); } #undef oil_clamphigh_s16 void oil_clamphigh_s16 (int16_t * dest, const int16_t * src, int n, const int16_t * s2_1) { if (_oil_function_class_clamphigh_s16.func == NULL) { oil_class_optimize (&_oil_function_class_clamphigh_s16); } ((void (*)(int16_t * dest, const int16_t * src, int n, const int16_t * s2_1))(_oil_function_class_clamphigh_s16.func))(dest, src, n, s2_1); } #undef oil_clamphigh_s32 void oil_clamphigh_s32 (int32_t * dest, const int32_t * src, int n, const int32_t * s2_1) { if (_oil_function_class_clamphigh_s32.func == NULL) { oil_class_optimize (&_oil_function_class_clamphigh_s32); } ((void (*)(int32_t * dest, const int32_t * src, int n, const int32_t * s2_1))(_oil_function_class_clamphigh_s32.func))(dest, src, n, s2_1); } #undef oil_clamphigh_s8 void oil_clamphigh_s8 (int8_t * dest, const int8_t * src, int n, const int8_t * s2_1) { if (_oil_function_class_clamphigh_s8.func == NULL) { oil_class_optimize (&_oil_function_class_clamphigh_s8); } ((void (*)(int8_t * dest, const int8_t * src, int n, const int8_t * s2_1))(_oil_function_class_clamphigh_s8.func))(dest, src, n, s2_1); } #undef oil_clamphigh_u16 void oil_clamphigh_u16 (uint16_t * dest, const uint16_t * src, int n, const uint16_t * s2_1) { if (_oil_function_class_clamphigh_u16.func == NULL) { oil_class_optimize (&_oil_function_class_clamphigh_u16); } ((void (*)(uint16_t * dest, const uint16_t * src, int n, const uint16_t * s2_1))(_oil_function_class_clamphigh_u16.func))(dest, src, n, s2_1); } #undef oil_clamphigh_u32 void oil_clamphigh_u32 (uint32_t * dest, const uint32_t * src, int n, const uint32_t * s2_1) { if (_oil_function_class_clamphigh_u32.func == NULL) { oil_class_optimize (&_oil_function_class_clamphigh_u32); } ((void (*)(uint32_t * dest, const uint32_t * src, int n, const uint32_t * s2_1))(_oil_function_class_clamphigh_u32.func))(dest, src, n, s2_1); } #undef oil_clamphigh_u8 void oil_clamphigh_u8 (uint8_t * dest, const uint8_t * src, int n, const uint8_t * s2_1) { if (_oil_function_class_clamphigh_u8.func == NULL) { oil_class_optimize (&_oil_function_class_clamphigh_u8); } ((void (*)(uint8_t * dest, const uint8_t * src, int n, const uint8_t * s2_1))(_oil_function_class_clamphigh_u8.func))(dest, src, n, s2_1); } #undef oil_clamplow_f32 void oil_clamplow_f32 (float * dest, const float * src, int n, const float * s2_1) { if (_oil_function_class_clamplow_f32.func == NULL) { oil_class_optimize (&_oil_function_class_clamplow_f32); } ((void (*)(float * dest, const float * src, int n, const float * s2_1))(_oil_function_class_clamplow_f32.func))(dest, src, n, s2_1); } #undef oil_clamplow_f64 void oil_clamplow_f64 (double * dest, const double * src, int n, const double * s2_1) { if (_oil_function_class_clamplow_f64.func == NULL) { oil_class_optimize (&_oil_function_class_clamplow_f64); } ((void (*)(double * dest, const double * src, int n, const double * s2_1))(_oil_function_class_clamplow_f64.func))(dest, src, n, s2_1); } #undef oil_clamplow_s16 void oil_clamplow_s16 (int16_t * dest, const int16_t * src, int n, const int16_t * s2_1) { if (_oil_function_class_clamplow_s16.func == NULL) { oil_class_optimize (&_oil_function_class_clamplow_s16); } ((void (*)(int16_t * dest, const int16_t * src, int n, const int16_t * s2_1))(_oil_function_class_clamplow_s16.func))(dest, src, n, s2_1); } #undef oil_clamplow_s32 void oil_clamplow_s32 (int32_t * dest, const int32_t * src, int n, const int32_t * s2_1) { if (_oil_function_class_clamplow_s32.func == NULL) { oil_class_optimize (&_oil_function_class_clamplow_s32); } ((void (*)(int32_t * dest, const int32_t * src, int n, const int32_t * s2_1))(_oil_function_class_clamplow_s32.func))(dest, src, n, s2_1); } #undef oil_clamplow_s8 void oil_clamplow_s8 (int8_t * dest, const int8_t * src, int n, const int8_t * s2_1) { if (_oil_function_class_clamplow_s8.func == NULL) { oil_class_optimize (&_oil_function_class_clamplow_s8); } ((void (*)(int8_t * dest, const int8_t * src, int n, const int8_t * s2_1))(_oil_function_class_clamplow_s8.func))(dest, src, n, s2_1); } #undef oil_clamplow_u16 void oil_clamplow_u16 (uint16_t * dest, const uint16_t * src, int n, const uint16_t * s2_1) { if (_oil_function_class_clamplow_u16.func == NULL) { oil_class_optimize (&_oil_function_class_clamplow_u16); } ((void (*)(uint16_t * dest, const uint16_t * src, int n, const uint16_t * s2_1))(_oil_function_class_clamplow_u16.func))(dest, src, n, s2_1); } #undef oil_clamplow_u32 void oil_clamplow_u32 (uint32_t * dest, const uint32_t * src, int n, const uint32_t * s2_1) { if (_oil_function_class_clamplow_u32.func == NULL) { oil_class_optimize (&_oil_function_class_clamplow_u32); } ((void (*)(uint32_t * dest, const uint32_t * src, int n, const uint32_t * s2_1))(_oil_function_class_clamplow_u32.func))(dest, src, n, s2_1); } #undef oil_clamplow_u8 void oil_clamplow_u8 (uint8_t * dest, const uint8_t * src, int n, const uint8_t * s2_1) { if (_oil_function_class_clamplow_u8.func == NULL) { oil_class_optimize (&_oil_function_class_clamplow_u8); } ((void (*)(uint8_t * dest, const uint8_t * src, int n, const uint8_t * s2_1))(_oil_function_class_clamplow_u8.func))(dest, src, n, s2_1); } #undef oil_clip_f32 void oil_clip_f32 (float * dest, int dstr, const float * src, int sstr, int n, const float * s2_1, const float * s3_1) { if (_oil_function_class_clip_f32.func == NULL) { oil_class_optimize (&_oil_function_class_clip_f32); } ((void (*)(float * dest, int dstr, const float * src, int sstr, int n, const float * s2_1, const float * s3_1))(_oil_function_class_clip_f32.func))(dest, dstr, src, sstr, n, s2_1, s3_1); } #undef oil_clip_f64 void oil_clip_f64 (double * dest, int dstr, const double * src, int sstr, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_clip_f64.func == NULL) { oil_class_optimize (&_oil_function_class_clip_f64); } ((void (*)(double * dest, int dstr, const double * src, int sstr, int n, const double * s2_1, const double * s3_1))(_oil_function_class_clip_f64.func))(dest, dstr, src, sstr, n, s2_1, s3_1); } #undef oil_clip_s16 void oil_clip_s16 (int16_t * dest, int dstr, const int16_t * src, int sstr, int n, const int16_t * s2_1, const int16_t * s3_1) { if (_oil_function_class_clip_s16.func == NULL) { oil_class_optimize (&_oil_function_class_clip_s16); } ((void (*)(int16_t * dest, int dstr, const int16_t * src, int sstr, int n, const int16_t * s2_1, const int16_t * s3_1))(_oil_function_class_clip_s16.func))(dest, dstr, src, sstr, n, s2_1, s3_1); } #undef oil_clip_s32 void oil_clip_s32 (int32_t * dest, int dstr, const int32_t * src, int sstr, int n, const int32_t * s2_1, const int32_t * s3_1) { if (_oil_function_class_clip_s32.func == NULL) { oil_class_optimize (&_oil_function_class_clip_s32); } ((void (*)(int32_t * dest, int dstr, const int32_t * src, int sstr, int n, const int32_t * s2_1, const int32_t * s3_1))(_oil_function_class_clip_s32.func))(dest, dstr, src, sstr, n, s2_1, s3_1); } #undef oil_clip_s8 void oil_clip_s8 (int8_t * dest, int dstr, const int8_t * src, int sstr, int n, const int8_t * s2_1, const int8_t * s3_1) { if (_oil_function_class_clip_s8.func == NULL) { oil_class_optimize (&_oil_function_class_clip_s8); } ((void (*)(int8_t * dest, int dstr, const int8_t * src, int sstr, int n, const int8_t * s2_1, const int8_t * s3_1))(_oil_function_class_clip_s8.func))(dest, dstr, src, sstr, n, s2_1, s3_1); } #undef oil_clip_u16 void oil_clip_u16 (uint16_t * dest, int dstr, const uint16_t * src, int sstr, int n, const uint16_t * s2_1, const uint16_t * s3_1) { if (_oil_function_class_clip_u16.func == NULL) { oil_class_optimize (&_oil_function_class_clip_u16); } ((void (*)(uint16_t * dest, int dstr, const uint16_t * src, int sstr, int n, const uint16_t * s2_1, const uint16_t * s3_1))(_oil_function_class_clip_u16.func))(dest, dstr, src, sstr, n, s2_1, s3_1); } #undef oil_clip_u32 void oil_clip_u32 (uint32_t * dest, int dstr, const uint32_t * src, int sstr, int n, const uint32_t * s2_1, const uint32_t * s3_1) { if (_oil_function_class_clip_u32.func == NULL) { oil_class_optimize (&_oil_function_class_clip_u32); } ((void (*)(uint32_t * dest, int dstr, const uint32_t * src, int sstr, int n, const uint32_t * s2_1, const uint32_t * s3_1))(_oil_function_class_clip_u32.func))(dest, dstr, src, sstr, n, s2_1, s3_1); } #undef oil_clip_u8 void oil_clip_u8 (uint8_t * dest, int dstr, const uint8_t * src, int sstr, int n, const uint8_t * s2_1, const uint8_t * s3_1) { if (_oil_function_class_clip_u8.func == NULL) { oil_class_optimize (&_oil_function_class_clip_u8); } ((void (*)(uint8_t * dest, int dstr, const uint8_t * src, int sstr, int n, const uint8_t * s2_1, const uint8_t * s3_1))(_oil_function_class_clip_u8.func))(dest, dstr, src, sstr, n, s2_1, s3_1); } #undef oil_clipconv8x8_u8_s16 void oil_clipconv8x8_u8_s16 (uint8_t * d_8x8, int dstr, const int16_t * s_8x8, int sstr) { if (_oil_function_class_clipconv8x8_u8_s16.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv8x8_u8_s16); } ((void (*)(uint8_t * d_8x8, int dstr, const int16_t * s_8x8, int sstr))(_oil_function_class_clipconv8x8_u8_s16.func))(d_8x8, dstr, s_8x8, sstr); } #undef oil_clipconv_s16_f32 void oil_clipconv_s16_f32 (int16_t * dest, int dstr, const float * src, int sstr, int n) { if (_oil_function_class_clipconv_s16_f32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_s16_f32); } ((void (*)(int16_t * dest, int dstr, const float * src, int sstr, int n))(_oil_function_class_clipconv_s16_f32.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_s16_f64 void oil_clipconv_s16_f64 (int16_t * dest, int dstr, const double * src, int sstr, int n) { if (_oil_function_class_clipconv_s16_f64.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_s16_f64); } ((void (*)(int16_t * dest, int dstr, const double * src, int sstr, int n))(_oil_function_class_clipconv_s16_f64.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_s16_s32 void oil_clipconv_s16_s32 (int16_t * dest, int dstr, const int32_t * src, int sstr, int n) { if (_oil_function_class_clipconv_s16_s32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_s16_s32); } ((void (*)(int16_t * dest, int dstr, const int32_t * src, int sstr, int n))(_oil_function_class_clipconv_s16_s32.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_s16_u16 void oil_clipconv_s16_u16 (int16_t * dest, int dstr, const uint16_t * src, int sstr, int n) { if (_oil_function_class_clipconv_s16_u16.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_s16_u16); } ((void (*)(int16_t * dest, int dstr, const uint16_t * src, int sstr, int n))(_oil_function_class_clipconv_s16_u16.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_s16_u32 void oil_clipconv_s16_u32 (int16_t * dest, int dstr, const uint32_t * src, int sstr, int n) { if (_oil_function_class_clipconv_s16_u32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_s16_u32); } ((void (*)(int16_t * dest, int dstr, const uint32_t * src, int sstr, int n))(_oil_function_class_clipconv_s16_u32.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_s32_f32 void oil_clipconv_s32_f32 (int32_t * dest, int dstr, const float * src, int sstr, int n) { if (_oil_function_class_clipconv_s32_f32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_s32_f32); } ((void (*)(int32_t * dest, int dstr, const float * src, int sstr, int n))(_oil_function_class_clipconv_s32_f32.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_s32_f64 void oil_clipconv_s32_f64 (int32_t * dest, int dstr, const double * src, int sstr, int n) { if (_oil_function_class_clipconv_s32_f64.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_s32_f64); } ((void (*)(int32_t * dest, int dstr, const double * src, int sstr, int n))(_oil_function_class_clipconv_s32_f64.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_s32_u32 void oil_clipconv_s32_u32 (int32_t * dest, int dstr, const uint32_t * src, int sstr, int n) { if (_oil_function_class_clipconv_s32_u32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_s32_u32); } ((void (*)(int32_t * dest, int dstr, const uint32_t * src, int sstr, int n))(_oil_function_class_clipconv_s32_u32.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_s8_f32 void oil_clipconv_s8_f32 (int8_t * dest, int dstr, const float * src, int sstr, int n) { if (_oil_function_class_clipconv_s8_f32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_s8_f32); } ((void (*)(int8_t * dest, int dstr, const float * src, int sstr, int n))(_oil_function_class_clipconv_s8_f32.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_s8_f64 void oil_clipconv_s8_f64 (int8_t * dest, int dstr, const double * src, int sstr, int n) { if (_oil_function_class_clipconv_s8_f64.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_s8_f64); } ((void (*)(int8_t * dest, int dstr, const double * src, int sstr, int n))(_oil_function_class_clipconv_s8_f64.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_s8_s16 void oil_clipconv_s8_s16 (int8_t * dest, int dstr, const int16_t * src, int sstr, int n) { if (_oil_function_class_clipconv_s8_s16.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_s8_s16); } ((void (*)(int8_t * dest, int dstr, const int16_t * src, int sstr, int n))(_oil_function_class_clipconv_s8_s16.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_s8_s32 void oil_clipconv_s8_s32 (int8_t * dest, int dstr, const int32_t * src, int sstr, int n) { if (_oil_function_class_clipconv_s8_s32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_s8_s32); } ((void (*)(int8_t * dest, int dstr, const int32_t * src, int sstr, int n))(_oil_function_class_clipconv_s8_s32.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_s8_u16 void oil_clipconv_s8_u16 (int8_t * dest, int dstr, const uint16_t * src, int sstr, int n) { if (_oil_function_class_clipconv_s8_u16.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_s8_u16); } ((void (*)(int8_t * dest, int dstr, const uint16_t * src, int sstr, int n))(_oil_function_class_clipconv_s8_u16.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_s8_u32 void oil_clipconv_s8_u32 (int8_t * dest, int dstr, const uint32_t * src, int sstr, int n) { if (_oil_function_class_clipconv_s8_u32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_s8_u32); } ((void (*)(int8_t * dest, int dstr, const uint32_t * src, int sstr, int n))(_oil_function_class_clipconv_s8_u32.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_s8_u8 void oil_clipconv_s8_u8 (int8_t * dest, int dstr, const uint8_t * src, int sstr, int n) { if (_oil_function_class_clipconv_s8_u8.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_s8_u8); } ((void (*)(int8_t * dest, int dstr, const uint8_t * src, int sstr, int n))(_oil_function_class_clipconv_s8_u8.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_u16_f32 void oil_clipconv_u16_f32 (uint16_t * dest, int dstr, const float * src, int sstr, int n) { if (_oil_function_class_clipconv_u16_f32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_u16_f32); } ((void (*)(uint16_t * dest, int dstr, const float * src, int sstr, int n))(_oil_function_class_clipconv_u16_f32.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_u16_f64 void oil_clipconv_u16_f64 (uint16_t * dest, int dstr, const double * src, int sstr, int n) { if (_oil_function_class_clipconv_u16_f64.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_u16_f64); } ((void (*)(uint16_t * dest, int dstr, const double * src, int sstr, int n))(_oil_function_class_clipconv_u16_f64.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_u16_s16 void oil_clipconv_u16_s16 (uint16_t * dest, int dstr, const int16_t * src, int sstr, int n) { if (_oil_function_class_clipconv_u16_s16.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_u16_s16); } ((void (*)(uint16_t * dest, int dstr, const int16_t * src, int sstr, int n))(_oil_function_class_clipconv_u16_s16.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_u16_s32 void oil_clipconv_u16_s32 (uint16_t * dest, int dstr, const int32_t * src, int sstr, int n) { if (_oil_function_class_clipconv_u16_s32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_u16_s32); } ((void (*)(uint16_t * dest, int dstr, const int32_t * src, int sstr, int n))(_oil_function_class_clipconv_u16_s32.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_u16_u32 void oil_clipconv_u16_u32 (uint16_t * dest, int dstr, const uint32_t * src, int sstr, int n) { if (_oil_function_class_clipconv_u16_u32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_u16_u32); } ((void (*)(uint16_t * dest, int dstr, const uint32_t * src, int sstr, int n))(_oil_function_class_clipconv_u16_u32.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_u32_f32 void oil_clipconv_u32_f32 (uint32_t * dest, int dstr, const float * src, int sstr, int n) { if (_oil_function_class_clipconv_u32_f32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_u32_f32); } ((void (*)(uint32_t * dest, int dstr, const float * src, int sstr, int n))(_oil_function_class_clipconv_u32_f32.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_u32_f64 void oil_clipconv_u32_f64 (uint32_t * dest, int dstr, const double * src, int sstr, int n) { if (_oil_function_class_clipconv_u32_f64.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_u32_f64); } ((void (*)(uint32_t * dest, int dstr, const double * src, int sstr, int n))(_oil_function_class_clipconv_u32_f64.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_u32_s32 void oil_clipconv_u32_s32 (uint32_t * dest, int dstr, const int32_t * src, int sstr, int n) { if (_oil_function_class_clipconv_u32_s32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_u32_s32); } ((void (*)(uint32_t * dest, int dstr, const int32_t * src, int sstr, int n))(_oil_function_class_clipconv_u32_s32.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_u8_f32 void oil_clipconv_u8_f32 (uint8_t * dest, int dstr, const float * src, int sstr, int n) { if (_oil_function_class_clipconv_u8_f32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_u8_f32); } ((void (*)(uint8_t * dest, int dstr, const float * src, int sstr, int n))(_oil_function_class_clipconv_u8_f32.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_u8_f64 void oil_clipconv_u8_f64 (uint8_t * dest, int dstr, const double * src, int sstr, int n) { if (_oil_function_class_clipconv_u8_f64.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_u8_f64); } ((void (*)(uint8_t * dest, int dstr, const double * src, int sstr, int n))(_oil_function_class_clipconv_u8_f64.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_u8_s16 void oil_clipconv_u8_s16 (uint8_t * dest, int dstr, const int16_t * src, int sstr, int n) { if (_oil_function_class_clipconv_u8_s16.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_u8_s16); } ((void (*)(uint8_t * dest, int dstr, const int16_t * src, int sstr, int n))(_oil_function_class_clipconv_u8_s16.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_u8_s32 void oil_clipconv_u8_s32 (uint8_t * dest, int dstr, const int32_t * src, int sstr, int n) { if (_oil_function_class_clipconv_u8_s32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_u8_s32); } ((void (*)(uint8_t * dest, int dstr, const int32_t * src, int sstr, int n))(_oil_function_class_clipconv_u8_s32.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_u8_s8 void oil_clipconv_u8_s8 (uint8_t * dest, int dstr, const int8_t * src, int sstr, int n) { if (_oil_function_class_clipconv_u8_s8.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_u8_s8); } ((void (*)(uint8_t * dest, int dstr, const int8_t * src, int sstr, int n))(_oil_function_class_clipconv_u8_s8.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_u8_u16 void oil_clipconv_u8_u16 (uint8_t * dest, int dstr, const uint16_t * src, int sstr, int n) { if (_oil_function_class_clipconv_u8_u16.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_u8_u16); } ((void (*)(uint8_t * dest, int dstr, const uint16_t * src, int sstr, int n))(_oil_function_class_clipconv_u8_u16.func))(dest, dstr, src, sstr, n); } #undef oil_clipconv_u8_u32 void oil_clipconv_u8_u32 (uint8_t * dest, int dstr, const uint32_t * src, int sstr, int n) { if (_oil_function_class_clipconv_u8_u32.func == NULL) { oil_class_optimize (&_oil_function_class_clipconv_u8_u32); } ((void (*)(uint8_t * dest, int dstr, const uint32_t * src, int sstr, int n))(_oil_function_class_clipconv_u8_u32.func))(dest, dstr, src, sstr, n); } #undef oil_colorspace_argb void oil_colorspace_argb (uint32_t * d, const uint32_t * s, const int16_t * s2_24, int n) { if (_oil_function_class_colorspace_argb.func == NULL) { oil_class_optimize (&_oil_function_class_colorspace_argb); } ((void (*)(uint32_t * d, const uint32_t * s, const int16_t * s2_24, int n))(_oil_function_class_colorspace_argb.func))(d, s, s2_24, n); } #undef oil_colsad8x8_u8 void oil_colsad8x8_u8 (uint32_t * d_1, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2) { if (_oil_function_class_colsad8x8_u8.func == NULL) { oil_class_optimize (&_oil_function_class_colsad8x8_u8); } ((void (*)(uint32_t * d_1, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2))(_oil_function_class_colsad8x8_u8.func))(d_1, s1_8x8, ss1, s2_8x8, ss2); } #undef oil_combine2_12xn_u8 void oil_combine2_12xn_u8 (uint8_t * d_12xn, int ds1, const uint8_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, const int16_t * s3_4, int n) { if (_oil_function_class_combine2_12xn_u8.func == NULL) { oil_class_optimize (&_oil_function_class_combine2_12xn_u8); } ((void (*)(uint8_t * d_12xn, int ds1, const uint8_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, const int16_t * s3_4, int n))(_oil_function_class_combine2_12xn_u8.func))(d_12xn, ds1, s1_12xn, ss1, s2_12xn, ss2, s3_4, n); } #undef oil_combine2_16xn_u8 void oil_combine2_16xn_u8 (uint8_t * d_16xn, int ds1, const uint8_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, const int16_t * s3_4, int n) { if (_oil_function_class_combine2_16xn_u8.func == NULL) { oil_class_optimize (&_oil_function_class_combine2_16xn_u8); } ((void (*)(uint8_t * d_16xn, int ds1, const uint8_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, const int16_t * s3_4, int n))(_oil_function_class_combine2_16xn_u8.func))(d_16xn, ds1, s1_16xn, ss1, s2_16xn, ss2, s3_4, n); } #undef oil_combine2_8xn_u8 void oil_combine2_8xn_u8 (uint8_t * d_8xn, int ds1, const uint8_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, const int16_t * s3_4, int n) { if (_oil_function_class_combine2_8xn_u8.func == NULL) { oil_class_optimize (&_oil_function_class_combine2_8xn_u8); } ((void (*)(uint8_t * d_8xn, int ds1, const uint8_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, const int16_t * s3_4, int n))(_oil_function_class_combine2_8xn_u8.func))(d_8xn, ds1, s1_8xn, ss1, s2_8xn, ss2, s3_4, n); } #undef oil_combine4_12xn_u8 void oil_combine4_12xn_u8 (uint8_t * d_12xn, int ds1, const uint8_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, const uint8_t * s3_12xn, int ss3, const uint8_t * s4_12xn, int ss4, const int16_t * s5_6, int n) { if (_oil_function_class_combine4_12xn_u8.func == NULL) { oil_class_optimize (&_oil_function_class_combine4_12xn_u8); } ((void (*)(uint8_t * d_12xn, int ds1, const uint8_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, const uint8_t * s3_12xn, int ss3, const uint8_t * s4_12xn, int ss4, const int16_t * s5_6, int n))(_oil_function_class_combine4_12xn_u8.func))(d_12xn, ds1, s1_12xn, ss1, s2_12xn, ss2, s3_12xn, ss3, s4_12xn, ss4, s5_6, n); } #undef oil_combine4_16xn_u8 void oil_combine4_16xn_u8 (uint8_t * d_16xn, int ds1, const uint8_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, const uint8_t * s3_16xn, int ss3, const uint8_t * s4_16xn, int ss4, const int16_t * s5_6, int n) { if (_oil_function_class_combine4_16xn_u8.func == NULL) { oil_class_optimize (&_oil_function_class_combine4_16xn_u8); } ((void (*)(uint8_t * d_16xn, int ds1, const uint8_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, const uint8_t * s3_16xn, int ss3, const uint8_t * s4_16xn, int ss4, const int16_t * s5_6, int n))(_oil_function_class_combine4_16xn_u8.func))(d_16xn, ds1, s1_16xn, ss1, s2_16xn, ss2, s3_16xn, ss3, s4_16xn, ss4, s5_6, n); } #undef oil_combine4_32xn_u8 void oil_combine4_32xn_u8 (uint8_t * d_32xn, int ds1, const uint8_t * s1_16xn, int ss1, const uint8_t * s2_32xn, int ss2, const uint8_t * s3_32xn, int ss3, const uint8_t * s4_32xn, int ss4, const int16_t * s5_6, int n) { if (_oil_function_class_combine4_32xn_u8.func == NULL) { oil_class_optimize (&_oil_function_class_combine4_32xn_u8); } ((void (*)(uint8_t * d_32xn, int ds1, const uint8_t * s1_16xn, int ss1, const uint8_t * s2_32xn, int ss2, const uint8_t * s3_32xn, int ss3, const uint8_t * s4_32xn, int ss4, const int16_t * s5_6, int n))(_oil_function_class_combine4_32xn_u8.func))(d_32xn, ds1, s1_16xn, ss1, s2_32xn, ss2, s3_32xn, ss3, s4_32xn, ss4, s5_6, n); } #undef oil_combine4_8xn_u8 void oil_combine4_8xn_u8 (uint8_t * d_8xn, int ds1, const uint8_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, const uint8_t * s3_8xn, int ss3, const uint8_t * s4_8xn, int ss4, const int16_t * s5_6, int n) { if (_oil_function_class_combine4_8xn_u8.func == NULL) { oil_class_optimize (&_oil_function_class_combine4_8xn_u8); } ((void (*)(uint8_t * d_8xn, int ds1, const uint8_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, const uint8_t * s3_8xn, int ss3, const uint8_t * s4_8xn, int ss4, const int16_t * s5_6, int n))(_oil_function_class_combine4_8xn_u8.func))(d_8xn, ds1, s1_8xn, ss1, s2_8xn, ss2, s3_8xn, ss3, s4_8xn, ss4, s5_6, n); } #undef oil_compare_u8 void oil_compare_u8 (uint32_t * d_1, const uint8_t * s1, const uint8_t * s2, int n) { if (_oil_function_class_compare_u8.func == NULL) { oil_class_optimize (&_oil_function_class_compare_u8); } ((void (*)(uint32_t * d_1, const uint8_t * s1, const uint8_t * s2, int n))(_oil_function_class_compare_u8.func))(d_1, s1, s2, n); } #undef oil_composite_add_argb void oil_composite_add_argb (uint32_t * i_n, const uint32_t * s1_n, int n) { if (_oil_function_class_composite_add_argb.func == NULL) { oil_class_optimize (&_oil_function_class_composite_add_argb); } ((void (*)(uint32_t * i_n, const uint32_t * s1_n, int n))(_oil_function_class_composite_add_argb.func))(i_n, s1_n, n); } #undef oil_composite_add_argb_const_src void oil_composite_add_argb_const_src (uint32_t * i_n, const uint32_t * s1_1, int n) { if (_oil_function_class_composite_add_argb_const_src.func == NULL) { oil_class_optimize (&_oil_function_class_composite_add_argb_const_src); } ((void (*)(uint32_t * i_n, const uint32_t * s1_1, int n))(_oil_function_class_composite_add_argb_const_src.func))(i_n, s1_1, n); } #undef oil_composite_add_u8 void oil_composite_add_u8 (uint8_t * i_n, const uint8_t * s1_n, int n) { if (_oil_function_class_composite_add_u8.func == NULL) { oil_class_optimize (&_oil_function_class_composite_add_u8); } ((void (*)(uint8_t * i_n, const uint8_t * s1_n, int n))(_oil_function_class_composite_add_u8.func))(i_n, s1_n, n); } #undef oil_composite_add_u8_const_src void oil_composite_add_u8_const_src (uint8_t * i_n, const uint8_t * s1_1, int n) { if (_oil_function_class_composite_add_u8_const_src.func == NULL) { oil_class_optimize (&_oil_function_class_composite_add_u8_const_src); } ((void (*)(uint8_t * i_n, const uint8_t * s1_1, int n))(_oil_function_class_composite_add_u8_const_src.func))(i_n, s1_1, n); } #undef oil_composite_in_argb void oil_composite_in_argb (uint32_t * d_n, const uint32_t * s1_n, const uint8_t * s2_n, int n) { if (_oil_function_class_composite_in_argb.func == NULL) { oil_class_optimize (&_oil_function_class_composite_in_argb); } ((void (*)(uint32_t * d_n, const uint32_t * s1_n, const uint8_t * s2_n, int n))(_oil_function_class_composite_in_argb.func))(d_n, s1_n, s2_n, n); } #undef oil_composite_in_argb_const_mask void oil_composite_in_argb_const_mask (uint32_t * d_n, const uint32_t * s1_n, const uint8_t * s2_1, int n) { if (_oil_function_class_composite_in_argb_const_mask.func == NULL) { oil_class_optimize (&_oil_function_class_composite_in_argb_const_mask); } ((void (*)(uint32_t * d_n, const uint32_t * s1_n, const uint8_t * s2_1, int n))(_oil_function_class_composite_in_argb_const_mask.func))(d_n, s1_n, s2_1, n); } #undef oil_composite_in_argb_const_src void oil_composite_in_argb_const_src (uint32_t * d_n, const uint32_t * s1_1, const uint8_t * s2_n, int n) { if (_oil_function_class_composite_in_argb_const_src.func == NULL) { oil_class_optimize (&_oil_function_class_composite_in_argb_const_src); } ((void (*)(uint32_t * d_n, const uint32_t * s1_1, const uint8_t * s2_n, int n))(_oil_function_class_composite_in_argb_const_src.func))(d_n, s1_1, s2_n, n); } #undef oil_composite_in_over_argb void oil_composite_in_over_argb (uint32_t * i_n, const uint32_t * s1_n, const uint8_t * s2_n, int n) { if (_oil_function_class_composite_in_over_argb.func == NULL) { oil_class_optimize (&_oil_function_class_composite_in_over_argb); } ((void (*)(uint32_t * i_n, const uint32_t * s1_n, const uint8_t * s2_n, int n))(_oil_function_class_composite_in_over_argb.func))(i_n, s1_n, s2_n, n); } #undef oil_composite_in_over_argb_const_mask void oil_composite_in_over_argb_const_mask (uint32_t * i_n, const uint32_t * s1_n, const uint8_t * s2_1, int n) { if (_oil_function_class_composite_in_over_argb_const_mask.func == NULL) { oil_class_optimize (&_oil_function_class_composite_in_over_argb_const_mask); } ((void (*)(uint32_t * i_n, const uint32_t * s1_n, const uint8_t * s2_1, int n))(_oil_function_class_composite_in_over_argb_const_mask.func))(i_n, s1_n, s2_1, n); } #undef oil_composite_in_over_argb_const_src void oil_composite_in_over_argb_const_src (uint32_t * i_n, const uint32_t * s1_1, const uint8_t * s2_n, int n) { if (_oil_function_class_composite_in_over_argb_const_src.func == NULL) { oil_class_optimize (&_oil_function_class_composite_in_over_argb_const_src); } ((void (*)(uint32_t * i_n, const uint32_t * s1_1, const uint8_t * s2_n, int n))(_oil_function_class_composite_in_over_argb_const_src.func))(i_n, s1_1, s2_n, n); } #undef oil_composite_over_argb void oil_composite_over_argb (uint32_t * i_n, const uint32_t * s1_n, int n) { if (_oil_function_class_composite_over_argb.func == NULL) { oil_class_optimize (&_oil_function_class_composite_over_argb); } ((void (*)(uint32_t * i_n, const uint32_t * s1_n, int n))(_oil_function_class_composite_over_argb.func))(i_n, s1_n, n); } #undef oil_composite_over_argb_const_src void oil_composite_over_argb_const_src (uint32_t * i_n, const uint32_t * s1_1, int n) { if (_oil_function_class_composite_over_argb_const_src.func == NULL) { oil_class_optimize (&_oil_function_class_composite_over_argb_const_src); } ((void (*)(uint32_t * i_n, const uint32_t * s1_1, int n))(_oil_function_class_composite_over_argb_const_src.func))(i_n, s1_1, n); } #undef oil_composite_over_u8 void oil_composite_over_u8 (uint8_t * i_n, const uint8_t * s1_n, int n) { if (_oil_function_class_composite_over_u8.func == NULL) { oil_class_optimize (&_oil_function_class_composite_over_u8); } ((void (*)(uint8_t * i_n, const uint8_t * s1_n, int n))(_oil_function_class_composite_over_u8.func))(i_n, s1_n, n); } #undef oil_conv8x8_f64_s16 void oil_conv8x8_f64_s16 (double * d_8x8, int dstr, const int16_t * s_8x8, int sstr) { if (_oil_function_class_conv8x8_f64_s16.func == NULL) { oil_class_optimize (&_oil_function_class_conv8x8_f64_s16); } ((void (*)(double * d_8x8, int dstr, const int16_t * s_8x8, int sstr))(_oil_function_class_conv8x8_f64_s16.func))(d_8x8, dstr, s_8x8, sstr); } #undef oil_conv8x8_s16_f64 void oil_conv8x8_s16_f64 (int16_t * d_8x8, int dstr, const double * s_8x8, int sstr) { if (_oil_function_class_conv8x8_s16_f64.func == NULL) { oil_class_optimize (&_oil_function_class_conv8x8_s16_f64); } ((void (*)(int16_t * d_8x8, int dstr, const double * s_8x8, int sstr))(_oil_function_class_conv8x8_s16_f64.func))(d_8x8, dstr, s_8x8, sstr); } #undef oil_conv_f32_f64 void oil_conv_f32_f64 (float * dest, int dstr, const double * src, int sstr, int n) { if (_oil_function_class_conv_f32_f64.func == NULL) { oil_class_optimize (&_oil_function_class_conv_f32_f64); } ((void (*)(float * dest, int dstr, const double * src, int sstr, int n))(_oil_function_class_conv_f32_f64.func))(dest, dstr, src, sstr, n); } #undef oil_conv_f32_s16 void oil_conv_f32_s16 (float * dest, int dstr, const int16_t * src, int sstr, int n) { if (_oil_function_class_conv_f32_s16.func == NULL) { oil_class_optimize (&_oil_function_class_conv_f32_s16); } ((void (*)(float * dest, int dstr, const int16_t * src, int sstr, int n))(_oil_function_class_conv_f32_s16.func))(dest, dstr, src, sstr, n); } #undef oil_conv_f32_s32 void oil_conv_f32_s32 (float * dest, int dstr, const int32_t * src, int sstr, int n) { if (_oil_function_class_conv_f32_s32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_f32_s32); } ((void (*)(float * dest, int dstr, const int32_t * src, int sstr, int n))(_oil_function_class_conv_f32_s32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_f32_s8 void oil_conv_f32_s8 (float * dest, int dstr, const int8_t * src, int sstr, int n) { if (_oil_function_class_conv_f32_s8.func == NULL) { oil_class_optimize (&_oil_function_class_conv_f32_s8); } ((void (*)(float * dest, int dstr, const int8_t * src, int sstr, int n))(_oil_function_class_conv_f32_s8.func))(dest, dstr, src, sstr, n); } #undef oil_conv_f32_u16 void oil_conv_f32_u16 (float * dest, int dstr, const uint16_t * src, int sstr, int n) { if (_oil_function_class_conv_f32_u16.func == NULL) { oil_class_optimize (&_oil_function_class_conv_f32_u16); } ((void (*)(float * dest, int dstr, const uint16_t * src, int sstr, int n))(_oil_function_class_conv_f32_u16.func))(dest, dstr, src, sstr, n); } #undef oil_conv_f32_u32 void oil_conv_f32_u32 (float * dest, int dstr, const uint32_t * src, int sstr, int n) { if (_oil_function_class_conv_f32_u32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_f32_u32); } ((void (*)(float * dest, int dstr, const uint32_t * src, int sstr, int n))(_oil_function_class_conv_f32_u32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_f32_u8 void oil_conv_f32_u8 (float * dest, int dstr, const uint8_t * src, int sstr, int n) { if (_oil_function_class_conv_f32_u8.func == NULL) { oil_class_optimize (&_oil_function_class_conv_f32_u8); } ((void (*)(float * dest, int dstr, const uint8_t * src, int sstr, int n))(_oil_function_class_conv_f32_u8.func))(dest, dstr, src, sstr, n); } #undef oil_conv_f64_f32 void oil_conv_f64_f32 (double * dest, int dstr, const float * src, int sstr, int n) { if (_oil_function_class_conv_f64_f32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_f64_f32); } ((void (*)(double * dest, int dstr, const float * src, int sstr, int n))(_oil_function_class_conv_f64_f32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_f64_s16 void oil_conv_f64_s16 (double * dest, int dstr, const int16_t * src, int sstr, int n) { if (_oil_function_class_conv_f64_s16.func == NULL) { oil_class_optimize (&_oil_function_class_conv_f64_s16); } ((void (*)(double * dest, int dstr, const int16_t * src, int sstr, int n))(_oil_function_class_conv_f64_s16.func))(dest, dstr, src, sstr, n); } #undef oil_conv_f64_s32 void oil_conv_f64_s32 (double * dest, int dstr, const int32_t * src, int sstr, int n) { if (_oil_function_class_conv_f64_s32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_f64_s32); } ((void (*)(double * dest, int dstr, const int32_t * src, int sstr, int n))(_oil_function_class_conv_f64_s32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_f64_s8 void oil_conv_f64_s8 (double * dest, int dstr, const int8_t * src, int sstr, int n) { if (_oil_function_class_conv_f64_s8.func == NULL) { oil_class_optimize (&_oil_function_class_conv_f64_s8); } ((void (*)(double * dest, int dstr, const int8_t * src, int sstr, int n))(_oil_function_class_conv_f64_s8.func))(dest, dstr, src, sstr, n); } #undef oil_conv_f64_u16 void oil_conv_f64_u16 (double * dest, int dstr, const uint16_t * src, int sstr, int n) { if (_oil_function_class_conv_f64_u16.func == NULL) { oil_class_optimize (&_oil_function_class_conv_f64_u16); } ((void (*)(double * dest, int dstr, const uint16_t * src, int sstr, int n))(_oil_function_class_conv_f64_u16.func))(dest, dstr, src, sstr, n); } #undef oil_conv_f64_u32 void oil_conv_f64_u32 (double * dest, int dstr, const uint32_t * src, int sstr, int n) { if (_oil_function_class_conv_f64_u32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_f64_u32); } ((void (*)(double * dest, int dstr, const uint32_t * src, int sstr, int n))(_oil_function_class_conv_f64_u32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_f64_u8 void oil_conv_f64_u8 (double * dest, int dstr, const uint8_t * src, int sstr, int n) { if (_oil_function_class_conv_f64_u8.func == NULL) { oil_class_optimize (&_oil_function_class_conv_f64_u8); } ((void (*)(double * dest, int dstr, const uint8_t * src, int sstr, int n))(_oil_function_class_conv_f64_u8.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s16_f32 void oil_conv_s16_f32 (int16_t * dest, int dstr, const float * src, int sstr, int n) { if (_oil_function_class_conv_s16_f32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s16_f32); } ((void (*)(int16_t * dest, int dstr, const float * src, int sstr, int n))(_oil_function_class_conv_s16_f32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s16_f64 void oil_conv_s16_f64 (int16_t * dest, int dstr, const double * src, int sstr, int n) { if (_oil_function_class_conv_s16_f64.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s16_f64); } ((void (*)(int16_t * dest, int dstr, const double * src, int sstr, int n))(_oil_function_class_conv_s16_f64.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s16_s32 void oil_conv_s16_s32 (int16_t * dest, int dstr, const int32_t * src, int sstr, int n) { if (_oil_function_class_conv_s16_s32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s16_s32); } ((void (*)(int16_t * dest, int dstr, const int32_t * src, int sstr, int n))(_oil_function_class_conv_s16_s32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s16_s8 void oil_conv_s16_s8 (int16_t * dest, int dstr, const int8_t * src, int sstr, int n) { if (_oil_function_class_conv_s16_s8.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s16_s8); } ((void (*)(int16_t * dest, int dstr, const int8_t * src, int sstr, int n))(_oil_function_class_conv_s16_s8.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s16_u16 void oil_conv_s16_u16 (int16_t * dest, int dstr, const uint16_t * src, int sstr, int n) { if (_oil_function_class_conv_s16_u16.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s16_u16); } ((void (*)(int16_t * dest, int dstr, const uint16_t * src, int sstr, int n))(_oil_function_class_conv_s16_u16.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s16_u32 void oil_conv_s16_u32 (int16_t * dest, int dstr, const uint32_t * src, int sstr, int n) { if (_oil_function_class_conv_s16_u32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s16_u32); } ((void (*)(int16_t * dest, int dstr, const uint32_t * src, int sstr, int n))(_oil_function_class_conv_s16_u32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s16_u8 void oil_conv_s16_u8 (int16_t * dest, int dstr, const uint8_t * src, int sstr, int n) { if (_oil_function_class_conv_s16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s16_u8); } ((void (*)(int16_t * dest, int dstr, const uint8_t * src, int sstr, int n))(_oil_function_class_conv_s16_u8.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s32_f32 void oil_conv_s32_f32 (int32_t * dest, int dstr, const float * src, int sstr, int n) { if (_oil_function_class_conv_s32_f32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s32_f32); } ((void (*)(int32_t * dest, int dstr, const float * src, int sstr, int n))(_oil_function_class_conv_s32_f32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s32_f64 void oil_conv_s32_f64 (int32_t * dest, int dstr, const double * src, int sstr, int n) { if (_oil_function_class_conv_s32_f64.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s32_f64); } ((void (*)(int32_t * dest, int dstr, const double * src, int sstr, int n))(_oil_function_class_conv_s32_f64.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s32_s16 void oil_conv_s32_s16 (int32_t * dest, int dstr, const int16_t * src, int sstr, int n) { if (_oil_function_class_conv_s32_s16.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s32_s16); } ((void (*)(int32_t * dest, int dstr, const int16_t * src, int sstr, int n))(_oil_function_class_conv_s32_s16.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s32_s8 void oil_conv_s32_s8 (int32_t * dest, int dstr, const int8_t * src, int sstr, int n) { if (_oil_function_class_conv_s32_s8.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s32_s8); } ((void (*)(int32_t * dest, int dstr, const int8_t * src, int sstr, int n))(_oil_function_class_conv_s32_s8.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s32_u16 void oil_conv_s32_u16 (int32_t * dest, int dstr, const uint16_t * src, int sstr, int n) { if (_oil_function_class_conv_s32_u16.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s32_u16); } ((void (*)(int32_t * dest, int dstr, const uint16_t * src, int sstr, int n))(_oil_function_class_conv_s32_u16.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s32_u32 void oil_conv_s32_u32 (int32_t * dest, int dstr, const uint32_t * src, int sstr, int n) { if (_oil_function_class_conv_s32_u32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s32_u32); } ((void (*)(int32_t * dest, int dstr, const uint32_t * src, int sstr, int n))(_oil_function_class_conv_s32_u32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s32_u8 void oil_conv_s32_u8 (int32_t * dest, int dstr, const uint8_t * src, int sstr, int n) { if (_oil_function_class_conv_s32_u8.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s32_u8); } ((void (*)(int32_t * dest, int dstr, const uint8_t * src, int sstr, int n))(_oil_function_class_conv_s32_u8.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s8_f32 void oil_conv_s8_f32 (int8_t * dest, int dstr, const float * src, int sstr, int n) { if (_oil_function_class_conv_s8_f32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s8_f32); } ((void (*)(int8_t * dest, int dstr, const float * src, int sstr, int n))(_oil_function_class_conv_s8_f32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s8_f64 void oil_conv_s8_f64 (int8_t * dest, int dstr, const double * src, int sstr, int n) { if (_oil_function_class_conv_s8_f64.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s8_f64); } ((void (*)(int8_t * dest, int dstr, const double * src, int sstr, int n))(_oil_function_class_conv_s8_f64.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s8_s16 void oil_conv_s8_s16 (int8_t * dest, int dstr, const int16_t * src, int sstr, int n) { if (_oil_function_class_conv_s8_s16.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s8_s16); } ((void (*)(int8_t * dest, int dstr, const int16_t * src, int sstr, int n))(_oil_function_class_conv_s8_s16.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s8_s32 void oil_conv_s8_s32 (int8_t * dest, int dstr, const int32_t * src, int sstr, int n) { if (_oil_function_class_conv_s8_s32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s8_s32); } ((void (*)(int8_t * dest, int dstr, const int32_t * src, int sstr, int n))(_oil_function_class_conv_s8_s32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s8_u16 void oil_conv_s8_u16 (int8_t * dest, int dstr, const uint16_t * src, int sstr, int n) { if (_oil_function_class_conv_s8_u16.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s8_u16); } ((void (*)(int8_t * dest, int dstr, const uint16_t * src, int sstr, int n))(_oil_function_class_conv_s8_u16.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s8_u32 void oil_conv_s8_u32 (int8_t * dest, int dstr, const uint32_t * src, int sstr, int n) { if (_oil_function_class_conv_s8_u32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s8_u32); } ((void (*)(int8_t * dest, int dstr, const uint32_t * src, int sstr, int n))(_oil_function_class_conv_s8_u32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_s8_u8 void oil_conv_s8_u8 (int8_t * dest, int dstr, const uint8_t * src, int sstr, int n) { if (_oil_function_class_conv_s8_u8.func == NULL) { oil_class_optimize (&_oil_function_class_conv_s8_u8); } ((void (*)(int8_t * dest, int dstr, const uint8_t * src, int sstr, int n))(_oil_function_class_conv_s8_u8.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u16_f32 void oil_conv_u16_f32 (uint16_t * dest, int dstr, const float * src, int sstr, int n) { if (_oil_function_class_conv_u16_f32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u16_f32); } ((void (*)(uint16_t * dest, int dstr, const float * src, int sstr, int n))(_oil_function_class_conv_u16_f32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u16_f64 void oil_conv_u16_f64 (uint16_t * dest, int dstr, const double * src, int sstr, int n) { if (_oil_function_class_conv_u16_f64.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u16_f64); } ((void (*)(uint16_t * dest, int dstr, const double * src, int sstr, int n))(_oil_function_class_conv_u16_f64.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u16_s16 void oil_conv_u16_s16 (uint16_t * dest, int dstr, const int16_t * src, int sstr, int n) { if (_oil_function_class_conv_u16_s16.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u16_s16); } ((void (*)(uint16_t * dest, int dstr, const int16_t * src, int sstr, int n))(_oil_function_class_conv_u16_s16.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u16_s32 void oil_conv_u16_s32 (uint16_t * dest, int dstr, const int32_t * src, int sstr, int n) { if (_oil_function_class_conv_u16_s32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u16_s32); } ((void (*)(uint16_t * dest, int dstr, const int32_t * src, int sstr, int n))(_oil_function_class_conv_u16_s32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u16_s8 void oil_conv_u16_s8 (uint16_t * dest, int dstr, const int8_t * src, int sstr, int n) { if (_oil_function_class_conv_u16_s8.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u16_s8); } ((void (*)(uint16_t * dest, int dstr, const int8_t * src, int sstr, int n))(_oil_function_class_conv_u16_s8.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u16_u32 void oil_conv_u16_u32 (uint16_t * dest, int dstr, const uint32_t * src, int sstr, int n) { if (_oil_function_class_conv_u16_u32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u16_u32); } ((void (*)(uint16_t * dest, int dstr, const uint32_t * src, int sstr, int n))(_oil_function_class_conv_u16_u32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u16_u8 void oil_conv_u16_u8 (uint16_t * dest, int dstr, const uint8_t * src, int sstr, int n) { if (_oil_function_class_conv_u16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u16_u8); } ((void (*)(uint16_t * dest, int dstr, const uint8_t * src, int sstr, int n))(_oil_function_class_conv_u16_u8.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u32_f32 void oil_conv_u32_f32 (uint32_t * dest, int dstr, const float * src, int sstr, int n) { if (_oil_function_class_conv_u32_f32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u32_f32); } ((void (*)(uint32_t * dest, int dstr, const float * src, int sstr, int n))(_oil_function_class_conv_u32_f32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u32_f64 void oil_conv_u32_f64 (uint32_t * dest, int dstr, const double * src, int sstr, int n) { if (_oil_function_class_conv_u32_f64.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u32_f64); } ((void (*)(uint32_t * dest, int dstr, const double * src, int sstr, int n))(_oil_function_class_conv_u32_f64.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u32_s16 void oil_conv_u32_s16 (uint32_t * dest, int dstr, const int16_t * src, int sstr, int n) { if (_oil_function_class_conv_u32_s16.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u32_s16); } ((void (*)(uint32_t * dest, int dstr, const int16_t * src, int sstr, int n))(_oil_function_class_conv_u32_s16.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u32_s32 void oil_conv_u32_s32 (uint32_t * dest, int dstr, const int32_t * src, int sstr, int n) { if (_oil_function_class_conv_u32_s32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u32_s32); } ((void (*)(uint32_t * dest, int dstr, const int32_t * src, int sstr, int n))(_oil_function_class_conv_u32_s32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u32_s8 void oil_conv_u32_s8 (uint32_t * dest, int dstr, const int8_t * src, int sstr, int n) { if (_oil_function_class_conv_u32_s8.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u32_s8); } ((void (*)(uint32_t * dest, int dstr, const int8_t * src, int sstr, int n))(_oil_function_class_conv_u32_s8.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u32_u16 void oil_conv_u32_u16 (uint32_t * dest, int dstr, const uint16_t * src, int sstr, int n) { if (_oil_function_class_conv_u32_u16.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u32_u16); } ((void (*)(uint32_t * dest, int dstr, const uint16_t * src, int sstr, int n))(_oil_function_class_conv_u32_u16.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u32_u8 void oil_conv_u32_u8 (uint32_t * dest, int dstr, const uint8_t * src, int sstr, int n) { if (_oil_function_class_conv_u32_u8.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u32_u8); } ((void (*)(uint32_t * dest, int dstr, const uint8_t * src, int sstr, int n))(_oil_function_class_conv_u32_u8.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u8_f32 void oil_conv_u8_f32 (uint8_t * dest, int dstr, const float * src, int sstr, int n) { if (_oil_function_class_conv_u8_f32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u8_f32); } ((void (*)(uint8_t * dest, int dstr, const float * src, int sstr, int n))(_oil_function_class_conv_u8_f32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u8_f64 void oil_conv_u8_f64 (uint8_t * dest, int dstr, const double * src, int sstr, int n) { if (_oil_function_class_conv_u8_f64.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u8_f64); } ((void (*)(uint8_t * dest, int dstr, const double * src, int sstr, int n))(_oil_function_class_conv_u8_f64.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u8_s16 void oil_conv_u8_s16 (uint8_t * dest, int dstr, const int16_t * src, int sstr, int n) { if (_oil_function_class_conv_u8_s16.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u8_s16); } ((void (*)(uint8_t * dest, int dstr, const int16_t * src, int sstr, int n))(_oil_function_class_conv_u8_s16.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u8_s32 void oil_conv_u8_s32 (uint8_t * dest, int dstr, const int32_t * src, int sstr, int n) { if (_oil_function_class_conv_u8_s32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u8_s32); } ((void (*)(uint8_t * dest, int dstr, const int32_t * src, int sstr, int n))(_oil_function_class_conv_u8_s32.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u8_s8 void oil_conv_u8_s8 (uint8_t * dest, int dstr, const int8_t * src, int sstr, int n) { if (_oil_function_class_conv_u8_s8.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u8_s8); } ((void (*)(uint8_t * dest, int dstr, const int8_t * src, int sstr, int n))(_oil_function_class_conv_u8_s8.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u8_u16 void oil_conv_u8_u16 (uint8_t * dest, int dstr, const uint16_t * src, int sstr, int n) { if (_oil_function_class_conv_u8_u16.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u8_u16); } ((void (*)(uint8_t * dest, int dstr, const uint16_t * src, int sstr, int n))(_oil_function_class_conv_u8_u16.func))(dest, dstr, src, sstr, n); } #undef oil_conv_u8_u32 void oil_conv_u8_u32 (uint8_t * dest, int dstr, const uint32_t * src, int sstr, int n) { if (_oil_function_class_conv_u8_u32.func == NULL) { oil_class_optimize (&_oil_function_class_conv_u8_u32); } ((void (*)(uint8_t * dest, int dstr, const uint32_t * src, int sstr, int n))(_oil_function_class_conv_u8_u32.func))(dest, dstr, src, sstr, n); } #undef oil_convert_s16_f32 void oil_convert_s16_f32 (int16_t * dest, const float * src, int n) { if (_oil_function_class_convert_s16_f32.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s16_f32); } ((void (*)(int16_t * dest, const float * src, int n))(_oil_function_class_convert_s16_f32.func))(dest, src, n); } #undef oil_convert_s16_f64 void oil_convert_s16_f64 (int16_t * dest, const double * src, int n) { if (_oil_function_class_convert_s16_f64.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s16_f64); } ((void (*)(int16_t * dest, const double * src, int n))(_oil_function_class_convert_s16_f64.func))(dest, src, n); } #undef oil_convert_s16_s32 void oil_convert_s16_s32 (int16_t * dest, const int32_t * src, int n) { if (_oil_function_class_convert_s16_s32.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s16_s32); } ((void (*)(int16_t * dest, const int32_t * src, int n))(_oil_function_class_convert_s16_s32.func))(dest, src, n); } #undef oil_convert_s16_s8 void oil_convert_s16_s8 (int16_t * dest, const int8_t * src, int n) { if (_oil_function_class_convert_s16_s8.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s16_s8); } ((void (*)(int16_t * dest, const int8_t * src, int n))(_oil_function_class_convert_s16_s8.func))(dest, src, n); } #undef oil_convert_s16_u16 void oil_convert_s16_u16 (int16_t * dest, const uint16_t * src, int n) { if (_oil_function_class_convert_s16_u16.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s16_u16); } ((void (*)(int16_t * dest, const uint16_t * src, int n))(_oil_function_class_convert_s16_u16.func))(dest, src, n); } #undef oil_convert_s16_u32 void oil_convert_s16_u32 (int16_t * dest, const uint32_t * src, int n) { if (_oil_function_class_convert_s16_u32.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s16_u32); } ((void (*)(int16_t * dest, const uint32_t * src, int n))(_oil_function_class_convert_s16_u32.func))(dest, src, n); } #undef oil_convert_s16_u8 void oil_convert_s16_u8 (int16_t * dest, const uint8_t * src, int n) { if (_oil_function_class_convert_s16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s16_u8); } ((void (*)(int16_t * dest, const uint8_t * src, int n))(_oil_function_class_convert_s16_u8.func))(dest, src, n); } #undef oil_convert_s32_f64 void oil_convert_s32_f64 (int32_t * dest, const double * src, int n) { if (_oil_function_class_convert_s32_f64.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s32_f64); } ((void (*)(int32_t * dest, const double * src, int n))(_oil_function_class_convert_s32_f64.func))(dest, src, n); } #undef oil_convert_s32_s16 void oil_convert_s32_s16 (int32_t * dest, const int16_t * src, int n) { if (_oil_function_class_convert_s32_s16.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s32_s16); } ((void (*)(int32_t * dest, const int16_t * src, int n))(_oil_function_class_convert_s32_s16.func))(dest, src, n); } #undef oil_convert_s32_s8 void oil_convert_s32_s8 (int32_t * dest, const int8_t * src, int n) { if (_oil_function_class_convert_s32_s8.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s32_s8); } ((void (*)(int32_t * dest, const int8_t * src, int n))(_oil_function_class_convert_s32_s8.func))(dest, src, n); } #undef oil_convert_s32_u16 void oil_convert_s32_u16 (int32_t * dest, const uint16_t * src, int n) { if (_oil_function_class_convert_s32_u16.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s32_u16); } ((void (*)(int32_t * dest, const uint16_t * src, int n))(_oil_function_class_convert_s32_u16.func))(dest, src, n); } #undef oil_convert_s32_u32 void oil_convert_s32_u32 (int32_t * dest, const uint32_t * src, int n) { if (_oil_function_class_convert_s32_u32.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s32_u32); } ((void (*)(int32_t * dest, const uint32_t * src, int n))(_oil_function_class_convert_s32_u32.func))(dest, src, n); } #undef oil_convert_s32_u8 void oil_convert_s32_u8 (int32_t * dest, const uint8_t * src, int n) { if (_oil_function_class_convert_s32_u8.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s32_u8); } ((void (*)(int32_t * dest, const uint8_t * src, int n))(_oil_function_class_convert_s32_u8.func))(dest, src, n); } #undef oil_convert_s8_f32 void oil_convert_s8_f32 (int8_t * dest, const float * src, int n) { if (_oil_function_class_convert_s8_f32.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s8_f32); } ((void (*)(int8_t * dest, const float * src, int n))(_oil_function_class_convert_s8_f32.func))(dest, src, n); } #undef oil_convert_s8_f64 void oil_convert_s8_f64 (int8_t * dest, const double * src, int n) { if (_oil_function_class_convert_s8_f64.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s8_f64); } ((void (*)(int8_t * dest, const double * src, int n))(_oil_function_class_convert_s8_f64.func))(dest, src, n); } #undef oil_convert_s8_s16 void oil_convert_s8_s16 (int8_t * dest, const int16_t * src, int n) { if (_oil_function_class_convert_s8_s16.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s8_s16); } ((void (*)(int8_t * dest, const int16_t * src, int n))(_oil_function_class_convert_s8_s16.func))(dest, src, n); } #undef oil_convert_s8_s32 void oil_convert_s8_s32 (int8_t * dest, const int32_t * src, int n) { if (_oil_function_class_convert_s8_s32.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s8_s32); } ((void (*)(int8_t * dest, const int32_t * src, int n))(_oil_function_class_convert_s8_s32.func))(dest, src, n); } #undef oil_convert_s8_u16 void oil_convert_s8_u16 (int8_t * dest, const uint16_t * src, int n) { if (_oil_function_class_convert_s8_u16.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s8_u16); } ((void (*)(int8_t * dest, const uint16_t * src, int n))(_oil_function_class_convert_s8_u16.func))(dest, src, n); } #undef oil_convert_s8_u32 void oil_convert_s8_u32 (int8_t * dest, const uint32_t * src, int n) { if (_oil_function_class_convert_s8_u32.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s8_u32); } ((void (*)(int8_t * dest, const uint32_t * src, int n))(_oil_function_class_convert_s8_u32.func))(dest, src, n); } #undef oil_convert_s8_u8 void oil_convert_s8_u8 (int8_t * dest, const uint8_t * src, int n) { if (_oil_function_class_convert_s8_u8.func == NULL) { oil_class_optimize (&_oil_function_class_convert_s8_u8); } ((void (*)(int8_t * dest, const uint8_t * src, int n))(_oil_function_class_convert_s8_u8.func))(dest, src, n); } #undef oil_convert_u16_f32 void oil_convert_u16_f32 (uint16_t * dest, const float * src, int n) { if (_oil_function_class_convert_u16_f32.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u16_f32); } ((void (*)(uint16_t * dest, const float * src, int n))(_oil_function_class_convert_u16_f32.func))(dest, src, n); } #undef oil_convert_u16_f64 void oil_convert_u16_f64 (uint16_t * dest, const double * src, int n) { if (_oil_function_class_convert_u16_f64.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u16_f64); } ((void (*)(uint16_t * dest, const double * src, int n))(_oil_function_class_convert_u16_f64.func))(dest, src, n); } #undef oil_convert_u16_s16 void oil_convert_u16_s16 (uint16_t * dest, const int16_t * src, int n) { if (_oil_function_class_convert_u16_s16.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u16_s16); } ((void (*)(uint16_t * dest, const int16_t * src, int n))(_oil_function_class_convert_u16_s16.func))(dest, src, n); } #undef oil_convert_u16_s32 void oil_convert_u16_s32 (uint16_t * dest, const int32_t * src, int n) { if (_oil_function_class_convert_u16_s32.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u16_s32); } ((void (*)(uint16_t * dest, const int32_t * src, int n))(_oil_function_class_convert_u16_s32.func))(dest, src, n); } #undef oil_convert_u16_u32 void oil_convert_u16_u32 (uint16_t * dest, const uint32_t * src, int n) { if (_oil_function_class_convert_u16_u32.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u16_u32); } ((void (*)(uint16_t * dest, const uint32_t * src, int n))(_oil_function_class_convert_u16_u32.func))(dest, src, n); } #undef oil_convert_u16_u8 void oil_convert_u16_u8 (uint16_t * dest, const uint8_t * src, int n) { if (_oil_function_class_convert_u16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u16_u8); } ((void (*)(uint16_t * dest, const uint8_t * src, int n))(_oil_function_class_convert_u16_u8.func))(dest, src, n); } #undef oil_convert_u32_f64 void oil_convert_u32_f64 (uint32_t * dest, const double * src, int n) { if (_oil_function_class_convert_u32_f64.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u32_f64); } ((void (*)(uint32_t * dest, const double * src, int n))(_oil_function_class_convert_u32_f64.func))(dest, src, n); } #undef oil_convert_u32_s32 void oil_convert_u32_s32 (uint32_t * dest, const int32_t * src, int n) { if (_oil_function_class_convert_u32_s32.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u32_s32); } ((void (*)(uint32_t * dest, const int32_t * src, int n))(_oil_function_class_convert_u32_s32.func))(dest, src, n); } #undef oil_convert_u32_u16 void oil_convert_u32_u16 (uint32_t * dest, const uint16_t * src, int n) { if (_oil_function_class_convert_u32_u16.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u32_u16); } ((void (*)(uint32_t * dest, const uint16_t * src, int n))(_oil_function_class_convert_u32_u16.func))(dest, src, n); } #undef oil_convert_u32_u8 void oil_convert_u32_u8 (uint32_t * dest, const uint8_t * src, int n) { if (_oil_function_class_convert_u32_u8.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u32_u8); } ((void (*)(uint32_t * dest, const uint8_t * src, int n))(_oil_function_class_convert_u32_u8.func))(dest, src, n); } #undef oil_convert_u8_f32 void oil_convert_u8_f32 (uint8_t * dest, const float * src, int n) { if (_oil_function_class_convert_u8_f32.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u8_f32); } ((void (*)(uint8_t * dest, const float * src, int n))(_oil_function_class_convert_u8_f32.func))(dest, src, n); } #undef oil_convert_u8_f64 void oil_convert_u8_f64 (uint8_t * dest, const double * src, int n) { if (_oil_function_class_convert_u8_f64.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u8_f64); } ((void (*)(uint8_t * dest, const double * src, int n))(_oil_function_class_convert_u8_f64.func))(dest, src, n); } #undef oil_convert_u8_s16 void oil_convert_u8_s16 (uint8_t * dest, const int16_t * src, int n) { if (_oil_function_class_convert_u8_s16.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u8_s16); } ((void (*)(uint8_t * dest, const int16_t * src, int n))(_oil_function_class_convert_u8_s16.func))(dest, src, n); } #undef oil_convert_u8_s32 void oil_convert_u8_s32 (uint8_t * dest, const int32_t * src, int n) { if (_oil_function_class_convert_u8_s32.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u8_s32); } ((void (*)(uint8_t * dest, const int32_t * src, int n))(_oil_function_class_convert_u8_s32.func))(dest, src, n); } #undef oil_convert_u8_s8 void oil_convert_u8_s8 (uint8_t * dest, const int8_t * src, int n) { if (_oil_function_class_convert_u8_s8.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u8_s8); } ((void (*)(uint8_t * dest, const int8_t * src, int n))(_oil_function_class_convert_u8_s8.func))(dest, src, n); } #undef oil_convert_u8_u16 void oil_convert_u8_u16 (uint8_t * dest, const uint16_t * src, int n) { if (_oil_function_class_convert_u8_u16.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u8_u16); } ((void (*)(uint8_t * dest, const uint16_t * src, int n))(_oil_function_class_convert_u8_u16.func))(dest, src, n); } #undef oil_convert_u8_u32 void oil_convert_u8_u32 (uint8_t * dest, const uint32_t * src, int n) { if (_oil_function_class_convert_u8_u32.func == NULL) { oil_class_optimize (&_oil_function_class_convert_u8_u32); } ((void (*)(uint8_t * dest, const uint32_t * src, int n))(_oil_function_class_convert_u8_u32.func))(dest, src, n); } #undef oil_copy8x8_u8 void oil_copy8x8_u8 (uint8_t * d_8x8, int ds, const uint8_t * s_8x8, int ss) { if (_oil_function_class_copy8x8_u8.func == NULL) { oil_class_optimize (&_oil_function_class_copy8x8_u8); } ((void (*)(uint8_t * d_8x8, int ds, const uint8_t * s_8x8, int ss))(_oil_function_class_copy8x8_u8.func))(d_8x8, ds, s_8x8, ss); } #undef oil_copy_u8 void oil_copy_u8 (uint8_t * dest, const uint8_t * src, int n) { if (_oil_function_class_copy_u8.func == NULL) { oil_class_optimize (&_oil_function_class_copy_u8); } ((void (*)(uint8_t * dest, const uint8_t * src, int n))(_oil_function_class_copy_u8.func))(dest, src, n); } #undef oil_dct36_f32 void oil_dct36_f32 (float * d_36, int dstr, const float * s_36, int sstr) { if (_oil_function_class_dct36_f32.func == NULL) { oil_class_optimize (&_oil_function_class_dct36_f32); } ((void (*)(float * d_36, int dstr, const float * s_36, int sstr))(_oil_function_class_dct36_f32.func))(d_36, dstr, s_36, sstr); } #undef oil_deinterleave void oil_deinterleave (int16_t * d_2xn, const int16_t * s_2xn, int n) { if (_oil_function_class_deinterleave.func == NULL) { oil_class_optimize (&_oil_function_class_deinterleave); } ((void (*)(int16_t * d_2xn, const int16_t * s_2xn, int n))(_oil_function_class_deinterleave.func))(d_2xn, s_2xn, n); } #undef oil_deinterleave2_s16 void oil_deinterleave2_s16 (int16_t * d1_n, int16_t * d2_n, const int16_t * s_2xn, int n) { if (_oil_function_class_deinterleave2_s16.func == NULL) { oil_class_optimize (&_oil_function_class_deinterleave2_s16); } ((void (*)(int16_t * d1_n, int16_t * d2_n, const int16_t * s_2xn, int n))(_oil_function_class_deinterleave2_s16.func))(d1_n, d2_n, s_2xn, n); } #undef oil_dequantize8x8_s16 void oil_dequantize8x8_s16 (int16_t * d_8x8, int dstr, const int16_t * s1_8x8, int sstr1, const int16_t * s2_8x8, int sstr2) { if (_oil_function_class_dequantize8x8_s16.func == NULL) { oil_class_optimize (&_oil_function_class_dequantize8x8_s16); } ((void (*)(int16_t * d_8x8, int dstr, const int16_t * s1_8x8, int sstr1, const int16_t * s2_8x8, int sstr2))(_oil_function_class_dequantize8x8_s16.func))(d_8x8, dstr, s1_8x8, sstr1, s2_8x8, sstr2); } #undef oil_diff8x8_average_s16_u8 void oil_diff8x8_average_s16_u8 (int16_t * d_8x8, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2, const uint8_t * s3_8x8, int ss3) { if (_oil_function_class_diff8x8_average_s16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_diff8x8_average_s16_u8); } ((void (*)(int16_t * d_8x8, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2, const uint8_t * s3_8x8, int ss3))(_oil_function_class_diff8x8_average_s16_u8.func))(d_8x8, s1_8x8, ss1, s2_8x8, ss2, s3_8x8, ss3); } #undef oil_diff8x8_const128_s16_u8 void oil_diff8x8_const128_s16_u8 (int16_t * d_8x8, const uint8_t * s1_8x8, int ss1) { if (_oil_function_class_diff8x8_const128_s16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_diff8x8_const128_s16_u8); } ((void (*)(int16_t * d_8x8, const uint8_t * s1_8x8, int ss1))(_oil_function_class_diff8x8_const128_s16_u8.func))(d_8x8, s1_8x8, ss1); } #undef oil_diff8x8_s16_u8 void oil_diff8x8_s16_u8 (int16_t * d_8x8, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2) { if (_oil_function_class_diff8x8_s16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_diff8x8_s16_u8); } ((void (*)(int16_t * d_8x8, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2))(_oil_function_class_diff8x8_s16_u8.func))(d_8x8, s1_8x8, ss1, s2_8x8, ss2); } #undef oil_diffsquaresum_f32 void oil_diffsquaresum_f32 (float * d_1, const float * src1, int sstr1, const float * src2, int sstr2, int n) { if (_oil_function_class_diffsquaresum_f32.func == NULL) { oil_class_optimize (&_oil_function_class_diffsquaresum_f32); } ((void (*)(float * d_1, const float * src1, int sstr1, const float * src2, int sstr2, int n))(_oil_function_class_diffsquaresum_f32.func))(d_1, src1, sstr1, src2, sstr2, n); } #undef oil_diffsquaresum_f64 void oil_diffsquaresum_f64 (double * d_1, const double * src1, int sstr1, const double * src2, int sstr2, int n) { if (_oil_function_class_diffsquaresum_f64.func == NULL) { oil_class_optimize (&_oil_function_class_diffsquaresum_f64); } ((void (*)(double * d_1, const double * src1, int sstr1, const double * src2, int sstr2, int n))(_oil_function_class_diffsquaresum_f64.func))(d_1, src1, sstr1, src2, sstr2, n); } #undef oil_divide_f32 void oil_divide_f32 (float * d, const float * s1, const float * s2, int n) { if (_oil_function_class_divide_f32.func == NULL) { oil_class_optimize (&_oil_function_class_divide_f32); } ((void (*)(float * d, const float * s1, const float * s2, int n))(_oil_function_class_divide_f32.func))(d, s1, s2, n); } #undef oil_divide_f64 void oil_divide_f64 (double * d, const double * s1, const double * s2, int n) { if (_oil_function_class_divide_f64.func == NULL) { oil_class_optimize (&_oil_function_class_divide_f64); } ((void (*)(double * d, const double * s1, const double * s2, int n))(_oil_function_class_divide_f64.func))(d, s1, s2, n); } #undef oil_err_inter8x8_u8 void oil_err_inter8x8_u8 (uint32_t * d_1, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2) { if (_oil_function_class_err_inter8x8_u8.func == NULL) { oil_class_optimize (&_oil_function_class_err_inter8x8_u8); } ((void (*)(uint32_t * d_1, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2))(_oil_function_class_err_inter8x8_u8.func))(d_1, s1_8x8, ss1, s2_8x8, ss2); } #undef oil_err_inter8x8_u8_avg void oil_err_inter8x8_u8_avg (uint32_t * d_1, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, const uint8_t * s3_8x8, int ss2) { if (_oil_function_class_err_inter8x8_u8_avg.func == NULL) { oil_class_optimize (&_oil_function_class_err_inter8x8_u8_avg); } ((void (*)(uint32_t * d_1, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, const uint8_t * s3_8x8, int ss2))(_oil_function_class_err_inter8x8_u8_avg.func))(d_1, s1_8x8, ss1, s2_8x8, s3_8x8, ss2); } #undef oil_err_intra8x8_u8 void oil_err_intra8x8_u8 (uint32_t * d_1, const uint8_t * s1_8x8, int ss1) { if (_oil_function_class_err_intra8x8_u8.func == NULL) { oil_class_optimize (&_oil_function_class_err_intra8x8_u8); } ((void (*)(uint32_t * d_1, const uint8_t * s1_8x8, int ss1))(_oil_function_class_err_intra8x8_u8.func))(d_1, s1_8x8, ss1); } #undef oil_fdct8_f64 void oil_fdct8_f64 (double * d_8, const double * s_8, int dstr, int sstr) { if (_oil_function_class_fdct8_f64.func == NULL) { oil_class_optimize (&_oil_function_class_fdct8_f64); } ((void (*)(double * d_8, const double * s_8, int dstr, int sstr))(_oil_function_class_fdct8_f64.func))(d_8, s_8, dstr, sstr); } #undef oil_fdct8x8_f64 void oil_fdct8x8_f64 (double * d_8x8, int dstr, const double * s_8x8, int sstr) { if (_oil_function_class_fdct8x8_f64.func == NULL) { oil_class_optimize (&_oil_function_class_fdct8x8_f64); } ((void (*)(double * d_8x8, int dstr, const double * s_8x8, int sstr))(_oil_function_class_fdct8x8_f64.func))(d_8x8, dstr, s_8x8, sstr); } #undef oil_fdct8x8s_s16 void oil_fdct8x8s_s16 (int16_t * d_8x8, int ds, const int16_t * s_8x8, int ss) { if (_oil_function_class_fdct8x8s_s16.func == NULL) { oil_class_optimize (&_oil_function_class_fdct8x8s_s16); } ((void (*)(int16_t * d_8x8, int ds, const int16_t * s_8x8, int ss))(_oil_function_class_fdct8x8s_s16.func))(d_8x8, ds, s_8x8, ss); } #undef oil_fdct8x8theora void oil_fdct8x8theora (const int16_t * s_8x8, int16_t * d_8x8) { if (_oil_function_class_fdct8x8theora.func == NULL) { oil_class_optimize (&_oil_function_class_fdct8x8theora); } ((void (*)(const int16_t * s_8x8, int16_t * d_8x8))(_oil_function_class_fdct8x8theora.func))(s_8x8, d_8x8); } #undef oil_floor_f32 void oil_floor_f32 (float * d, const float * s, int n) { if (_oil_function_class_floor_f32.func == NULL) { oil_class_optimize (&_oil_function_class_floor_f32); } ((void (*)(float * d, const float * s, int n))(_oil_function_class_floor_f32.func))(d, s, n); } #undef oil_idct8_f64 void oil_idct8_f64 (double * d_8, int dstr, const double * s_8, int sstr) { if (_oil_function_class_idct8_f64.func == NULL) { oil_class_optimize (&_oil_function_class_idct8_f64); } ((void (*)(double * d_8, int dstr, const double * s_8, int sstr))(_oil_function_class_idct8_f64.func))(d_8, dstr, s_8, sstr); } #undef oil_idct8theora_s16 void oil_idct8theora_s16 (int16_t * d_8, int dstr, const int16_t * s_8, int sstr) { if (_oil_function_class_idct8theora_s16.func == NULL) { oil_class_optimize (&_oil_function_class_idct8theora_s16); } ((void (*)(int16_t * d_8, int dstr, const int16_t * s_8, int sstr))(_oil_function_class_idct8theora_s16.func))(d_8, dstr, s_8, sstr); } #undef oil_idct8x8_f64 void oil_idct8x8_f64 (double * d_8x8, int dstr, const double * s_8x8, int sstr) { if (_oil_function_class_idct8x8_f64.func == NULL) { oil_class_optimize (&_oil_function_class_idct8x8_f64); } ((void (*)(double * d_8x8, int dstr, const double * s_8x8, int sstr))(_oil_function_class_idct8x8_f64.func))(d_8x8, dstr, s_8x8, sstr); } #undef oil_idct8x8_s16 void oil_idct8x8_s16 (int16_t * d_8x8, int dstr, const int16_t * s_8x8, int sstr) { if (_oil_function_class_idct8x8_s16.func == NULL) { oil_class_optimize (&_oil_function_class_idct8x8_s16); } ((void (*)(int16_t * d_8x8, int dstr, const int16_t * s_8x8, int sstr))(_oil_function_class_idct8x8_s16.func))(d_8x8, dstr, s_8x8, sstr); } #undef oil_idct8x8lim10_f64 void oil_idct8x8lim10_f64 (double * d_8x8, int dstr, const double * s_8x8, int sstr) { if (_oil_function_class_idct8x8lim10_f64.func == NULL) { oil_class_optimize (&_oil_function_class_idct8x8lim10_f64); } ((void (*)(double * d_8x8, int dstr, const double * s_8x8, int sstr))(_oil_function_class_idct8x8lim10_f64.func))(d_8x8, dstr, s_8x8, sstr); } #undef oil_idct8x8lim10_s16 void oil_idct8x8lim10_s16 (int16_t * d_8x8, int dstr, const int16_t * s_8x8, int sstr) { if (_oil_function_class_idct8x8lim10_s16.func == NULL) { oil_class_optimize (&_oil_function_class_idct8x8lim10_s16); } ((void (*)(int16_t * d_8x8, int dstr, const int16_t * s_8x8, int sstr))(_oil_function_class_idct8x8lim10_s16.func))(d_8x8, dstr, s_8x8, sstr); } #undef oil_idct8x8theora_s16 void oil_idct8x8theora_s16 (int16_t * d_8x8, int dstr, const int16_t * s_8x8, int sstr) { if (_oil_function_class_idct8x8theora_s16.func == NULL) { oil_class_optimize (&_oil_function_class_idct8x8theora_s16); } ((void (*)(int16_t * d_8x8, int dstr, const int16_t * s_8x8, int sstr))(_oil_function_class_idct8x8theora_s16.func))(d_8x8, dstr, s_8x8, sstr); } #undef oil_imdct12_f64 void oil_imdct12_f64 (double * d_12, const double * s_6) { if (_oil_function_class_imdct12_f64.func == NULL) { oil_class_optimize (&_oil_function_class_imdct12_f64); } ((void (*)(double * d_12, const double * s_6))(_oil_function_class_imdct12_f64.func))(d_12, s_6); } #undef oil_imdct32_f32 void oil_imdct32_f32 (float * d_32, const float * s_32) { if (_oil_function_class_imdct32_f32.func == NULL) { oil_class_optimize (&_oil_function_class_imdct32_f32); } ((void (*)(float * d_32, const float * s_32))(_oil_function_class_imdct32_f32.func))(d_32, s_32); } #undef oil_imdct36_f64 void oil_imdct36_f64 (double * d_36, const double * s_18) { if (_oil_function_class_imdct36_f64.func == NULL) { oil_class_optimize (&_oil_function_class_imdct36_f64); } ((void (*)(double * d_36, const double * s_18))(_oil_function_class_imdct36_f64.func))(d_36, s_18); } #undef oil_interleave void oil_interleave (int16_t * d_2xn, const int16_t * s_2xn, int n) { if (_oil_function_class_interleave.func == NULL) { oil_class_optimize (&_oil_function_class_interleave); } ((void (*)(int16_t * d_2xn, const int16_t * s_2xn, int n))(_oil_function_class_interleave.func))(d_2xn, s_2xn, n); } #undef oil_interleave2_s16 void oil_interleave2_s16 (int16_t * d_2xn, const int16_t * s1_n, const int16_t * s2_n, int n) { if (_oil_function_class_interleave2_s16.func == NULL) { oil_class_optimize (&_oil_function_class_interleave2_s16); } ((void (*)(int16_t * d_2xn, const int16_t * s1_n, const int16_t * s2_n, int n))(_oil_function_class_interleave2_s16.func))(d_2xn, s1_n, s2_n, n); } #undef oil_inverse_f32 void oil_inverse_f32 (float * d, const float * s, int n) { if (_oil_function_class_inverse_f32.func == NULL) { oil_class_optimize (&_oil_function_class_inverse_f32); } ((void (*)(float * d, const float * s, int n))(_oil_function_class_inverse_f32.func))(d, s, n); } #undef oil_lift_add_135 void oil_lift_add_135 (int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, const int16_t * s5, int n) { if (_oil_function_class_lift_add_135.func == NULL) { oil_class_optimize (&_oil_function_class_lift_add_135); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, const int16_t * s5, int n))(_oil_function_class_lift_add_135.func))(d, s1, s2, s3, s4, s5, n); } #undef oil_lift_add_mult_shift12 void oil_lift_add_mult_shift12 (int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_1, int n) { if (_oil_function_class_lift_add_mult_shift12.func == NULL) { oil_class_optimize (&_oil_function_class_lift_add_mult_shift12); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_1, int n))(_oil_function_class_lift_add_mult_shift12.func))(d, s1, s2, s3, s4_1, n); } #undef oil_lift_add_shift1 void oil_lift_add_shift1 (int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n) { if (_oil_function_class_lift_add_shift1.func == NULL) { oil_class_optimize (&_oil_function_class_lift_add_shift1); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n))(_oil_function_class_lift_add_shift1.func))(d, s1, s2, s3, n); } #undef oil_lift_add_shift2 void oil_lift_add_shift2 (int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n) { if (_oil_function_class_lift_add_shift2.func == NULL) { oil_class_optimize (&_oil_function_class_lift_add_shift2); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n))(_oil_function_class_lift_add_shift2.func))(d, s1, s2, s3, n); } #undef oil_lift_sub_135 void oil_lift_sub_135 (int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, const int16_t * s5, int n) { if (_oil_function_class_lift_sub_135.func == NULL) { oil_class_optimize (&_oil_function_class_lift_sub_135); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4, const int16_t * s5, int n))(_oil_function_class_lift_sub_135.func))(d, s1, s2, s3, s4, s5, n); } #undef oil_lift_sub_mult_shift12 void oil_lift_sub_mult_shift12 (int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_1, int n) { if (_oil_function_class_lift_sub_mult_shift12.func == NULL) { oil_class_optimize (&_oil_function_class_lift_sub_mult_shift12); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_1, int n))(_oil_function_class_lift_sub_mult_shift12.func))(d, s1, s2, s3, s4_1, n); } #undef oil_lift_sub_shift1 void oil_lift_sub_shift1 (int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n) { if (_oil_function_class_lift_sub_shift1.func == NULL) { oil_class_optimize (&_oil_function_class_lift_sub_shift1); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n))(_oil_function_class_lift_sub_shift1.func))(d, s1, s2, s3, n); } #undef oil_lift_sub_shift2 void oil_lift_sub_shift2 (int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n) { if (_oil_function_class_lift_sub_shift2.func == NULL) { oil_class_optimize (&_oil_function_class_lift_sub_shift2); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, int n))(_oil_function_class_lift_sub_shift2.func))(d, s1, s2, s3, n); } #undef oil_lshift_s16 void oil_lshift_s16 (int16_t * d1, const int16_t * s1, const int16_t * s2_1, int n) { if (_oil_function_class_lshift_s16.func == NULL) { oil_class_optimize (&_oil_function_class_lshift_s16); } ((void (*)(int16_t * d1, const int16_t * s1, const int16_t * s2_1, int n))(_oil_function_class_lshift_s16.func))(d1, s1, s2_1, n); } #undef oil_mas10_u8 void oil_mas10_u8 (uint8_t * d, const uint8_t * s1_np9, const int16_t * s2_10, const int16_t * s3_2, int n) { if (_oil_function_class_mas10_u8.func == NULL) { oil_class_optimize (&_oil_function_class_mas10_u8); } ((void (*)(uint8_t * d, const uint8_t * s1_np9, const int16_t * s2_10, const int16_t * s3_2, int n))(_oil_function_class_mas10_u8.func))(d, s1_np9, s2_10, s3_2, n); } #undef oil_mas10_u8_l15 void oil_mas10_u8_l15 (uint8_t * d, const uint8_t * s1_np9, const int16_t * s2_10, const int16_t * s3_2, int n) { if (_oil_function_class_mas10_u8_l15.func == NULL) { oil_class_optimize (&_oil_function_class_mas10_u8_l15); } ((void (*)(uint8_t * d, const uint8_t * s1_np9, const int16_t * s2_10, const int16_t * s3_2, int n))(_oil_function_class_mas10_u8_l15.func))(d, s1_np9, s2_10, s3_2, n); } #undef oil_mas10_u8_sym_l15 void oil_mas10_u8_sym_l15 (uint8_t * d, const uint8_t * s1_np9, const int16_t * s2_10, const int16_t * s3_2, int n) { if (_oil_function_class_mas10_u8_sym_l15.func == NULL) { oil_class_optimize (&_oil_function_class_mas10_u8_sym_l15); } ((void (*)(uint8_t * d, const uint8_t * s1_np9, const int16_t * s2_10, const int16_t * s3_2, int n))(_oil_function_class_mas10_u8_sym_l15.func))(d, s1_np9, s2_10, s3_2, n); } #undef oil_mas12_addc_rshift_decim2_u8 void oil_mas12_addc_rshift_decim2_u8 (uint8_t * d, const uint8_t * s1_2xnp11, const int16_t * s2_12, const int16_t * s3_2, int n) { if (_oil_function_class_mas12_addc_rshift_decim2_u8.func == NULL) { oil_class_optimize (&_oil_function_class_mas12_addc_rshift_decim2_u8); } ((void (*)(uint8_t * d, const uint8_t * s1_2xnp11, const int16_t * s2_12, const int16_t * s3_2, int n))(_oil_function_class_mas12_addc_rshift_decim2_u8.func))(d, s1_2xnp11, s2_12, s3_2, n); } #undef oil_mas2_across_add_s16 void oil_mas2_across_add_s16 (int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_2, const int16_t * s5_2, int n) { if (_oil_function_class_mas2_across_add_s16.func == NULL) { oil_class_optimize (&_oil_function_class_mas2_across_add_s16); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2, const int16_t * s3, const int16_t * s4_2, const int16_t * s5_2, int n))(_oil_function_class_mas2_across_add_s16.func))(d, s1, s2, s3, s4_2, s5_2, n); } #undef oil_mas2_add_s16 void oil_mas2_add_s16 (int16_t * d, const int16_t * s1, const int16_t * s2_np1, const int16_t * s3_2, const int16_t * s4_2, int n) { if (_oil_function_class_mas2_add_s16.func == NULL) { oil_class_optimize (&_oil_function_class_mas2_add_s16); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2_np1, const int16_t * s3_2, const int16_t * s4_2, int n))(_oil_function_class_mas2_add_s16.func))(d, s1, s2_np1, s3_2, s4_2, n); } #undef oil_mas4_across_add_s16 void oil_mas4_across_add_s16 (int16_t * d, const int16_t * s1, const int16_t * s2_nx4, int sstr2, const int16_t * s3_4, const int16_t * s4_2, int n) { if (_oil_function_class_mas4_across_add_s16.func == NULL) { oil_class_optimize (&_oil_function_class_mas4_across_add_s16); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2_nx4, int sstr2, const int16_t * s3_4, const int16_t * s4_2, int n))(_oil_function_class_mas4_across_add_s16.func))(d, s1, s2_nx4, sstr2, s3_4, s4_2, n); } #undef oil_mas4_add_s16 void oil_mas4_add_s16 (int16_t * d, const int16_t * s1, const int16_t * s2_np3, const int16_t * s3_4, const int16_t * s4_2, int n) { if (_oil_function_class_mas4_add_s16.func == NULL) { oil_class_optimize (&_oil_function_class_mas4_add_s16); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2_np3, const int16_t * s3_4, const int16_t * s4_2, int n))(_oil_function_class_mas4_add_s16.func))(d, s1, s2_np3, s3_4, s4_2, n); } #undef oil_mas8_across_add_s16 void oil_mas8_across_add_s16 (int16_t * d, const int16_t * s1, const int16_t * s2_nx8, int sstr2, const int16_t * s3_8, const int16_t * s4_2, int n) { if (_oil_function_class_mas8_across_add_s16.func == NULL) { oil_class_optimize (&_oil_function_class_mas8_across_add_s16); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2_nx8, int sstr2, const int16_t * s3_8, const int16_t * s4_2, int n))(_oil_function_class_mas8_across_add_s16.func))(d, s1, s2_nx8, sstr2, s3_8, s4_2, n); } #undef oil_mas8_across_u8 void oil_mas8_across_u8 (uint8_t * d, const uint8_t * s1_nx8, int sstr1, const int16_t * s2_8, const int16_t * s3_2, int n) { if (_oil_function_class_mas8_across_u8.func == NULL) { oil_class_optimize (&_oil_function_class_mas8_across_u8); } ((void (*)(uint8_t * d, const uint8_t * s1_nx8, int sstr1, const int16_t * s2_8, const int16_t * s3_2, int n))(_oil_function_class_mas8_across_u8.func))(d, s1_nx8, sstr1, s2_8, s3_2, n); } #undef oil_mas8_add_s16 void oil_mas8_add_s16 (int16_t * d, const int16_t * s1, const int16_t * s2_np7, const int16_t * s3_8, const int16_t * s4_2, int n) { if (_oil_function_class_mas8_add_s16.func == NULL) { oil_class_optimize (&_oil_function_class_mas8_add_s16); } ((void (*)(int16_t * d, const int16_t * s1, const int16_t * s2_np7, const int16_t * s3_8, const int16_t * s4_2, int n))(_oil_function_class_mas8_add_s16.func))(d, s1, s2_np7, s3_8, s4_2, n); } #undef oil_mas8_addc_rshift_decim2_u8 void oil_mas8_addc_rshift_decim2_u8 (uint8_t * d, const uint8_t * s1_2xnp9, const int16_t * s2_8, const int16_t * s3_2, int n) { if (_oil_function_class_mas8_addc_rshift_decim2_u8.func == NULL) { oil_class_optimize (&_oil_function_class_mas8_addc_rshift_decim2_u8); } ((void (*)(uint8_t * d, const uint8_t * s1_2xnp9, const int16_t * s2_8, const int16_t * s3_2, int n))(_oil_function_class_mas8_addc_rshift_decim2_u8.func))(d, s1_2xnp9, s2_8, s3_2, n); } #undef oil_mas8_u8 void oil_mas8_u8 (uint8_t * d, const uint8_t * s1_np7, const int16_t * s2_8, const int16_t * s3_2, int n) { if (_oil_function_class_mas8_u8.func == NULL) { oil_class_optimize (&_oil_function_class_mas8_u8); } ((void (*)(uint8_t * d, const uint8_t * s1_np7, const int16_t * s2_8, const int16_t * s3_2, int n))(_oil_function_class_mas8_u8.func))(d, s1_np7, s2_8, s3_2, n); } #undef oil_mas8_u8_l15 void oil_mas8_u8_l15 (uint8_t * d, const uint8_t * s1_np7, const int16_t * s2_8, const int16_t * s3_2, int n) { if (_oil_function_class_mas8_u8_l15.func == NULL) { oil_class_optimize (&_oil_function_class_mas8_u8_l15); } ((void (*)(uint8_t * d, const uint8_t * s1_np7, const int16_t * s2_8, const int16_t * s3_2, int n))(_oil_function_class_mas8_u8_l15.func))(d, s1_np7, s2_8, s3_2, n); } #undef oil_mas8_u8_sym_l15 void oil_mas8_u8_sym_l15 (uint8_t * d, const uint8_t * s1_np7, const int16_t * s2_8, const int16_t * s3_2, int n) { if (_oil_function_class_mas8_u8_sym_l15.func == NULL) { oil_class_optimize (&_oil_function_class_mas8_u8_sym_l15); } ((void (*)(uint8_t * d, const uint8_t * s1_np7, const int16_t * s2_8, const int16_t * s3_2, int n))(_oil_function_class_mas8_u8_sym_l15.func))(d, s1_np7, s2_8, s3_2, n); } #undef oil_maximum_f32 void oil_maximum_f32 (float * d, const float * s1, const float * s2, int n) { if (_oil_function_class_maximum_f32.func == NULL) { oil_class_optimize (&_oil_function_class_maximum_f32); } ((void (*)(float * d, const float * s1, const float * s2, int n))(_oil_function_class_maximum_f32.func))(d, s1, s2, n); } #undef oil_maximum_f64 void oil_maximum_f64 (float * d, const float * s1, const float * s2, int n) { if (_oil_function_class_maximum_f64.func == NULL) { oil_class_optimize (&_oil_function_class_maximum_f64); } ((void (*)(float * d, const float * s1, const float * s2, int n))(_oil_function_class_maximum_f64.func))(d, s1, s2, n); } #undef oil_md5 void oil_md5 (uint32_t * i_4, const uint32_t * s_16) { if (_oil_function_class_md5.func == NULL) { oil_class_optimize (&_oil_function_class_md5); } ((void (*)(uint32_t * i_4, const uint32_t * s_16))(_oil_function_class_md5.func))(i_4, s_16); } #undef oil_mdct12_f64 void oil_mdct12_f64 (double * d_6, const double * s_12) { if (_oil_function_class_mdct12_f64.func == NULL) { oil_class_optimize (&_oil_function_class_mdct12_f64); } ((void (*)(double * d_6, const double * s_12))(_oil_function_class_mdct12_f64.func))(d_6, s_12); } #undef oil_mdct36_f64 void oil_mdct36_f64 (double * d_18, const double * s_36) { if (_oil_function_class_mdct36_f64.func == NULL) { oil_class_optimize (&_oil_function_class_mdct36_f64); } ((void (*)(double * d_18, const double * s_36))(_oil_function_class_mdct36_f64.func))(d_18, s_36); } #undef oil_merge_linear_argb void oil_merge_linear_argb (uint32_t * d_n, const uint32_t * s_n, const uint32_t * s2_n, const uint32_t * s3_1, int n) { if (_oil_function_class_merge_linear_argb.func == NULL) { oil_class_optimize (&_oil_function_class_merge_linear_argb); } ((void (*)(uint32_t * d_n, const uint32_t * s_n, const uint32_t * s2_n, const uint32_t * s3_1, int n))(_oil_function_class_merge_linear_argb.func))(d_n, s_n, s2_n, s3_1, n); } #undef oil_merge_linear_u8 void oil_merge_linear_u8 (uint8_t * d_n, const uint8_t * s_n, const uint8_t * s2_n, const uint32_t * s3_1, int n) { if (_oil_function_class_merge_linear_u8.func == NULL) { oil_class_optimize (&_oil_function_class_merge_linear_u8); } ((void (*)(uint8_t * d_n, const uint8_t * s_n, const uint8_t * s2_n, const uint32_t * s3_1, int n))(_oil_function_class_merge_linear_u8.func))(d_n, s_n, s2_n, s3_1, n); } #undef oil_minimum_f32 void oil_minimum_f32 (float * d, const float * s1, const float * s2, int n) { if (_oil_function_class_minimum_f32.func == NULL) { oil_class_optimize (&_oil_function_class_minimum_f32); } ((void (*)(float * d, const float * s1, const float * s2, int n))(_oil_function_class_minimum_f32.func))(d, s1, s2, n); } #undef oil_minimum_f64 void oil_minimum_f64 (float * d, const float * s1, const float * s2, int n) { if (_oil_function_class_minimum_f64.func == NULL) { oil_class_optimize (&_oil_function_class_minimum_f64); } ((void (*)(float * d, const float * s1, const float * s2, int n))(_oil_function_class_minimum_f64.func))(d, s1, s2, n); } #undef oil_mix_u8 void oil_mix_u8 (uint8_t * dest, const uint8_t * src1, const uint8_t * src2, const uint8_t * src3, int n) { if (_oil_function_class_mix_u8.func == NULL) { oil_class_optimize (&_oil_function_class_mix_u8); } ((void (*)(uint8_t * dest, const uint8_t * src1, const uint8_t * src2, const uint8_t * src3, int n))(_oil_function_class_mix_u8.func))(dest, src1, src2, src3, n); } #undef oil_mt19937 void oil_mt19937 (uint32_t * d_624, uint32_t * i_624) { if (_oil_function_class_mt19937.func == NULL) { oil_class_optimize (&_oil_function_class_mt19937); } ((void (*)(uint32_t * d_624, uint32_t * i_624))(_oil_function_class_mt19937.func))(d_624, i_624); } #undef oil_mult8x8_s16 void oil_mult8x8_s16 (int16_t * d_8x8, const int16_t * s1_8x8, const int16_t * s2_8x8, int ds, int ss1, int ss2) { if (_oil_function_class_mult8x8_s16.func == NULL) { oil_class_optimize (&_oil_function_class_mult8x8_s16); } ((void (*)(int16_t * d_8x8, const int16_t * s1_8x8, const int16_t * s2_8x8, int ds, int ss1, int ss2))(_oil_function_class_mult8x8_s16.func))(d_8x8, s1_8x8, s2_8x8, ds, ss1, ss2); } #undef oil_multiply_and_acc_12xn_s16_u8 void oil_multiply_and_acc_12xn_s16_u8 (int16_t * i1_12xn, int is1, const int16_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, int n) { if (_oil_function_class_multiply_and_acc_12xn_s16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_multiply_and_acc_12xn_s16_u8); } ((void (*)(int16_t * i1_12xn, int is1, const int16_t * s1_12xn, int ss1, const uint8_t * s2_12xn, int ss2, int n))(_oil_function_class_multiply_and_acc_12xn_s16_u8.func))(i1_12xn, is1, s1_12xn, ss1, s2_12xn, ss2, n); } #undef oil_multiply_and_acc_16xn_s16_u8 void oil_multiply_and_acc_16xn_s16_u8 (int16_t * i1_16xn, int is1, const int16_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, int n) { if (_oil_function_class_multiply_and_acc_16xn_s16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_multiply_and_acc_16xn_s16_u8); } ((void (*)(int16_t * i1_16xn, int is1, const int16_t * s1_16xn, int ss1, const uint8_t * s2_16xn, int ss2, int n))(_oil_function_class_multiply_and_acc_16xn_s16_u8.func))(i1_16xn, is1, s1_16xn, ss1, s2_16xn, ss2, n); } #undef oil_multiply_and_acc_24xn_s16_u8 void oil_multiply_and_acc_24xn_s16_u8 (int16_t * i1_24xn, int is1, const int16_t * s1_24xn, int ss1, const uint8_t * s2_24xn, int ss2, int n) { if (_oil_function_class_multiply_and_acc_24xn_s16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_multiply_and_acc_24xn_s16_u8); } ((void (*)(int16_t * i1_24xn, int is1, const int16_t * s1_24xn, int ss1, const uint8_t * s2_24xn, int ss2, int n))(_oil_function_class_multiply_and_acc_24xn_s16_u8.func))(i1_24xn, is1, s1_24xn, ss1, s2_24xn, ss2, n); } #undef oil_multiply_and_acc_6xn_s16_u8 void oil_multiply_and_acc_6xn_s16_u8 (int16_t * i1_6xn, int is1, const int16_t * s1_6xn, int ss1, const uint8_t * s2_6xn, int ss2, int n) { if (_oil_function_class_multiply_and_acc_6xn_s16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_multiply_and_acc_6xn_s16_u8); } ((void (*)(int16_t * i1_6xn, int is1, const int16_t * s1_6xn, int ss1, const uint8_t * s2_6xn, int ss2, int n))(_oil_function_class_multiply_and_acc_6xn_s16_u8.func))(i1_6xn, is1, s1_6xn, ss1, s2_6xn, ss2, n); } #undef oil_multiply_and_acc_8xn_s16_u8 void oil_multiply_and_acc_8xn_s16_u8 (int16_t * i1_8xn, int is1, const int16_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, int n) { if (_oil_function_class_multiply_and_acc_8xn_s16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_multiply_and_acc_8xn_s16_u8); } ((void (*)(int16_t * i1_8xn, int is1, const int16_t * s1_8xn, int ss1, const uint8_t * s2_8xn, int ss2, int n))(_oil_function_class_multiply_and_acc_8xn_s16_u8.func))(i1_8xn, is1, s1_8xn, ss1, s2_8xn, ss2, n); } #undef oil_multiply_and_add_s16 void oil_multiply_and_add_s16 (int16_t * d, const int16_t * src1, const int16_t * src2, const int16_t * src3, int n) { if (_oil_function_class_multiply_and_add_s16.func == NULL) { oil_class_optimize (&_oil_function_class_multiply_and_add_s16); } ((void (*)(int16_t * d, const int16_t * src1, const int16_t * src2, const int16_t * src3, int n))(_oil_function_class_multiply_and_add_s16.func))(d, src1, src2, src3, n); } #undef oil_multiply_and_add_s16_u8 void oil_multiply_and_add_s16_u8 (int16_t * d, const int16_t * src1, const int16_t * src2, const uint8_t * src3, int n) { if (_oil_function_class_multiply_and_add_s16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_multiply_and_add_s16_u8); } ((void (*)(int16_t * d, const int16_t * src1, const int16_t * src2, const uint8_t * src3, int n))(_oil_function_class_multiply_and_add_s16_u8.func))(d, src1, src2, src3, n); } #undef oil_multiply_f32 void oil_multiply_f32 (float * d, const float * s1, const float * s2, int n) { if (_oil_function_class_multiply_f32.func == NULL) { oil_class_optimize (&_oil_function_class_multiply_f32); } ((void (*)(float * d, const float * s1, const float * s2, int n))(_oil_function_class_multiply_f32.func))(d, s1, s2, n); } #undef oil_multiply_f64 void oil_multiply_f64 (double * d, const double * s1, const double * s2, int n) { if (_oil_function_class_multiply_f64.func == NULL) { oil_class_optimize (&_oil_function_class_multiply_f64); } ((void (*)(double * d, const double * s1, const double * s2, int n))(_oil_function_class_multiply_f64.func))(d, s1, s2, n); } #undef oil_multsum_f32 void oil_multsum_f32 (float * dest, const float * src1, int sstr1, const float * src2, int sstr2, int n) { if (_oil_function_class_multsum_f32.func == NULL) { oil_class_optimize (&_oil_function_class_multsum_f32); } ((void (*)(float * dest, const float * src1, int sstr1, const float * src2, int sstr2, int n))(_oil_function_class_multsum_f32.func))(dest, src1, sstr1, src2, sstr2, n); } #undef oil_multsum_f64 void oil_multsum_f64 (double * dest, const double * src1, int sstr1, const double * src2, int sstr2, int n) { if (_oil_function_class_multsum_f64.func == NULL) { oil_class_optimize (&_oil_function_class_multsum_f64); } ((void (*)(double * dest, const double * src1, int sstr1, const double * src2, int sstr2, int n))(_oil_function_class_multsum_f64.func))(dest, src1, sstr1, src2, sstr2, n); } #undef oil_negative_f32 void oil_negative_f32 (float * d, const float * s, int n) { if (_oil_function_class_negative_f32.func == NULL) { oil_class_optimize (&_oil_function_class_negative_f32); } ((void (*)(float * d, const float * s, int n))(_oil_function_class_negative_f32.func))(d, s, n); } #undef oil_null void oil_null (void) { if (_oil_function_class_null.func == NULL) { oil_class_optimize (&_oil_function_class_null); } ((void (*)(void))(_oil_function_class_null.func))(); } #undef oil_packyuyv void oil_packyuyv (uint32_t * d, const uint8_t * s1_nx2, const uint8_t * s2, const uint8_t * s3, int n) { if (_oil_function_class_packyuyv.func == NULL) { oil_class_optimize (&_oil_function_class_packyuyv); } ((void (*)(uint32_t * d, const uint8_t * s1_nx2, const uint8_t * s2, const uint8_t * s3, int n))(_oil_function_class_packyuyv.func))(d, s1_nx2, s2, s3, n); } #undef oil_permute_f32 void oil_permute_f32 (float * dest, int dstr, const float * src1, int sstr1, const int32_t * src2, int sstr2, int n) { if (_oil_function_class_permute_f32.func == NULL) { oil_class_optimize (&_oil_function_class_permute_f32); } ((void (*)(float * dest, int dstr, const float * src1, int sstr1, const int32_t * src2, int sstr2, int n))(_oil_function_class_permute_f32.func))(dest, dstr, src1, sstr1, src2, sstr2, n); } #undef oil_permute_f64 void oil_permute_f64 (double * dest, int dstr, const double * src1, int sstr1, const int32_t * src2, int sstr2, int n) { if (_oil_function_class_permute_f64.func == NULL) { oil_class_optimize (&_oil_function_class_permute_f64); } ((void (*)(double * dest, int dstr, const double * src1, int sstr1, const int32_t * src2, int sstr2, int n))(_oil_function_class_permute_f64.func))(dest, dstr, src1, sstr1, src2, sstr2, n); } #undef oil_permute_s16 void oil_permute_s16 (int16_t * dest, int dstr, const int16_t * src1, int sstr1, const int32_t * src2, int sstr2, int n) { if (_oil_function_class_permute_s16.func == NULL) { oil_class_optimize (&_oil_function_class_permute_s16); } ((void (*)(int16_t * dest, int dstr, const int16_t * src1, int sstr1, const int32_t * src2, int sstr2, int n))(_oil_function_class_permute_s16.func))(dest, dstr, src1, sstr1, src2, sstr2, n); } #undef oil_permute_s32 void oil_permute_s32 (int32_t * dest, int dstr, const int32_t * src1, int sstr1, const int32_t * src2, int sstr2, int n) { if (_oil_function_class_permute_s32.func == NULL) { oil_class_optimize (&_oil_function_class_permute_s32); } ((void (*)(int32_t * dest, int dstr, const int32_t * src1, int sstr1, const int32_t * src2, int sstr2, int n))(_oil_function_class_permute_s32.func))(dest, dstr, src1, sstr1, src2, sstr2, n); } #undef oil_permute_s8 void oil_permute_s8 (int8_t * dest, int dstr, const int8_t * src1, int sstr1, const int32_t * src2, int sstr2, int n) { if (_oil_function_class_permute_s8.func == NULL) { oil_class_optimize (&_oil_function_class_permute_s8); } ((void (*)(int8_t * dest, int dstr, const int8_t * src1, int sstr1, const int32_t * src2, int sstr2, int n))(_oil_function_class_permute_s8.func))(dest, dstr, src1, sstr1, src2, sstr2, n); } #undef oil_permute_u16 void oil_permute_u16 (uint16_t * dest, int dstr, const uint16_t * src1, int sstr1, const int32_t * src2, int sstr2, int n) { if (_oil_function_class_permute_u16.func == NULL) { oil_class_optimize (&_oil_function_class_permute_u16); } ((void (*)(uint16_t * dest, int dstr, const uint16_t * src1, int sstr1, const int32_t * src2, int sstr2, int n))(_oil_function_class_permute_u16.func))(dest, dstr, src1, sstr1, src2, sstr2, n); } #undef oil_permute_u32 void oil_permute_u32 (uint32_t * dest, int dstr, const uint32_t * src1, int sstr1, const int32_t * src2, int sstr2, int n) { if (_oil_function_class_permute_u32.func == NULL) { oil_class_optimize (&_oil_function_class_permute_u32); } ((void (*)(uint32_t * dest, int dstr, const uint32_t * src1, int sstr1, const int32_t * src2, int sstr2, int n))(_oil_function_class_permute_u32.func))(dest, dstr, src1, sstr1, src2, sstr2, n); } #undef oil_permute_u8 void oil_permute_u8 (uint8_t * dest, int dstr, const uint8_t * src1, int sstr1, const int32_t * src2, int sstr2, int n) { if (_oil_function_class_permute_u8.func == NULL) { oil_class_optimize (&_oil_function_class_permute_u8); } ((void (*)(uint8_t * dest, int dstr, const uint8_t * src1, int sstr1, const int32_t * src2, int sstr2, int n))(_oil_function_class_permute_u8.func))(dest, dstr, src1, sstr1, src2, sstr2, n); } #undef oil_recon8x8_inter void oil_recon8x8_inter (uint8_t * d_8x8, int ds, const uint8_t * s1_8x8, int ss1, const int16_t * s2_8x8) { if (_oil_function_class_recon8x8_inter.func == NULL) { oil_class_optimize (&_oil_function_class_recon8x8_inter); } ((void (*)(uint8_t * d_8x8, int ds, const uint8_t * s1_8x8, int ss1, const int16_t * s2_8x8))(_oil_function_class_recon8x8_inter.func))(d_8x8, ds, s1_8x8, ss1, s2_8x8); } #undef oil_recon8x8_inter2 void oil_recon8x8_inter2 (uint8_t * d_8x8, int ds, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2, const int16_t * s3_8x8) { if (_oil_function_class_recon8x8_inter2.func == NULL) { oil_class_optimize (&_oil_function_class_recon8x8_inter2); } ((void (*)(uint8_t * d_8x8, int ds, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2, const int16_t * s3_8x8))(_oil_function_class_recon8x8_inter2.func))(d_8x8, ds, s1_8x8, ss1, s2_8x8, ss2, s3_8x8); } #undef oil_recon8x8_intra void oil_recon8x8_intra (uint8_t * d_8x8, int ds, const int16_t * s_8x8) { if (_oil_function_class_recon8x8_intra.func == NULL) { oil_class_optimize (&_oil_function_class_recon8x8_intra); } ((void (*)(uint8_t * d_8x8, int ds, const int16_t * s_8x8))(_oil_function_class_recon8x8_intra.func))(d_8x8, ds, s_8x8); } #undef oil_resample_linear_argb void oil_resample_linear_argb (uint32_t * d_n, const uint32_t * s_2xn, int n, uint32_t * i_2) { if (_oil_function_class_resample_linear_argb.func == NULL) { oil_class_optimize (&_oil_function_class_resample_linear_argb); } ((void (*)(uint32_t * d_n, const uint32_t * s_2xn, int n, uint32_t * i_2))(_oil_function_class_resample_linear_argb.func))(d_n, s_2xn, n, i_2); } #undef oil_resample_linear_u8 void oil_resample_linear_u8 (uint8_t * d_n, const uint8_t * s_2xn, int n, uint32_t * i_2) { if (_oil_function_class_resample_linear_u8.func == NULL) { oil_class_optimize (&_oil_function_class_resample_linear_u8); } ((void (*)(uint8_t * d_n, const uint8_t * s_2xn, int n, uint32_t * i_2))(_oil_function_class_resample_linear_u8.func))(d_n, s_2xn, n, i_2); } #undef oil_rgb2bgr void oil_rgb2bgr (uint8_t * d_3xn, const uint8_t * s_3xn, int n) { if (_oil_function_class_rgb2bgr.func == NULL) { oil_class_optimize (&_oil_function_class_rgb2bgr); } ((void (*)(uint8_t * d_3xn, const uint8_t * s_3xn, int n))(_oil_function_class_rgb2bgr.func))(d_3xn, s_3xn, n); } #undef oil_rgb2rgba void oil_rgb2rgba (uint8_t * d_4xn, const uint8_t * s_3xn, int n) { if (_oil_function_class_rgb2rgba.func == NULL) { oil_class_optimize (&_oil_function_class_rgb2rgba); } ((void (*)(uint8_t * d_4xn, const uint8_t * s_3xn, int n))(_oil_function_class_rgb2rgba.func))(d_4xn, s_3xn, n); } #undef oil_rgb565_to_argb void oil_rgb565_to_argb (uint32_t * d, const uint16_t * s, int n) { if (_oil_function_class_rgb565_to_argb.func == NULL) { oil_class_optimize (&_oil_function_class_rgb565_to_argb); } ((void (*)(uint32_t * d, const uint16_t * s, int n))(_oil_function_class_rgb565_to_argb.func))(d, s, n); } #undef oil_rowsad8x8_u8 void oil_rowsad8x8_u8 (uint32_t * d_1, const uint8_t * s1_8x8, const uint8_t * s2_8x8) { if (_oil_function_class_rowsad8x8_u8.func == NULL) { oil_class_optimize (&_oil_function_class_rowsad8x8_u8); } ((void (*)(uint32_t * d_1, const uint8_t * s1_8x8, const uint8_t * s2_8x8))(_oil_function_class_rowsad8x8_u8.func))(d_1, s1_8x8, s2_8x8); } #undef oil_sad12x12_12xn_u8 void oil_sad12x12_12xn_u8 (uint32_t * d_n, const uint8_t * s1_12x12, int ss1, const uint8_t * s2_12xnp11, int ss2, int n) { if (_oil_function_class_sad12x12_12xn_u8.func == NULL) { oil_class_optimize (&_oil_function_class_sad12x12_12xn_u8); } ((void (*)(uint32_t * d_n, const uint8_t * s1_12x12, int ss1, const uint8_t * s2_12xnp11, int ss2, int n))(_oil_function_class_sad12x12_12xn_u8.func))(d_n, s1_12x12, ss1, s2_12xnp11, ss2, n); } #undef oil_sad12x12_u8 void oil_sad12x12_u8 (uint32_t * d_1, const uint8_t * s1_12x12, int ss1, const uint8_t * s2_12x12, int ss2) { if (_oil_function_class_sad12x12_u8.func == NULL) { oil_class_optimize (&_oil_function_class_sad12x12_u8); } ((void (*)(uint32_t * d_1, const uint8_t * s1_12x12, int ss1, const uint8_t * s2_12x12, int ss2))(_oil_function_class_sad12x12_u8.func))(d_1, s1_12x12, ss1, s2_12x12, ss2); } #undef oil_sad16x16_16xn_u8 void oil_sad16x16_16xn_u8 (uint32_t * d_n, const uint8_t * s1_16x16, int ss1, const uint8_t * s2_16xnp15, int ss2, int n) { if (_oil_function_class_sad16x16_16xn_u8.func == NULL) { oil_class_optimize (&_oil_function_class_sad16x16_16xn_u8); } ((void (*)(uint32_t * d_n, const uint8_t * s1_16x16, int ss1, const uint8_t * s2_16xnp15, int ss2, int n))(_oil_function_class_sad16x16_16xn_u8.func))(d_n, s1_16x16, ss1, s2_16xnp15, ss2, n); } #undef oil_sad16x16_u8 void oil_sad16x16_u8 (uint32_t * d_1, const uint8_t * s1_16x16, int ss1, const uint8_t * s2_16x16, int ss2) { if (_oil_function_class_sad16x16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_sad16x16_u8); } ((void (*)(uint32_t * d_1, const uint8_t * s1_16x16, int ss1, const uint8_t * s2_16x16, int ss2))(_oil_function_class_sad16x16_u8.func))(d_1, s1_16x16, ss1, s2_16x16, ss2); } #undef oil_sad8x8_8xn_u8 void oil_sad8x8_8xn_u8 (uint32_t * d_n, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8xnp7, int ss2, int n) { if (_oil_function_class_sad8x8_8xn_u8.func == NULL) { oil_class_optimize (&_oil_function_class_sad8x8_8xn_u8); } ((void (*)(uint32_t * d_n, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8xnp7, int ss2, int n))(_oil_function_class_sad8x8_8xn_u8.func))(d_n, s1_8x8, ss1, s2_8xnp7, ss2, n); } #undef oil_sad8x8_f64 void oil_sad8x8_f64 (double * d_8x8, int ds, const double * s1_8x8, int ss1, const double * s2_8x8, int ss2) { if (_oil_function_class_sad8x8_f64.func == NULL) { oil_class_optimize (&_oil_function_class_sad8x8_f64); } ((void (*)(double * d_8x8, int ds, const double * s1_8x8, int ss1, const double * s2_8x8, int ss2))(_oil_function_class_sad8x8_f64.func))(d_8x8, ds, s1_8x8, ss1, s2_8x8, ss2); } #undef oil_sad8x8_f64_2 void oil_sad8x8_f64_2 (double * d_1, const double * s1_8x8, int ss1, const double * s2_8x8, int ss2) { if (_oil_function_class_sad8x8_f64_2.func == NULL) { oil_class_optimize (&_oil_function_class_sad8x8_f64_2); } ((void (*)(double * d_1, const double * s1_8x8, int ss1, const double * s2_8x8, int ss2))(_oil_function_class_sad8x8_f64_2.func))(d_1, s1_8x8, ss1, s2_8x8, ss2); } #undef oil_sad8x8_s16 void oil_sad8x8_s16 (uint32_t * d_8x8, int ds, const int16_t * s1_8x8, int ss1, const int16_t * s2_8x8, int ss2) { if (_oil_function_class_sad8x8_s16.func == NULL) { oil_class_optimize (&_oil_function_class_sad8x8_s16); } ((void (*)(uint32_t * d_8x8, int ds, const int16_t * s1_8x8, int ss1, const int16_t * s2_8x8, int ss2))(_oil_function_class_sad8x8_s16.func))(d_8x8, ds, s1_8x8, ss1, s2_8x8, ss2); } #undef oil_sad8x8_s16_2 void oil_sad8x8_s16_2 (uint32_t * d_1, const int16_t * s1_8x8, int ss1, const int16_t * s2_8x8, int ss2) { if (_oil_function_class_sad8x8_s16_2.func == NULL) { oil_class_optimize (&_oil_function_class_sad8x8_s16_2); } ((void (*)(uint32_t * d_1, const int16_t * s1_8x8, int ss1, const int16_t * s2_8x8, int ss2))(_oil_function_class_sad8x8_s16_2.func))(d_1, s1_8x8, ss1, s2_8x8, ss2); } #undef oil_sad8x8_u8 void oil_sad8x8_u8 (uint32_t * d_1, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2) { if (_oil_function_class_sad8x8_u8.func == NULL) { oil_class_optimize (&_oil_function_class_sad8x8_u8); } ((void (*)(uint32_t * d_1, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, int ss2))(_oil_function_class_sad8x8_u8.func))(d_1, s1_8x8, ss1, s2_8x8, ss2); } #undef oil_sad8x8_u8_avg void oil_sad8x8_u8_avg (uint32_t * d_1, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, const uint8_t * s3_8x8, int ss2) { if (_oil_function_class_sad8x8_u8_avg.func == NULL) { oil_class_optimize (&_oil_function_class_sad8x8_u8_avg); } ((void (*)(uint32_t * d_1, const uint8_t * s1_8x8, int ss1, const uint8_t * s2_8x8, const uint8_t * s3_8x8, int ss2))(_oil_function_class_sad8x8_u8_avg.func))(d_1, s1_8x8, ss1, s2_8x8, s3_8x8, ss2); } #undef oil_scalaradd_f32 void oil_scalaradd_f32 (float * d, int dstr, const float * s1, int sstr, const float * s2_1, int n) { if (_oil_function_class_scalaradd_f32.func == NULL) { oil_class_optimize (&_oil_function_class_scalaradd_f32); } ((void (*)(float * d, int dstr, const float * s1, int sstr, const float * s2_1, int n))(_oil_function_class_scalaradd_f32.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalaradd_f32_ns void oil_scalaradd_f32_ns (float * d, const float * s1, const float * s2_1, int n) { if (_oil_function_class_scalaradd_f32_ns.func == NULL) { oil_class_optimize (&_oil_function_class_scalaradd_f32_ns); } ((void (*)(float * d, const float * s1, const float * s2_1, int n))(_oil_function_class_scalaradd_f32_ns.func))(d, s1, s2_1, n); } #undef oil_scalaradd_f64 void oil_scalaradd_f64 (double * d, int dstr, const double * s1, int sstr, const double * s2_1, int n) { if (_oil_function_class_scalaradd_f64.func == NULL) { oil_class_optimize (&_oil_function_class_scalaradd_f64); } ((void (*)(double * d, int dstr, const double * s1, int sstr, const double * s2_1, int n))(_oil_function_class_scalaradd_f64.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalaradd_s16 void oil_scalaradd_s16 (int16_t * d, int dstr, const int16_t * s1, int sstr, const int16_t * s2_1, int n) { if (_oil_function_class_scalaradd_s16.func == NULL) { oil_class_optimize (&_oil_function_class_scalaradd_s16); } ((void (*)(int16_t * d, int dstr, const int16_t * s1, int sstr, const int16_t * s2_1, int n))(_oil_function_class_scalaradd_s16.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalaradd_s32 void oil_scalaradd_s32 (int32_t * d, int dstr, const int32_t * s1, int sstr, const int32_t * s2_1, int n) { if (_oil_function_class_scalaradd_s32.func == NULL) { oil_class_optimize (&_oil_function_class_scalaradd_s32); } ((void (*)(int32_t * d, int dstr, const int32_t * s1, int sstr, const int32_t * s2_1, int n))(_oil_function_class_scalaradd_s32.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalaradd_s8 void oil_scalaradd_s8 (int8_t * d, int dstr, const int8_t * s1, int sstr, const int8_t * s2_1, int n) { if (_oil_function_class_scalaradd_s8.func == NULL) { oil_class_optimize (&_oil_function_class_scalaradd_s8); } ((void (*)(int8_t * d, int dstr, const int8_t * s1, int sstr, const int8_t * s2_1, int n))(_oil_function_class_scalaradd_s8.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalaradd_u16 void oil_scalaradd_u16 (uint16_t * d, int dstr, const uint16_t * s1, int sstr, const uint16_t * s2_1, int n) { if (_oil_function_class_scalaradd_u16.func == NULL) { oil_class_optimize (&_oil_function_class_scalaradd_u16); } ((void (*)(uint16_t * d, int dstr, const uint16_t * s1, int sstr, const uint16_t * s2_1, int n))(_oil_function_class_scalaradd_u16.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalaradd_u32 void oil_scalaradd_u32 (uint32_t * d, int dstr, const uint32_t * s1, int sstr, const uint32_t * s2_1, int n) { if (_oil_function_class_scalaradd_u32.func == NULL) { oil_class_optimize (&_oil_function_class_scalaradd_u32); } ((void (*)(uint32_t * d, int dstr, const uint32_t * s1, int sstr, const uint32_t * s2_1, int n))(_oil_function_class_scalaradd_u32.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalaradd_u8 void oil_scalaradd_u8 (uint8_t * d, int dstr, const uint8_t * s1, int sstr, const uint8_t * s2_1, int n) { if (_oil_function_class_scalaradd_u8.func == NULL) { oil_class_optimize (&_oil_function_class_scalaradd_u8); } ((void (*)(uint8_t * d, int dstr, const uint8_t * s1, int sstr, const uint8_t * s2_1, int n))(_oil_function_class_scalaradd_u8.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalarmult_f32 void oil_scalarmult_f32 (float * d, int dstr, const float * s1, int sstr, const float * s2_1, int n) { if (_oil_function_class_scalarmult_f32.func == NULL) { oil_class_optimize (&_oil_function_class_scalarmult_f32); } ((void (*)(float * d, int dstr, const float * s1, int sstr, const float * s2_1, int n))(_oil_function_class_scalarmult_f32.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalarmult_f64 void oil_scalarmult_f64 (double * d, int dstr, const double * s1, int sstr, const double * s2_1, int n) { if (_oil_function_class_scalarmult_f64.func == NULL) { oil_class_optimize (&_oil_function_class_scalarmult_f64); } ((void (*)(double * d, int dstr, const double * s1, int sstr, const double * s2_1, int n))(_oil_function_class_scalarmult_f64.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalarmult_s16 void oil_scalarmult_s16 (int16_t * d, int dstr, const int16_t * s1, int sstr, const int16_t * s2_1, int n) { if (_oil_function_class_scalarmult_s16.func == NULL) { oil_class_optimize (&_oil_function_class_scalarmult_s16); } ((void (*)(int16_t * d, int dstr, const int16_t * s1, int sstr, const int16_t * s2_1, int n))(_oil_function_class_scalarmult_s16.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalarmult_s32 void oil_scalarmult_s32 (int32_t * d, int dstr, const int32_t * s1, int sstr, const int32_t * s2_1, int n) { if (_oil_function_class_scalarmult_s32.func == NULL) { oil_class_optimize (&_oil_function_class_scalarmult_s32); } ((void (*)(int32_t * d, int dstr, const int32_t * s1, int sstr, const int32_t * s2_1, int n))(_oil_function_class_scalarmult_s32.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalarmult_s8 void oil_scalarmult_s8 (int8_t * d, int dstr, const int8_t * s1, int sstr, const int8_t * s2_1, int n) { if (_oil_function_class_scalarmult_s8.func == NULL) { oil_class_optimize (&_oil_function_class_scalarmult_s8); } ((void (*)(int8_t * d, int dstr, const int8_t * s1, int sstr, const int8_t * s2_1, int n))(_oil_function_class_scalarmult_s8.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalarmult_u16 void oil_scalarmult_u16 (uint16_t * d, int dstr, const uint16_t * s1, int sstr, const uint16_t * s2_1, int n) { if (_oil_function_class_scalarmult_u16.func == NULL) { oil_class_optimize (&_oil_function_class_scalarmult_u16); } ((void (*)(uint16_t * d, int dstr, const uint16_t * s1, int sstr, const uint16_t * s2_1, int n))(_oil_function_class_scalarmult_u16.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalarmult_u32 void oil_scalarmult_u32 (uint32_t * d, int dstr, const uint32_t * s1, int sstr, const uint32_t * s2_1, int n) { if (_oil_function_class_scalarmult_u32.func == NULL) { oil_class_optimize (&_oil_function_class_scalarmult_u32); } ((void (*)(uint32_t * d, int dstr, const uint32_t * s1, int sstr, const uint32_t * s2_1, int n))(_oil_function_class_scalarmult_u32.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalarmult_u8 void oil_scalarmult_u8 (uint8_t * d, int dstr, const uint8_t * s1, int sstr, const uint8_t * s2_1, int n) { if (_oil_function_class_scalarmult_u8.func == NULL) { oil_class_optimize (&_oil_function_class_scalarmult_u8); } ((void (*)(uint8_t * d, int dstr, const uint8_t * s1, int sstr, const uint8_t * s2_1, int n))(_oil_function_class_scalarmult_u8.func))(d, dstr, s1, sstr, s2_1, n); } #undef oil_scalarmultiply_f32_ns void oil_scalarmultiply_f32_ns (float * d, const float * s1, const float * s2_1, int n) { if (_oil_function_class_scalarmultiply_f32_ns.func == NULL) { oil_class_optimize (&_oil_function_class_scalarmultiply_f32_ns); } ((void (*)(float * d, const float * s1, const float * s2_1, int n))(_oil_function_class_scalarmultiply_f32_ns.func))(d, s1, s2_1, n); } #undef oil_scalarmultiply_f64_ns void oil_scalarmultiply_f64_ns (double * d, const double * s1, const double * s2_1, int n) { if (_oil_function_class_scalarmultiply_f64_ns.func == NULL) { oil_class_optimize (&_oil_function_class_scalarmultiply_f64_ns); } ((void (*)(double * d, const double * s1, const double * s2_1, int n))(_oil_function_class_scalarmultiply_f64_ns.func))(d, s1, s2_1, n); } #undef oil_scaleconv_f32_s16 void oil_scaleconv_f32_s16 (float * dest, const int16_t * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_f32_s16.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_f32_s16); } ((void (*)(float * dest, const int16_t * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_f32_s16.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_f32_s32 void oil_scaleconv_f32_s32 (float * dest, const int32_t * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_f32_s32.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_f32_s32); } ((void (*)(float * dest, const int32_t * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_f32_s32.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_f32_s8 void oil_scaleconv_f32_s8 (float * dest, const int8_t * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_f32_s8.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_f32_s8); } ((void (*)(float * dest, const int8_t * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_f32_s8.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_f32_u16 void oil_scaleconv_f32_u16 (float * dest, const uint16_t * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_f32_u16.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_f32_u16); } ((void (*)(float * dest, const uint16_t * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_f32_u16.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_f32_u32 void oil_scaleconv_f32_u32 (float * dest, const uint32_t * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_f32_u32.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_f32_u32); } ((void (*)(float * dest, const uint32_t * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_f32_u32.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_f32_u8 void oil_scaleconv_f32_u8 (float * dest, const uint8_t * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_f32_u8.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_f32_u8); } ((void (*)(float * dest, const uint8_t * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_f32_u8.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_f64_s16 void oil_scaleconv_f64_s16 (double * dest, const int16_t * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_f64_s16.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_f64_s16); } ((void (*)(double * dest, const int16_t * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_f64_s16.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_f64_s32 void oil_scaleconv_f64_s32 (double * dest, const int32_t * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_f64_s32.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_f64_s32); } ((void (*)(double * dest, const int32_t * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_f64_s32.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_f64_s8 void oil_scaleconv_f64_s8 (double * dest, const int8_t * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_f64_s8.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_f64_s8); } ((void (*)(double * dest, const int8_t * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_f64_s8.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_f64_u16 void oil_scaleconv_f64_u16 (double * dest, const uint16_t * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_f64_u16.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_f64_u16); } ((void (*)(double * dest, const uint16_t * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_f64_u16.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_f64_u32 void oil_scaleconv_f64_u32 (double * dest, const uint32_t * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_f64_u32.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_f64_u32); } ((void (*)(double * dest, const uint32_t * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_f64_u32.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_f64_u8 void oil_scaleconv_f64_u8 (double * dest, const uint8_t * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_f64_u8.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_f64_u8); } ((void (*)(double * dest, const uint8_t * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_f64_u8.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_s16_f32 void oil_scaleconv_s16_f32 (int16_t * dest, const float * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_s16_f32.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_s16_f32); } ((void (*)(int16_t * dest, const float * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_s16_f32.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_s16_f64 void oil_scaleconv_s16_f64 (int16_t * dest, const double * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_s16_f64.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_s16_f64); } ((void (*)(int16_t * dest, const double * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_s16_f64.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_s32_f32 void oil_scaleconv_s32_f32 (int32_t * dest, const float * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_s32_f32.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_s32_f32); } ((void (*)(int32_t * dest, const float * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_s32_f32.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_s32_f64 void oil_scaleconv_s32_f64 (int32_t * dest, const double * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_s32_f64.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_s32_f64); } ((void (*)(int32_t * dest, const double * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_s32_f64.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_s8_f32 void oil_scaleconv_s8_f32 (int8_t * dest, const float * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_s8_f32.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_s8_f32); } ((void (*)(int8_t * dest, const float * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_s8_f32.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_s8_f64 void oil_scaleconv_s8_f64 (int8_t * dest, const double * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_s8_f64.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_s8_f64); } ((void (*)(int8_t * dest, const double * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_s8_f64.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_u16_f32 void oil_scaleconv_u16_f32 (uint16_t * dest, const float * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_u16_f32.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_u16_f32); } ((void (*)(uint16_t * dest, const float * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_u16_f32.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_u16_f64 void oil_scaleconv_u16_f64 (uint16_t * dest, const double * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_u16_f64.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_u16_f64); } ((void (*)(uint16_t * dest, const double * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_u16_f64.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_u32_f32 void oil_scaleconv_u32_f32 (uint32_t * dest, const float * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_u32_f32.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_u32_f32); } ((void (*)(uint32_t * dest, const float * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_u32_f32.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_u32_f64 void oil_scaleconv_u32_f64 (uint32_t * dest, const double * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_u32_f64.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_u32_f64); } ((void (*)(uint32_t * dest, const double * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_u32_f64.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_u8_f32 void oil_scaleconv_u8_f32 (uint8_t * dest, const float * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_u8_f32.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_u8_f32); } ((void (*)(uint8_t * dest, const float * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_u8_f32.func))(dest, src, n, s2_1, s3_1); } #undef oil_scaleconv_u8_f64 void oil_scaleconv_u8_f64 (uint8_t * dest, const double * src, int n, const double * s2_1, const double * s3_1) { if (_oil_function_class_scaleconv_u8_f64.func == NULL) { oil_class_optimize (&_oil_function_class_scaleconv_u8_f64); } ((void (*)(uint8_t * dest, const double * src, int n, const double * s2_1, const double * s3_1))(_oil_function_class_scaleconv_u8_f64.func))(dest, src, n, s2_1, s3_1); } #undef oil_scanlinescale2_u8 void oil_scanlinescale2_u8 (uint8_t * d, const uint8_t * s, int n) { if (_oil_function_class_scanlinescale2_u8.func == NULL) { oil_class_optimize (&_oil_function_class_scanlinescale2_u8); } ((void (*)(uint8_t * d, const uint8_t * s, int n))(_oil_function_class_scanlinescale2_u8.func))(d, s, n); } #undef oil_sign_f32 void oil_sign_f32 (float * d, const float * s, int n) { if (_oil_function_class_sign_f32.func == NULL) { oil_class_optimize (&_oil_function_class_sign_f32); } ((void (*)(float * d, const float * s, int n))(_oil_function_class_sign_f32.func))(d, s, n); } #undef oil_sincos_f64 void oil_sincos_f64 (double * dest1, double * dest2, int n, const double * s1_1, const double * s2_1) { if (_oil_function_class_sincos_f64.func == NULL) { oil_class_optimize (&_oil_function_class_sincos_f64); } ((void (*)(double * dest1, double * dest2, int n, const double * s1_1, const double * s2_1))(_oil_function_class_sincos_f64.func))(dest1, dest2, n, s1_1, s2_1); } #undef oil_splat_u16_ns void oil_splat_u16_ns (uint16_t * dest, const uint16_t * s1_1, int n) { if (_oil_function_class_splat_u16_ns.func == NULL) { oil_class_optimize (&_oil_function_class_splat_u16_ns); } ((void (*)(uint16_t * dest, const uint16_t * s1_1, int n))(_oil_function_class_splat_u16_ns.func))(dest, s1_1, n); } #undef oil_splat_u32 void oil_splat_u32 (uint32_t * dest, int dstr, const uint32_t * s1_1, int n) { if (_oil_function_class_splat_u32.func == NULL) { oil_class_optimize (&_oil_function_class_splat_u32); } ((void (*)(uint32_t * dest, int dstr, const uint32_t * s1_1, int n))(_oil_function_class_splat_u32.func))(dest, dstr, s1_1, n); } #undef oil_splat_u32_ns void oil_splat_u32_ns (uint32_t * dest, const uint32_t * s1_1, int n) { if (_oil_function_class_splat_u32_ns.func == NULL) { oil_class_optimize (&_oil_function_class_splat_u32_ns); } ((void (*)(uint32_t * dest, const uint32_t * s1_1, int n))(_oil_function_class_splat_u32_ns.func))(dest, s1_1, n); } #undef oil_splat_u8 void oil_splat_u8 (uint8_t * dest, int dstr, const uint8_t * s1_1, int n) { if (_oil_function_class_splat_u8.func == NULL) { oil_class_optimize (&_oil_function_class_splat_u8); } ((void (*)(uint8_t * dest, int dstr, const uint8_t * s1_1, int n))(_oil_function_class_splat_u8.func))(dest, dstr, s1_1, n); } #undef oil_splat_u8_ns void oil_splat_u8_ns (uint8_t * dest, const uint8_t * s1_1, int n) { if (_oil_function_class_splat_u8_ns.func == NULL) { oil_class_optimize (&_oil_function_class_splat_u8_ns); } ((void (*)(uint8_t * dest, const uint8_t * s1_1, int n))(_oil_function_class_splat_u8_ns.func))(dest, s1_1, n); } #undef oil_split_135 void oil_split_135 (int16_t * d_2xn, const int16_t * s_2xn, int n) { if (_oil_function_class_split_135.func == NULL) { oil_class_optimize (&_oil_function_class_split_135); } ((void (*)(int16_t * d_2xn, const int16_t * s_2xn, int n))(_oil_function_class_split_135.func))(d_2xn, s_2xn, n); } #undef oil_split_53 void oil_split_53 (int16_t * d_2xn, const int16_t * s_2xn, int n) { if (_oil_function_class_split_53.func == NULL) { oil_class_optimize (&_oil_function_class_split_53); } ((void (*)(int16_t * d_2xn, const int16_t * s_2xn, int n))(_oil_function_class_split_53.func))(d_2xn, s_2xn, n); } #undef oil_split_approx97 void oil_split_approx97 (int16_t * d_2xn, const int16_t * s_2xn, int n) { if (_oil_function_class_split_approx97.func == NULL) { oil_class_optimize (&_oil_function_class_split_approx97); } ((void (*)(int16_t * d_2xn, const int16_t * s_2xn, int n))(_oil_function_class_split_approx97.func))(d_2xn, s_2xn, n); } #undef oil_split_daub97 void oil_split_daub97 (int16_t * d_2xn, const int16_t * s_2xn, int n) { if (_oil_function_class_split_daub97.func == NULL) { oil_class_optimize (&_oil_function_class_split_daub97); } ((void (*)(int16_t * d_2xn, const int16_t * s_2xn, int n))(_oil_function_class_split_daub97.func))(d_2xn, s_2xn, n); } #undef oil_squaresum_f32 void oil_squaresum_f32 (float * d, const float * s, int n) { if (_oil_function_class_squaresum_f32.func == NULL) { oil_class_optimize (&_oil_function_class_squaresum_f32); } ((void (*)(float * d, const float * s, int n))(_oil_function_class_squaresum_f32.func))(d, s, n); } #undef oil_squaresum_f64 void oil_squaresum_f64 (double * d, const double * s, int n) { if (_oil_function_class_squaresum_f64.func == NULL) { oil_class_optimize (&_oil_function_class_squaresum_f64); } ((void (*)(double * d, const double * s, int n))(_oil_function_class_squaresum_f64.func))(d, s, n); } #undef oil_squaresum_shifted_s16 void oil_squaresum_shifted_s16 (uint32_t * d, const int16_t * s, int n) { if (_oil_function_class_squaresum_shifted_s16.func == NULL) { oil_class_optimize (&_oil_function_class_squaresum_shifted_s16); } ((void (*)(uint32_t * d, const int16_t * s, int n))(_oil_function_class_squaresum_shifted_s16.func))(d, s, n); } #undef oil_subtract_f32 void oil_subtract_f32 (float * d, const float * s1, const float * s2, int n) { if (_oil_function_class_subtract_f32.func == NULL) { oil_class_optimize (&_oil_function_class_subtract_f32); } ((void (*)(float * d, const float * s1, const float * s2, int n))(_oil_function_class_subtract_f32.func))(d, s1, s2, n); } #undef oil_subtract_f64 void oil_subtract_f64 (double * d, const double * s1, const double * s2, int n) { if (_oil_function_class_subtract_f64.func == NULL) { oil_class_optimize (&_oil_function_class_subtract_f64); } ((void (*)(double * d, const double * s1, const double * s2, int n))(_oil_function_class_subtract_f64.func))(d, s1, s2, n); } #undef oil_subtract_s16 void oil_subtract_s16 (int16_t * d, const int16_t * src1, const int16_t * src2, int n) { if (_oil_function_class_subtract_s16.func == NULL) { oil_class_optimize (&_oil_function_class_subtract_s16); } ((void (*)(int16_t * d, const int16_t * src1, const int16_t * src2, int n))(_oil_function_class_subtract_s16.func))(d, src1, src2, n); } #undef oil_subtract_s16_u8 void oil_subtract_s16_u8 (int16_t * d, const int16_t * src1, const uint8_t * src2, int n) { if (_oil_function_class_subtract_s16_u8.func == NULL) { oil_class_optimize (&_oil_function_class_subtract_s16_u8); } ((void (*)(int16_t * d, const int16_t * src1, const uint8_t * src2, int n))(_oil_function_class_subtract_s16_u8.func))(d, src1, src2, n); } #undef oil_sum_f64 void oil_sum_f64 (double * d_1, const double * s, int sstr, int n) { if (_oil_function_class_sum_f64.func == NULL) { oil_class_optimize (&_oil_function_class_sum_f64); } ((void (*)(double * d_1, const double * s, int sstr, int n))(_oil_function_class_sum_f64.func))(d_1, s, sstr, n); } #undef oil_sum_s16 void oil_sum_s16 (int16_t * d_1, const int16_t * s, int n) { if (_oil_function_class_sum_s16.func == NULL) { oil_class_optimize (&_oil_function_class_sum_s16); } ((void (*)(int16_t * d_1, const int16_t * s, int n))(_oil_function_class_sum_s16.func))(d_1, s, n); } #undef oil_swab_u16 void oil_swab_u16 (uint16_t * d_n, const uint16_t * s_n, int n) { if (_oil_function_class_swab_u16.func == NULL) { oil_class_optimize (&_oil_function_class_swab_u16); } ((void (*)(uint16_t * d_n, const uint16_t * s_n, int n))(_oil_function_class_swab_u16.func))(d_n, s_n, n); } #undef oil_swab_u32 void oil_swab_u32 (uint32_t * d_n, const uint32_t * s_n, int n) { if (_oil_function_class_swab_u32.func == NULL) { oil_class_optimize (&_oil_function_class_swab_u32); } ((void (*)(uint32_t * d_n, const uint32_t * s_n, int n))(_oil_function_class_swab_u32.func))(d_n, s_n, n); } #undef oil_synth_135 void oil_synth_135 (int16_t * d_2xn, const int16_t * s_2xn, int n) { if (_oil_function_class_synth_135.func == NULL) { oil_class_optimize (&_oil_function_class_synth_135); } ((void (*)(int16_t * d_2xn, const int16_t * s_2xn, int n))(_oil_function_class_synth_135.func))(d_2xn, s_2xn, n); } #undef oil_synth_53 void oil_synth_53 (int16_t * d_2xn, const int16_t * s_2xn, int n) { if (_oil_function_class_synth_53.func == NULL) { oil_class_optimize (&_oil_function_class_synth_53); } ((void (*)(int16_t * d_2xn, const int16_t * s_2xn, int n))(_oil_function_class_synth_53.func))(d_2xn, s_2xn, n); } #undef oil_synth_approx97 void oil_synth_approx97 (int16_t * d_2xn, const int16_t * s_2xn, int n) { if (_oil_function_class_synth_approx97.func == NULL) { oil_class_optimize (&_oil_function_class_synth_approx97); } ((void (*)(int16_t * d_2xn, const int16_t * s_2xn, int n))(_oil_function_class_synth_approx97.func))(d_2xn, s_2xn, n); } #undef oil_synth_daub97 void oil_synth_daub97 (int16_t * d_2xn, const int16_t * s_2xn, int n) { if (_oil_function_class_synth_daub97.func == NULL) { oil_class_optimize (&_oil_function_class_synth_daub97); } ((void (*)(int16_t * d_2xn, const int16_t * s_2xn, int n))(_oil_function_class_synth_daub97.func))(d_2xn, s_2xn, n); } #undef oil_tablelookup_u8 void oil_tablelookup_u8 (uint8_t * d, int ds, const uint8_t * s1, int ss1, const uint8_t * s2_256, int ss2, int n) { if (_oil_function_class_tablelookup_u8.func == NULL) { oil_class_optimize (&_oil_function_class_tablelookup_u8); } ((void (*)(uint8_t * d, int ds, const uint8_t * s1, int ss1, const uint8_t * s2_256, int ss2, int n))(_oil_function_class_tablelookup_u8.func))(d, ds, s1, ss1, s2_256, ss2, n); } #undef oil_testzero_u8 void oil_testzero_u8 (uint32_t * d_1, const uint8_t * s, int n) { if (_oil_function_class_testzero_u8.func == NULL) { oil_class_optimize (&_oil_function_class_testzero_u8); } ((void (*)(uint32_t * d_1, const uint8_t * s, int n))(_oil_function_class_testzero_u8.func))(d_1, s, n); } #undef oil_trans8x8_f64 void oil_trans8x8_f64 (double * d_8x8, int ds, const double * s_8x8, int ss) { if (_oil_function_class_trans8x8_f64.func == NULL) { oil_class_optimize (&_oil_function_class_trans8x8_f64); } ((void (*)(double * d_8x8, int ds, const double * s_8x8, int ss))(_oil_function_class_trans8x8_f64.func))(d_8x8, ds, s_8x8, ss); } #undef oil_trans8x8_u16 void oil_trans8x8_u16 (uint16_t * d_8x8, int ds, const uint16_t * s_8x8, int ss) { if (_oil_function_class_trans8x8_u16.func == NULL) { oil_class_optimize (&_oil_function_class_trans8x8_u16); } ((void (*)(uint16_t * d_8x8, int ds, const uint16_t * s_8x8, int ss))(_oil_function_class_trans8x8_u16.func))(d_8x8, ds, s_8x8, ss); } #undef oil_trans8x8_u32 void oil_trans8x8_u32 (uint32_t * d_8x8, int ds, const uint32_t * s_8x8, int ss) { if (_oil_function_class_trans8x8_u32.func == NULL) { oil_class_optimize (&_oil_function_class_trans8x8_u32); } ((void (*)(uint32_t * d_8x8, int ds, const uint32_t * s_8x8, int ss))(_oil_function_class_trans8x8_u32.func))(d_8x8, ds, s_8x8, ss); } #undef oil_trans8x8_u8 void oil_trans8x8_u8 (uint8_t * d_8x8, int ds, const uint8_t * s_8x8, int ss) { if (_oil_function_class_trans8x8_u8.func == NULL) { oil_class_optimize (&_oil_function_class_trans8x8_u8); } ((void (*)(uint8_t * d_8x8, int ds, const uint8_t * s_8x8, int ss))(_oil_function_class_trans8x8_u8.func))(d_8x8, ds, s_8x8, ss); } #undef oil_unpackyuyv void oil_unpackyuyv (uint8_t * d1_nx2, uint8_t * d2, uint8_t * d3, const uint32_t * s, int n) { if (_oil_function_class_unpackyuyv.func == NULL) { oil_class_optimize (&_oil_function_class_unpackyuyv); } ((void (*)(uint8_t * d1_nx2, uint8_t * d2, uint8_t * d3, const uint32_t * s, int n))(_oil_function_class_unpackyuyv.func))(d1_nx2, d2, d3, s, n); } #undef oil_unzigzag8x8_s16 void oil_unzigzag8x8_s16 (int16_t * d_8x8, int ds, const int16_t * s_8x8, int ss) { if (_oil_function_class_unzigzag8x8_s16.func == NULL) { oil_class_optimize (&_oil_function_class_unzigzag8x8_s16); } ((void (*)(int16_t * d_8x8, int ds, const int16_t * s_8x8, int ss))(_oil_function_class_unzigzag8x8_s16.func))(d_8x8, ds, s_8x8, ss); } #undef oil_utf8_validate void oil_utf8_validate (int32_t * d_1, const uint8_t * s, int n) { if (_oil_function_class_utf8_validate.func == NULL) { oil_class_optimize (&_oil_function_class_utf8_validate); } ((void (*)(int32_t * d_1, const uint8_t * s, int n))(_oil_function_class_utf8_validate.func))(d_1, s, n); } #undef oil_uyvy2ayuv void oil_uyvy2ayuv (uint32_t * d_n, const uint32_t * s_n, int n) { if (_oil_function_class_uyvy2ayuv.func == NULL) { oil_class_optimize (&_oil_function_class_uyvy2ayuv); } ((void (*)(uint32_t * d_n, const uint32_t * s_n, int n))(_oil_function_class_uyvy2ayuv.func))(d_n, s_n, n); } #undef oil_vectoradd_f32 void oil_vectoradd_f32 (float * d, int dstr, const float * s1, int sstr1, const float * s2, int sstr2, int n, const float * s3_1, const float * s4_1) { if (_oil_function_class_vectoradd_f32.func == NULL) { oil_class_optimize (&_oil_function_class_vectoradd_f32); } ((void (*)(float * d, int dstr, const float * s1, int sstr1, const float * s2, int sstr2, int n, const float * s3_1, const float * s4_1))(_oil_function_class_vectoradd_f32.func))(d, dstr, s1, sstr1, s2, sstr2, n, s3_1, s4_1); } #undef oil_vectoradd_f64 void oil_vectoradd_f64 (double * d, int dstr, const double * s1, int sstr1, const double * s2, int sstr2, int n, const double * s3_1, const double * s4_1) { if (_oil_function_class_vectoradd_f64.func == NULL) { oil_class_optimize (&_oil_function_class_vectoradd_f64); } ((void (*)(double * d, int dstr, const double * s1, int sstr1, const double * s2, int sstr2, int n, const double * s3_1, const double * s4_1))(_oil_function_class_vectoradd_f64.func))(d, dstr, s1, sstr1, s2, sstr2, n, s3_1, s4_1); } #undef oil_vectoradd_s16 void oil_vectoradd_s16 (int16_t * d, int dstr, const int16_t * s1, int sstr1, const int16_t * s2, int sstr2, int n, const int16_t * s3_1, const int16_t * s4_1) { if (_oil_function_class_vectoradd_s16.func == NULL) { oil_class_optimize (&_oil_function_class_vectoradd_s16); } ((void (*)(int16_t * d, int dstr, const int16_t * s1, int sstr1, const int16_t * s2, int sstr2, int n, const int16_t * s3_1, const int16_t * s4_1))(_oil_function_class_vectoradd_s16.func))(d, dstr, s1, sstr1, s2, sstr2, n, s3_1, s4_1); } #undef oil_vectoradd_s32 void oil_vectoradd_s32 (int32_t * d, int dstr, const int32_t * s1, int sstr1, const int32_t * s2, int sstr2, int n, const int32_t * s3_1, const int32_t * s4_1) { if (_oil_function_class_vectoradd_s32.func == NULL) { oil_class_optimize (&_oil_function_class_vectoradd_s32); } ((void (*)(int32_t * d, int dstr, const int32_t * s1, int sstr1, const int32_t * s2, int sstr2, int n, const int32_t * s3_1, const int32_t * s4_1))(_oil_function_class_vectoradd_s32.func))(d, dstr, s1, sstr1, s2, sstr2, n, s3_1, s4_1); } #undef oil_vectoradd_s8 void oil_vectoradd_s8 (int8_t * d, int dstr, const int8_t * s1, int sstr1, const int8_t * s2, int sstr2, int n, const int8_t * s3_1, const int8_t * s4_1) { if (_oil_function_class_vectoradd_s8.func == NULL) { oil_class_optimize (&_oil_function_class_vectoradd_s8); } ((void (*)(int8_t * d, int dstr, const int8_t * s1, int sstr1, const int8_t * s2, int sstr2, int n, const int8_t * s3_1, const int8_t * s4_1))(_oil_function_class_vectoradd_s8.func))(d, dstr, s1, sstr1, s2, sstr2, n, s3_1, s4_1); } #undef oil_vectoradd_s_f32 void oil_vectoradd_s_f32 (float * d, int dstr, const float * s1, int sstr1, const float * s2, int sstr2, int n) { if (_oil_function_class_vectoradd_s_f32.func == NULL) { oil_class_optimize (&_oil_function_class_vectoradd_s_f32); } ((void (*)(float * d, int dstr, const float * s1, int sstr1, const float * s2, int sstr2, int n))(_oil_function_class_vectoradd_s_f32.func))(d, dstr, s1, sstr1, s2, sstr2, n); } #undef oil_vectoradd_s_f64 void oil_vectoradd_s_f64 (double * d, int dstr, const double * s1, int sstr1, const double * s2, int sstr2, int n) { if (_oil_function_class_vectoradd_s_f64.func == NULL) { oil_class_optimize (&_oil_function_class_vectoradd_s_f64); } ((void (*)(double * d, int dstr, const double * s1, int sstr1, const double * s2, int sstr2, int n))(_oil_function_class_vectoradd_s_f64.func))(d, dstr, s1, sstr1, s2, sstr2, n); } #undef oil_vectoradd_s_s16 void oil_vectoradd_s_s16 (int16_t * d, int dstr, const int16_t * s1, int sstr1, const int16_t * s2, int sstr2, int n) { if (_oil_function_class_vectoradd_s_s16.func == NULL) { oil_class_optimize (&_oil_function_class_vectoradd_s_s16); } ((void (*)(int16_t * d, int dstr, const int16_t * s1, int sstr1, const int16_t * s2, int sstr2, int n))(_oil_function_class_vectoradd_s_s16.func))(d, dstr, s1, sstr1, s2, sstr2, n); } #undef oil_vectoradd_s_s8 void oil_vectoradd_s_s8 (int8_t * d, int dstr, const int8_t * s1, int sstr1, const int8_t * s2, int sstr2, int n) { if (_oil_function_class_vectoradd_s_s8.func == NULL) { oil_class_optimize (&_oil_function_class_vectoradd_s_s8); } ((void (*)(int8_t * d, int dstr, const int8_t * s1, int sstr1, const int8_t * s2, int sstr2, int n))(_oil_function_class_vectoradd_s_s8.func))(d, dstr, s1, sstr1, s2, sstr2, n); } #undef oil_vectoradd_s_u16 void oil_vectoradd_s_u16 (uint16_t * d, int dstr, const uint16_t * s1, int sstr1, const uint16_t * s2, int sstr2, int n) { if (_oil_function_class_vectoradd_s_u16.func == NULL) { oil_class_optimize (&_oil_function_class_vectoradd_s_u16); } ((void (*)(uint16_t * d, int dstr, const uint16_t * s1, int sstr1, const uint16_t * s2, int sstr2, int n))(_oil_function_class_vectoradd_s_u16.func))(d, dstr, s1, sstr1, s2, sstr2, n); } #undef oil_vectoradd_s_u8 void oil_vectoradd_s_u8 (uint8_t * d, int dstr, const uint8_t * s1, int sstr1, const uint8_t * s2, int sstr2, int n) { if (_oil_function_class_vectoradd_s_u8.func == NULL) { oil_class_optimize (&_oil_function_class_vectoradd_s_u8); } ((void (*)(uint8_t * d, int dstr, const uint8_t * s1, int sstr1, const uint8_t * s2, int sstr2, int n))(_oil_function_class_vectoradd_s_u8.func))(d, dstr, s1, sstr1, s2, sstr2, n); } #undef oil_vectoradd_u16 void oil_vectoradd_u16 (uint16_t * d, int dstr, const uint16_t * s1, int sstr1, const uint16_t * s2, int sstr2, int n, const uint16_t * s3_1, const uint16_t * s4_1) { if (_oil_function_class_vectoradd_u16.func == NULL) { oil_class_optimize (&_oil_function_class_vectoradd_u16); } ((void (*)(uint16_t * d, int dstr, const uint16_t * s1, int sstr1, const uint16_t * s2, int sstr2, int n, const uint16_t * s3_1, const uint16_t * s4_1))(_oil_function_class_vectoradd_u16.func))(d, dstr, s1, sstr1, s2, sstr2, n, s3_1, s4_1); } #undef oil_vectoradd_u32 void oil_vectoradd_u32 (uint32_t * d, int dstr, const uint32_t * s1, int sstr1, const uint32_t * s2, int sstr2, int n, const uint32_t * s3_1, const uint32_t * s4_1) { if (_oil_function_class_vectoradd_u32.func == NULL) { oil_class_optimize (&_oil_function_class_vectoradd_u32); } ((void (*)(uint32_t * d, int dstr, const uint32_t * s1, int sstr1, const uint32_t * s2, int sstr2, int n, const uint32_t * s3_1, const uint32_t * s4_1))(_oil_function_class_vectoradd_u32.func))(d, dstr, s1, sstr1, s2, sstr2, n, s3_1, s4_1); } #undef oil_vectoradd_u8 void oil_vectoradd_u8 (uint8_t * d, int dstr, const uint8_t * s1, int sstr1, const uint8_t * s2, int sstr2, int n, const uint8_t * s3_1, const uint8_t * s4_1) { if (_oil_function_class_vectoradd_u8.func == NULL) { oil_class_optimize (&_oil_function_class_vectoradd_u8); } ((void (*)(uint8_t * d, int dstr, const uint8_t * s1, int sstr1, const uint8_t * s2, int sstr2, int n, const uint8_t * s3_1, const uint8_t * s4_1))(_oil_function_class_vectoradd_u8.func))(d, dstr, s1, sstr1, s2, sstr2, n, s3_1, s4_1); } #undef oil_yuv2rgbx_sub2_u8 void oil_yuv2rgbx_sub2_u8 (uint8_t * d_4xn, const uint8_t * src1, const uint8_t * src2, const uint8_t * src3, int n) { if (_oil_function_class_yuv2rgbx_sub2_u8.func == NULL) { oil_class_optimize (&_oil_function_class_yuv2rgbx_sub2_u8); } ((void (*)(uint8_t * d_4xn, const uint8_t * src1, const uint8_t * src2, const uint8_t * src3, int n))(_oil_function_class_yuv2rgbx_sub2_u8.func))(d_4xn, src1, src2, src3, n); } #undef oil_yuv2rgbx_sub4_u8 void oil_yuv2rgbx_sub4_u8 (uint8_t * d_4xn, const uint8_t * src1, const uint8_t * src2, const uint8_t * src3, int n) { if (_oil_function_class_yuv2rgbx_sub4_u8.func == NULL) { oil_class_optimize (&_oil_function_class_yuv2rgbx_sub4_u8); } ((void (*)(uint8_t * d_4xn, const uint8_t * src1, const uint8_t * src2, const uint8_t * src3, int n))(_oil_function_class_yuv2rgbx_sub4_u8.func))(d_4xn, src1, src2, src3, n); } #undef oil_yuv2rgbx_u8 void oil_yuv2rgbx_u8 (uint8_t * d_4xn, const uint8_t * src1, const uint8_t * src2, const uint8_t * src3, int n) { if (_oil_function_class_yuv2rgbx_u8.func == NULL) { oil_class_optimize (&_oil_function_class_yuv2rgbx_u8); } ((void (*)(uint8_t * d_4xn, const uint8_t * src1, const uint8_t * src2, const uint8_t * src3, int n))(_oil_function_class_yuv2rgbx_u8.func))(d_4xn, src1, src2, src3, n); } #undef oil_yuyv2ayuv void oil_yuyv2ayuv (uint32_t * d_n, const uint32_t * s_n, int n) { if (_oil_function_class_yuyv2ayuv.func == NULL) { oil_class_optimize (&_oil_function_class_yuyv2ayuv); } ((void (*)(uint32_t * d_n, const uint32_t * s_n, int n))(_oil_function_class_yuyv2ayuv.func))(d_n, s_n, n); } #undef oil_yvyu2ayuv void oil_yvyu2ayuv (uint32_t * d_n, const uint32_t * s_n, int n) { if (_oil_function_class_yvyu2ayuv.func == NULL) { oil_class_optimize (&_oil_function_class_yvyu2ayuv); } ((void (*)(uint32_t * d_n, const uint32_t * s_n, int n))(_oil_function_class_yvyu2ayuv.func))(d_n, s_n, n); } #undef oil_zigzag8x8_s16 void oil_zigzag8x8_s16 (int16_t * d_8x8, int ds, const int16_t * s_8x8, int ss) { if (_oil_function_class_zigzag8x8_s16.func == NULL) { oil_class_optimize (&_oil_function_class_zigzag8x8_s16); } ((void (*)(int16_t * d_8x8, int ds, const int16_t * s_8x8, int ss))(_oil_function_class_zigzag8x8_s16.func))(d_8x8, ds, s_8x8, ss); } liboil-0.3.17/liboil/liboilcpu.c0000644000175000017500000001132011265637226013404 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif #include #include #include #include #include #include #ifdef HAVE_SYS_TIME_H #include #endif #include #if defined(__FreeBSD__) #include #include #endif #ifdef __sun #include #endif /** * SECTION:liboilcpu * @title: CPU * @short_description: Check the capabilities of the current CPU * */ void oil_cpu_detect_arch(void); unsigned long oil_cpu_flags; extern unsigned long (*_oil_profile_stamp)(void); #ifdef HAVE_GETTIMEOFDAY static unsigned long oil_profile_stamp_gtod (void) { struct timeval tv; gettimeofday(&tv,NULL); return 1000000*(unsigned long)tv.tv_sec + (unsigned long)tv.tv_usec; } #endif #if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_MONOTONIC_CLOCK) static unsigned long oil_profile_stamp_clock_gettime (void) { struct timespec ts; clock_gettime (CLOCK_MONOTONIC, &ts); return 1000000000*ts.tv_sec + ts.tv_nsec; } #endif static unsigned long oil_profile_stamp_zero (void) { return 0; } void _oil_cpu_init (void) { const char *envvar; OIL_INFO ("checking architecture"); oil_cpu_detect_arch(); envvar = getenv ("OIL_CPU_FLAGS"); if (envvar != NULL) { char *end = NULL; unsigned long flags; flags = strtoul (envvar, &end, 0); if (end > envvar) { oil_cpu_flags = flags; } OIL_INFO ("cpu flags from environment %08lx", oil_cpu_flags); } OIL_INFO ("cpu flags %08lx", oil_cpu_flags); #if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_MONOTONIC_CLOCK) if (_oil_profile_stamp == NULL) { _oil_profile_stamp = oil_profile_stamp_clock_gettime; OIL_INFO("Using clock_gettime() as a timestamp function."); } #endif #ifdef HAVE_GETTIMEOFDAY if (_oil_profile_stamp == NULL) { _oil_profile_stamp = oil_profile_stamp_gtod; OIL_WARNING("Using gettimeofday() as a timestamp function."); } #endif if (_oil_profile_stamp == NULL) { _oil_profile_stamp = oil_profile_stamp_zero; OIL_ERROR("No timestamping function. This is kinda bad."); } } /** * oil_cpu_get_flags: * * Returns a bitmask containing the available CPU features. * * Returns: the CPU features. */ unsigned int oil_cpu_get_flags (void) { return oil_cpu_flags; } #if 0 /** * oil_cpu_get_ticks_per_second: * * Returns the estimated number of ticks per second. This feature * is currently unimplemented. * * This function may take several milliseconds or more to execute * in order to calculate a good estimate of the number of ticks (as * measured by the profiling functions) per second. Note that the * number of ticks per second is often dependent on the CPU frequency, * which can change dynamically. Thus the value returned by this * function may be incorrect as soon as it is returned. * * Returns: a double */ double oil_cpu_get_ticks_per_second (void) { return _oil_ticks_per_second; } #endif double oil_cpu_get_frequency (void) { #if defined(__linux__) int freq; if (get_file_int ("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", &freq)) { return 1000.0 * freq; } return 0; #else return 0; #endif } liboil-0.3.17/liboil/math/0000777000175000017500000000000011332637375012276 500000000000000liboil-0.3.17/liboil/math/Makefile.am0000644000175000017500000000064610717203073014242 00000000000000 EXTRA_DIST = generate_math.pl if USE_ALT_OPT opt_libs = libmath_opt1.la else opt_libs = endif noinst_LTLIBRARIES = libmath.la $(opt_libs) libmath_la_SOURCES = math.c ag_math.c libmath_la_LIBADD = $(opt_libs) libmath_la_CFLAGS = $(LIBOIL_CFLAGS) libmath_opt1_la_SOURCES = $(c_sources) libmath_opt1_la_CFLAGS = $(LIBOIL_CFLAGS) $(LIBOIL_OPT_CFLAGS) ag_math.c: generate_math.pl $(srcdir)/generate_math.pl >ag_math.c liboil-0.3.17/liboil/math/ag_math.c0000644000175000017500000003765410717203073013763 00000000000000/* This file is autogenerated. Do not edit. */ /* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include static void add_f32_pointer (oil_type_f32 *dest, oil_type_f32 *src1, oil_type_f32 *src2, int n) { while (n) { *dest = *src1 + *src2; dest++; src1++; src2++; n--; } } OIL_DEFINE_IMPL (add_f32_pointer, add_f32); static void add_f32_unroll2 (oil_type_f32 *dest, oil_type_f32 *src1, oil_type_f32 *src2, int n) { int i; if (n & 1) { dest[0] = src1[0] + src2[0]; dest++; src1++; src2++; n--; } for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include EOF ; sub binary_pointer { my $kernel = shift; my $precision = shift; my $type = "oil_type_$precision"; my $operator = shift; print < "+", "subtract" => "-", "multiply" => "*", "divide" => "/" ); my @types = ( "f32", "f64" ); while ( ($name, $op) = each %binary_operators ) { foreach $prec (@types) { binary_pointer($name, $prec, $op); binary_unroll2($name, $prec, $op); binary_unroll4a($name, $prec, $op); binary_unroll4b($name, $prec, $op); binary_unroll4c($name, $prec, $op); } } exit 0; binary_pointer("subtract", "f32", "-"); binary_unroll2("subtract", "f32", "-"); binary_unroll4a("subtract", "f32", "-"); binary_unroll4b("subtract", "f32", "-"); binary_unroll4c("subtract", "f32", "-"); binary_pointer("add", "f32", "+"); binary_unroll2("add", "f32", "+"); binary_unroll4a("add", "f32", "+"); binary_unroll4b("add", "f32", "+"); binary_unroll4c("add", "f32", "+"); binary_pointer("multiply", "f32", "*"); binary_unroll2("multiply", "f32", "*"); binary_unroll4a("multiply", "f32", "*"); binary_unroll4b("multiply", "f32", "*"); binary_unroll4c("multiply", "f32", "*"); binary_pointer("divide", "f32", "/"); binary_unroll2("divide", "f32", "/"); binary_unroll4a("divide", "f32", "/"); binary_unroll4b("divide", "f32", "/"); binary_unroll4c("divide", "f32", "/"); binary_pointer("subtract", "f64", "-"); binary_unroll2("subtract", "f64", "-"); binary_unroll4a("subtract", "f64", "-"); binary_unroll4b("subtract", "f64", "-"); binary_unroll4c("subtract", "f64", "-"); binary_pointer("add", "f64", "+"); binary_unroll2("add", "f64", "+"); binary_unroll4a("add", "f64", "+"); binary_unroll4b("add", "f64", "+"); binary_unroll4c("add", "f64", "+"); binary_pointer("multiply", "f64", "*"); binary_unroll2("multiply", "f64", "*"); binary_unroll4a("multiply", "f64", "*"); binary_unroll4b("multiply", "f64", "*"); binary_unroll4c("multiply", "f64", "*"); binary_pointer("divide", "f64", "/"); binary_unroll2("divide", "f64", "/"); binary_unroll4a("divide", "f64", "/"); binary_unroll4b("divide", "f64", "/"); binary_unroll4c("divide", "f64", "/"); $blah = " static void subtract_f32_ref (float *dest, float *src1, float *src2, int n) { int i; for(i=0;i src2[i]) ? src1[i] : src2[i]; } } OIL_DEFINE_IMPL_REF (maximum_f32_ref, maximum_f32); static void negative_f32_ref (float *dest, float *src1, int n) { int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #if 0 static void add_f32_unroll4 (float *dest, float *src1, float *src2, int n) { int i; for(i=0;i<(n&(~0x3));i+=4){ dest[i+0] = src1[i+0] + src2[i+0]; dest[i+1] = src1[i+1] + src2[i+1]; dest[i+2] = src1[i+2] + src2[i+2]; dest[i+3] = src1[i+3] + src2[i+3]; } for(;iag_math.c # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/liboilutils.c0000644000175000017500000000707011067011142013743 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #ifdef HAVE_UNISTD_H #include #endif #include #include #include int get_file_int (const char *file, int *value) { char buffer[20]; char *endptr; int fd; int n; fd = open (file, O_RDONLY); if (fd < 0) return 0; n = read(fd, buffer, 19); close(fd); if (n < 0) { return 0; } buffer[n] = 0; *value = strtol (buffer, &endptr, 0); if (endptr[0] == 0 || endptr[0] == '\n') return 1; return 0; } char * get_file (const char *filename) { char *cpuinfo; int fd; int n; cpuinfo = malloc(4096); if (cpuinfo == NULL) return NULL; fd = open(filename, O_RDONLY); if (fd < 0) { free (cpuinfo); return NULL; } n = read(fd, cpuinfo, 4095); if (n < 0) { free (cpuinfo); close (fd); return NULL; } cpuinfo[n] = 0; close (fd); return cpuinfo; } char * get_cpuinfo_line (char *cpuinfo, const char *tag) { char *flags; char *end; char *colon; flags = strstr(cpuinfo,tag); if (flags == NULL) return NULL; end = strchr(flags, '\n'); if (end == NULL) return NULL; colon = strchr (flags, ':'); if (colon == NULL) return NULL; colon++; if(colon >= end) return NULL; return _strndup (colon, end-colon); } char * _strndup (const char *s, int n) { char *r; r = malloc (n+1); memcpy(r,s,n); r[n]=0; return r; } char ** strsplit (char *s) { char **list = NULL; char *tok; int n = 0; while (*s == ' ') s++; list = malloc (1 * sizeof(char *)); while (*s) { tok = s; while (*s && *s != ' ') s++; list[n] = _strndup (tok, s - tok); while (*s && *s == ' ') s++; list = realloc (list, (n + 2) * sizeof(char *)); n++; } list[n] = NULL; return list; } char * get_tag_value (char *s, const char *tag) { char *flags; char *end; char *colon; flags = strstr(s,tag); if (flags == NULL) return NULL; end = strchr(flags, '\n'); if (end == NULL) return NULL; colon = strchr (flags, ':'); if (colon == NULL) return NULL; colon++; if(colon >= end) return NULL; return _strndup (colon, end-colon); } liboil-0.3.17/liboil/liboildebug.c0000644000175000017500000000735310717203073013704 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include /** * SECTION:liboildebug * @title: Debug * @short_description: Printing and formatting debug information */ static void oil_debug_print_valist (int level, const char *file, const char *func, int line, const char *format, va_list args); static int _oil_debug_level = OIL_DEBUG_ERROR; static OilDebugPrintFunc _oil_debug_print_func = oil_debug_print_valist; void _oil_debug_init(void) { const char *envvar; envvar = getenv ("OIL_DEBUG"); if (envvar != NULL) { char *end = NULL; int level; level = strtol (envvar, &end, 0); if (end > envvar) { _oil_debug_level = level; } } OIL_INFO ("liboil-" VERSION " debug init"); } static void oil_debug_print_valist (int level, const char *file, const char *func, int line, const char *format, va_list args) { static const char *level_names[] = { "NONE", "ERROR", "WARNING", "INFO", "DEBUG", "LOG" }; const char *level_name = "unknown"; if (level > _oil_debug_level) return; if(level>=OIL_DEBUG_NONE && level<=OIL_DEBUG_LOG){ level_name = level_names[level]; } fprintf (stderr, "OIL: %s %s %d: %s(): ", level_name, file, line, func); vfprintf (stderr, format, args); fprintf (stderr, "\n"); } void oil_debug_print (int level, const char *file, const char *func, int line, const char *format, ...) { va_list var_args; va_start (var_args, format); _oil_debug_print_func (level, file, func, line, format, var_args); va_end (var_args); } /** * oil_debug_get_level: * * Gets the current debug level. * * Returns: the current debug level */ int oil_debug_get_level (void) { return _oil_debug_level; } /** * oil_debug_set_level: * @level: the new debug level * * Sets the current debug level. */ void oil_debug_set_level (int level) { _oil_debug_level = level; } /** * oil_debug_set_print_function: * @func: * * Sets the function to call when outputting debugging information. * A value of NULL for @func will restore the default handler, * which prints debugging information to stderr. */ void oil_debug_set_print_function (OilDebugPrintFunc func) { if (func) { _oil_debug_print_func = func; } else { _oil_debug_print_func = oil_debug_print_valist; } } liboil-0.3.17/liboil/mmx/0000777000175000017500000000000011332637375012146 500000000000000liboil-0.3.17/liboil/mmx/composite_mmx.c0000644000175000017500000000363610717203073015107 00000000000000/* * Copyright (c) 2005 * Eric Anholt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include static void composite_add_u8_const_src_mmx (uint8_t *dest, uint8_t *src1_1, int n) { __m64 xmm0; uint8_t add = *src1_1; xmm0 = _mm_set1_pi8(add); for (; n >= 8; n -= 8) { *(__m64 *)dest = _mm_adds_pu8(xmm0, *(__m64 *)dest); dest += 8; } for (; n > 0; n--) { int val = *dest + add; if (val > 255) val = 255; *dest++ = val; } _mm_empty(); } OIL_DEFINE_IMPL_FULL (composite_add_u8_const_src_mmx, composite_add_u8_const_src, OIL_IMPL_FLAG_MMX); liboil-0.3.17/liboil/mmx/copy_mmx.c0000644000175000017500000000440511131504056014046 00000000000000/* * Copyright (c) 2005 * Eric Anholt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include static void copy_u8_mmx (uint8_t *dest, const uint8_t *src, int n) { for (; n >= 8; n -= 8) { *(__m64 *)dest = *(__m64 *)src; src += 8; dest += 8; } for (; n > 0; n--) { *dest++ = *src++; } _mm_empty(); } OIL_DEFINE_IMPL_FULL (copy_u8_mmx, copy_u8, OIL_IMPL_FLAG_MMX); static void copy_u8_mmx_unroll4 (uint8_t *dest, const uint8_t *src, int n) { for (; n >= 32; n -= 32) { ((__m64 *)dest)[0] = ((__m64 *)src)[0]; ((__m64 *)dest)[1] = ((__m64 *)src)[1]; ((__m64 *)dest)[2] = ((__m64 *)src)[2]; ((__m64 *)dest)[3] = ((__m64 *)src)[3]; src += 32; dest += 32; } for (; n >= 8; n -= 8) { *(__m64 *)dest = *(__m64 *)src; src += 8; dest += 8; } for (; n > 0; n--) { *dest++ = *src++; } _mm_empty(); } OIL_DEFINE_IMPL_FULL (copy_u8_mmx_unroll4, copy_u8, OIL_IMPL_FLAG_MMX); liboil-0.3.17/liboil/mmx/Makefile.am0000644000175000017500000000025510717203073014106 00000000000000 noinst_LTLIBRARIES = libmmx.la libmmx_la_SOURCES = \ composite_mmx.c \ copy_mmx.c \ recon8x8_mmx.c \ splat_mmx.c libmmx_la_CFLAGS = $(MMX_CFLAGS) $(LIBOIL_CFLAGS) liboil-0.3.17/liboil/mmx/recon8x8_mmx.c0000644000175000017500000000710611066774524014573 00000000000000/* * Copyright (c) 2005 * Eric Anholt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #ifdef ENABLE_BROKEN_IMPLS union m64_int { __m64 m64; uint64_t ull; }; static const struct _MMXData { union m64_int mmx_4x0080; } c = { .mmx_4x0080.ull = 0x0080008000800080ULL, }; #define MC(x) (c.mmx_##x.m64) static void recon8x8_intra_mmx (uint8_t *dest, int ds, int16_t *change) { int i; __m64 offset = MC(4x0080); for (i = 8; i; i--) { __m64 mm0, mm1, c0, c1; c0 = ((__m64 *)change)[0]; c1 = ((__m64 *)change)[1]; mm0 = _mm_adds_pi16(c0, offset); mm1 = _mm_adds_pi16(c1, offset); *(__m64 *)dest = _mm_packs_pu16(mm0, mm1); dest += ds; change += 8; } _mm_empty(); } OIL_DEFINE_IMPL_FULL (recon8x8_intra_mmx, recon8x8_intra, OIL_IMPL_FLAG_MMX); #endif static void recon8x8_inter_mmx (uint8_t *dest, int ds, uint8_t *src, int ss, int16_t *change, int dss) { int i; for (i = 8; i; i--) { __m64 mm0, mm1, c0, c1; c0 = ((__m64 *)change)[0]; c1 = ((__m64 *)change)[1]; mm0 = _mm_unpacklo_pi8(*(__m64 *)src, _mm_setzero_si64()); mm1 = _mm_unpackhi_pi8(*(__m64 *)src, _mm_setzero_si64()); mm0 = _mm_adds_pi16(mm0, c0); mm1 = _mm_adds_pi16(mm1, c1); *(__m64 *)dest = _mm_packs_pu16(mm0, mm1); change += 8; dest += ds; src += ss; } _mm_empty(); } OIL_DEFINE_IMPL_FULL (recon8x8_inter_mmx, recon8x8_inter, OIL_IMPL_FLAG_MMX); static void recon8x8_inter2_mmx (uint8_t *dest, int ds, uint8_t *s1, int ss1, uint8_t *s2, int ss2, int16_t *change) { int i; for (i = 8; i; i--) { __m64 mm0, mm1, c0, c1; mm0 = _mm_adds_pu16( _mm_unpacklo_pi8(*(__m64 *)s1, _mm_setzero_si64()), _mm_unpacklo_pi8(*(__m64 *)s2, _mm_setzero_si64())); mm1 = _mm_adds_pu16( _mm_unpackhi_pi8(*(__m64 *)s1, _mm_setzero_si64()), _mm_unpackhi_pi8(*(__m64 *)s2, _mm_setzero_si64())); c0 = ((__m64 *)change)[0]; c1 = ((__m64 *)change)[1]; mm0 = _mm_srli_pi16(mm0, 1); mm1 = _mm_srli_pi16(mm1, 1); mm0 = _mm_adds_pi16(mm0, c0); mm1 = _mm_adds_pi16(mm1, c1); *(__m64 *)dest = _mm_packs_pu16(mm0, mm1); change += 8; dest += ds; s1 += ss1; s2 += ss2; } _mm_empty(); } OIL_DEFINE_IMPL_FULL (recon8x8_inter2_mmx, recon8x8_inter2, OIL_IMPL_FLAG_MMX); liboil-0.3.17/liboil/mmx/Makefile.in0000644000175000017500000004665711332627673014151 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = liboil/mmx DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmmx_la_LIBADD = am_libmmx_la_OBJECTS = libmmx_la-composite_mmx.lo \ libmmx_la-copy_mmx.lo libmmx_la-recon8x8_mmx.lo \ libmmx_la-splat_mmx.lo libmmx_la_OBJECTS = $(am_libmmx_la_OBJECTS) libmmx_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmmx_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libmmx_la_SOURCES) DIST_SOURCES = $(libmmx_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmmx.la libmmx_la_SOURCES = \ composite_mmx.c \ copy_mmx.c \ recon8x8_mmx.c \ splat_mmx.c libmmx_la_CFLAGS = $(MMX_CFLAGS) $(LIBOIL_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/mmx/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/mmx/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmmx.la: $(libmmx_la_OBJECTS) $(libmmx_la_DEPENDENCIES) $(libmmx_la_LINK) $(libmmx_la_OBJECTS) $(libmmx_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmmx_la-composite_mmx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmmx_la-copy_mmx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmmx_la-recon8x8_mmx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmmx_la-splat_mmx.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libmmx_la-composite_mmx.lo: composite_mmx.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmmx_la_CFLAGS) $(CFLAGS) -MT libmmx_la-composite_mmx.lo -MD -MP -MF $(DEPDIR)/libmmx_la-composite_mmx.Tpo -c -o libmmx_la-composite_mmx.lo `test -f 'composite_mmx.c' || echo '$(srcdir)/'`composite_mmx.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmmx_la-composite_mmx.Tpo $(DEPDIR)/libmmx_la-composite_mmx.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='composite_mmx.c' object='libmmx_la-composite_mmx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmmx_la_CFLAGS) $(CFLAGS) -c -o libmmx_la-composite_mmx.lo `test -f 'composite_mmx.c' || echo '$(srcdir)/'`composite_mmx.c libmmx_la-copy_mmx.lo: copy_mmx.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmmx_la_CFLAGS) $(CFLAGS) -MT libmmx_la-copy_mmx.lo -MD -MP -MF $(DEPDIR)/libmmx_la-copy_mmx.Tpo -c -o libmmx_la-copy_mmx.lo `test -f 'copy_mmx.c' || echo '$(srcdir)/'`copy_mmx.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmmx_la-copy_mmx.Tpo $(DEPDIR)/libmmx_la-copy_mmx.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy_mmx.c' object='libmmx_la-copy_mmx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmmx_la_CFLAGS) $(CFLAGS) -c -o libmmx_la-copy_mmx.lo `test -f 'copy_mmx.c' || echo '$(srcdir)/'`copy_mmx.c libmmx_la-recon8x8_mmx.lo: recon8x8_mmx.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmmx_la_CFLAGS) $(CFLAGS) -MT libmmx_la-recon8x8_mmx.lo -MD -MP -MF $(DEPDIR)/libmmx_la-recon8x8_mmx.Tpo -c -o libmmx_la-recon8x8_mmx.lo `test -f 'recon8x8_mmx.c' || echo '$(srcdir)/'`recon8x8_mmx.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmmx_la-recon8x8_mmx.Tpo $(DEPDIR)/libmmx_la-recon8x8_mmx.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='recon8x8_mmx.c' object='libmmx_la-recon8x8_mmx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmmx_la_CFLAGS) $(CFLAGS) -c -o libmmx_la-recon8x8_mmx.lo `test -f 'recon8x8_mmx.c' || echo '$(srcdir)/'`recon8x8_mmx.c libmmx_la-splat_mmx.lo: splat_mmx.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmmx_la_CFLAGS) $(CFLAGS) -MT libmmx_la-splat_mmx.lo -MD -MP -MF $(DEPDIR)/libmmx_la-splat_mmx.Tpo -c -o libmmx_la-splat_mmx.lo `test -f 'splat_mmx.c' || echo '$(srcdir)/'`splat_mmx.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libmmx_la-splat_mmx.Tpo $(DEPDIR)/libmmx_la-splat_mmx.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='splat_mmx.c' object='libmmx_la-splat_mmx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmmx_la_CFLAGS) $(CFLAGS) -c -o libmmx_la-splat_mmx.lo `test -f 'splat_mmx.c' || echo '$(srcdir)/'`splat_mmx.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/mmx/splat_mmx.c0000644000175000017500000000606410717203073014226 00000000000000/* * Copyright (c) 2005 * Eric Anholt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include static void splat_u32_ns_mmx (uint32_t *dest, const uint32_t *param, int n) { __m64 v; v = _mm_set1_pi32(*param); for (; n >= 2; n -= 2) { *(__m64 *)dest = v; dest += 2; } for (; n > 0; n--) { *dest++ = *param; } _mm_empty(); } OIL_DEFINE_IMPL_FULL (splat_u32_ns_mmx, splat_u32_ns, OIL_IMPL_FLAG_MMX); static void splat_u32_ns_mmx_unroll4 (uint32_t *dest, const uint32_t *param, int n) { __m64 v; v = _mm_set1_pi32(*param); for (; n >= 8; n -= 8) { ((__m64 *)dest)[0] = v; ((__m64 *)dest)[1] = v; ((__m64 *)dest)[2] = v; ((__m64 *)dest)[3] = v; dest += 8; } for (; n >= 2; n -= 2) { *(__m64 *)dest = v; dest += 2; } for (; n > 0; n--) { *dest++ = *param; } _mm_empty(); } OIL_DEFINE_IMPL_FULL (splat_u32_ns_mmx_unroll4, splat_u32_ns, OIL_IMPL_FLAG_MMX); static void splat_u8_ns_mmx (uint8_t *dest, const uint8_t *param, int n) { __m64 v; v = _mm_set1_pi8(*param); for (; n >= 8; n -= 8) { *(__m64 *)dest = v; dest += 8; } for (; n > 0; n--) { *dest++ = *param; } _mm_empty(); } OIL_DEFINE_IMPL_FULL (splat_u8_ns_mmx, splat_u8_ns, OIL_IMPL_FLAG_MMX); static void splat_u8_ns_mmx_unroll4 (uint8_t *dest, const uint8_t *param, int n) { __m64 v; v = _mm_set1_pi8(*param); for (; n >= 32; n -= 32) { ((__m64 *)dest)[0] = v; ((__m64 *)dest)[1] = v; ((__m64 *)dest)[2] = v; ((__m64 *)dest)[3] = v; dest += 32; } for (; n >= 8; n -= 8) { *(__m64 *)dest = v; dest += 8; } for (; n > 0; n--) { *dest++ = *param; } _mm_empty(); } OIL_DEFINE_IMPL_FULL (splat_u8_ns_mmx_unroll4, splat_u8_ns, OIL_IMPL_FLAG_MMX); liboil-0.3.17/liboil/liboilparameter.h0000644000175000017500000000661311066774524014615 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_PARAMETER_H_ #define _LIBOIL_PARAMETER_H_ #include #include OIL_BEGIN_DECLS #ifdef OIL_ENABLE_UNSTABLE_API /** * OilType: * * Enumeration containing the data types understood by Liboil. */ typedef enum { OIL_TYPE_UNKNOWN = 0, OIL_TYPE_INT, OIL_TYPE_s8, OIL_TYPE_u8, OIL_TYPE_s16, OIL_TYPE_u16, OIL_TYPE_s32, OIL_TYPE_u32, OIL_TYPE_s64, OIL_TYPE_u64, OIL_TYPE_f32, OIL_TYPE_f64, OIL_TYPE_s8p, OIL_TYPE_u8p, OIL_TYPE_s16p, OIL_TYPE_u16p, OIL_TYPE_s32p, OIL_TYPE_u32p, OIL_TYPE_s64p, OIL_TYPE_u64p, OIL_TYPE_f32p, OIL_TYPE_f64p, } OilType; /** * OilArgType: * * Enumeration containing the types of parameter types understood * by Liboil. */ typedef enum { OIL_ARG_UNKNOWN = 0, OIL_ARG_N, OIL_ARG_M, OIL_ARG_DEST1, OIL_ARG_DSTR1, OIL_ARG_DEST2, OIL_ARG_DSTR2, OIL_ARG_DEST3, OIL_ARG_DSTR3, OIL_ARG_SRC1, OIL_ARG_SSTR1, OIL_ARG_SRC2, OIL_ARG_SSTR2, OIL_ARG_SRC3, OIL_ARG_SSTR3, OIL_ARG_SRC4, OIL_ARG_SSTR4, OIL_ARG_SRC5, OIL_ARG_SSTR5, OIL_ARG_INPLACE1, OIL_ARG_ISTR1, OIL_ARG_INPLACE2, OIL_ARG_ISTR2, OIL_ARG_LAST } OilArgType; /** * OilParameter: * * An opaque structure representing a single parameter in the * function prototype of an OilFunctionClass. */ struct _OilParameter { /*< private >*/ char *type_name; char *parameter_name; int order; OilType type; int direction; int is_pointer; int is_stride; int index; int prestride_length; int prestride_var; int poststride_length; int poststride_var; OilArgType parameter_type; uint8_t *src_data; uint8_t *ref_data; uint8_t *test_data; unsigned long value; int pre_n; int post_n; int stride; int size; int guard; int test_header; int test_footer; }; void *oil_param_get_source_data (OilParameter *param); int oil_param_from_string (OilParameter *p, char *s); #define oil_type_is_floating_point(type) \ (((type) == OIL_TYPE_f64p) || ((type) == OIL_TYPE_f32p)) #endif OIL_END_DECLS #endif liboil-0.3.17/liboil/liboilcpu-x86.c0000644000175000017500000002172611151570265014033 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #ifdef HAVE_UNISTD_H #include #endif #include #include #include #include #include #include #ifdef HAVE_SYS_TIME_H #include #endif #include #if defined(__FreeBSD__) || defined(__APPLE__) #include #include #endif #ifdef __sun #include #endif /***** i386, amd64 *****/ #if defined(__sun) #define USE_I386_GETISAX #else #define USE_I386_CPUID #endif #ifdef USE_I386_CPUINFO static void oil_cpu_i386_getflags_cpuinfo (char *cpuinfo) { char *cpuinfo_flags; char **flags; char **f; cpuinfo_flags = get_tag_value (cpuinfo, "flags"); if (cpuinfo_flags == NULL) { free (cpuinfo); return; } flags = strsplit(cpuinfo_flags); for (f = flags; *f; f++) { if (strcmp (*f, "cmov") == 0) { OIL_DEBUG ("cpu flag %s", *f); oil_cpu_flags |= OIL_IMPL_FLAG_CMOV; } if (strcmp (*f, "mmx") == 0) { OIL_DEBUG ("cpu flag %s", *f); oil_cpu_flags |= OIL_IMPL_FLAG_MMX; } if (strcmp (*f, "sse") == 0) { OIL_DEBUG ("cpu flag %s", *f); oil_cpu_flags |= OIL_IMPL_FLAG_SSE; } if (strcmp (*f, "mmxext") == 0) { OIL_DEBUG ("cpu flag %s", *f); oil_cpu_flags |= OIL_IMPL_FLAG_MMXEXT; } if (strcmp (*f, "sse2") == 0) { OIL_DEBUG ("cpu flag %s", *f); oil_cpu_flags |= OIL_IMPL_FLAG_SSE2; oil_cpu_flags |= OIL_IMPL_FLAG_MMXEXT; } if (strcmp (*f, "3dnow") == 0) { OIL_DEBUG ("cpu flag %s", *f); oil_cpu_flags |= OIL_IMPL_FLAG_3DNOW; } if (strcmp (*f, "3dnowext") == 0) { OIL_DEBUG ("cpu flag %s", *f); oil_cpu_flags |= OIL_IMPL_FLAG_3DNOWEXT; } if (strcmp (*f, "sse3") == 0) { OIL_DEBUG ("cpu flag %s", *f); oil_cpu_flags |= OIL_IMPL_FLAG_SSE3; oil_cpu_flags |= OIL_IMPL_FLAG_SSE2; oil_cpu_flags |= OIL_IMPL_FLAG_MMXEXT; } if (strcmp (*f, "ssse3") == 0) { OIL_DEBUG ("cpu flag %s", *f); oil_cpu_flags |= OIL_IMPL_FLAG_SSSE3; oil_cpu_flags |= OIL_IMPL_FLAG_SSE3; oil_cpu_flags |= OIL_IMPL_FLAG_SSE2; oil_cpu_flags |= OIL_IMPL_FLAG_MMXEXT; } free (*f); } free (flags); free (cpuinfo); free (cpuinfo_flags); } #endif #ifdef HAVE_GCC_ASM static unsigned long oil_profile_stamp_rdtsc(void) { unsigned long ts; __asm__ __volatile__("rdtsc\n" : "=a" (ts) : : "edx"); return ts; } #endif #ifdef USE_I386_CPUID #ifdef __i386__ static void get_cpuid (uint32_t op, uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d) { __asm__ ( " pushl %%ebx\n" " cpuid\n" " mov %%ebx, %%esi\n" " popl %%ebx\n" : "=a" (*a), "=S" (*b), "=c" (*c), "=d" (*d) : "0" (op)); } #endif #ifdef __amd64__ static void get_cpuid (uint32_t op, uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d) { __asm__ ( " pushq %%rbx\n" " cpuid\n" " mov %%ebx, %%esi\n" " popq %%rbx\n" : "=a" (*a), "=S" (*b), "=c" (*c), "=d" (*d) : "0" (op)); } #endif static void test_cpuid (void *ignored) { uint32_t eax, ebx, ecx, edx; get_cpuid (0x00000000, &eax, &ebx, &ecx, &edx); } static void oil_cpu_detect_cpuid (void) { uint32_t eax, ebx, ecx, edx; uint32_t level; char vendor[13] = { 0 }; int ret; oil_fault_check_enable (); ret = oil_fault_check_try(test_cpuid, NULL); oil_fault_check_disable (); if (!ret) { /* CPU thinks cpuid is an illegal instruction. */ return; } get_cpuid (0x00000000, &level, (uint32_t *)(vendor+0), (uint32_t *)(vendor+8), (uint32_t *)(vendor+4)); OIL_DEBUG("cpuid %d %s", level, vendor); if (level < 1) { return; } get_cpuid (0x00000001, &eax, &ebx, &ecx, &edx); #ifdef HAVE_GCC_ASM if (edx & (1<<4)) { _oil_profile_stamp = oil_profile_stamp_rdtsc; } #endif /* Intel flags */ if (edx & (1<<15)) { oil_cpu_flags |= OIL_IMPL_FLAG_CMOV; } if (edx & (1<<23)) { oil_cpu_flags |= OIL_IMPL_FLAG_MMX; } if (edx & (1<<25)) { oil_cpu_flags |= OIL_IMPL_FLAG_SSE; } if (edx & (1<<26)) { oil_cpu_flags |= OIL_IMPL_FLAG_SSE2; oil_cpu_flags |= OIL_IMPL_FLAG_MMXEXT; } if (ecx & (1<<0)) { oil_cpu_flags |= OIL_IMPL_FLAG_SSE3; } if (memcmp (vendor, "AuthenticAMD", 12) == 0) { get_cpuid (0x80000001, &eax, &ebx, &ecx, &edx); /* AMD flags */ if (edx & (1<<22)) { oil_cpu_flags |= OIL_IMPL_FLAG_MMXEXT; } if (edx & (1<<31)) { oil_cpu_flags |= OIL_IMPL_FLAG_3DNOW; } if (edx & (1<<30)) { oil_cpu_flags |= OIL_IMPL_FLAG_3DNOWEXT; } get_cpuid (0x80000005, &eax, &ebx, &ecx, &edx); OIL_INFO("L1 D-cache: %d kbytes, %d-way, %d lines/tag, %d line size", (ecx>>24)&0xff, (ecx>>16)&0xff, (ecx>>8)&0xff, ecx&0xff); OIL_INFO("L1 I-cache: %d kbytes, %d-way, %d lines/tag, %d line size", (edx>>24)&0xff, (edx>>16)&0xff, (edx>>8)&0xff, edx&0xff); get_cpuid (0x80000006, &eax, &ebx, &ecx, &edx); OIL_INFO("L2 cache: %d kbytes, %d assoc, %d lines/tag, %d line size", (ecx>>16)&0xffff, (ecx>>12)&0xf, (ecx>>8)&0xf, ecx&0xff); } } #endif #ifdef USE_I386_GETISAX static void oil_cpu_detect_getisax (void) { uint_t ui; getisax (&ui, 1); if (ui & AV_386_CMOV) { oil_cpu_flags |= OIL_IMPL_FLAG_CMOV; } if (ui & AV_386_MMX) { oil_cpu_flags |= OIL_IMPL_FLAG_MMX; } if (ui & AV_386_SSE) { oil_cpu_flags |= OIL_IMPL_FLAG_SSE; } if (ui & AV_386_SSE2) { oil_cpu_flags |= OIL_IMPL_FLAG_SSE2; oil_cpu_flags |= OIL_IMPL_FLAG_MMXEXT; } if (ui & AV_386_SSE3) { oil_cpu_flags |= OIL_IMPL_FLAG_SSE3; } if (ui & AV_386_AMD_3DNow) { oil_cpu_flags |= OIL_IMPL_FLAG_3DNOW; } if (ui & AV_386_AMD_3DNowx) { oil_cpu_flags |= OIL_IMPL_FLAG_3DNOWEXT; } if (ui & AV_386_AMD_MMX) { oil_cpu_flags |= OIL_IMPL_FLAG_MMXEXT; } } #endif /* Reduce the set of CPU capabilities detected by whatever detection mechanism * was chosen, according to kernel limitations. SSE requires kernel support for * use. */ static void oil_cpu_detect_kernel_support (void) { #if defined(__APPLE__) int ret, enabled; size_t len; len = sizeof(enabled); ret = sysctlbyname("hw.optional.sse", &enabled, &len, NULL, 0); if (ret || !enabled) { oil_cpu_flags &= ~(OIL_IMPL_FLAG_SSE | OIL_IMPL_FLAG_SSE2 | OIL_IMPL_FLAG_MMXEXT | OIL_IMPL_FLAG_SSE3); } #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) int ret, enabled; size_t len; len = sizeof(enabled); ret = sysctlbyname("hw.instruction_sse", &enabled, &len, NULL, 0); if (ret || !enabled) { oil_cpu_flags &= ~(OIL_IMPL_FLAG_SSE | OIL_IMPL_FLAG_SSE2 | OIL_IMPL_FLAG_MMXEXT | OIL_IMPL_FLAG_SSE3); } #elif defined(__linux__) /* * Might also want to grow a check for the old RedHat + Linux 2.2 * unmasked SSE FPU exception bug. Other than that, if /proc/cpuinfo * reported SSE, then it's safe. */ #elif defined(__sun) || defined(__NetBSD__) || defined(__OpenBSD__) /* Solaris/NetBSD/OpenBSD are OK */ #else OIL_WARNING("Operating system is not known to support SSE. " "Assuming it does, which might cause problems"); #if 0 oil_cpu_flags &= ~(OIL_IMPL_FLAG_SSE | OIL_IMPL_FLAG_SSE2 | OIL_IMPL_FLAG_MMXEXT | OIL_IMPL_FLAG_SSE3); #endif #endif } void oil_cpu_detect_arch(void) { #ifdef USE_I386_CPUID oil_cpu_detect_cpuid (); #endif #ifdef USE_I386_GETISAX oil_cpu_detect_getisax (); #endif #ifdef USE_I386_CPUINFO oil_cpu_detect_cpuinfo (); #endif oil_cpu_detect_kernel_support (); } liboil-0.3.17/liboil/liboil.h0000644000175000017500000000420610717203073012674 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_H_ #define _LIBOIL_H_ #include #include OIL_BEGIN_DECLS void oil_init (void); /** * oil_memcpy: * @dest: * @src: * @n_bytes: * * Macro that uses oil_copy_u8() to provide an implementation of * memcpy(). Note that oil_copy_u8() is optimized for short copies, * and may be very slow for large copies compared to alternatives, * including the system memcpy(). */ #define oil_memcpy(dest,src,n_bytes) \ oil_copy_u8((void *)(dest),(const void *)(src),(n_bytes)) /** * oil_trans8x8_s16: * @dest: * @dstr: * @src: * @sstr: * * Macro wrapping trans8x8_u16(). */ #define oil_trans8x8_s16(dest, dstr, src, sstr) \ oil_trans8x8_u16((uint16_t *)dest, dstr, (const uint16_t *)src, sstr) OIL_END_DECLS #endif liboil-0.3.17/liboil/liboilcolorspace.h0000644000175000017500000000771510717203073014757 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_COLORSPACE_H_ #define _LIBOIL_COLORSPACE_H_ #include OIL_BEGIN_DECLS #ifdef OIL_ENABLE_UNSTABLE_API /** * oil_max: * @x: a value * @y: a value * * Evaluates to the maximum of @x and @y. */ #define oil_max(x,y) ((x)>(y)?(x):(y)) /** * oil_min: * @x: a value * @y: a value * * Evaluates to the minimum of @x and @y. */ #define oil_min(x,y) ((x)<(y)?(x):(y)) /** * oil_clamp_255: * @x: a value * * Clamps @x to the range [0,255]. * * Evaluates to the clamped value. */ #define oil_clamp_255(x) oil_max(0,oil_min((x),255)) /** * oil_argb: * @a: alpha component * @r: red component * @g: green component * @b: blue component * * Creates a Liboil ARGB value from individual components. Clamps * each component to [0,255]. * * Evaluates to the ARGB value */ #define oil_argb(a,r,g,b) \ ((oil_clamp_255(a)<<24) | \ (oil_clamp_255(r)<<16) | \ (oil_clamp_255(g)<<8) | \ (oil_clamp_255(b)<<0)) /** * oil_argb_noclamp: * @a: alpha component * @r: red component * @g: green component * @b: blue component * * Creates a Liboil ARGB value from individual components. Does not * clamp components. * * Evaluates to the ARGB value */ #define oil_argb_noclamp(a,r,g,b) \ (((a)<<24) | ((r)<<16) | ((g)<<8) | ((b)<<0)) /** * oil_argb_A: * @color: an ARGB value * * Extracts the alpha component from @color. * * Evaluates to the alpha component */ #define oil_argb_A(color) (((color)>>24)&0xff) /** * oil_argb_R: * @color: an ARGB value * * Extracts the red component from @color. * * Evaluates to the red component */ #define oil_argb_R(color) (((color)>>16)&0xff) /** * oil_argb_G: * @color: an ARGB value * * Extracts the green component from @color. * * Evaluates to the green component */ #define oil_argb_G(color) (((color)>>8)&0xff) /** * oil_argb_B: * @color: an ARGB value * * Extracts the blue component from @color. * * Evaluates to the blue component */ #define oil_argb_B(color) (((color)>>0)&0xff) /** * oil_divide_255: * @x: a value in the range [0,65025] * * Divides @x by 255 in a way that is compatible with the pixel * operations in Liboil. The number 65025 is 255*255. * * Evaluates to @x divided by 255. */ #define oil_divide_255(x) ((((x)+128) + (((x)+128)>>8))>>8) /** * oil_muldiv_255: * @a: a value in the range [0,255] * @b: a value in the range [0,255] * * Multiplies @a and @b and divides the result by 255 in a way that * is compatible with the pixel operations in Liboil. * * Evaluates to the result. */ #define oil_muldiv_255(a,b) oil_divide_255((a)*(b)) #endif OIL_END_DECLS #endif liboil-0.3.17/liboil/build_prototypes_04.c0000644000175000017500000001164610717203073015335 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include static char * xstrdup (const char *s); void print_header (void); void print_footer (void); int main (int argc, char *argv[]) { OilFunctionClass *klass; OilPrototype *proto; int i; int n; char *string; oil_init_no_optimize (); print_header (); n = oil_class_get_n_classes (); for (i=0;iprototype) { proto = oil_prototype_from_string (klass->prototype); if (proto) { string = oil_prototype_to_string (proto); if (strlen (string) == 0) { free (string); string = xstrdup("void"); } printf ("void oil_%s (%s);\n",klass->name,string); oil_prototype_free (proto); free (string); } else { printf("/* ERROR: could not parse %s(%s) */\n", klass->name, klass->prototype); } } } print_footer (); return 0; } void print_header (void) { printf ("/*\n"); printf (" * LIBOIL - Library of Optimized Inner Loops\n"); printf (" * Copyright (c) 2004 David A. Schleef \n"); printf (" * All rights reserved.\n"); printf (" *\n"); printf (" * Redistribution and use in source and binary forms, with or without\n"); printf (" * modification, are permitted provided that the following conditions\n"); printf (" * are met:\n"); printf (" * 1. Redistributions of source code must retain the above copyright\n"); printf (" * notice, this list of conditions and the following disclaimer.\n"); printf (" * 2. Redistributions in binary form must reproduce the above copyright\n"); printf (" * notice, this list of conditions and the following disclaimer in the\n"); printf (" * documentation and/or other materials provided with the distribution.\n"); printf (" * \n"); printf (" * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n"); printf (" * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n"); printf (" * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n"); printf (" * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,\n"); printf (" * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n"); printf (" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n"); printf (" * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n"); printf (" * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n"); printf (" * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\n"); printf (" * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n"); printf (" * POSSIBILITY OF SUCH DAMAGE.\n"); printf (" */\n"); printf ("\n"); printf ("/* This file is automatically generated. Do not edit. */\n"); printf ("\n"); printf ("#ifndef _LIBOIL_FUNCS_H_\n"); printf ("#define _LIBOIL_FUNCS_H_\n"); printf ("\n"); printf ("#include \n"); printf ("\n"); printf ("#ifdef __cplusplus\n"); printf ("extern \"C\" {\n"); printf ("#endif\n"); printf ("\n"); } void print_footer (void) { printf ("\n"); printf ("#ifdef __cplusplus\n"); printf ("}\n"); printf ("#endif\n"); printf ("\n"); printf ("#endif\n"); printf ("\n"); } static char * xstrdup (const char *s) { int n = strlen(s); char *t; n = strlen(s); t = malloc(n + 1); memcpy (t, s, n); t[n] = 0; return t; } liboil-0.3.17/liboil/liboilfault.c0000644000175000017500000001067411067011142013722 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #ifdef _WIN32 #include #endif static jmp_buf jump_env; #ifdef HAVE_SIGACTION static struct sigaction action; static struct sigaction oldaction; #else static void * oldhandler; #endif static int in_try_block; static int enable_level; #ifdef _WIN32 static LONG __stdcall illegal_instruction_handler (EXCEPTION_POINTERS *e) { if (in_try_block) { /* according to the laws of win32, this isn't allowed. * It does, however, work. */ longjmp (jump_env, 1); } /* kill the process */ return EXCEPTION_EXECUTE_HANDLER; } #else static void illegal_instruction_handler (int num) { if (in_try_block) { //#ifdef HAVE_SIGPROCMASK sigset_t set; sigemptyset (&set); sigaddset (&set, SIGILL); sigprocmask (SIG_UNBLOCK, &set, NULL); //#endif longjmp (jump_env, 1); } else { abort (); } } #endif /** * oil_fault_check_enable: * * Enables fault checking mode. This function may be called multiple times. * Each call to this function must be paired with a corresponding call * to oil_fault_check_disable(). * * This function sets a signal handler for SIGILL. */ void oil_fault_check_enable (void) { if (enable_level == 0) { #ifndef _WIN32 #ifdef HAVE_SIGACTION memset (&action, 0, sizeof(action)); action.sa_handler = &illegal_instruction_handler; sigaction (SIGILL, &action, &oldaction); #else oldhandler = signal (SIGILL, illegal_instruction_handler); #endif #else oldhandler = SetUnhandledExceptionFilter(illegal_instruction_handler); #endif in_try_block = 0; OIL_INFO("enabling SIGILL handler. Make sure to continue past " "any SIGILL signals caught by gdb."); } enable_level++; } /** * oil_fault_check_try: * @func: the function to attempt * @priv: a value to pass to the function * * Calls to this * function must be preceded by a call to oil_fault_check_enable() * to enable fault checking mode. This function sets up recovery * information and then calls the function @func with the parameter * @priv. If @func or any other functions it calls attempt to execute * an illegal instruction, the exception will be caught and recovered from. * * Returns: 1 if the function was executed sucessfully, 0 if the * function attempted to execute an illegal instruction. */ int oil_fault_check_try (void (*func) (void *), void *priv) { int ret; in_try_block = 1; ret = setjmp (jump_env); if (!ret) { func (priv); } in_try_block = 0; return (ret == 0); } /** * oil_fault_check_disable: * * Disables fault checking mode. See oil_fault_check_enable() * for details. */ void oil_fault_check_disable (void) { enable_level--; if (enable_level == 0) { #ifndef _WIN32 #ifdef HAVE_SIGACTION sigaction (SIGILL, &oldaction, NULL); #else signal (SIGILL, oldhandler); #endif #else SetUnhandledExceptionFilter(oldhandler); #endif OIL_INFO("disabling SIGILL handler"); } } liboil-0.3.17/liboil/null.c0000644000175000017500000000330110717203073012362 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include /** * oil_null: * * Does nothing, and does it fast. * * This function is useful for testing the overhead of calling * a Liboil function. * */ OIL_DEFINE_CLASS (null, ""); static void null_ref (void) { } OIL_DEFINE_IMPL_REF (null_ref, null); liboil-0.3.17/liboil/liboilprototype.c0000644000175000017500000003741410726400052014660 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include /** * SECTION:liboilprototype * @title:OilPrototype * @short_description: * Functions to manipulate prototype information. * */ /** * SECTION:liboilparameter * @title: OilParameter * @short_description: * Functions to manipulate prototype parameter information. * */ #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif typedef struct _OilString OilString; struct _OilString { int len; int alloc_len; char *data; }; static OilType oil_type_from_string (const char *s, int ptr); static OilString *oil_string_new (const char *a); static void oil_string_append (OilString *s, const char *a); static char * oil_string_free (OilString *s, int free_seg); static char * parse_string (const char *s, const char **endptr); static int oil_prototype_check_sanity (OilPrototype *proto); /** * oil_prototype_append_param: * @proto: the OilPrototype * @param: an OilParameter * * Appends @param to the list of parameters contained in @proto. The * contents of @param are copied. */ void oil_prototype_append_param (OilPrototype *proto, OilParameter *param) { proto->n_params++; proto->params = realloc(proto->params, sizeof(OilParameter) * proto->n_params); proto->params[proto->n_params - 1] = *param; } /** * oil_prototype_to_string: * @proto: the OilPrototype * * Converts a prototype into the corresponding C style declaration. * * Returns: a string that should be freed using free() when it is no * longer needed. */ char * oil_prototype_to_string (OilPrototype *proto) { OilString *string; OilParameter *param; int i; string = oil_string_new (""); for(i=0;in_params;i++){ param = proto->params + i; if (param->parameter_type == OIL_ARG_SRC1 || param->parameter_type == OIL_ARG_SRC2 || param->parameter_type == OIL_ARG_SRC3 || param->parameter_type == OIL_ARG_SRC4 || param->parameter_type == OIL_ARG_SRC5) { oil_string_append (string, "const "); } if (param->type != OIL_TYPE_UNKNOWN) { oil_string_append (string, oil_type_name (param->type)); } else { oil_string_append (string, param->type_name); } oil_string_append (string, " "); oil_string_append (string, param->parameter_name); if(in_params-1){ oil_string_append (string, ", "); } } return oil_string_free (string, FALSE); } /** * oil_prototype_to_arg_string: * @proto: the OilPrototype * * Converts a prototype into the corresponding C argument list. * * Returns: a string that should be freed using free() when it is no * longer needed. */ char * oil_prototype_to_arg_string (OilPrototype *proto) { OilString *string; OilParameter *param; int i; string = oil_string_new (""); for(i=0;in_params;i++){ param = proto->params + i; oil_string_append (string, param->parameter_name); if(in_params-1){ oil_string_append (string, ", "); } } return oil_string_free (string, FALSE); } /** * oil_prototype_from_string: * @s: a string * * Converts the string @s containing C prototype that follows * Liboil parameter naming rules into a OilPrototype. If the * string cannot be converted, NULL is returned. * * Returns: the OilPrototype. When it is no longer needed, free * the prototype using oil_prototype_free(). */ OilPrototype * oil_prototype_from_string (const char *s) { OilPrototype *proto; OilParameter param = { 0 }; char *type_name; char *parameter_name; int ptr; int order = 0; proto = malloc (sizeof(OilPrototype)); memset (proto, 0, sizeof(OilPrototype)); while (isspace((int)*s))s++; while (*s) { type_name = parse_string (s, &s); while (isspace((int)*s))s++; ptr = FALSE; if(s[0] == '*'){ ptr = TRUE; s++; } while (isspace((int)*s))s++; parameter_name = parse_string (s, &s); while (isspace((int)*s))s++; if(s[0] == ','){ s++; } while (isspace((int)*s))s++; param.type = oil_type_from_string (type_name, ptr); param.type_name = type_name; param.parameter_name = parameter_name; oil_param_from_string (¶m, parameter_name); param.order = order; oil_prototype_append_param (proto, ¶m); if (param.type == OIL_TYPE_UNKNOWN || param.parameter_type == OIL_ARG_UNKNOWN) { OIL_ERROR ("bad type (%s) or parameter (%s)", type_name, parameter_name); oil_prototype_free (proto); return NULL; } order++; } if (!oil_prototype_check_sanity (proto)) { OIL_ERROR ("prototype failed sanity check"); oil_prototype_free (proto); return NULL; } return proto; } static int oil_prototype_check_sanity (OilPrototype *proto) { int i; int has_n; has_n = 0; for (i=0;in_params;i++){ if (proto->params[i].parameter_type == OIL_ARG_N) { has_n = 1; } } if (has_n == 0) { /* check that no parameter depends on n */ for(i=0;in_params;i++){ if (proto->params[i].is_stride) continue; if (proto->params[i].parameter_type == OIL_ARG_N) continue; if (proto->params[i].parameter_type == OIL_ARG_M) continue; if (proto->params[i].prestride_var == 1) return 0; if (proto->params[i].poststride_var == 1) return 0; } } return 1; } static char * parse_string (const char *s, const char **endptr) { const char *s0; s0 = s; while(isalnum((int)*s) || *s=='_') { s++; } *endptr = s; return _strndup(s0, s - s0); } /** * oil_prototype_free: * @proto: the OilPrototype * * Frees memory associated with @proto. */ void oil_prototype_free (OilPrototype *proto) { int i; if (proto->params) { for(i=0;in_params;i++) { if (proto->params[i].parameter_name) { free (proto->params[i].parameter_name); } if (proto->params[i].type_name) { free (proto->params[i].type_name); } } free (proto->params); } free (proto); } /* OilString */ static OilString * oil_string_new (const char *a) { OilString *s; s = malloc (sizeof(OilString)); memset (s, 0, sizeof(OilString)); if (a) { oil_string_append (s, a); } return s; } static void oil_string_append (OilString *s, const char *a) { int len = strlen (a); if (s->len + len + 1 > s->alloc_len) { s->alloc_len = s->len + len + 1; s->data = realloc (s->data, s->alloc_len); } memcpy (s->data + s->len, a, len + 1); s->len += len; } static char * oil_string_free (OilString *s, int free_seg) { char *data = s->data; free(s); if (free_seg) { free (data); return NULL; } return data; } /** * oil_type_sizeof: * @type: the OilType * * Looks up the size of the OilType represented by @type. * * Returns: the size of @type */ int oil_type_sizeof (OilType type) { switch (type) { case OIL_TYPE_UNKNOWN: case OIL_TYPE_INT: return 0; case OIL_TYPE_s8: case OIL_TYPE_u8: case OIL_TYPE_s8p: case OIL_TYPE_u8p: return 1; case OIL_TYPE_s16: case OIL_TYPE_u16: case OIL_TYPE_s16p: case OIL_TYPE_u16p: return 2; case OIL_TYPE_s32: case OIL_TYPE_u32: case OIL_TYPE_f32: case OIL_TYPE_s32p: case OIL_TYPE_u32p: case OIL_TYPE_f32p: return 4; case OIL_TYPE_s64: case OIL_TYPE_u64: case OIL_TYPE_f64: case OIL_TYPE_s64p: case OIL_TYPE_u64p: case OIL_TYPE_f64p: return 8; } return 0; } static const char *oil_type_names [] = { "unknown", "int", "int8_t", "uint8_t", "int16_t", "uint16_t", "int32_t", "uint32_t", "int64_t", "uint64_t", "float", "double", "int8_t *", "uint8_t *", "int16_t *", "uint16_t *", "int32_t *", "uint32_t *", "int64_t *", "uint64_t *", "float *", "double *" }; static const char *oil_type_names_2 [] = { "int8_t", "uint8_t", "int16_t", "uint16_t", "int32_t", "uint32_t", "int64_t", "uint64_t", "float", "double" }; static const char *oil_type_names_3 [] = { "oil_type_s8", "oil_type_u8", "oil_type_s16", "oil_type_u16", "oil_type_s32", "oil_type_u32", "oil_type_s64", "oil_type_u64", "oil_type_f32", "oil_type_f64" }; #define ARRAY_LENGTH(x) (sizeof(x)/sizeof(x[0])) /** * oil_type_name: * @type: an OilType * * Looks up the name of the OilType given by @type. * * Returns: a string containing the name of the OilType @type. */ const char * oil_type_name (OilType type) { if (type < 0 || type >= ARRAY_LENGTH(oil_type_names)) return "unknown"; return oil_type_names[type]; } static OilType oil_type_from_string (const char *s, int ptr) { int i; if (ptr) { for(i=0;iparameter_type = OIL_ARG_UNKNOWN; if (s[0] == 'n' && s[1] == 0) { p->direction = *s; p->is_stride = 0; p->is_pointer = 0; p->parameter_type = OIL_ARG_N; return 1; } if (s[0] == 'm' && s[1] == 0) { p->direction = *s; p->is_stride = 0; p->is_pointer = 0; p->parameter_type = OIL_ARG_M; return 1; } for(i=0;arg_aliases[i].from;i++){ if (strcmp (s,arg_aliases[i].from) == 0) { s = arg_aliases[i].to; break; } } p->direction = *s; switch (*s) { case 'i': break; case 's': break; case 'd': break; default: return 0; } s++; if (*s == 's') { p->is_stride = 1; p->is_pointer = 0; s++; } else { p->is_stride = 0; p->is_pointer = 1; } if (isdigit ((int)*s)) { p->index = *s - '0'; s++; } else { p->index = 1; } if (!p->is_stride && *s == '_') { int length; int var; s++; if (isdigit ((int)*s)) { length = strtoul (s, &s, 10); var = 0; } else if (*s == 'n' || *s == 'm') { var = (*s == 'n') ? 1 : 2; s++; if (*s == 'p') { s++; length = strtoul (s, &s, 10); } else { length = 0; } } else { return 0; } if (*s == 'x') { s++; p->prestride_length = length; p->prestride_var = var; if (isdigit ((int)*s)) { p->poststride_length = strtoul (s, &s, 10); p->poststride_var = 0; } else if (*s == 'n' || *s == 'm') { p->poststride_var = (*s == 'n') ? 1 : 2; s++; if (*s == 'p') { s++; p->poststride_length = strtoul (s, &s, 10); } else { p->poststride_length = 0; } } else { return 0; } } else { p->poststride_length = length; p->poststride_var = var; p->prestride_length = 1; p->prestride_var = 0; } } else { p->poststride_length = 0; p->poststride_var = 1; p->prestride_length = 1; p->prestride_var = 0; } if (*s != 0) { return 0; } p->parameter_type = OIL_ARG_UNKNOWN; for (i=0;arg_types[i].type != OIL_ARG_UNKNOWN; i++) { if (p->direction == arg_types[i].direction && p->is_stride == arg_types[i].is_stride && p->index == arg_types[i].index) { p->parameter_type = arg_types[i].type; break; } } if (p->parameter_type == OIL_ARG_UNKNOWN) { return 0; } return 1; } void *oil_param_get_source_data (OilParameter *param) { uint8_t *ptr; ptr = param->src_data; ptr += param->test_header; return ptr; } liboil-0.3.17/liboil/liboildebug.h0000644000175000017500000001001410717203073013675 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_DEBUG_H_ #define _LIBOIL_DEBUG_H_ #include #include OIL_BEGIN_DECLS #ifdef OIL_ENABLE_UNSTABLE_API /** * OilDebugPrintFunc: * @level: the debug level * @file: name of the file where the debug message occurs * @func: name of the function where the debug message occurs * @line: line in the file where the debug message occurs * @format: a printf format * @varargs: varargs for the printf format * * Typedef describing functions that can be registered using * oil_debug_set_print_function() so that it is called to * print debugging messages. */ typedef void (*OilDebugPrintFunc) (int level, const char *file, const char *func, int line, const char *format, va_list varargs); /** * OilDebugLevel: * * Enumeration describing debug levels in Liboil. */ typedef enum { OIL_DEBUG_NONE = 0, OIL_DEBUG_ERROR, OIL_DEBUG_WARNING, OIL_DEBUG_INFO, OIL_DEBUG_DEBUG, OIL_DEBUG_LOG } OilDebugLevel; /** * OIL_ERROR: * * Macro to call OIL_DEBUG_PRINT() with a level of #OIL_DEBUG_ERROR. */ #define OIL_ERROR(...) OIL_DEBUG_PRINT(OIL_DEBUG_ERROR, __VA_ARGS__) /** * OIL_WARNING: * * Macro to call OIL_DEBUG_PRINT() with a level of #OIL_DEBUG_WARNING. */ #define OIL_WARNING(...) OIL_DEBUG_PRINT(OIL_DEBUG_WARNING, __VA_ARGS__) /** * OIL_INFO: * * Macro to call OIL_DEBUG_PRINT() with a level of #OIL_DEBUG_INFO. */ #define OIL_INFO(...) OIL_DEBUG_PRINT(OIL_DEBUG_INFO, __VA_ARGS__) /** * OIL_DEBUG: * * Macro to call OIL_DEBUG_PRINT() with a level of #OIL_DEBUG_DEBUG. */ #define OIL_DEBUG(...) OIL_DEBUG_PRINT(OIL_DEBUG_DEBUG, __VA_ARGS__) /** * OIL_LOG: * * Macro to call OIL_DEBUG_PRINT() with a level of #OIL_DEBUG_LOG. */ #define OIL_LOG(...) OIL_DEBUG_PRINT(OIL_DEBUG_LOG, __VA_ARGS__) /** * OIL_FUNCTION: * * Internal macro that points to __PRETTY_FUNCTION__ or __func__ * if the former is not available. */ #if defined (__GNUC__) || defined (__PRETTY_FUNCTION__) #define OIL_FUNCTION __PRETTY_FUNCTION__ #elif defined(__func__) #define OIL_FUNCTION __func__ #else #define OIL_FUNCTION "" #endif /** * OIL_DEBUG_PRINT: * @level: * @...: * * Macro to call oil_debug_print() with the correct values for * the name of the source file, line of source file, and function. */ #define OIL_DEBUG_PRINT(level, ...) do { \ oil_debug_print((level), __FILE__, OIL_FUNCTION, __LINE__, __VA_ARGS__); \ }while(0) void oil_debug_set_print_function (OilDebugPrintFunc func); int oil_debug_get_level (void); void oil_debug_set_level (int level); void _oil_debug_init (void); void oil_debug_print (int level, const char *file, const char *func, int line, const char *format, ...); #endif OIL_END_DECLS #endif liboil-0.3.17/liboil/sse/0000777000175000017500000000000011332637376012140 500000000000000liboil-0.3.17/liboil/sse/composite_sse.c0000644000175000017500000001200311155003636015055 00000000000000/* * Copyright (c) 2005 * Eric Anholt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #ifdef HAVE_I386 #define SSE_FUNCTION __attribute__((force_align_arg_pointer)) #else #define SSE_FUNCTION #endif #define COMPOSITE_ADD(d,s) oil_clamp_255((d) + (s)) SSE_FUNCTION static void composite_add_argb_sse (uint32_t *dest, const uint32_t *src, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { uint32_t d = *dest, s = *src++; *dest++ = oil_argb( COMPOSITE_ADD(oil_argb_A(d), oil_argb_A(s)), COMPOSITE_ADD(oil_argb_R(d), oil_argb_R(s)), COMPOSITE_ADD(oil_argb_G(d), oil_argb_G(s)), COMPOSITE_ADD(oil_argb_B(d), oil_argb_B(s))); } for (; n >= 4; n -= 4) { __m128i s; s = _mm_loadu_si128((__m128i *)src); *(__m128i *)dest = _mm_adds_epu8(s, *(__m128i *)dest); src += 4; dest += 4; } for (; n > 0; n--) { uint32_t d = *dest, s = *src++; *dest++ = oil_argb( COMPOSITE_ADD(oil_argb_A(d), oil_argb_A(s)), COMPOSITE_ADD(oil_argb_R(d), oil_argb_R(s)), COMPOSITE_ADD(oil_argb_G(d), oil_argb_G(s)), COMPOSITE_ADD(oil_argb_B(d), oil_argb_B(s))); } } OIL_DEFINE_IMPL_FULL (composite_add_argb_sse, composite_add_argb, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_add_argb_const_src_sse (uint32_t *dest, const uint32_t *src_1, int n) { __m128i s; uint32_t val = *src_1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { uint32_t d = *dest; *dest++ = oil_argb( COMPOSITE_ADD(oil_argb_A(d), oil_argb_A(val)), COMPOSITE_ADD(oil_argb_R(d), oil_argb_R(val)), COMPOSITE_ADD(oil_argb_G(d), oil_argb_G(val)), COMPOSITE_ADD(oil_argb_B(d), oil_argb_B(val))); } s = _mm_set1_epi32(val); for (; n >= 4; n -= 4) { __m128i xmm0; xmm0 = _mm_adds_epu8(s, *(__m128i *)dest); _mm_store_si128((__m128i *)dest, xmm0); dest += 4; } for (; n > 0; n--) { uint32_t d = *dest; *dest++ = oil_argb( COMPOSITE_ADD(oil_argb_A(d), oil_argb_A(val)), COMPOSITE_ADD(oil_argb_R(d), oil_argb_R(val)), COMPOSITE_ADD(oil_argb_G(d), oil_argb_G(val)), COMPOSITE_ADD(oil_argb_B(d), oil_argb_B(val))); } } OIL_DEFINE_IMPL_FULL (composite_add_argb_const_src_sse, composite_add_argb_const_src, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_add_u8_sse (uint8_t *dest, const uint8_t *src, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { int x = (int)*dest + *src++; if (x > 255) x = 255; *dest++ = x; } for (; n >= 16; n -= 16) { __m128i d, s; s = _mm_loadu_si128((__m128i *)src); d = _mm_adds_epu8(s, *(__m128i *)dest); _mm_store_si128((__m128i *)dest, d); src += 16; dest += 16; } for (; n > 0; n--) { int x = (int)*dest + *src++; if (x > 255) x = 255; *dest++ = x; } } OIL_DEFINE_IMPL_FULL (composite_add_u8_sse, composite_add_u8, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_add_u8_const_src_sse (uint8_t *dest, const uint8_t *src_1, int n) { __m128i s; int val = *src_1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { int x = *dest + val; if (x > 255) x = 255; *dest++ = x; } s = _mm_set1_epi8(val); for (; n >= 16; n -= 16) { __m128i d; d = _mm_adds_epu8(*(__m128i *)dest, s); _mm_store_si128((__m128i *)dest, d); dest += 16; } for (; n > 0; n--) { int x = *dest + val; if (x > 255) x = 255; *dest++ = x; } } OIL_DEFINE_IMPL_FULL (composite_add_u8_const_src_sse, composite_add_u8_const_src, OIL_IMPL_FLAG_SSE2); liboil-0.3.17/liboil/sse/copy_sse.c0000644000175000017500000000510111155003647014030 00000000000000/* * Copyright (c) 2005 * Eric Anholt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #ifdef HAVE_I386 #define SSE_FUNCTION __attribute__((force_align_arg_pointer)) #else #define SSE_FUNCTION #endif SSE_FUNCTION static void copy_u8_sse (uint8_t *dest, const uint8_t *src, int n) { for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src++; } for (; n >= 16; n -= 16) { _mm_store_si128((__m128i *)dest, _mm_loadu_si128((__m128i *)src)); src += 16; dest += 16; } for (; n > 0; n--) { *dest++ = *src++; } } OIL_DEFINE_IMPL_FULL (copy_u8_sse, copy_u8, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void copy_u8_sse_unroll2 (uint8_t *dest, const uint8_t *src, int n) { for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src++; } for (; n >= 32; n -= 32) { _mm_store_si128((__m128i *)dest, _mm_loadu_si128((__m128i *)src)); _mm_store_si128((__m128i *)(dest + 16), _mm_loadu_si128((__m128i *)(src + 16))); src += 32; dest += 32; } if (n >= 16) { _mm_store_si128((__m128i *)dest, _mm_loadu_si128((__m128i *)src)); src += 16; dest += 16; n -= 16; } for (; n > 0; n--) { *dest++ = *src++; } } OIL_DEFINE_IMPL_FULL (copy_u8_sse_unroll2, copy_u8, OIL_IMPL_FLAG_SSE2); liboil-0.3.17/liboil/sse/Makefile.am0000644000175000017500000000047510717203073014103 00000000000000 noinst_LTLIBRARIES = libsse.la libsse_la_SOURCES = \ clamp_sse.c \ composite_sse.c \ composite_sse_2pix.c \ composite_sse_4pix.c \ copy_sse.c \ math_sse.c \ math_sse_unroll2.c \ multsum_sse.c \ sad8x8_sse.c \ splat_sse.c \ sse_wrapper.h libsse_la_CFLAGS = $(SSE_CFLAGS) $(SSE2_CFLAGS) $(LIBOIL_CFLAGS) liboil-0.3.17/liboil/sse/clamp_sse.c0000644000175000017500000002570211155003624014156 00000000000000/* * Copyright (c) 2005 * Eric Anholt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #ifdef HAVE_I386 /* TODO: If we have gcc 4.2 or above, do this. Otherwise, disable all SSE use */ #define SSE_FUNCTION __attribute__((force_align_arg_pointer)) #else #define SSE_FUNCTION #endif SSE_FUNCTION static void clamp_u8_sse (uint8_t *dest, uint8_t *src1, int n, uint8_t *src2_1, uint8_t *src3_1) { __m128i xmm1, xmm2; uint8_t min = *src2_1; uint8_t max = *src3_1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { uint8_t x = *src1++; if (x < min) x = min; if (x > max) x = max; *dest++ = x; } xmm1 = _mm_set1_epi8(min); xmm2 = _mm_set1_epi8(max); for (; n >= 16; n -= 16) { __m128i xmm0; xmm0 = _mm_loadu_si128((__m128i *)src1); xmm0 = _mm_max_epu8(xmm0, xmm1); xmm0 = _mm_min_epu8(xmm0, xmm2); _mm_store_si128((__m128i *)dest, xmm0); dest += 16; src1 += 16; } for (; n > 0; n--) { uint8_t x = *src1++; if (x < min) x = min; if (x > max) x = max; *dest++ = x; } } OIL_DEFINE_IMPL_FULL (clamp_u8_sse, clamp_u8, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void clamp_s16_sse (int16_t *dest, int16_t *src1, int n, int16_t *src2_1, int16_t *src3_1) { __m128i xmm1, xmm2; int16_t min = *src2_1; int16_t max = *src3_1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { int16_t x = *src1++; if (x < min) x = min; if (x > max) x = max; *dest++ = x; } xmm1 = _mm_set1_epi16(min); xmm2 = _mm_set1_epi16(max); for (; n >= 8; n -= 8) { __m128i xmm0; xmm0 = _mm_loadu_si128((__m128i *)src1); xmm0 = _mm_max_epi16(xmm0, xmm1); xmm0 = _mm_min_epi16(xmm0, xmm2); _mm_store_si128((__m128i *)dest, xmm0); dest += 8; src1 += 8; } for (; n > 0; n--) { int16_t x = *src1++; if (x < min) x = min; if (x > max) x = max; *dest++ = x; } } OIL_DEFINE_IMPL_FULL (clamp_s16_sse, clamp_s16, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void clamp_f32_sse (float *dest, const float *src1, int n, const float *src2_1, const float *src3_1) { __m128 xmm1, xmm2; float min = *src2_1; float max = *src3_1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { float x = *src1++; if (x < min) x = min; if (x > max) x = max; *dest++ = x; } xmm1 = _mm_set_ps1(min); xmm2 = _mm_set_ps1(max); for (; n >= 4; n -= 4) { __m128 xmm0; xmm0 = _mm_loadu_ps(src1); xmm0 = _mm_max_ps(xmm0, xmm1); xmm0 = _mm_min_ps(xmm0, xmm2); _mm_store_ps(dest, xmm0); dest += 4; src1 += 4; } for (; n > 0; n--) { float x = *src1++; if (x < min) x = min; if (x > max) x = max; *dest++ = x; } } OIL_DEFINE_IMPL_FULL (clamp_f32_sse, clamp_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void clamp_f64_sse (double *dest, const double *src1, int n, const double *src2_1, const double *src3_1) { __m128d xmm1, xmm2; double min = *src2_1; double max = *src3_1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { double x = *src1++; if (x < min) x = min; if (x > max) x = max; *dest++ = x; } xmm1 = _mm_set1_pd(min); xmm2 = _mm_set1_pd(max); for (; n >= 2; n -= 2) { __m128d xmm0; xmm0 = _mm_loadu_pd(src1); xmm0 = _mm_max_pd(xmm0, xmm1); xmm0 = _mm_min_pd(xmm0, xmm2); _mm_store_pd(dest, xmm0); dest += 2; src1 += 2; } for (; n > 0; n--) { double x = *src1++; if (x < min) x = min; if (x > max) x = max; *dest++ = x; } } OIL_DEFINE_IMPL_FULL (clamp_f64_sse, clamp_f64, OIL_IMPL_FLAG_SSE | OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void clamplow_u8_sse (uint8_t *dest, const uint8_t *src1, int n, const uint8_t *src2_1) { __m128i xmm1; uint8_t min = *src2_1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { uint8_t x = *src1++; if (x < min) x = min; *dest++ = x; } xmm1 = _mm_set1_epi8(min); for (; n >= 16; n -= 16) { __m128i xmm0; xmm0 = _mm_loadu_si128((__m128i *)src1); xmm0 = _mm_max_epu8(xmm0, xmm1); _mm_store_si128((__m128i *)dest, xmm0); dest += 16; src1 += 16; } for (; n > 0; n--) { uint8_t x = *src1++; if (x < min) x = min; *dest++ = x; } } OIL_DEFINE_IMPL_FULL (clamplow_u8_sse, clamplow_u8, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void clamplow_s16_sse (int16_t *dest, const int16_t *src1, int n, const int16_t *src2_1) { __m128i xmm1; int16_t min = *src2_1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { int16_t x = *src1++; if (x < min) x = min; *dest++ = x; } xmm1 = _mm_set1_epi16(min); for (; n >= 8; n -= 8) { __m128i xmm0; xmm0 = _mm_loadu_si128((__m128i *)src1); xmm0 = _mm_max_epi16(xmm0, xmm1); _mm_store_si128((__m128i *)dest, xmm0); dest += 8; src1 += 8; } for (; n > 0; n--) { int16_t x = *src1++; if (x < min) x = min; *dest++ = x; } } OIL_DEFINE_IMPL_FULL (clamplow_s16_sse, clamplow_s16, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void clamplow_f32_sse (float *dest, const float *src1, int n, const float *src2_1) { __m128 xmm1; float min = *src2_1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { float x = *src1++; if (x < min) x = min; *dest++ = x; } xmm1 = _mm_set_ps1(min); for (; n >= 4; n -= 4) { __m128 xmm0; xmm0 = _mm_loadu_ps(src1); xmm0 = _mm_max_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); dest += 4; src1 += 4; } for (; n > 0; n--) { float x = *src1++; if (x < min) x = min; *dest++ = x; } } OIL_DEFINE_IMPL_FULL (clamplow_f32_sse, clamplow_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void clamplow_f64_sse (double *dest, const double *src1, int n, const double *src2_1) { __m128d xmm1; double min = *src2_1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { double x = *src1++; if (x < min) x = min; *dest++ = x; } xmm1 = _mm_set1_pd(min); for (; n >= 2; n -= 2) { __m128d xmm0; xmm0 = _mm_loadu_pd(src1); xmm0 = _mm_max_pd(xmm0, xmm1); _mm_store_pd(dest, xmm0); dest += 2; src1 += 2; } for (; n > 0; n--) { double x = *src1++; if (x < min) x = min; *dest++ = x; } } OIL_DEFINE_IMPL_FULL (clamplow_f64_sse, clamplow_f64, OIL_IMPL_FLAG_SSE | OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void clamphigh_u8_sse (uint8_t *dest, const uint8_t *src1, int n, const uint8_t *src2_1) { __m128i xmm1; uint8_t max = *src2_1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { uint8_t x = *src1++; if (x > max) x = max; *dest++ = x; } xmm1 = _mm_set1_epi8(max); for (; n >= 16; n -= 16) { __m128i xmm0; xmm0 = _mm_loadu_si128((__m128i *)src1); xmm0 = _mm_min_epu8(xmm0, xmm1); _mm_store_si128((__m128i *)dest, xmm0); dest += 16; src1 += 16; } for (; n > 0; n--) { uint8_t x = *src1++; if (x > max) x = max; *dest++ = x; } } OIL_DEFINE_IMPL_FULL (clamphigh_u8_sse, clamphigh_u8, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void clamphigh_s16_sse (int16_t *dest, const int16_t *src1, int n, const int16_t *src2_1) { __m128i xmm1; int16_t max = *src2_1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { int16_t x = *src1++; if (x > max) x = max; *dest++ = x; } xmm1 = _mm_set1_epi16(max); for (; n >= 8; n -= 8) { __m128i xmm0; xmm0 = _mm_loadu_si128((__m128i *)src1); xmm0 = _mm_min_epi16(xmm0, xmm1); _mm_store_si128((__m128i *)dest, xmm0); dest += 8; src1 += 8; } for (; n > 0; n--) { int16_t x = *src1++; if (x > max) x = max; *dest++ = x; } } OIL_DEFINE_IMPL_FULL (clamphigh_s16_sse, clamphigh_s16, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void clamphigh_f32_sse (float *dest, const float *src1, int n, const float *src2_1) { __m128 xmm1; float max = *src2_1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { float x = *src1++; if (x > max) x = max; *dest++ = x; } xmm1 = _mm_set_ps1(max); for (; n >= 4; n -= 4) { __m128 xmm0; xmm0 = _mm_loadu_ps(src1); xmm0 = _mm_min_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); dest += 4; src1 += 4; } for (; n > 0; n--) { float x = *src1++; if (x > max) x = max; *dest++ = x; } } OIL_DEFINE_IMPL_FULL (clamphigh_f32_sse, clamphigh_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void clamphigh_f64_sse (double *dest, const double *src1, int n, const double *src2_1) { __m128d xmm1; double max = *src2_1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { double x = *src1++; if (x > max) x = max; *dest++ = x; } xmm1 = _mm_set1_pd(max); for (; n >= 2; n -= 2) { __m128d xmm0; xmm0 = _mm_loadu_pd(src1); xmm0 = _mm_min_pd(xmm0, xmm1); _mm_store_pd(dest, xmm0); dest += 2; src1 += 2; } for (; n > 0; n--) { double x = *src1++; if (x > max) x = max; *dest++ = x; } } OIL_DEFINE_IMPL_FULL (clamphigh_f64_sse, clamphigh_f64, OIL_IMPL_FLAG_SSE | OIL_IMPL_FLAG_SSE2); liboil-0.3.17/liboil/sse/composite_sse_4pix.c0000644000175000017500000003724111155003644016033 00000000000000/* * Copyright (c) 2005 * Eric Anholt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #ifdef HAVE_I386 #define SSE_FUNCTION __attribute__((force_align_arg_pointer)) #else #define SSE_FUNCTION #endif #ifdef ENABLE_BROKEN_IMPLS union m128_int { __m128i m128; uint64_t ull[2]; }; static const struct _SSEData { union m128_int sse_16xff; union m128_int sse_8x0080; } c = { .sse_16xff.ull = {0xffffffffffffffffULL, 0xffffffffffffffffULL}, .sse_8x0080.ull = {0x0080008000800080ULL, 0x0080008000800080ULL}, }; #define MC(x) (c.sse_##x.m128) /* non-SSE2 compositing support */ #define COMPOSITE_OVER(d,s,m) ((d) + (s) - oil_muldiv_255((d),(m))) #define COMPOSITE_ADD(d,s) oil_clamp_255((d) + (s)) #define COMPOSITE_IN(s,m) oil_muldiv_255((s),(m)) /* This SSE2 code is based around operations on four pixels at a time. The * exception is muldiv_255_sse2, which needs to expand the four pixels into * 2 sets of 2 pixels at 16 bits per channel each, for the purpose of doing * the appropriate rounding on division. */ /* Shuffles the given value such that the alpha for each pixel appears in each * channel of the pixel. */ SSE_FUNCTION static inline __m128i argb_A_sse2(__m128i a) { #if 0 /* Shift the alpha channel of each pixel into the low byte */ a = _mm_srli_epi32(a, 24); /* Now, shift and or so we can get it into all the channels */ a = _mm_or_si128(a, _mm_slli_epi32(a, 8)); a = _mm_or_si128(a, _mm_slli_epi32(a, 16)); return a; #else /* Move the alpha channel into the low byte */ a = _mm_srli_epi32(a, 24); /* Pack our four alpha channels down into the lower 32 bits */ a = _mm_packus_epi16(a, _mm_setzero_si128()); a = _mm_packus_epi16(a, _mm_setzero_si128()); /* And expand it back out into four pixels of all channels the same */ a = _mm_unpacklo_epi8(a, a); return _mm_unpacklo_epi16(a, a); #endif } /* Multiplies the unpacked 16-bits-per-channel pixel data in a * channel-by-channel by b, and divides the result by 255, with rounding. */ SSE_FUNCTION static inline __m128i inner_muldiv_255_sse2(__m128i a, __m128i b) { __m128i ret; __m128i roundconst = MC(8x0080); ret = _mm_mullo_epi16(a, b); ret = _mm_adds_epu16(ret, roundconst); ret = _mm_adds_epu16(ret, _mm_srli_epi16(ret, 8)); ret = _mm_srli_epi16(ret, 8); return ret; } SSE_FUNCTION static inline __m128i muldiv_255_sse2(__m128i a, __m128i b) { __m128i alow, blow, ahigh, bhigh, low, high; alow = _mm_unpacklo_epi8(a, _mm_setzero_si128()); blow = _mm_unpacklo_epi8(b, _mm_setzero_si128()); ahigh = _mm_unpackhi_epi8(a, _mm_setzero_si128()); bhigh = _mm_unpackhi_epi8(b, _mm_setzero_si128()); low = inner_muldiv_255_sse2(alow, blow); high = inner_muldiv_255_sse2(ahigh, bhigh); return _mm_packus_epi16(low, high); } SSE_FUNCTION static inline __m128i negate_argb_sse2(__m128i a) { return _mm_xor_si128(a, MC(16xff)); } SSE_FUNCTION static inline __m128i load_argb_sse2(const uint32_t *src) { return _mm_loadu_si128((__m128i *)src); } SSE_FUNCTION static inline __m128i set1_argb_sse2(uint32_t src) { return _mm_set1_epi32(src); } SSE_FUNCTION static inline __m128i load_u8_mask(const uint8_t *m) { __m128i a; a = _mm_cvtsi32_si128(*(uint32_t *)m); a = _mm_unpacklo_epi8(a, a); a = _mm_unpacklo_epi16(a, a); return a; } SSE_FUNCTION static inline __m128i set1_u8_mask(uint8_t m) { return _mm_set1_epi8(m); } SSE_FUNCTION static void store_argb_sse2(uint32_t *dest, __m128i pix) { _mm_store_si128((__m128i *)dest, pix); } SSE_FUNCTION static __m128i over_argb_sse2(__m128i dest, __m128i src, __m128i srca) { return _mm_adds_epu8(src, muldiv_255_sse2(dest, negate_argb_sse2(srca))); } SSE_FUNCTION static void composite_in_argb_sse (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { for (; ((long)dest & 15) && (n > 0); n--) { uint32_t s = *src++; uint8_t m = *mask++; *dest++ = oil_argb( COMPOSITE_IN(oil_argb_A(s), m), COMPOSITE_IN(oil_argb_R(s), m), COMPOSITE_IN(oil_argb_G(s), m), COMPOSITE_IN(oil_argb_B(s), m)); } for (; n >= 4; n -= 4) { __m128i s, m; s = load_argb_sse2(src); m = load_u8_mask(mask); store_argb_sse2(dest, muldiv_255_sse2(s, m)); src += 4; mask += 4; dest += 4; } for (; n > 0; n--) { uint32_t s = *src++; uint8_t m = *mask++; *dest++ = oil_argb( COMPOSITE_IN(oil_argb_A(s), m), COMPOSITE_IN(oil_argb_R(s), m), COMPOSITE_IN(oil_argb_G(s), m), COMPOSITE_IN(oil_argb_B(s), m)); } } OIL_DEFINE_IMPL_FULL_WRAPPER (composite_in_argb_sse, composite_in_argb, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_in_argb_const_src_sse (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { __m128i s; s = set1_argb_sse2(*src); for (; ((long)dest & 15) && (n > 0); n--) { uint8_t m = *mask++; *dest++ = oil_argb( COMPOSITE_IN(oil_argb_A(*src), m), COMPOSITE_IN(oil_argb_R(*src), m), COMPOSITE_IN(oil_argb_G(*src), m), COMPOSITE_IN(oil_argb_B(*src), m)); } for (; n >= 4; n -= 4) { __m128i m; m = load_u8_mask(mask); store_argb_sse2(dest, muldiv_255_sse2(s, m)); mask += 4; dest += 4; } for (; n > 0; n--) { uint8_t m = *mask++; *dest++ = oil_argb( COMPOSITE_IN(oil_argb_A(*src), m), COMPOSITE_IN(oil_argb_R(*src), m), COMPOSITE_IN(oil_argb_G(*src), m), COMPOSITE_IN(oil_argb_B(*src), m)); } } OIL_DEFINE_IMPL_FULL_WRAPPER (composite_in_argb_const_src_sse, composite_in_argb_const_src, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_in_argb_const_mask_sse (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { __m128i m; m = set1_u8_mask(*mask); for (; ((long)dest & 15) && (n > 0); n--) { uint32_t s = *src++; *dest++ = oil_argb( COMPOSITE_IN(oil_argb_A(s), mask[0]), COMPOSITE_IN(oil_argb_R(s), mask[0]), COMPOSITE_IN(oil_argb_G(s), mask[0]), COMPOSITE_IN(oil_argb_B(s), mask[0])); } for (; n >= 4; n -= 4) { __m128i s; s = load_argb_sse2(src); store_argb_sse2(dest, muldiv_255_sse2(s, m)); src += 4; dest += 4; } for (; n > 0; n--) { uint32_t s = *src++; *dest++ = oil_argb( COMPOSITE_IN(oil_argb_A(s), mask[0]), COMPOSITE_IN(oil_argb_R(s), mask[0]), COMPOSITE_IN(oil_argb_G(s), mask[0]), COMPOSITE_IN(oil_argb_B(s), mask[0])); } } OIL_DEFINE_IMPL_FULL_WRAPPER (composite_in_argb_const_mask_sse, composite_in_argb_const_mask, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_over_argb_sse (uint32_t *dest, const uint32_t *src, int n) { for (; ((long)dest & 15) && (n > 0); n--) { uint32_t d = *dest, s = *src++; uint8_t srca = oil_argb_A(s); d = oil_argb( COMPOSITE_OVER(oil_argb_A(d), oil_argb_A(s), srca), COMPOSITE_OVER(oil_argb_R(d), oil_argb_R(s), srca), COMPOSITE_OVER(oil_argb_G(d), oil_argb_G(s), srca), COMPOSITE_OVER(oil_argb_B(d), oil_argb_B(s), srca)); *dest++ = d; } for (; n >= 4; n -= 4) { __m128i d, s; s = load_argb_sse2(src); d = over_argb_sse2(*(__m128i *)dest, s, argb_A_sse2(s)); store_argb_sse2(dest, d); src += 4; dest += 4; } for (; n > 0; n--) { uint32_t d = *dest, s = *src++; uint8_t srca = oil_argb_A(s); d = oil_argb( COMPOSITE_OVER(oil_argb_A(d), oil_argb_A(s), srca), COMPOSITE_OVER(oil_argb_R(d), oil_argb_R(s), srca), COMPOSITE_OVER(oil_argb_G(d), oil_argb_G(s), srca), COMPOSITE_OVER(oil_argb_B(d), oil_argb_B(s), srca)); *dest++ = d; } } OIL_DEFINE_IMPL_FULL_WRAPPER (composite_over_argb_sse, composite_over_argb, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_over_argb_const_src_sse (uint32_t *dest, const uint32_t *src, int n) { __m128i s, sa; uint32_t srca; srca = oil_argb_A(*src); s = set1_argb_sse2(*src); sa = negate_argb_sse2(argb_A_sse2(s)); for (; ((long)dest & 15) && (n > 0); n--) { uint32_t d = *dest; d = oil_argb( COMPOSITE_OVER(oil_argb_A(d), oil_argb_A(*src), srca), COMPOSITE_OVER(oil_argb_R(d), oil_argb_R(*src), srca), COMPOSITE_OVER(oil_argb_G(d), oil_argb_G(*src), srca), COMPOSITE_OVER(oil_argb_B(d), oil_argb_B(*src), srca)); *dest++ = d; } for (; n >= 4; n -= 4) { __m128i d; d = _mm_adds_epu8(s, muldiv_255_sse2(*(__m128i *)dest, sa)); store_argb_sse2(dest, d); dest += 4; } for (; n > 0; n--) { uint32_t d = *dest; d = oil_argb( COMPOSITE_OVER(oil_argb_A(d), oil_argb_A(*src), srca), COMPOSITE_OVER(oil_argb_R(d), oil_argb_R(*src), srca), COMPOSITE_OVER(oil_argb_G(d), oil_argb_G(*src), srca), COMPOSITE_OVER(oil_argb_B(d), oil_argb_B(*src), srca)); *dest++ = d; } } OIL_DEFINE_IMPL_FULL_WRAPPER (composite_over_argb_const_src_sse, composite_over_argb_const_src, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_in_over_argb_sse (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { for (; ((long)dest & 15) && (n > 0); n--) { uint32_t d = *dest, s = *src++, m = *mask++, color; uint8_t srca; color = oil_argb( COMPOSITE_IN(oil_argb_A(s), m), COMPOSITE_IN(oil_argb_R(s), m), COMPOSITE_IN(oil_argb_G(s), m), COMPOSITE_IN(oil_argb_B(s), m)); srca = oil_argb_A(color); d = oil_argb( COMPOSITE_OVER(oil_argb_A(d), oil_argb_A(color), srca), COMPOSITE_OVER(oil_argb_R(d), oil_argb_R(color), srca), COMPOSITE_OVER(oil_argb_G(d), oil_argb_G(color), srca), COMPOSITE_OVER(oil_argb_B(d), oil_argb_B(color), srca)); *dest++ = d; } for (; n >= 4; n -= 4) { __m128i d, s, m; s = load_argb_sse2(src); m = load_u8_mask(mask); s = muldiv_255_sse2(s, m); d = over_argb_sse2(*(__m128i *)dest, s, argb_A_sse2(s)); store_argb_sse2(dest, d); src += 4; mask += 4; dest += 4; } for (; n > 0; n--) { uint32_t d = *dest, s = *src++, m = *mask++, color; uint8_t srca; color = oil_argb( COMPOSITE_IN(oil_argb_A(s), m), COMPOSITE_IN(oil_argb_R(s), m), COMPOSITE_IN(oil_argb_G(s), m), COMPOSITE_IN(oil_argb_B(s), m)); srca = oil_argb_A(color); d = oil_argb( COMPOSITE_OVER(oil_argb_A(d), oil_argb_A(color), srca), COMPOSITE_OVER(oil_argb_R(d), oil_argb_R(color), srca), COMPOSITE_OVER(oil_argb_G(d), oil_argb_G(color), srca), COMPOSITE_OVER(oil_argb_B(d), oil_argb_B(color), srca)); *dest++ = d; } } OIL_DEFINE_IMPL_FULL_WRAPPER (composite_in_over_argb_sse, composite_in_over_argb, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_in_over_argb_const_src_sse (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { __m128i s; s = set1_argb_sse2(*src); for (; ((long)dest & 15) && (n > 0); n--) { uint32_t d = *dest, m = *mask++, color; uint8_t srca; color = oil_argb( COMPOSITE_IN(oil_argb_A(*src), m), COMPOSITE_IN(oil_argb_R(*src), m), COMPOSITE_IN(oil_argb_G(*src), m), COMPOSITE_IN(oil_argb_B(*src), m)); srca = oil_argb_A(color); d = oil_argb( COMPOSITE_OVER(oil_argb_A(d), oil_argb_A(color), srca), COMPOSITE_OVER(oil_argb_R(d), oil_argb_R(color), srca), COMPOSITE_OVER(oil_argb_G(d), oil_argb_G(color), srca), COMPOSITE_OVER(oil_argb_B(d), oil_argb_B(color), srca)); *dest++ = d; } for (; n >= 4; n -= 4) { __m128i d, color, m; m = load_u8_mask(mask); color = muldiv_255_sse2(s, m); d = over_argb_sse2(*(__m128i *)dest, color, argb_A_sse2(color)); store_argb_sse2(dest, d); mask += 4; dest += 4; } for (; n > 0; n--) { uint32_t d = *dest, m = *mask++, color; uint8_t srca; color = oil_argb( COMPOSITE_IN(oil_argb_A(*src), m), COMPOSITE_IN(oil_argb_R(*src), m), COMPOSITE_IN(oil_argb_G(*src), m), COMPOSITE_IN(oil_argb_B(*src), m)); srca = oil_argb_A(color); d = oil_argb( COMPOSITE_OVER(oil_argb_A(d), oil_argb_A(color), srca), COMPOSITE_OVER(oil_argb_R(d), oil_argb_R(color), srca), COMPOSITE_OVER(oil_argb_G(d), oil_argb_G(color), srca), COMPOSITE_OVER(oil_argb_B(d), oil_argb_B(color), srca)); *dest++ = d; } } OIL_DEFINE_IMPL_FULL_WRAPPER (composite_in_over_argb_const_src_sse, composite_in_over_argb_const_src, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_in_over_argb_const_mask_sse (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { __m128i m; m = set1_u8_mask(*mask); for (; ((long)dest & 15) && (n > 0); n--) { uint32_t d = *dest, s = *src++, color; uint8_t srca; color = oil_argb( COMPOSITE_IN(oil_argb_A(s), *mask), COMPOSITE_IN(oil_argb_R(s), *mask), COMPOSITE_IN(oil_argb_G(s), *mask), COMPOSITE_IN(oil_argb_B(s), *mask)); srca = oil_argb_A(color); d = oil_argb( COMPOSITE_OVER(oil_argb_A(d), oil_argb_A(color), srca), COMPOSITE_OVER(oil_argb_R(d), oil_argb_R(color), srca), COMPOSITE_OVER(oil_argb_G(d), oil_argb_G(color), srca), COMPOSITE_OVER(oil_argb_B(d), oil_argb_B(color), srca)); *dest++ = d; } for (; n >= 4; n -= 4) { __m128i d, s; s = load_argb_sse2(src); s = muldiv_255_sse2(s, m); d = over_argb_sse2(*(__m128i *)dest, s, argb_A_sse2(s)); store_argb_sse2(dest, d); src += 4; dest += 4; } for (; n > 0; n--) { uint32_t d = *dest, s = *src++, color; uint8_t srca; color = oil_argb( COMPOSITE_IN(oil_argb_A(s), *mask), COMPOSITE_IN(oil_argb_R(s), *mask), COMPOSITE_IN(oil_argb_G(s), *mask), COMPOSITE_IN(oil_argb_B(s), *mask)); srca = oil_argb_A(color); d = oil_argb( COMPOSITE_OVER(oil_argb_A(d), oil_argb_A(color), srca), COMPOSITE_OVER(oil_argb_R(d), oil_argb_R(color), srca), COMPOSITE_OVER(oil_argb_G(d), oil_argb_G(color), srca), COMPOSITE_OVER(oil_argb_B(d), oil_argb_B(color), srca)); *dest++ = d; } } OIL_DEFINE_IMPL_FULL_WRAPPER (composite_in_over_argb_const_mask_sse, composite_in_over_argb_const_mask, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_over_u8_sse (uint8_t *dest, const uint8_t *src, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest = COMPOSITE_OVER(*dest, *src, *src); src++; dest++; } /* over_u8 can be dealt with using our argb code, with srca = s */ for (; n >= 16; n -= 16) { __m128i d, s; d = *(__m128i *)dest; s = load_argb_sse2((uint32_t *)src); store_argb_sse2((uint32_t *)dest, over_argb_sse2(d, s, s)); src += 16; dest += 16; } for (; n > 0; n--) { *dest = COMPOSITE_OVER(*dest, *src, *src); src++; dest++; } } OIL_DEFINE_IMPL_FULL_WRAPPER (composite_over_u8_sse, composite_over_u8, OIL_IMPL_FLAG_SSE2); #endif liboil-0.3.17/liboil/sse/math_sse.c0000644000175000017500000002312711332625245014020 00000000000000/* * Copyright (c) 2005 * Eric Anholt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #ifdef HAVE_I386 #define SSE_FUNCTION __attribute__((force_align_arg_pointer)) #else #define SSE_FUNCTION #endif SSE_FUNCTION static void add_f32_sse (float *dest, float *src1, float *src2, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1++ + *src2++; } for (; n >= 4; n -= 4) { __m128 xmm0, xmm1; xmm0 = _mm_loadu_ps(src1); xmm1 = _mm_loadu_ps(src2); xmm0 = _mm_add_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); dest += 4; src1 += 4; src2 += 4; } for (; n > 0; n--) { *dest++ = *src1++ + *src2++; } } OIL_DEFINE_IMPL_FULL (add_f32_sse, add_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void add_f64_sse2 (double *dest, double *src1, double *src2, int n) { __m128d xmm0, xmm1; while (((long)dest & 15) && (0 < n)) { *dest++ = *src1++ + *src2++; n--; } while (1 < n) { xmm0 = _mm_loadu_pd(src1); xmm1 = _mm_loadu_pd(src2); xmm0 = _mm_add_pd(xmm0, xmm1); _mm_store_pd(dest, xmm0); dest += 2; src1 += 2; src2 += 2; n -= 2; } while (0 < n) { *dest++ = *src1++ + *src2++; n--; } } OIL_DEFINE_IMPL_FULL (add_f64_sse2, add_f64, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void add_f64_sse2_unroll (double *dest, double *src1, double *src2, int n) { __m128d xmm0, xmm1; while (((long)dest & 15) && (0 < n)) { *dest++ = *src1++ + *src2++; n--; } while (3 < n) { xmm0 = _mm_loadu_pd(src1); xmm1 = _mm_loadu_pd(src2); xmm0 = _mm_add_pd(xmm0, xmm1); _mm_store_pd(dest, xmm0); xmm0 = _mm_loadu_pd(src1+2); xmm1 = _mm_loadu_pd(src2+2); xmm0 = _mm_add_pd(xmm0, xmm1); _mm_store_pd(dest+2, xmm0); dest += 4; src1 += 4; src2 += 4; n -= 4; } while (1 < n) { xmm0 = _mm_loadu_pd(src1); xmm1 = _mm_loadu_pd(src2); xmm0 = _mm_add_pd(xmm0, xmm1); _mm_store_pd(dest, xmm0); dest += 2; src1 += 2; src2 += 2; n -= 2; } while (0 < n) { *dest++ = *src1++ + *src2++; n--; } } OIL_DEFINE_IMPL_FULL (add_f64_sse2_unroll, add_f64, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void subtract_f32_sse (float *dest, float *src1, float *src2, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1++ - *src2++; } for (; n >= 4; n -= 4) { __m128 xmm0, xmm1; xmm0 = _mm_loadu_ps(src1); xmm1 = _mm_loadu_ps(src2); xmm0 = _mm_sub_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); dest += 4; src1 += 4; src2 += 4; } for (; n > 0; n--) { *dest++ = *src1++ - *src2++; } } OIL_DEFINE_IMPL_FULL (subtract_f32_sse, subtract_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void multiply_f32_sse (float *dest, float *src1, float *src2, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1++ * *src2++; } for (; n >= 4; n -= 4) { __m128 xmm0, xmm1; xmm0 = _mm_loadu_ps(src1); xmm1 = _mm_loadu_ps(src2); xmm0 = _mm_mul_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); dest += 4; src1 += 4; src2 += 4; } for (; n > 0; n--) { *dest++ = *src1++ * *src2++; } } OIL_DEFINE_IMPL_FULL (multiply_f32_sse, multiply_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void divide_f32_sse (float *dest, float *src1, float *src2, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1++ / *src2++; } for (; n >= 4; n -= 4) { __m128 xmm0, xmm1; xmm0 = _mm_loadu_ps(src1); xmm1 = _mm_loadu_ps(src2); xmm0 = _mm_div_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); dest += 4; src1 += 4; src2 += 4; } for (; n > 0; n--) { *dest++ = *src1++ / *src2++; } } OIL_DEFINE_IMPL_FULL (divide_f32_sse, divide_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void minimum_f32_sse (float *dest, float *src1, float *src2, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1 < *src2 ? *src1 : *src2; src1++; src2++; } for (; n >= 4; n -= 4) { __m128 xmm0, xmm1; xmm0 = _mm_loadu_ps(src1); xmm1 = _mm_loadu_ps(src2); xmm0 = _mm_min_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); dest += 4; src1 += 4; src2 += 4; } for (; n > 0; n--) { *dest++ = *src1 < *src2 ? *src1 : *src2; src1++; src2++; } } OIL_DEFINE_IMPL_FULL (minimum_f32_sse, minimum_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void maximum_f32_sse (float *dest, float *src1, float *src2, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1 > *src2 ? *src1 : *src2; src1++; src2++; } for (; n >= 4; n -= 4) { __m128 xmm0, xmm1; xmm0 = _mm_loadu_ps(src1); xmm1 = _mm_loadu_ps(src2); xmm0 = _mm_max_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); dest += 4; src1 += 4; src2 += 4; } for (; n > 0; n--) { *dest++ = *src1 > *src2 ? *src1 : *src2; src1++; src2++; } } OIL_DEFINE_IMPL_FULL (maximum_f32_sse, maximum_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void inverse_f32_sse (float *dest, float *src1, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = 1.0 / *src1++; } for (; n >= 4; n -= 4) { __m128 xmm0, xmm1; /* While _mm_rcp_ps sounds promising, the results it gives are rather * different from the 1.0 / src1 reference implementation, so do that. */ xmm0 = _mm_set_ps1(1.0); xmm1 = _mm_loadu_ps(src1); xmm0 = _mm_div_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); dest += 4; src1 += 4; } for (; n > 0; n--) { *dest++ = 1.0 / *src1++; } } OIL_DEFINE_IMPL_FULL (inverse_f32_sse, inverse_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void negative_f32_sse (float *dest, float *src1, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = -(*src1++); } for (; n >= 4; n -= 4) { __m128 xmm0, xmm1; xmm0 = _mm_setzero_ps(); xmm1 = _mm_loadu_ps(src1); xmm0 = _mm_sub_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); dest += 4; src1 += 4; } for (; n > 0; n--) { *dest++ = -(*src1++); } } OIL_DEFINE_IMPL_FULL (negative_f32_sse, negative_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void scalaradd_f32_ns_sse (float *dest, float *src1, float *val, int n) { __m128 xmm1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1++ + *val; } xmm1 = _mm_load_ps1(val); for (; n >= 4; n -= 4) { __m128 xmm0; xmm0 = _mm_loadu_ps(src1); xmm0 = _mm_add_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); dest += 4; src1 += 4; } for (; n > 0; n--) { *dest++ = *src1++ + *val; } } OIL_DEFINE_IMPL_FULL (scalaradd_f32_ns_sse, scalaradd_f32_ns, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void scalarmultiply_f32_ns_sse (float *dest, float *src1, float *val, int n) { __m128 xmm1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1++ * *val; } xmm1 = _mm_load_ps1(val); for (; n >= 4; n -= 4) { __m128 xmm0; xmm0 = _mm_loadu_ps(src1); xmm0 = _mm_mul_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); dest += 4; src1 += 4; } for (; n > 0; n--) { *dest++ = *src1++ * *val; } } OIL_DEFINE_IMPL_FULL (scalarmultiply_f32_ns_sse, scalarmultiply_f32_ns, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void scalarmultiply_f64_ns_sse2 (double *dest, double *src1, double *val, int n) { __m128d xmm1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1++ * *val; } xmm1 = _mm_load1_pd(val); for (; n >= 2; n -= 2) { __m128d xmm0; xmm0 = _mm_loadu_pd(src1); xmm0 = _mm_mul_pd(xmm0, xmm1); _mm_store_pd(dest, xmm0); dest += 2; src1 += 2; } for (; n > 0; n--) { *dest++ = *src1++ * *val; } } OIL_DEFINE_IMPL_FULL (scalarmultiply_f64_ns_sse2, scalarmultiply_f64_ns, OIL_IMPL_FLAG_SSE2); liboil-0.3.17/liboil/sse/sse_wrapper.h0000644000175000017500000000171211066763263014557 00000000000000#ifndef __SSE_WRAPPER_H__ #define __SSE_WRAPPER_H__ /* A massive hack to work around gcc (and mono) alignment bugs. This * realigns the stack to 16 bytes when calling a wrapped function. */ #ifdef USE_SSE_WRAPPER #define OIL_SSE_WRAPPER(func) \ static void func () __attribute__ ((used)); \ static void func ## _wrapper (void) \ { \ __asm__ __volatile__ ("\n" \ " subl $0x20, %%esp\n" \ " andl $0xfffffff0, %%esp\n" \ " movdqu 0x08(%%ebp), %%xmm0\n" \ " movdqa %%xmm0, 0x00(%%esp)\n" \ " movdqu 0x18(%%ebp), %%xmm0\n" \ " movdqa %%xmm0, 0x10(%%esp)\n" \ " call *%[f]\n" \ " movl %%ebp, %%esp\n" \ : \ : [f] "r" (func) \ : "xmm0"); \ } #define OIL_DEFINE_IMPL_FULL_WRAPPER(func,klass,flags) \ OIL_SSE_WRAPPER(func) \ OIL_DEFINE_IMPL_FULL(func ## _wrapper, klass, flags) #else #define OIL_DEFINE_IMPL_FULL_WRAPPER(func,klass,flags) \ OIL_DEFINE_IMPL_FULL(func, klass, flags) #endif #endif liboil-0.3.17/liboil/sse/multsum_sse.c0000644000175000017500000000355111155003664014572 00000000000000#ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #ifdef HAVE_I386 #define SSE_FUNCTION __attribute__((force_align_arg_pointer)) #else #define SSE_FUNCTION #endif #define MULTSUM_SSE2_NSTRIDED(i) { \ t1 = _mm_load_pd(&OIL_GET(src1, i, double)); \ t2 = _mm_load_pd(&OIL_GET(src2, i, double)); \ t1 = _mm_mul_pd(t1,t2); \ sum.reg = _mm_add_pd(sum.reg,t1); \ } #define MULTSUM_SSE2_NSTRIDEDP(i) { \ t1 = _mm_load_pd(&OIL_GET(src1, i*sstr1, double)); \ t2 = _mm_loadl_pd(t2, &OIL_GET(src2, i*sstr2, double)); \ t2 = _mm_loadh_pd(t2, &OIL_GET(src2, (i+1)*sstr2, double)); \ t1 = _mm_mul_pd(t1,t2); \ sum.reg = _mm_add_pd(sum.reg,t1); \ } #define MULTSUM_SSE2_STRIDED(i) { \ t1 = _mm_loadl_pd(t1, &OIL_GET(src1, i*sstr1, double)); \ t1 = _mm_loadh_pd(t1, &OIL_GET(src1, (i+1)*sstr1, double)); \ t2 = _mm_loadl_pd(t2, &OIL_GET(src2, i*sstr2, double)); \ t2 = _mm_loadh_pd(t2, &OIL_GET(src2, (i+1)*sstr2, double)); \ t1 = _mm_mul_pd(t1,t2); \ sum.reg = _mm_add_pd(sum.reg,t1); \ } #ifdef ENABLE_BROKEN_IMPLS SSE_FUNCTION static void multsum_f64_sse2_unroll4(double *dest, const double *src1, int sstr1, const double *src2, int sstr2, int n) { __m128d t1, t2; union { __m128d reg; double vals[2]; } sum; int i = 0; sum.reg = _mm_setzero_pd(); while (i < n-3) { MULTSUM_SSE2_STRIDED(0); MULTSUM_SSE2_STRIDED(2); OIL_INCREMENT(src1, 4*sstr1); OIL_INCREMENT(src2, 4*sstr2); i += 4; } while (i < n-1) { MULTSUM_SSE2_STRIDED(0); OIL_INCREMENT(src1, 2*sstr1); OIL_INCREMENT(src2, 2*sstr2); i+=2; } *dest = sum.vals[0] + sum.vals[1]; if (i < n) { *dest += (OIL_GET(src1,0,double)*OIL_GET(src2,0,double)); } } OIL_DEFINE_IMPL_FULL (multsum_f64_sse2_unroll4, multsum_f64, OIL_IMPL_FLAG_SSE2); #endif liboil-0.3.17/liboil/sse/Makefile.in0000644000175000017500000006447011332627673014133 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = liboil/sse DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libsse_la_LIBADD = am_libsse_la_OBJECTS = libsse_la-clamp_sse.lo \ libsse_la-composite_sse.lo libsse_la-composite_sse_2pix.lo \ libsse_la-composite_sse_4pix.lo libsse_la-copy_sse.lo \ libsse_la-math_sse.lo libsse_la-math_sse_unroll2.lo \ libsse_la-multsum_sse.lo libsse_la-sad8x8_sse.lo \ libsse_la-splat_sse.lo libsse_la_OBJECTS = $(am_libsse_la_OBJECTS) libsse_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libsse_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libsse_la_SOURCES) DIST_SOURCES = $(libsse_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libsse.la libsse_la_SOURCES = \ clamp_sse.c \ composite_sse.c \ composite_sse_2pix.c \ composite_sse_4pix.c \ copy_sse.c \ math_sse.c \ math_sse_unroll2.c \ multsum_sse.c \ sad8x8_sse.c \ splat_sse.c \ sse_wrapper.h libsse_la_CFLAGS = $(SSE_CFLAGS) $(SSE2_CFLAGS) $(LIBOIL_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/sse/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/sse/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libsse.la: $(libsse_la_OBJECTS) $(libsse_la_DEPENDENCIES) $(libsse_la_LINK) $(libsse_la_OBJECTS) $(libsse_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse_la-clamp_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse_la-composite_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse_la-composite_sse_2pix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse_la-composite_sse_4pix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse_la-copy_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse_la-math_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse_la-math_sse_unroll2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse_la-multsum_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse_la-sad8x8_sse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsse_la-splat_sse.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libsse_la-clamp_sse.lo: clamp_sse.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -MT libsse_la-clamp_sse.lo -MD -MP -MF $(DEPDIR)/libsse_la-clamp_sse.Tpo -c -o libsse_la-clamp_sse.lo `test -f 'clamp_sse.c' || echo '$(srcdir)/'`clamp_sse.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsse_la-clamp_sse.Tpo $(DEPDIR)/libsse_la-clamp_sse.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clamp_sse.c' object='libsse_la-clamp_sse.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -c -o libsse_la-clamp_sse.lo `test -f 'clamp_sse.c' || echo '$(srcdir)/'`clamp_sse.c libsse_la-composite_sse.lo: composite_sse.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -MT libsse_la-composite_sse.lo -MD -MP -MF $(DEPDIR)/libsse_la-composite_sse.Tpo -c -o libsse_la-composite_sse.lo `test -f 'composite_sse.c' || echo '$(srcdir)/'`composite_sse.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsse_la-composite_sse.Tpo $(DEPDIR)/libsse_la-composite_sse.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='composite_sse.c' object='libsse_la-composite_sse.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -c -o libsse_la-composite_sse.lo `test -f 'composite_sse.c' || echo '$(srcdir)/'`composite_sse.c libsse_la-composite_sse_2pix.lo: composite_sse_2pix.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -MT libsse_la-composite_sse_2pix.lo -MD -MP -MF $(DEPDIR)/libsse_la-composite_sse_2pix.Tpo -c -o libsse_la-composite_sse_2pix.lo `test -f 'composite_sse_2pix.c' || echo '$(srcdir)/'`composite_sse_2pix.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsse_la-composite_sse_2pix.Tpo $(DEPDIR)/libsse_la-composite_sse_2pix.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='composite_sse_2pix.c' object='libsse_la-composite_sse_2pix.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -c -o libsse_la-composite_sse_2pix.lo `test -f 'composite_sse_2pix.c' || echo '$(srcdir)/'`composite_sse_2pix.c libsse_la-composite_sse_4pix.lo: composite_sse_4pix.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -MT libsse_la-composite_sse_4pix.lo -MD -MP -MF $(DEPDIR)/libsse_la-composite_sse_4pix.Tpo -c -o libsse_la-composite_sse_4pix.lo `test -f 'composite_sse_4pix.c' || echo '$(srcdir)/'`composite_sse_4pix.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsse_la-composite_sse_4pix.Tpo $(DEPDIR)/libsse_la-composite_sse_4pix.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='composite_sse_4pix.c' object='libsse_la-composite_sse_4pix.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -c -o libsse_la-composite_sse_4pix.lo `test -f 'composite_sse_4pix.c' || echo '$(srcdir)/'`composite_sse_4pix.c libsse_la-copy_sse.lo: copy_sse.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -MT libsse_la-copy_sse.lo -MD -MP -MF $(DEPDIR)/libsse_la-copy_sse.Tpo -c -o libsse_la-copy_sse.lo `test -f 'copy_sse.c' || echo '$(srcdir)/'`copy_sse.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsse_la-copy_sse.Tpo $(DEPDIR)/libsse_la-copy_sse.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy_sse.c' object='libsse_la-copy_sse.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -c -o libsse_la-copy_sse.lo `test -f 'copy_sse.c' || echo '$(srcdir)/'`copy_sse.c libsse_la-math_sse.lo: math_sse.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -MT libsse_la-math_sse.lo -MD -MP -MF $(DEPDIR)/libsse_la-math_sse.Tpo -c -o libsse_la-math_sse.lo `test -f 'math_sse.c' || echo '$(srcdir)/'`math_sse.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsse_la-math_sse.Tpo $(DEPDIR)/libsse_la-math_sse.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='math_sse.c' object='libsse_la-math_sse.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -c -o libsse_la-math_sse.lo `test -f 'math_sse.c' || echo '$(srcdir)/'`math_sse.c libsse_la-math_sse_unroll2.lo: math_sse_unroll2.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -MT libsse_la-math_sse_unroll2.lo -MD -MP -MF $(DEPDIR)/libsse_la-math_sse_unroll2.Tpo -c -o libsse_la-math_sse_unroll2.lo `test -f 'math_sse_unroll2.c' || echo '$(srcdir)/'`math_sse_unroll2.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsse_la-math_sse_unroll2.Tpo $(DEPDIR)/libsse_la-math_sse_unroll2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='math_sse_unroll2.c' object='libsse_la-math_sse_unroll2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -c -o libsse_la-math_sse_unroll2.lo `test -f 'math_sse_unroll2.c' || echo '$(srcdir)/'`math_sse_unroll2.c libsse_la-multsum_sse.lo: multsum_sse.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -MT libsse_la-multsum_sse.lo -MD -MP -MF $(DEPDIR)/libsse_la-multsum_sse.Tpo -c -o libsse_la-multsum_sse.lo `test -f 'multsum_sse.c' || echo '$(srcdir)/'`multsum_sse.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsse_la-multsum_sse.Tpo $(DEPDIR)/libsse_la-multsum_sse.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='multsum_sse.c' object='libsse_la-multsum_sse.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -c -o libsse_la-multsum_sse.lo `test -f 'multsum_sse.c' || echo '$(srcdir)/'`multsum_sse.c libsse_la-sad8x8_sse.lo: sad8x8_sse.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -MT libsse_la-sad8x8_sse.lo -MD -MP -MF $(DEPDIR)/libsse_la-sad8x8_sse.Tpo -c -o libsse_la-sad8x8_sse.lo `test -f 'sad8x8_sse.c' || echo '$(srcdir)/'`sad8x8_sse.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsse_la-sad8x8_sse.Tpo $(DEPDIR)/libsse_la-sad8x8_sse.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sad8x8_sse.c' object='libsse_la-sad8x8_sse.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -c -o libsse_la-sad8x8_sse.lo `test -f 'sad8x8_sse.c' || echo '$(srcdir)/'`sad8x8_sse.c libsse_la-splat_sse.lo: splat_sse.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -MT libsse_la-splat_sse.lo -MD -MP -MF $(DEPDIR)/libsse_la-splat_sse.Tpo -c -o libsse_la-splat_sse.lo `test -f 'splat_sse.c' || echo '$(srcdir)/'`splat_sse.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libsse_la-splat_sse.Tpo $(DEPDIR)/libsse_la-splat_sse.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='splat_sse.c' object='libsse_la-splat_sse.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsse_la_CFLAGS) $(CFLAGS) -c -o libsse_la-splat_sse.lo `test -f 'splat_sse.c' || echo '$(srcdir)/'`splat_sse.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/sse/math_sse_unroll2.c0000644000175000017500000002336511332625245015501 00000000000000/* * Copyright (c) 2005 * Eric Anholt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #ifdef HAVE_I386 #define SSE_FUNCTION __attribute__((force_align_arg_pointer)) #else #define SSE_FUNCTION #endif SSE_FUNCTION static void add_f32_sse_unroll2 (float *dest, float *src1, float *src2, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1++ + *src2++; } for (; n >= 8; n -= 8) { __m128 xmm0, xmm1; xmm0 = _mm_loadu_ps(src1); xmm1 = _mm_loadu_ps(src2); xmm0 = _mm_add_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); xmm0 = _mm_loadu_ps(src1 + 4); xmm1 = _mm_loadu_ps(src2 + 4); xmm0 = _mm_add_ps(xmm0, xmm1); _mm_store_ps(dest + 4, xmm0); dest += 8; src1 += 8; src2 += 8; } for (; n > 0; n--) { *dest++ = *src1++ + *src2++; } } OIL_DEFINE_IMPL_FULL (add_f32_sse_unroll2, add_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void subtract_f32_sse_unroll2 (float *dest, float *src1, float *src2, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1++ - *src2++; } for (; n >= 8; n -= 8) { __m128 xmm0, xmm1; xmm0 = _mm_loadu_ps(src1); xmm1 = _mm_loadu_ps(src2); xmm0 = _mm_sub_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); xmm0 = _mm_loadu_ps(src1 + 4); xmm1 = _mm_loadu_ps(src2 + 4); xmm0 = _mm_sub_ps(xmm0, xmm1); _mm_store_ps(dest + 4, xmm0); dest += 8; src1 += 8; src2 += 8; } for (; n > 0; n--) { *dest++ = *src1++ - *src2++; } } OIL_DEFINE_IMPL_FULL (subtract_f32_sse_unroll2, subtract_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void multiply_f32_sse_unroll2 (float *dest, float *src1, float *src2, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1++ * *src2++; } for (; n >= 8; n -= 8) { __m128 xmm0, xmm1; xmm0 = _mm_loadu_ps(src1); xmm1 = _mm_loadu_ps(src2); xmm0 = _mm_mul_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); xmm0 = _mm_loadu_ps(src1 + 4); xmm1 = _mm_loadu_ps(src2 + 4); xmm0 = _mm_mul_ps(xmm0, xmm1); _mm_store_ps(dest + 4, xmm0); dest += 8; src1 += 8; src2 += 8; } for (; n > 0; n--) { *dest++ = *src1++ * *src2++; } } OIL_DEFINE_IMPL_FULL (multiply_f32_sse_unroll2, multiply_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void divide_f32_sse_unroll2 (float *dest, float *src1, float *src2, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1++ / *src2++; } for (; n >= 8; n -= 8) { __m128 xmm0, xmm1; xmm0 = _mm_loadu_ps(src1); xmm1 = _mm_loadu_ps(src2); xmm0 = _mm_div_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); xmm0 = _mm_loadu_ps(src1 + 4); xmm1 = _mm_loadu_ps(src2 + 4); xmm0 = _mm_div_ps(xmm0, xmm1); _mm_store_ps(dest + 4, xmm0); dest += 8; src1 += 8; src2 += 8; } for (; n > 0; n--) { *dest++ = *src1++ / *src2++; } } OIL_DEFINE_IMPL_FULL (divide_f32_sse_unroll2, divide_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void minimum_f32_sse_unroll2 (float *dest, float *src1, float *src2, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1 < *src2 ? *src1 : *src2; src1++; src2++; } for (; n >= 8; n -= 8) { __m128 xmm0, xmm1; xmm0 = _mm_loadu_ps(src1); xmm1 = _mm_loadu_ps(src2); xmm0 = _mm_min_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); xmm0 = _mm_loadu_ps(src1 + 4); xmm1 = _mm_loadu_ps(src2 + 4); xmm0 = _mm_min_ps(xmm0, xmm1); _mm_store_ps(dest + 4, xmm0); dest += 8; src1 += 8; src2 += 8; } for (; n > 0; n--) { *dest++ = *src1 < *src2 ? *src1 : *src2; src1++; src2++; } } OIL_DEFINE_IMPL_FULL (minimum_f32_sse_unroll2, minimum_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void maximum_f32_sse_unroll2 (float *dest, float *src1, float *src2, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1 > *src2 ? *src1 : *src2; src1++; src2++; } for (; n >= 8; n -= 8) { __m128 xmm0, xmm1; xmm0 = _mm_loadu_ps(src1); xmm1 = _mm_loadu_ps(src2); xmm0 = _mm_max_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); xmm0 = _mm_loadu_ps(src1 + 4); xmm1 = _mm_loadu_ps(src2 + 4); xmm0 = _mm_max_ps(xmm0, xmm1); _mm_store_ps(dest + 4, xmm0); dest += 8; src1 += 8; src2 += 8; } for (; n > 0; n--) { *dest++ = *src1 > *src2 ? *src1 : *src2; src1++; src2++; } } OIL_DEFINE_IMPL_FULL (maximum_f32_sse_unroll2, maximum_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void inverse_f32_sse_unroll2 (float *dest, float *src1, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = 1.0 / *src1++; } for (; n >= 8; n -= 8) { __m128 xmm0, xmm1; /* While _mm_rcp_ps sounds promising, the results it gives are rather * different from the 1.0 / src1 reference implementation, so do that. */ xmm0 = _mm_set_ps1(1.0); xmm1 = _mm_loadu_ps(src1); xmm0 = _mm_div_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); xmm0 = _mm_set_ps1(1.0); xmm1 = _mm_loadu_ps(src1 + 4); xmm0 = _mm_div_ps(xmm0, xmm1); _mm_store_ps(dest + 4, xmm0); dest += 8; src1 += 8; } for (; n > 0; n--) { *dest++ = 1.0 / *src1++; } } OIL_DEFINE_IMPL_FULL (inverse_f32_sse_unroll2, inverse_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void negative_f32_sse_unroll2 (float *dest, float *src1, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = -(*src1++); } for (; n >= 8; n -= 8) { __m128 xmm0, xmm1; xmm0 = _mm_setzero_ps(); xmm1 = _mm_loadu_ps(src1); xmm0 = _mm_sub_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); xmm0 = _mm_setzero_ps(); xmm1 = _mm_loadu_ps(src1 + 4); xmm0 = _mm_sub_ps(xmm0, xmm1); _mm_store_ps(dest + 4, xmm0); dest += 8; src1 += 8; } for (; n > 0; n--) { *dest++ = -(*src1++); } } OIL_DEFINE_IMPL_FULL (negative_f32_sse_unroll2, negative_f32, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void scalaradd_f32_ns_sse_unroll2 (float *dest, float *src1, float *val, int n) { __m128 xmm1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1++ + *val; } xmm1 = _mm_load_ps1(val); for (; n >= 8; n -= 8) { __m128 xmm0; xmm0 = _mm_loadu_ps(src1); xmm0 = _mm_add_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); xmm0 = _mm_loadu_ps(src1 + 4); xmm0 = _mm_add_ps(xmm0, xmm1); _mm_store_ps(dest + 4, xmm0); dest += 8; src1 += 8; } for (; n > 0; n--) { *dest++ = *src1++ + *val; } } OIL_DEFINE_IMPL_FULL (scalaradd_f32_ns_sse_unroll2, scalaradd_f32_ns, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void scalarmultiply_f32_ns_sse_unroll2 (float *dest, float *src1, float *val, int n) { __m128 xmm1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1++ * *val; } xmm1 = _mm_load_ps1(val); for (; n >= 8; n -= 8) { __m128 xmm0; xmm0 = _mm_loadu_ps(src1); xmm0 = _mm_mul_ps(xmm0, xmm1); _mm_store_ps(dest, xmm0); xmm0 = _mm_loadu_ps(src1 + 4); xmm0 = _mm_mul_ps(xmm0, xmm1); _mm_store_ps(dest + 4, xmm0); dest += 8; src1 += 8; } for (; n > 0; n--) { *dest++ = *src1++ * *val; } } OIL_DEFINE_IMPL_FULL (scalarmultiply_f32_ns_sse_unroll2, scalarmultiply_f32_ns, OIL_IMPL_FLAG_SSE); SSE_FUNCTION static void scalarmultiply_f64_ns_sse2_unroll2 (double *dest, double *src1, double *val, int n) { __m128d xmm1; /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *src1++ * *val; } xmm1 = _mm_load1_pd(val); for (; n >= 4; n -= 4) { __m128d xmm0; xmm0 = _mm_loadu_pd(src1); xmm0 = _mm_mul_pd(xmm0, xmm1); _mm_store_pd(dest, xmm0); xmm0 = _mm_loadu_pd(src1 + 2); xmm0 = _mm_mul_pd(xmm0, xmm1); _mm_store_pd(dest + 2, xmm0); dest += 4; src1 += 4; } for (; n > 0; n--) { *dest++ = *src1++ * *val; } } OIL_DEFINE_IMPL_FULL (scalarmultiply_f64_ns_sse2_unroll2, scalarmultiply_f64_ns, OIL_IMPL_FLAG_SSE2); liboil-0.3.17/liboil/sse/splat_sse.c0000644000175000017500000000675211155003675014217 00000000000000/* * Copyright (c) 2005 * Eric Anholt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #ifdef HAVE_I386 #define SSE_FUNCTION __attribute__((force_align_arg_pointer)) #else #define SSE_FUNCTION #endif SSE_FUNCTION static void splat_u32_ns_sse (uint32_t *dest, const uint32_t *param, int n) { __m128i v; v = _mm_set1_epi32(*param); for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *param; } for (; n >= 4; n -= 4) { _mm_store_si128((__m128i *)dest, v); dest += 4; } for (; n > 0; n--) { *dest++ = *param; } } OIL_DEFINE_IMPL_FULL (splat_u32_ns_sse, splat_u32_ns, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void splat_u32_ns_sse_unroll2 (uint32_t *dest, const uint32_t *param, int n) { __m128i v; v = _mm_set1_epi32(*param); for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *param; } for (; n >= 8; n -= 8) { _mm_store_si128((__m128i *)dest, v); _mm_store_si128((__m128i *)(dest + 4), v); dest += 8; } for (; n >= 4; n -= 4) { _mm_store_si128((__m128i *)dest, v); dest += 4; } for (; n > 0; n--) { *dest++ = *param; } } OIL_DEFINE_IMPL_FULL (splat_u32_ns_sse_unroll2, splat_u32_ns, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void splat_u8_ns_sse (uint8_t *dest, const uint8_t *param, int n) { __m128i v; v = _mm_set1_epi8(*param); for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *param; } for (; n >= 16; n -= 16) { _mm_store_si128((__m128i *)dest, v); dest += 16; } for (; n > 0; n--) { *dest++ = *param; } } OIL_DEFINE_IMPL_FULL (splat_u8_ns_sse, splat_u8_ns, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void splat_u8_ns_sse_unroll2 (uint8_t *dest, const uint8_t *param, int n) { __m128i v; v = _mm_set1_epi8(*param); for (; ((long)dest & 15) && (n > 0); n--) { *dest++ = *param; } for (; n >= 32; n -= 32) { _mm_store_si128((__m128i *)dest, v); _mm_store_si128((__m128i *)(dest + 16), v); dest += 32; } for (; n >= 16; n -= 16) { _mm_store_si128((__m128i *)dest, v); dest += 16; } for (; n > 0; n--) { *dest++ = *param; } } OIL_DEFINE_IMPL_FULL (splat_u8_ns_sse_unroll2, splat_u8_ns, OIL_IMPL_FLAG_SSE2); liboil-0.3.17/liboil/sse/sad8x8_sse.c0000644000175000017500000000462311155003667014207 00000000000000/* * Copyright (c) 2005 * Eric Anholt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #ifdef HAVE_I386 #define SSE_FUNCTION __attribute__((force_align_arg_pointer)) #else #define SSE_FUNCTION #endif #ifdef ENABLE_BROKEN_IMPLS union m128_int { __m128i m128; uint32_t i[4]; uint16_t s[8]; }; SSE_FUNCTION static void sad8x8_u8_sse (uint32_t *dest, uint8_t *src1, int sstr1, uint8_t *src2, int sstr2) { int i; __m128i sum = _mm_setzero_si128(); union m128_int sumi; for (i = 0; i < 4; i++) { __m128i xmm0, xmm1, xmm2, xmm3; xmm0 = _mm_loadl_epi64((__m128i *)src1); xmm1 = _mm_loadl_epi64((__m128i *)(src1 + sstr1)); xmm2 = _mm_loadl_epi64((__m128i *)src2); xmm3 = _mm_loadl_epi64((__m128i *)(src2 + sstr2)); xmm0 = _mm_unpacklo_epi8(xmm0, xmm1); xmm2 = _mm_unpacklo_epi8(xmm2, xmm3); sum = _mm_add_epi64(sum, _mm_sad_epu8(xmm0, xmm2)); src1 += 2 * sstr1; src2 += 2 * sstr2; } sumi.m128 = sum; *dest = sumi.i[0] + sumi.i[2]; } OIL_DEFINE_IMPL_FULL_WRAPPER(sad8x8_u8_sse, sad8x8_u8, OIL_IMPL_FLAG_SSE2); #endif liboil-0.3.17/liboil/sse/composite_sse_2pix.c0000644000175000017500000002754111155003641016030 00000000000000/* * Copyright (c) 2005 * Eric Anholt. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #ifdef HAVE_I386 #define SSE_FUNCTION __attribute__((force_align_arg_pointer)) #else #define SSE_FUNCTION #endif /* non-SSE2 compositing support */ #define COMPOSITE_OVER(d,s,m) ((d) + (s) - oil_muldiv_255((d),(m))) #define COMPOSITE_ADD(d,s) oil_clamp_255((d) + (s)) #define COMPOSITE_IN(s,m) oil_muldiv_255((s),(m)) /* rgba values in SSE2 code will be unpacked as 16-bit integers per channel with * the channel value in the low byte. This means 2 pixels per pass. */ #ifdef ENABLE_BROKEN_IMPLS union m128_int { __m128i m128; uint64_t ull[2]; }; static const struct _SSEData { union m128_int sse_8x00ff; union m128_int sse_8x0080; } c = { .sse_8x00ff.ull = {0x00ff00ff00ff00ffULL, 0x00ff00ff00ff00ffULL}, .sse_8x0080.ull = {0x0080008000800080ULL, 0x0080008000800080ULL}, }; #define MC(x) (c.sse_##x.m128) /* Shuffles the given value such that the alpha for each pixel appears in each * channel of the pixel. */ SSE_FUNCTION static inline __m128i argb_A_sse2(__m128i a) { a = _mm_shufflehi_epi16(a, _MM_SHUFFLE(3,3,3,3)); a = _mm_shufflelo_epi16(a, _MM_SHUFFLE(3,3,3,3)); return a; } /* Multiplies the pixel data in a channel-by-channel by b, and divides the * result by 255, with rounding. */ SSE_FUNCTION static inline __m128i muldiv_255_sse2(__m128i a, __m128i b) { __m128i ret; __m128i roundconst = MC(8x0080); ret = _mm_mullo_epi16(a, b); ret = _mm_adds_epu16(ret, roundconst); ret = _mm_adds_epu16(ret, _mm_srli_epi16(ret, 8)); ret = _mm_srli_epi16(ret, 8); return ret; } SSE_FUNCTION static inline __m128i negate_argb_sse2(__m128i a) { return _mm_xor_si128(a, MC(8x00ff)); } /* Loads the 2 (unaligned) pixels at *src into unpacked SSE2 registers */ SSE_FUNCTION static inline __m128i load_argb_sse2(const uint32_t *src) { __m128i pix; pix = _mm_loadl_epi64((__m128i *)src); pix = _mm_unpacklo_epi8(pix, _mm_setzero_si128()); return pix; } SSE_FUNCTION static inline __m128i set1_argb_sse2(uint32_t src) { __m128i pix; pix = _mm_set1_epi32(src); pix = _mm_unpacklo_epi8(pix, _mm_setzero_si128()); return pix; } SSE_FUNCTION static inline __m128i load_u8_mask(const uint8_t *m) { return _mm_unpacklo_epi64(_mm_set1_epi16(m[0]), _mm_set1_epi16(m[1])); } SSE_FUNCTION static inline __m128i set1_u8_mask(uint8_t m) { return _mm_unpacklo_epi8(_mm_set1_epi8(m), _mm_setzero_si128()); } /* Stores the 2 unpacked pixels in pix into the (unaligned) *dest */ SSE_FUNCTION static void store_argb_sse2(uint32_t *dest, __m128i pix) { pix = _mm_packus_epi16(pix, pix); _mm_storel_epi64((__m128i *)dest, pix); } SSE_FUNCTION static __m128i over_argb_sse2(__m128i dest, __m128i src, __m128i srca) { return _mm_adds_epu8(src, muldiv_255_sse2(dest, negate_argb_sse2(srca))); } SSE_FUNCTION static void composite_in_argb_sse_2pix (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { for (; n >= 2; n -= 2) { __m128i s, m; s = load_argb_sse2(src); m = load_u8_mask(mask); store_argb_sse2(dest, muldiv_255_sse2(s, m)); src += 2; mask += 2; dest += 2; } for (; n > 0; n--) { uint32_t s = *src++; uint8_t m = *mask++; *dest++ = oil_argb( COMPOSITE_IN(oil_argb_A(s), m), COMPOSITE_IN(oil_argb_R(s), m), COMPOSITE_IN(oil_argb_G(s), m), COMPOSITE_IN(oil_argb_B(s), m)); } } OIL_DEFINE_IMPL_FULL_WRAPPER(composite_in_argb_sse_2pix, composite_in_argb, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_in_argb_const_src_sse_2pix (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { __m128i s; s = set1_argb_sse2(*src); for (; n >= 2; n -= 2) { __m128i m; m = load_u8_mask(mask); store_argb_sse2(dest, muldiv_255_sse2(s, m)); mask += 2; dest += 2; } for (; n > 0; n--) { uint8_t m = *mask++; *dest++ = oil_argb( COMPOSITE_IN(oil_argb_A(*src), m), COMPOSITE_IN(oil_argb_R(*src), m), COMPOSITE_IN(oil_argb_G(*src), m), COMPOSITE_IN(oil_argb_B(*src), m)); } } OIL_DEFINE_IMPL_FULL_WRAPPER(composite_in_argb_const_src_sse_2pix, composite_in_argb_const_src, OIL_IMPL_FLAG_SSE2); #ifdef SSE_ALIGN SSE_FUNCTION static void composite_in_argb_const_mask_sse_2pix (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { __m128i m; m = set1_u8_mask(*mask); for (; n >= 2; n -= 2) { __m128i s; s = load_argb_sse2(src); store_argb_sse2(dest, muldiv_255_sse2(s, m)); src += 2; dest += 2; } for (; n > 0; n--) { uint32_t s = *src++; *dest++ = oil_argb( COMPOSITE_IN(oil_argb_A(s), mask[0]), COMPOSITE_IN(oil_argb_R(s), mask[0]), COMPOSITE_IN(oil_argb_G(s), mask[0]), COMPOSITE_IN(oil_argb_B(s), mask[0])); } } OIL_DEFINE_IMPL_FULL_WRAPPER(composite_in_argb_const_mask_sse_2pix, composite_in_argb_const_mask, OIL_IMPL_FLAG_SSE2); #endif SSE_FUNCTION static void composite_over_argb_sse_2pix (uint32_t *dest, const uint32_t *src, int n) { for (; n >= 2; n -= 2) { __m128i d, s; s = load_argb_sse2(src); d = load_argb_sse2(dest); d = over_argb_sse2(d, s, argb_A_sse2(s)); store_argb_sse2(dest, d); src += 2; dest += 2; } for (; n > 0; n--) { uint32_t d = *dest, s = *src++; uint8_t srca = oil_argb_A(s); d = oil_argb( COMPOSITE_OVER(oil_argb_A(d), oil_argb_A(s), srca), COMPOSITE_OVER(oil_argb_R(d), oil_argb_R(s), srca), COMPOSITE_OVER(oil_argb_G(d), oil_argb_G(s), srca), COMPOSITE_OVER(oil_argb_B(d), oil_argb_B(s), srca)); *dest++ = d; } } OIL_DEFINE_IMPL_FULL_WRAPPER(composite_over_argb_sse_2pix, composite_over_argb, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_over_argb_const_src_sse_2pix (uint32_t *dest, const uint32_t *src, int n) { __m128i s, sa; uint32_t srca; srca = oil_argb_A(*src); s = set1_argb_sse2(*src); sa = negate_argb_sse2(argb_A_sse2(s)); for (; n >= 2; n -= 2) { __m128i d; d = load_argb_sse2(dest); d = _mm_adds_epu8(s, muldiv_255_sse2(d, sa)); store_argb_sse2(dest, d); dest += 2; } for (; n > 0; n--) { uint32_t d = *dest; d = oil_argb( COMPOSITE_OVER(oil_argb_A(d), oil_argb_A(*src), srca), COMPOSITE_OVER(oil_argb_R(d), oil_argb_R(*src), srca), COMPOSITE_OVER(oil_argb_G(d), oil_argb_G(*src), srca), COMPOSITE_OVER(oil_argb_B(d), oil_argb_B(*src), srca)); *dest++ = d; } } OIL_DEFINE_IMPL_FULL_WRAPPER(composite_over_argb_const_src_sse_2pix, composite_over_argb_const_src, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_in_over_argb_sse_2pix (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { for (; n >= 2; n -= 2) { __m128i d, s, m; s = load_argb_sse2(src); m = load_u8_mask(mask); d = load_argb_sse2(dest); s = muldiv_255_sse2(s, m); d = over_argb_sse2(d, s, argb_A_sse2(s)); store_argb_sse2(dest, d); src += 2; mask += 2; dest += 2; } for (; n > 0; n--) { uint32_t d = *dest, s = *src++, m = *mask++, color; uint8_t srca; color = oil_argb( COMPOSITE_IN(oil_argb_A(s), m), COMPOSITE_IN(oil_argb_R(s), m), COMPOSITE_IN(oil_argb_G(s), m), COMPOSITE_IN(oil_argb_B(s), m)); srca = oil_argb_A(color); d = oil_argb( COMPOSITE_OVER(oil_argb_A(d), oil_argb_A(color), srca), COMPOSITE_OVER(oil_argb_R(d), oil_argb_R(color), srca), COMPOSITE_OVER(oil_argb_G(d), oil_argb_G(color), srca), COMPOSITE_OVER(oil_argb_B(d), oil_argb_B(color), srca)); *dest++ = d; } } OIL_DEFINE_IMPL_FULL_WRAPPER(composite_in_over_argb_sse_2pix, composite_in_over_argb, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_in_over_argb_const_src_sse_2pix (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { __m128i s; s = set1_argb_sse2(*src); for (; n >= 2; n -= 2) { __m128i d, color, m; m = load_u8_mask(mask); d = load_argb_sse2(dest); color = muldiv_255_sse2(s, m); d = over_argb_sse2(d, color, argb_A_sse2(color)); store_argb_sse2(dest, d); mask += 2; dest += 2; } for (; n > 0; n--) { uint32_t d = *dest, m = *mask++, color; uint8_t srca; color = oil_argb( COMPOSITE_IN(oil_argb_A(*src), m), COMPOSITE_IN(oil_argb_R(*src), m), COMPOSITE_IN(oil_argb_G(*src), m), COMPOSITE_IN(oil_argb_B(*src), m)); srca = oil_argb_A(color); d = oil_argb( COMPOSITE_OVER(oil_argb_A(d), oil_argb_A(color), srca), COMPOSITE_OVER(oil_argb_R(d), oil_argb_R(color), srca), COMPOSITE_OVER(oil_argb_G(d), oil_argb_G(color), srca), COMPOSITE_OVER(oil_argb_B(d), oil_argb_B(color), srca)); *dest++ = d; } } OIL_DEFINE_IMPL_FULL_WRAPPER(composite_in_over_argb_const_src_sse_2pix, composite_in_over_argb_const_src, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_in_over_argb_const_mask_sse_2pix (uint32_t *dest, const uint32_t *src, const uint8_t *mask, int n) { __m128i m; m = set1_u8_mask(*mask); for (; n >= 2; n -= 2) { __m128i d, s; s = load_argb_sse2(src); d = load_argb_sse2(dest); s = muldiv_255_sse2(s, m); d = over_argb_sse2(d, s, argb_A_sse2(s)); store_argb_sse2(dest, d); src += 2; dest += 2; } for (; n > 0; n--) { uint32_t d = *dest, s = *src++, color; uint8_t srca; color = oil_argb( COMPOSITE_IN(oil_argb_A(s), *mask), COMPOSITE_IN(oil_argb_R(s), *mask), COMPOSITE_IN(oil_argb_G(s), *mask), COMPOSITE_IN(oil_argb_B(s), *mask)); srca = oil_argb_A(color); d = oil_argb( COMPOSITE_OVER(oil_argb_A(d), oil_argb_A(color), srca), COMPOSITE_OVER(oil_argb_R(d), oil_argb_R(color), srca), COMPOSITE_OVER(oil_argb_G(d), oil_argb_G(color), srca), COMPOSITE_OVER(oil_argb_B(d), oil_argb_B(color), srca)); *dest++ = d; } } OIL_DEFINE_IMPL_FULL_WRAPPER(composite_in_over_argb_const_mask_sse_2pix, composite_in_over_argb_const_mask, OIL_IMPL_FLAG_SSE2); SSE_FUNCTION static void composite_over_u8_sse_2pix (uint8_t *dest, const uint8_t *src, int n) { /* Initial operations to align the destination pointer */ for (; ((long)dest & 15) && (n > 0); n--) { *dest = COMPOSITE_OVER(*dest, *src, *src); src++; dest++; } /* over_u8 can be dealt with using our argb code, with srca = s */ for (; n >= 8; n -= 8) { __m128i d, s; d = load_argb_sse2((uint32_t *)dest); s = load_argb_sse2((uint32_t *)src); store_argb_sse2((uint32_t *)dest, over_argb_sse2(d, s, s)); src += 8; dest += 8; } for (; n > 0; n--) { *dest = COMPOSITE_OVER(*dest, *src, *src); src++; dest++; } } OIL_DEFINE_IMPL_FULL_WRAPPER(composite_over_u8_sse_2pix, composite_over_u8, OIL_IMPL_FLAG_SSE2); #endif liboil-0.3.17/liboil/deprecated/0000777000175000017500000000000011332637376013446 500000000000000liboil-0.3.17/liboil/deprecated/permute.c0000644000175000017500000001143010717203073015173 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include static void permute_test (OilTest *test) { int i; int n = test->n; int stride = oil_test_get_value (test, OIL_ARG_SSTR2); uint8_t *ptr = (uint8_t *) oil_test_get_source_data (test, OIL_ARG_SRC2); for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #define SCALARMULT_DEFINE_REF(type) \ static void scalarmult_ ## type ## _ref( \ oil_type_ ## type *dest, int dstr, \ oil_type_ ## type *src, int sstr, \ oil_type_ ## type *val, int n) \ { \ int i; \ for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #define VECTORADD_DEFINE(type) \ static void vectoradd_ ## type ## _ref ( \ oil_type_ ## type *dest, int dstr, \ oil_type_ ## type *src1, int sstr1, \ oil_type_ ## type *src2, int sstr2, \ int n, oil_type_ ## type *v1, oil_type_ ## type *v2) \ { \ int i; \ for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * oil_average2_u8: * @d: * @dstr: * @s1: * @sstr1: * @s2: * @sstr2: * @n: * * Averages each element in @s1 and @s2 and places the result in @d. * * FIXME: This class is difficult to optimize and will likely be * replaced. */ OIL_DEFINE_CLASS (average2_u8, "uint8_t *d, int dstr, uint8_t *s1, int sstr1, " "uint8_t *s2, int sstr2, int n"); static void average2_u8_ref (uint8_t * dest, int dstr, uint8_t *src1, int sstr1, uint8_t *src2, int sstr2, int n) { int i; for (i = 0; i < n; i++) { dest[dstr * i] = (src1[sstr1 * i] + src2[sstr2 * i]) >> 1; } } OIL_DEFINE_IMPL_REF (average2_u8_ref, average2_u8); liboil-0.3.17/liboil/deprecated/vectoradd_s.c0000644000175000017500000001047610717203073016020 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #define oil_type_min_f32 -1.0 #define oil_type_max_f32 1.0 #define oil_type_min_f64 -1.0 #define oil_type_max_f64 1.0 #define VECTORADD_S_DEFINE_IMPL(type,bigger) \ static void vectoradd_s_ ## type ## _ref ( \ oil_type_ ## type *dest, int dstr, \ oil_type_ ## type *src1, int sstr1, \ oil_type_ ## type *src2, int sstr2, \ int n) \ { \ int i; \ for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include OIL_DEFINE_CLASS (abs_u8_s8, "uint8_t *dest, int dstr, int8_t *src, int sstr, int n"); OIL_DEFINE_CLASS (abs_u16_s16, "uint16_t *dest, int dstr, int16_t *src, int sstr, int n"); OIL_DEFINE_CLASS (abs_u32_s32, "uint32_t *dest, int dstr, int32_t *src, int sstr, int n"); OIL_DEFINE_CLASS (abs_f32_f32, "float *dest, int dstr, float *src, int sstr, int n"); OIL_DEFINE_CLASS (abs_f64_f64, "double *dest, int dstr, double *src, int sstr, int n"); //static void abs_test (OilFunctionClass *klass, OilFunctionImpl *impl); #define ABS(x) ((x)>0 ? (x) : -(x)) /** * oil_abs_u8_s8: * @dest: destination array * @dstr: stride of destination elements * @src: source array * @sstr: stride of source elements * @n: number of elements in arrays * * Calculates the absolute value of each element in the source array * and writes it into the destination array. */ static void abs_u8_s8_ref (uint8_t *dest, int dstr, int8_t *src, int sstr, int n) { int i; int x; for (i=0; i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include /** * oil_tablelookup_u8: * @d: * @ds: * @s1: * @ss1: * @s2_256: * @ss2: * @n: * * Looks up each element in @s1 using the lookup table in @s2_256, * and places the table value in @d. */ OIL_DEFINE_CLASS (tablelookup_u8, "uint8_t *d, int ds, uint8_t *s1, int ss1, " "uint8_t *s2_256, int ss2, int n"); static void tablelookup_u8_ref (uint8_t *dest, int dstr, uint8_t *src, int sstr, uint8_t *table, int tablestride, int n) { int i; for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include /** * SECTION:liboilfuncs-doc: * @title: Miscellaneous * @short_description: Miscellaneous functions */ #define CLIP_DEFINE_REF(type) \ static void clip_ ## type ## _ref ( \ oil_type_ ## type *dest, \ int dstr, \ oil_type_ ## type *src, \ int sstr, int n, \ oil_type_ ## type *min, oil_type_ ## type *max) \ { \ int i; \ oil_type_ ## type x; \ for(i=0;i*max) x = *max; \ OIL_GET(dest,i*dstr,oil_type_ ## type) = x; \ } \ } \ static void clip_ ## type ## _test (OilTest *test) \ { \ oil_type_ ## type *lo = (oil_type_ ## type *) \ oil_test_get_source_data (test, OIL_ARG_SRC2); \ oil_type_ ## type *hi = (oil_type_ ## type *) \ oil_test_get_source_data (test, OIL_ARG_SRC3); \ if (*lo > *hi) { \ oil_type_ ## type tmp; \ tmp = *lo; \ *lo = *hi; \ *hi = tmp; \ } \ } \ OIL_DEFINE_CLASS_FULL(clip_ ## type, \ "oil_type_" #type " *dest, " \ "int dstr, " \ "oil_type_" #type " *src, " \ "int sstr, int n, " \ "oil_type_" #type " *s2_1, oil_type_" #type " *s3_1", \ clip_ ## type ## _test); \ OIL_DEFINE_IMPL_REF(clip_ ## type ## _ref, clip_ ## type) CLIP_DEFINE_REF (s8); CLIP_DEFINE_REF (u8); CLIP_DEFINE_REF (s16); CLIP_DEFINE_REF (u16); CLIP_DEFINE_REF (s32); CLIP_DEFINE_REF (u32); CLIP_DEFINE_REF (f32); CLIP_DEFINE_REF (f64); /** * oil_clip_s8: * @dest: * @dstr: * @src: * @sstr: * @n: * @s2_1: * @s3_1: * * Clips each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ /** * oil_clip_u8: * @dest: * @dstr: * @src: * @sstr: * @n: * @s2_1: * @s3_1: * * Clips each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ /** * oil_clip_s16: * @dest: * @dstr: * @src: * @sstr: * @n: * @s2_1: * @s3_1: * * Clips each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ /** * oil_clip_u16: * @dest: * @dstr: * @src: * @sstr: * @n: * @s2_1: * @s3_1: * * Clips each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ /** * oil_clip_s32: * @dest: * @dstr: * @src: * @sstr: * @n: * @s2_1: * @s3_1: * * Clips each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ /** * oil_clip_u32: * @dest: * @dstr: * @src: * @sstr: * @n: * @s2_1: * @s3_1: * * Clips each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ /** * oil_clip_f32: * @dest: * @dstr: * @src: * @sstr: * @n: * @s2_1: * @s3_1: * * Clips each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ /** * oil_clip_f64: * @dest: * @dstr: * @src: * @sstr: * @n: * @s2_1: * @s3_1: * * Clips each value in @src to the range [@s2_1,@s3_1] and places * the result in @dest. */ liboil-0.3.17/liboil/deprecated/conv.c0000644000175000017500000014147510717203073014474 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2001,2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include /** * SECTION:liboilfuncs-conv * @title: Type Conversion * @short_description: Type conversion * * The functions in this section perform type conversion. * * The conv functions convert value from the source type to * the destination type. Conversion of values outside the destination * range is undefined and may vary between implementations. * * The clipconv functions convert values from the source * type to the destination type. Conversion of values outside the * destination range are saturated to the destination range. * * The scaleconv functions multiply the source values by a * constant factor before converting to the destination type. Conversion * of values outside the destination range is undefined and may vary * between implementations. * * Conversion of values from floating point types to integer types * is done using a round-to-nearest policy. Rounding of half-integers * is undefined and may vary between implementations. */ static void conv_test (OilTest *test) { int i; int n; double min = 0; double max = 1; int stride = test->params[OIL_ARG_SRC1].stride; void *data = oil_test_get_source_data (test, OIL_ARG_SRC1); n = test->params[OIL_ARG_SRC1].post_n; switch(test->params[OIL_ARG_DEST1].type) { case OIL_TYPE_s8p: min = oil_type_min_s8; max = oil_type_max_s8; break; case OIL_TYPE_u8p: min = oil_type_min_u8; max = oil_type_max_u8; break; case OIL_TYPE_s16p: min = oil_type_min_s16; max = oil_type_max_s16; break; case OIL_TYPE_u16p: min = oil_type_min_u16; max = oil_type_max_u16; break; case OIL_TYPE_s32p: min = oil_type_min_s32; max = oil_type_max_s32; break; case OIL_TYPE_u32p: min = oil_type_min_u32; max = oil_type_max_u32; break; default: break; } switch (test->params[OIL_ARG_SRC1].type) { case OIL_TYPE_f32p: for(i=0;ioil_type_max_ ## desttype) x=oil_type_max_ ## desttype; \ OIL_GET(dest,i*dest_stride, oil_type_ ## desttype) = x; \ } \ } \ OIL_DEFINE_CLASS(clipconv_ ## desttype ## _ ## srctype, \ "oil_type_" #desttype " *dest, " \ "int dstr, " \ "oil_type_" #srctype " *src, " \ "int sstr, int n"); \ OIL_DEFINE_IMPL_REF(clipconv_ ## desttype ## _ ## srctype ## _ref, \ clipconv_ ## desttype ## _ ## srctype) #define CLIPCONV_DEFINE_UPPER_REF(desttype,srctype) \ static void clipconv_ ## desttype ## _ ## srctype ## _ref ( \ oil_type_ ## desttype *dest, \ int dest_stride, \ oil_type_ ## srctype *src, \ int src_stride, int n) \ { \ int i; \ oil_type_ ## srctype x; \ for(i=0;ioil_type_max_ ## desttype) x=oil_type_max_ ## desttype; \ OIL_GET(dest,i*dest_stride, oil_type_ ## desttype) = x; \ } \ } \ OIL_DEFINE_CLASS(clipconv_ ## desttype ## _ ## srctype, \ "oil_type_" #desttype " *dest, " \ "int dstr, " \ "oil_type_" #srctype " *src, " \ "int sstr, int n"); \ OIL_DEFINE_IMPL_REF(clipconv_ ## desttype ## _ ## srctype ## _ref, \ clipconv_ ## desttype ## _ ## srctype) #define CLIPCONV_DEFINE_LOWER_REF(desttype,srctype) \ static void clipconv_ ## desttype ## _ ## srctype ## _ref ( \ oil_type_ ## desttype *dest, \ int dest_stride, \ oil_type_ ## srctype *src, \ int src_stride, int n) \ { \ int i; \ oil_type_ ## srctype x; \ for(i=0;ioil_type_max_ ## desttype) x=oil_type_max_ ## desttype; \ OIL_GET(dest,i*dest_stride, oil_type_ ## desttype) = rint(x); \ } \ } \ OIL_DEFINE_CLASS(clipconv_ ## desttype ## _ ## srctype, \ "oil_type_" #desttype " *dest, " \ "int dstr, " \ "oil_type_" #srctype " *src, " \ "int sstr, int n"); \ OIL_DEFINE_IMPL_REF(clipconv_ ## desttype ## _ ## srctype ## _ref, \ clipconv_ ## desttype ## _ ## srctype) /* clip upper */ CLIPCONV_DEFINE_UPPER_REF(s8,u8); CLIPCONV_DEFINE_UPPER_REF(s8,u16); CLIPCONV_DEFINE_UPPER_REF(s8,u32); CLIPCONV_DEFINE_UPPER_REF(u8,u32); CLIPCONV_DEFINE_UPPER_REF(u8,u16); CLIPCONV_DEFINE_UPPER_REF(s16,u16); CLIPCONV_DEFINE_UPPER_REF(s16,u32); CLIPCONV_DEFINE_UPPER_REF(s32,u32); CLIPCONV_DEFINE_UPPER_REF(u16,u32); /* clip both */ CLIPCONV_DEFINE_BOTH_REF(s8,s16); CLIPCONV_DEFINE_BOTH_REF(s8,s32); CLIPCONV_DEFINE_BOTH_REF(u8,s16); CLIPCONV_DEFINE_BOTH_REF(u8,s32); CLIPCONV_DEFINE_BOTH_REF(s16,s32); CLIPCONV_DEFINE_BOTH_REF(u16,s32); /* clip lower */ CLIPCONV_DEFINE_LOWER_REF(u8,s8); CLIPCONV_DEFINE_LOWER_REF(u16,s16); CLIPCONV_DEFINE_LOWER_REF(u32,s32); /* clip both, float */ CLIPCONV_DEFINE_FLOAT_REF(s8,f32); CLIPCONV_DEFINE_FLOAT_REF(s8,f64); CLIPCONV_DEFINE_FLOAT_REF(u8,f32); CLIPCONV_DEFINE_FLOAT_REF(u8,f64); CLIPCONV_DEFINE_FLOAT_REF(s16,f32); CLIPCONV_DEFINE_FLOAT_REF(s16,f64); CLIPCONV_DEFINE_FLOAT_REF(u16,f32); CLIPCONV_DEFINE_FLOAT_REF(u16,f64); CLIPCONV_DEFINE_FLOAT_REF(s32,f32); CLIPCONV_DEFINE_FLOAT_REF(s32,f64); CLIPCONV_DEFINE_FLOAT_REF(u32,f32); CLIPCONV_DEFINE_FLOAT_REF(u32,f64); #define SCALECONV_DEFINE_REF_RINT(desttype,srctype) \ static void scaleconv_ ## desttype ## _ ## srctype ## _ref ( \ oil_type_ ## desttype *dest, \ oil_type_ ## srctype *src, \ int n, double *offset, double *multiplier) \ { \ int i; \ double x; \ for(i=0;ioil_type_max_ ## desttype) x=oil_type_max_ ## desttype; \ dest[i] = rint(x); \ } \ } \ OIL_DEFINE_CLASS(scaleconv_ ## desttype ## _ ## srctype, \ "oil_type_" #desttype " *dest, " \ "oil_type_" #srctype " *src, " \ "int n, double *s2_1, double *s3_1"); \ OIL_DEFINE_IMPL_REF(scaleconv_ ## desttype ## _ ## srctype ## _ref, \ scaleconv_ ## desttype ## _ ## srctype) #define SCALECONV_DEFINE_REF_CAST(desttype,srctype) \ static void scaleconv_ ## desttype ## _ ## srctype ## _ref ( \ oil_type_ ## desttype *dest, \ oil_type_ ## srctype *src, \ int n, double *offset, double *multiplier) \ { \ int i; \ for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #define SCALARADD_DEFINE_REF(type) \ static void scalaradd_ ## type ## _ref( \ oil_type_ ## type *dest, int dstr, \ oil_type_ ## type *src, int sstr, \ oil_type_ ## type *val, int n) \ { \ int i; \ for(i=0;i * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_TYPES_H_ #define _LIBOIL_TYPES_H_ #include #include OIL_BEGIN_DECLS /** * NULL: * * FIXME: gtk-doc is broken and doesn't know how to ignore this. */ #ifndef NULL #define NULL ((void *)0) #endif /** * SECTION:liboiltypes * @short_description: Internal Liboil types */ typedef struct _OilFunctionClass OilFunctionClass; typedef struct _OilFunctionImpl OilFunctionImpl; typedef struct _OilParameter OilParameter; typedef struct _OilTest OilTest; typedef void (*OilTestFunction) (OilTest *test); /** * oil_type_s8: * * Useful for autogenerated code. Do not use otherwise. */ #define oil_type_s8 int8_t /** * oil_type_u8: * * Useful for autogenerated code. Do not use otherwise. */ #define oil_type_u8 uint8_t /** * oil_type_s16: * * Useful for autogenerated code. Do not use otherwise. */ #define oil_type_s16 int16_t /** * oil_type_u16: * * Useful for autogenerated code. Do not use otherwise. */ #define oil_type_u16 uint16_t /** * oil_type_s32: * * Useful for autogenerated code. Do not use otherwise. */ #define oil_type_s32 int32_t /** * oil_type_u32: * * Useful for autogenerated code. Do not use otherwise. */ #define oil_type_u32 uint32_t /** * oil_type_s64: * * Useful for autogenerated code. Do not use otherwise. */ #define oil_type_s64 int64_t /** * oil_type_u64: * * Useful for autogenerated code. Do not use otherwise. */ #define oil_type_u64 uint64_t /** * oil_type_f32: * * Useful for autogenerated code. Do not use otherwise. */ #define oil_type_f32 float /** * oil_type_f64: * * Useful for autogenerated code. Do not use otherwise. */ #define oil_type_f64 double #define oil_type_min_s8 (-128) #define oil_type_min_u8 (0) #define oil_type_min_s16 (-32768) #define oil_type_min_u16 (0) #define oil_type_min_s32 (-2147483647 - 1) #define oil_type_min_u32 (0) #define oil_type_max_s8 (127) #define oil_type_max_u8 (255) #define oil_type_max_s16 (32767) #define oil_type_max_u16 (65535) #define oil_type_max_s32 (2147483647) #define oil_type_max_u32 (4294967295U) /** * oil_type_min_s8: * * Useful for autogenerated code. Do not use otherwise. */ /** * oil_type_min_u8: * * Useful for autogenerated code. Do not use otherwise. */ /** * oil_type_min_s16: * * Useful for autogenerated code. Do not use otherwise. */ /** * oil_type_min_u16: * * Useful for autogenerated code. Do not use otherwise. */ /** * oil_type_min_s32: * * Useful for autogenerated code. Do not use otherwise. */ /** * oil_type_min_u32: * * Useful for autogenerated code. Do not use otherwise. */ /** * oil_type_min_f32: * * Useful for autogenerated code. Do not use otherwise. */ /** * oil_type_min_f64: * * Useful for autogenerated code. Do not use otherwise. */ /** * oil_type_max_s8: * * Useful for autogenerated code. Do not use otherwise. */ /** * oil_type_max_u8: * * Useful for autogenerated code. Do not use otherwise. */ /** * oil_type_max_s16: * * Useful for autogenerated code. Do not use otherwise. */ /** * oil_type_max_u16: * * Useful for autogenerated code. Do not use otherwise. */ /** * oil_type_max_s32: * * Useful for autogenerated code. Do not use otherwise. */ /** * oil_type_max_u32: * * Useful for autogenerated code. Do not use otherwise. */ /** * oil_type_max_f32: * * Useful for autogenerated code. Do not use otherwise. */ /** * oil_type_max_f64: * * Useful for autogenerated code. Do not use otherwise. */ OIL_END_DECLS #endif liboil-0.3.17/liboil/build_class_decls.c0000644000175000017500000001032110717203073015046 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include void print_header (void); void print_footer (void); int main (int argc, char *argv[]) { OilFunctionClass *klass; int i; int n; oil_init_no_optimize (); print_header (); n = oil_class_get_n_classes (); for (i=0;iname); } print_footer (); return 0; } void print_header (void) { printf ("/*\n"); printf (" * LIBOIL - Library of Optimized Inner Loops\n"); printf (" * Copyright (c) 2005 David A. Schleef \n"); printf (" * All rights reserved.\n"); printf (" *\n"); printf (" * Redistribution and use in source and binary forms, with or without\n"); printf (" * modification, are permitted provided that the following conditions\n"); printf (" * are met:\n"); printf (" * 1. Redistributions of source code must retain the above copyright\n"); printf (" * notice, this list of conditions and the following disclaimer.\n"); printf (" * 2. Redistributions in binary form must reproduce the above copyright\n"); printf (" * notice, this list of conditions and the following disclaimer in the\n"); printf (" * documentation and/or other materials provided with the distribution.\n"); printf (" * \n"); printf (" * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n"); printf (" * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n"); printf (" * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n"); printf (" * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,\n"); printf (" * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n"); printf (" * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n"); printf (" * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n"); printf (" * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n"); printf (" * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\n"); printf (" * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n"); printf (" * POSSIBILITY OF SUCH DAMAGE.\n"); printf (" */\n"); printf ("\n"); printf ("/* This file is automatically generated. Do not edit. */\n"); printf ("\n"); printf ("#ifndef _LIBOIL_CLASSES_H_\n"); printf ("#define _LIBOIL_CLASSES_H_\n"); printf ("\n"); printf ("#include \n"); printf ("\n"); printf ("#ifdef __cplusplus\n"); printf ("extern \"C\" {\n"); printf ("#endif\n"); printf ("\n"); } void print_footer (void) { printf ("\n"); printf ("#ifdef __cplusplus\n"); printf ("}\n"); printf ("#endif\n"); printf ("\n"); printf ("#endif\n"); printf ("\n"); } liboil-0.3.17/liboil/liboilfault.h0000644000175000017500000000322710717203073013732 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2007 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef _LIBOIL_FAULT_H_ #define _LIBOIL_FAULT_H_ #include OIL_BEGIN_DECLS #ifdef OIL_ENABLE_UNSTABLE_API void oil_fault_check_enable (void); void oil_fault_check_disable (void); int oil_fault_check_try (void (*func)(void *), void *priv); #endif OIL_END_DECLS #endif liboil-0.3.17/liboil/liboilprofile.c0000644000175000017500000001002611066774524014261 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2003,2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #ifdef HAVE_SYS_TIME_H #include #endif #include #include #include /** * SECTION:liboilprofile * @title:OilProfile * @short_description: * Measuring the length of time needed to execute Liboil functions. * */ /** * oil_profile_init: * @prof: the OilProfile structure * * Initializes a profiling structure. */ void oil_profile_init (OilProfile *prof) { memset(prof, 0, sizeof(OilProfile)); prof->min = -1; } /** * oil_profile_stop_handle: * @prof: the OilProfile structure * * Handles post-processing of a single profiling run. * * FIXME: need more info */ void oil_profile_stop_handle (OilProfile *prof) { int i; prof->last = prof->stop - prof->start; prof->total += prof->last; prof->n++; if (prof->last < prof->min) prof->min = prof->last; for(i=0;ihist_n;i++) { if (prof->last == prof->hist_time[i]) { prof->hist_count[i]++; break; } } if (i == prof->hist_n && prof->hist_n < OIL_PROFILE_HIST_LENGTH) { prof->hist_time[prof->hist_n] = prof->last; prof->hist_count[prof->hist_n] = 1; prof->hist_n++; } } /** * oil_profile_get_ave_std: * @prof: the OilProfile structure * @ave_p: pointer to average * @std_p: pointer to standard deviation * * Calculates the average and standard deviation of a number of * profiling runs, and places the results in the locations * provided by @ave_p and @std_p. Either @ave_p and @std_p may * be NULL, in which case the values will not be written. */ void oil_profile_get_ave_std (OilProfile *prof, double *ave_p, double *std_p) { double ave; double std; int max_i; double off; double s; double s2; int i; int n; double x; do { s = s2 = 0; n = 0; max_i = -1; for(i=0;i<10;i++){ x = prof->hist_time[i]; s2 += x * x * prof->hist_count[i]; s += x * prof->hist_count[i]; n += prof->hist_count[i]; if (prof->hist_count[i] > 0) { if (max_i == -1 || prof->hist_time[i] > prof->hist_time[max_i]) { max_i = i; } } } ave = s / n; std = sqrt (s2 - s * s / n + n*n) / (n-1); off = (prof->hist_time[max_i] - ave)/std; if (off > 4.0) { prof->hist_count[max_i] = 0; } } while (off > 4.0); if (ave_p) *ave_p = ave; if (std_p) *std_p = std; } unsigned long (*_oil_profile_stamp)(void); /** * oil_profile_stamp: * * Creates a timestamp based on a CPU-specific high-frequency * counter, if available. * * Returns: a timestamp */ unsigned long oil_profile_stamp (void) { return _oil_profile_stamp(); } liboil-0.3.17/liboil/liboilmarshal.c0000644000175000017500000002057211151566776014262 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* This file is automatically generated. Do not edit. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include void _oil_test_marshal_function (void *func, unsigned long *args, int n_args, unsigned int pointer_mask, OilProfile *prof) { switch (pointer_mask) { case 0x0034: oil_profile_start (prof); ((void (*)(void *,int,void *,int,int))func) ((void *)args[0],(int)args[1],(void *)args[2],(int)args[3],(int)args[4]); oil_profile_stop (prof); break; case 0x007e: oil_profile_start (prof); ((void (*)(void *,void *,void *,void *,void *,int))func) ((void *)args[0],(void *)args[1],(void *)args[2],(void *)args[3],(void *)args[4],(int)args[5]); oil_profile_stop (prof); break; case 0x001e: oil_profile_start (prof); ((void (*)(void *,void *,void *,int))func) ((void *)args[0],(void *)args[1],(void *)args[2],(int)args[3]); oil_profile_stop (prof); break; case 0x00d4: oil_profile_start (prof); ((void (*)(void *,int,void *,int,void *,int,int))func) ((void *)args[0],(int)args[1],(void *)args[2],(int)args[3],(void *)args[4],(int)args[5],(int)args[6]); oil_profile_stop (prof); break; case 0x000e: oil_profile_start (prof); ((void (*)(void *,void *,int))func) ((void *)args[0],(void *)args[1],(int)args[2]); oil_profile_stop (prof); break; case 0x003b: oil_profile_start (prof); ((void (*)(void *,void *,int,void *,void *))func) ((void *)args[0],(void *)args[1],(int)args[2],(void *)args[3],(void *)args[4]); oil_profile_stop (prof); break; case 0x001d: oil_profile_start (prof); ((void (*)(void *,void *,int,void *))func) ((void *)args[0],(void *)args[1],(int)args[2],(void *)args[3]); oil_profile_stop (prof); break; case 0x00d3: oil_profile_start (prof); ((void (*)(void *,int,void *,int,int,void *,void *))func) ((void *)args[0],(int)args[1],(void *)args[2],(int)args[3],(int)args[4],(void *)args[5],(void *)args[6]); oil_profile_stop (prof); break; case 0x001a: oil_profile_start (prof); ((void (*)(void *,int,void *,int))func) ((void *)args[0],(int)args[1],(void *)args[2],(int)args[3]); oil_profile_stop (prof); break; case 0x003a: oil_profile_start (prof); ((void (*)(void *,void *,int,void *,int))func) ((void *)args[0],(void *)args[1],(int)args[2],(void *)args[3],(int)args[4]); oil_profile_stop (prof); break; case 0x01aa: oil_profile_start (prof); ((void (*)(void *,int,void *,int,void *,int,void *,int))func) ((void *)args[0],(int)args[1],(void *)args[2],(int)args[3],(void *)args[4],(int)args[5],(void *)args[6],(int)args[7]); oil_profile_stop (prof); break; case 0x1aaa: oil_profile_start (prof); ((void (*)(void *,int,void *,int,void *,int,void *,int,void *,int,void *,int))func) ((void *)args[0],(int)args[1],(void *)args[2],(int)args[3],(void *)args[4],(int)args[5],(void *)args[6],(int)args[7],(void *)args[8],(int)args[9],(void *)args[10],(int)args[11]); oil_profile_stop (prof); break; case 0x006a: oil_profile_start (prof); ((void (*)(void *,int,void *,int,void *,int))func) ((void *)args[0],(int)args[1],(void *)args[2],(int)args[3],(void *)args[4],(int)args[5]); oil_profile_stop (prof); break; case 0x00ea: oil_profile_start (prof); ((void (*)(void *,void *,int,void *,int,void *,int))func) ((void *)args[0],(void *)args[1],(int)args[2],(void *)args[3],(int)args[4],(void *)args[5],(int)args[6]); oil_profile_stop (prof); break; case 0x0074: oil_profile_start (prof); ((void (*)(void *,void *,int,void *,int,int))func) ((void *)args[0],(void *)args[1],(int)args[2],(void *)args[3],(int)args[4],(int)args[5]); oil_profile_stop (prof); break; case 0x0076: oil_profile_start (prof); ((void (*)(void *,void *,int,void *,void *,int))func) ((void *)args[0],(void *)args[1],(int)args[2],(void *)args[3],(void *)args[4],(int)args[5]); oil_profile_stop (prof); break; case 0x001c: oil_profile_start (prof); ((void (*)(void *,void *,int,int))func) ((void *)args[0],(void *)args[1],(int)args[2],(int)args[3]); oil_profile_stop (prof); break; case 0x0007: oil_profile_start (prof); ((void (*)(void *,void *))func) ((void *)args[0],(void *)args[1]); oil_profile_stop (prof); break; case 0x00fe: oil_profile_start (prof); ((void (*)(void *,void *,void *,void *,void *,void *,int))func) ((void *)args[0],(void *)args[1],(void *)args[2],(void *)args[3],(void *)args[4],(void *)args[5],(int)args[6]); oil_profile_stop (prof); break; case 0x003e: oil_profile_start (prof); ((void (*)(void *,void *,void *,void *,int))func) ((void *)args[0],(void *)args[1],(void *)args[2],(void *)args[3],(int)args[4]); oil_profile_stop (prof); break; case 0x00f6: oil_profile_start (prof); ((void (*)(void *,void *,void *,int,void *,void *,int))func) ((void *)args[0],(void *)args[1],(void *)args[2],(int)args[3],(void *)args[4],(void *)args[5],(int)args[6]); oil_profile_stop (prof); break; case 0x0078: oil_profile_start (prof); ((void (*)(void *,void *,void *,int,int,int))func) ((void *)args[0],(void *)args[1],(void *)args[2],(int)args[3],(int)args[4],(int)args[5]); oil_profile_stop (prof); break; case 0x0001: oil_profile_start (prof); ((void (*)(void))func) (); oil_profile_stop (prof); break; case 0x0035: oil_profile_start (prof); ((void (*)(void *,int,void *,int,void *))func) ((void *)args[0],(int)args[1],(void *)args[2],(int)args[3],(void *)args[4]); oil_profile_stop (prof); break; case 0x00d5: oil_profile_start (prof); ((void (*)(void *,int,void *,int,void *,int,void *))func) ((void *)args[0],(int)args[1],(void *)args[2],(int)args[3],(void *)args[4],(int)args[5],(void *)args[6]); oil_profile_stop (prof); break; case 0x000d: oil_profile_start (prof); ((void (*)(void *,int,void *))func) ((void *)args[0],(int)args[1],(void *)args[2]); oil_profile_stop (prof); break; case 0x000f: oil_profile_start (prof); ((void (*)(void *,void *,void *))func) ((void *)args[0],(void *)args[1],(void *)args[2]); oil_profile_stop (prof); break; case 0x0353: oil_profile_start (prof); ((void (*)(void *,int,void *,int,void *,int,int,void *,void *))func) ((void *)args[0],(int)args[1],(void *)args[2],(int)args[3],(void *)args[4],(int)args[5],(int)args[6],(void *)args[7],(void *)args[8]); oil_profile_stop (prof); break; default: OIL_ERROR ("unhandled marshal case"); } } liboil-0.3.17/liboil/Makefile.in0000644000175000017500000023336511332627671013340 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @HAVE_GCC_ASM_TRUE@@HAVE_I386_TRUE@am__append_1 = i386 i386_amd64 @HAVE_GCC_ASM_TRUE@@HAVE_I386_TRUE@am__append_2 = i386/libi386.la i386_amd64/libi386_amd64.la @HAVE_MMX_INTRINSICS_TRUE@am__append_3 = mmx @HAVE_MMX_INTRINSICS_TRUE@am__append_4 = mmx/libmmx.la @HAVE_SSE2_INTRINSICS_TRUE@am__append_5 = fb sse @HAVE_SSE2_INTRINSICS_TRUE@am__append_6 = fb/libfb.la sse/libsse.la #subdir_i386 += 3dnow #libs_i386 += 3dnow/lib3dnow.la @HAVE_AMD64_TRUE@@HAVE_GCC_ASM_TRUE@am__append_7 = amd64 i386_amd64 @HAVE_AMD64_TRUE@@HAVE_GCC_ASM_TRUE@am__append_8 = amd64/libamd64.la i386_amd64/libi386_amd64.la @HAVE_GCC_ASM_TRUE@@HAVE_POWERPC_TRUE@am__append_9 = powerpc motovec @HAVE_GCC_ASM_TRUE@@HAVE_POWERPC_TRUE@am__append_10 = powerpc/libpowerpc.la motovec/libmotovec.la # motovec doesn't compile on snow leopard, and isn't useful elsewhere #SUBDIRS += motovec #libs += motovec/libmotovec.la @HAVE_ASM_BLOCKS_TRUE@@HAVE_GCC_ASM_TRUE@@HAVE_POWERPC_TRUE@am__append_11 = powerpc_asm_blocks @HAVE_ASM_BLOCKS_TRUE@@HAVE_GCC_ASM_TRUE@@HAVE_POWERPC_TRUE@am__append_12 = powerpc/libpowerpc_asm_blocks.la @HAVE_ARM_TRUE@@HAVE_GCC_ASM_TRUE@am__append_13 = arm @HAVE_ARM_TRUE@@HAVE_GCC_ASM_TRUE@am__append_14 = arm/libarm.la @USE_NEW_ABI_TRUE@am__append_15 = liboil-@LIBOIL_OLD_MAJORMINOR@.la noinst_PROGRAMS = build_prototypes$(EXEEXT) \ build_prototypes_doc$(EXEEXT) build_marshal$(EXEEXT) \ build_class_decls$(EXEEXT) build_trampolines$(EXEEXT) \ build_prototypes_04$(EXEEXT) @USE_NEW_ABI_FALSE@am__append_16 = \ @USE_NEW_ABI_FALSE@ conv/libconv.la \ @USE_NEW_ABI_FALSE@ deprecated/libdeprecated.la @HAVE_I386_TRUE@am__append_17 = liboilcpu-x86.c @HAVE_AMD64_TRUE@@HAVE_I386_FALSE@am__append_18 = liboilcpu-x86.c @HAVE_AMD64_FALSE@@HAVE_I386_FALSE@@HAVE_POWERPC_TRUE@am__append_19 = liboilcpu-powerpc.c @HAVE_AMD64_FALSE@@HAVE_ARM_TRUE@@HAVE_I386_FALSE@@HAVE_POWERPC_FALSE@am__append_20 = liboilcpu-arm.c @HAVE_AMD64_FALSE@@HAVE_ARM_FALSE@@HAVE_I386_FALSE@@HAVE_POWERPC_FALSE@am__append_21 = liboilcpu-misc.c @USE_NEW_ABI_TRUE@am__append_22 = \ @USE_NEW_ABI_TRUE@ liboiltrampolines.c subdir = liboil DIST_COMMON = README $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(buildnoinstdir)" "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(buildnoinst_LTLIBRARIES) $(lib_LTLIBRARIES) \ $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = liboil_@LIBOIL_MAJORMINOR@_la_DEPENDENCIES = liboilfunctions.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am__liboil_@LIBOIL_MAJORMINOR@_la_SOURCES_DIST = liboil.h \ liboilcolorspace.h liboilcpu.c liboildebug.c liboildebug.h \ liboilfault.c liboilfault.h liboilfuncs.h liboilfunction.c \ liboilfunction.h liboilmarshal.c liboilprofile.c \ liboilprofile.h liboilprototype.c liboilrandom.c liboiltest.c \ liboiltest.h liboiltypes.h liboilutils.c liboilutils.h \ liboilcpu-x86.c liboilcpu-powerpc.c liboilcpu-arm.c \ liboilcpu-misc.c liboiltrampolines.c @HAVE_I386_TRUE@am__objects_1 = liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-x86.lo @HAVE_AMD64_TRUE@@HAVE_I386_FALSE@am__objects_2 = liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-x86.lo @HAVE_AMD64_FALSE@@HAVE_I386_FALSE@@HAVE_POWERPC_TRUE@am__objects_3 = liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-powerpc.lo @HAVE_AMD64_FALSE@@HAVE_ARM_TRUE@@HAVE_I386_FALSE@@HAVE_POWERPC_FALSE@am__objects_4 = liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-arm.lo @HAVE_AMD64_FALSE@@HAVE_ARM_FALSE@@HAVE_I386_FALSE@@HAVE_POWERPC_FALSE@am__objects_5 = liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-misc.lo @USE_NEW_ABI_TRUE@am__objects_6 = liboil_@LIBOIL_MAJORMINOR@_la-liboiltrampolines.lo am_liboil_@LIBOIL_MAJORMINOR@_la_OBJECTS = \ liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu.lo \ liboil_@LIBOIL_MAJORMINOR@_la-liboildebug.lo \ liboil_@LIBOIL_MAJORMINOR@_la-liboilfault.lo \ liboil_@LIBOIL_MAJORMINOR@_la-liboilfunction.lo \ liboil_@LIBOIL_MAJORMINOR@_la-liboilmarshal.lo \ liboil_@LIBOIL_MAJORMINOR@_la-liboilprofile.lo \ liboil_@LIBOIL_MAJORMINOR@_la-liboilprototype.lo \ liboil_@LIBOIL_MAJORMINOR@_la-liboilrandom.lo \ liboil_@LIBOIL_MAJORMINOR@_la-liboiltest.lo \ liboil_@LIBOIL_MAJORMINOR@_la-liboilutils.lo $(am__objects_1) \ $(am__objects_2) $(am__objects_3) $(am__objects_4) \ $(am__objects_5) $(am__objects_6) nodist_liboil_@LIBOIL_MAJORMINOR@_la_OBJECTS = \ liboil_@LIBOIL_MAJORMINOR@_la-liboilarray.lo liboil_@LIBOIL_MAJORMINOR@_la_OBJECTS = \ $(am_liboil_@LIBOIL_MAJORMINOR@_la_OBJECTS) \ $(nodist_liboil_@LIBOIL_MAJORMINOR@_la_OBJECTS) liboil_@LIBOIL_MAJORMINOR@_la_LINK = $(LIBTOOL) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) \ $(liboil_@LIBOIL_MAJORMINOR@_la_LDFLAGS) $(LDFLAGS) -o $@ @USE_NEW_ABI_TRUE@liboil_@LIBOIL_OLD_MAJORMINOR@_la_DEPENDENCIES = \ @USE_NEW_ABI_TRUE@ deprecated/libdeprecated.la \ @USE_NEW_ABI_TRUE@ liboil-@LIBOIL_MAJORMINOR@.la am_liboil_@LIBOIL_OLD_MAJORMINOR@_la_OBJECTS = liboil_@LIBOIL_OLD_MAJORMINOR@_la_OBJECTS = \ $(am_liboil_@LIBOIL_OLD_MAJORMINOR@_la_OBJECTS) liboil_@LIBOIL_OLD_MAJORMINOR@_la_LINK = $(LIBTOOL) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) \ $(liboil_@LIBOIL_OLD_MAJORMINOR@_la_LDFLAGS) $(LDFLAGS) -o $@ @USE_NEW_ABI_TRUE@am_liboil_@LIBOIL_OLD_MAJORMINOR@_la_rpath = -rpath \ @USE_NEW_ABI_TRUE@ $(libdir) liboilfunctions_la_DEPENDENCIES = c/lib_c.la \ colorspace/libcolorspace.la copy/libcopy.la dct/libdct.la \ $(libs) jpeg/libjpeg.la math/libmath.la md5/libmd5.la \ ref/libref.la simdpack/libsimdpack.la utf8/libutf8.la \ $(am__append_16) am_liboilfunctions_la_OBJECTS = liboilfunctions_la-null.lo liboilfunctions_la_OBJECTS = $(am_liboilfunctions_la_OBJECTS) liboilfunctions_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(liboilfunctions_la_CFLAGS) $(CFLAGS) \ $(liboilfunctions_la_LDFLAGS) $(LDFLAGS) -o $@ liboiltmp1_la_DEPENDENCIES = liboilfunctions.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_liboiltmp1_la_OBJECTS = liboiltmp.lo liboiltmp1_la_OBJECTS = $(am_liboiltmp1_la_OBJECTS) liboiltmp1_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(liboiltmp1_la_LDFLAGS) $(LDFLAGS) -o $@ PROGRAMS = $(noinst_PROGRAMS) am_build_class_decls_OBJECTS = \ build_class_decls-build_class_decls.$(OBJEXT) build_class_decls_OBJECTS = $(am_build_class_decls_OBJECTS) build_class_decls_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(build_class_decls_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ am_build_marshal_OBJECTS = build_marshal-build_marshal.$(OBJEXT) build_marshal_OBJECTS = $(am_build_marshal_OBJECTS) build_marshal_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(build_marshal_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_build_prototypes_OBJECTS = \ build_prototypes-build_prototypes.$(OBJEXT) build_prototypes_OBJECTS = $(am_build_prototypes_OBJECTS) build_prototypes_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(build_prototypes_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_build_prototypes_04_OBJECTS = \ build_prototypes_04-build_prototypes_04.$(OBJEXT) build_prototypes_04_OBJECTS = $(am_build_prototypes_04_OBJECTS) build_prototypes_04_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(build_prototypes_04_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_build_prototypes_doc_OBJECTS = \ build_prototypes_doc-build_prototypes_doc.$(OBJEXT) build_prototypes_doc_OBJECTS = $(am_build_prototypes_doc_OBJECTS) build_prototypes_doc_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(build_prototypes_doc_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_build_trampolines_OBJECTS = \ build_trampolines-build_trampolines.$(OBJEXT) build_trampolines_OBJECTS = $(am_build_trampolines_OBJECTS) build_trampolines_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(build_trampolines_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(liboil_@LIBOIL_MAJORMINOR@_la_SOURCES) \ $(nodist_liboil_@LIBOIL_MAJORMINOR@_la_SOURCES) \ $(liboil_@LIBOIL_OLD_MAJORMINOR@_la_SOURCES) \ $(liboilfunctions_la_SOURCES) $(liboiltmp1_la_SOURCES) \ $(build_class_decls_SOURCES) $(build_marshal_SOURCES) \ $(build_prototypes_SOURCES) $(build_prototypes_04_SOURCES) \ $(build_prototypes_doc_SOURCES) $(build_trampolines_SOURCES) DIST_SOURCES = $(am__liboil_@LIBOIL_MAJORMINOR@_la_SOURCES_DIST) \ $(liboil_@LIBOIL_OLD_MAJORMINOR@_la_SOURCES) \ $(liboilfunctions_la_SOURCES) $(liboiltmp1_la_SOURCES) \ $(build_class_decls_SOURCES) $(build_marshal_SOURCES) \ $(build_prototypes_SOURCES) $(build_prototypes_04_SOURCES) \ $(build_prototypes_doc_SOURCES) $(build_trampolines_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive HEADERS = $(nodist_noinst_HEADERS) $(nodist_pkginclude_HEADERS) \ $(pkginclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" pkgincludedir = $(includedir)/liboil-@LIBOIL_MAJORMINOR@/liboil ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ DIST_SUBDIRS = amd64 3dnow c colorspace conv copy dct fb i386 i386_amd64 jpeg math md5 mmx motovec powerpc powerpc_asm_blocks ref simdpack sse utf8 deprecated arm SUBDIRS = c colorspace conv copy dct jpeg math md5 ref simdpack utf8 \ deprecated $(am__append_1) $(am__append_3) $(am__append_5) \ $(am__append_7) $(am__append_9) $(am__append_11) \ $(am__append_13) EXTRA_DIST = README libs = $(am__append_2) $(am__append_4) $(am__append_6) $(am__append_8) \ $(am__append_10) $(am__append_12) $(am__append_14) lib_LTLIBRARIES = liboil-@LIBOIL_MAJORMINOR@.la $(am__append_15) buildnoinstdir = $(libdir) buildnoinst_LTLIBRARIES = liboiltmp1.la noinst_LTLIBRARIES = liboilfunctions.la pkginclude_HEADERS = liboil.h liboilfunction.h liboildebug.h liboilfuncs.h \ liboiltypes.h liboilcpu.h liboilprototype.h liboilparameter.h \ liboilrandom.h liboilgcc.h liboiltest.h liboilprofile.h \ liboilinternal.h liboilclasses.h liboilfault.h liboilutils.h nodist_pkginclude_HEADERS = liboil-stdint.h @ENABLE_GTK_DOC_FALSE@nodist_noinst_HEADERS = @ENABLE_GTK_DOC_TRUE@nodist_noinst_HEADERS = liboilfuncs-doc.h CLEANFILES = liboilarray.c liboilfuncs-doc.h DISTCLEANFILES = liboil-stdint.h liboilfunctions_la_SOURCES = \ null.c liboilfunctions_la_CFLAGS = $(LIBOIL_CFLAGS) liboilfunctions_la_LIBADD = c/lib_c.la colorspace/libcolorspace.la \ copy/libcopy.la dct/libdct.la $(libs) jpeg/libjpeg.la \ math/libmath.la md5/libmd5.la ref/libref.la \ simdpack/libsimdpack.la utf8/libutf8.la $(am__append_16) liboilfunctions_la_LDFLAGS = \ -no-undefined liboiltmp1_la_SOURCES = \ liboiltmp.c liboiltmp1_la_LDFLAGS = \ -no-undefined \ -export-symbols-regex 'oil_' liboiltmp1_la_LIBADD = \ liboilfunctions.la \ $(LIBM) $(LIBRT) liboil_@LIBOIL_MAJORMINOR@_la_SOURCES = liboil.h liboilcolorspace.h \ liboilcpu.c liboildebug.c liboildebug.h liboilfault.c \ liboilfault.h liboilfuncs.h liboilfunction.c liboilfunction.h \ liboilmarshal.c liboilprofile.c liboilprofile.h \ liboilprototype.c liboilrandom.c liboiltest.c liboiltest.h \ liboiltypes.h liboilutils.c liboilutils.h $(am__append_17) \ $(am__append_18) $(am__append_19) $(am__append_20) \ $(am__append_21) $(am__append_22) nodist_liboil_@LIBOIL_MAJORMINOR@_la_SOURCES = \ liboilarray.c liboil_@LIBOIL_MAJORMINOR@_la_LIBADD = \ liboilfunctions.la \ $(LIBM) \ $(LIBRT) liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS = $(LIBOIL_CFLAGS) liboil_@LIBOIL_MAJORMINOR@_la_LDFLAGS = \ -no-undefined \ -version-info $(LIBOIL_LIBVERSION) \ -export-symbols-regex '^oil_' # This is required to use 'make -j2'. Automake doesn't seem to notice # that one of the dependencies is in this directory. build_prototypes_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la build_prototypes_SOURCES = build_prototypes.c build_prototypes_CFLAGS = $(LIBOIL_CFLAGS) build_prototypes_LDADD = $(LIBOIL_LIBS) build_prototypes_04_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la build_prototypes_04_SOURCES = build_prototypes_04.c build_prototypes_04_CFLAGS = $(LIBOIL_CFLAGS) build_prototypes_04_LDADD = $(LIBOIL_LIBS) build_class_decls_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la build_class_decls_SOURCES = build_class_decls.c build_class_decls_CFLAGS = $(LIBOIL_CFLAGS) build_class_decls_LDADD = $(LIBOIL_LIBS) build_prototypes_doc_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la build_prototypes_doc_SOURCES = build_prototypes_doc.c build_prototypes_doc_CFLAGS = $(LIBOIL_CFLAGS) build_prototypes_doc_LDADD = $(LIBOIL_LIBS) build_marshal_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la build_marshal_SOURCES = build_marshal.c build_marshal_CFLAGS = $(LIBOIL_CFLAGS) build_marshal_LDADD = $(LIBOIL_LIBS) build_trampolines_DEPENDENCIES = liboil-$(LIBOIL_MAJORMINOR).la build_trampolines_SOURCES = build_trampolines.c build_trampolines_CFLAGS = $(LIBOIL_CFLAGS) build_trampolines_LDADD = $(LIBOIL_LIBS) @USE_NEW_ABI_TRUE@liboil_@LIBOIL_OLD_MAJORMINOR@_la_SOURCES = @USE_NEW_ABI_TRUE@liboil_@LIBOIL_OLD_MAJORMINOR@_la_LIBADD = \ @USE_NEW_ABI_TRUE@ deprecated/libdeprecated.la \ @USE_NEW_ABI_TRUE@ liboil-@LIBOIL_MAJORMINOR@.la @USE_NEW_ABI_TRUE@liboil_@LIBOIL_OLD_MAJORMINOR@_la_LDFLAGS = \ @USE_NEW_ABI_TRUE@ -no-undefined \ @USE_NEW_ABI_TRUE@ -version-info $(LIBOIL_LIBVERSION) \ @USE_NEW_ABI_TRUE@ -export-symbols-regex '^oil_' all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): uninstall-buildnoinstLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(buildnoinst_LTLIBRARIES)'; test -n "$(buildnoinstdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(buildnoinstdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(buildnoinstdir)/$$f"; \ done clean-buildnoinstLTLIBRARIES: -test -z "$(buildnoinst_LTLIBRARIES)" || rm -f $(buildnoinst_LTLIBRARIES) @list='$(buildnoinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done liboil-@LIBOIL_MAJORMINOR@.la: $(liboil_@LIBOIL_MAJORMINOR@_la_OBJECTS) $(liboil_@LIBOIL_MAJORMINOR@_la_DEPENDENCIES) $(liboil_@LIBOIL_MAJORMINOR@_la_LINK) -rpath $(libdir) $(liboil_@LIBOIL_MAJORMINOR@_la_OBJECTS) $(liboil_@LIBOIL_MAJORMINOR@_la_LIBADD) $(LIBS) liboil-@LIBOIL_OLD_MAJORMINOR@.la: $(liboil_@LIBOIL_OLD_MAJORMINOR@_la_OBJECTS) $(liboil_@LIBOIL_OLD_MAJORMINOR@_la_DEPENDENCIES) $(liboil_@LIBOIL_OLD_MAJORMINOR@_la_LINK) $(am_liboil_@LIBOIL_OLD_MAJORMINOR@_la_rpath) $(liboil_@LIBOIL_OLD_MAJORMINOR@_la_OBJECTS) $(liboil_@LIBOIL_OLD_MAJORMINOR@_la_LIBADD) $(LIBS) liboilfunctions.la: $(liboilfunctions_la_OBJECTS) $(liboilfunctions_la_DEPENDENCIES) $(liboilfunctions_la_LINK) $(liboilfunctions_la_OBJECTS) $(liboilfunctions_la_LIBADD) $(LIBS) liboiltmp1.la: $(liboiltmp1_la_OBJECTS) $(liboiltmp1_la_DEPENDENCIES) $(liboiltmp1_la_LINK) -rpath $(buildnoinstdir) $(liboiltmp1_la_OBJECTS) $(liboiltmp1_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list build_class_decls$(EXEEXT): $(build_class_decls_OBJECTS) $(build_class_decls_DEPENDENCIES) @rm -f build_class_decls$(EXEEXT) $(build_class_decls_LINK) $(build_class_decls_OBJECTS) $(build_class_decls_LDADD) $(LIBS) build_marshal$(EXEEXT): $(build_marshal_OBJECTS) $(build_marshal_DEPENDENCIES) @rm -f build_marshal$(EXEEXT) $(build_marshal_LINK) $(build_marshal_OBJECTS) $(build_marshal_LDADD) $(LIBS) build_prototypes$(EXEEXT): $(build_prototypes_OBJECTS) $(build_prototypes_DEPENDENCIES) @rm -f build_prototypes$(EXEEXT) $(build_prototypes_LINK) $(build_prototypes_OBJECTS) $(build_prototypes_LDADD) $(LIBS) build_prototypes_04$(EXEEXT): $(build_prototypes_04_OBJECTS) $(build_prototypes_04_DEPENDENCIES) @rm -f build_prototypes_04$(EXEEXT) $(build_prototypes_04_LINK) $(build_prototypes_04_OBJECTS) $(build_prototypes_04_LDADD) $(LIBS) build_prototypes_doc$(EXEEXT): $(build_prototypes_doc_OBJECTS) $(build_prototypes_doc_DEPENDENCIES) @rm -f build_prototypes_doc$(EXEEXT) $(build_prototypes_doc_LINK) $(build_prototypes_doc_OBJECTS) $(build_prototypes_doc_LDADD) $(LIBS) build_trampolines$(EXEEXT): $(build_trampolines_OBJECTS) $(build_trampolines_DEPENDENCIES) @rm -f build_trampolines$(EXEEXT) $(build_trampolines_LINK) $(build_trampolines_OBJECTS) $(build_trampolines_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/build_class_decls-build_class_decls.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/build_marshal-build_marshal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/build_prototypes-build_prototypes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/build_prototypes_04-build_prototypes_04.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/build_prototypes_doc-build_prototypes_doc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/build_trampolines-build_trampolines.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilarray.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-arm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-powerpc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-x86.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboildebug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilfault.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilfunction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilmarshal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilprofile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilprototype.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilrandom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboiltest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboiltrampolines.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilutils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboilfunctions_la-null.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liboiltmp.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu.lo: liboilcpu.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu.lo `test -f 'liboilcpu.c' || echo '$(srcdir)/'`liboilcpu.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboilcpu.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu.lo `test -f 'liboilcpu.c' || echo '$(srcdir)/'`liboilcpu.c liboil_@LIBOIL_MAJORMINOR@_la-liboildebug.lo: liboildebug.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboildebug.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboildebug.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboildebug.lo `test -f 'liboildebug.c' || echo '$(srcdir)/'`liboildebug.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboildebug.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboildebug.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboildebug.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboildebug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboildebug.lo `test -f 'liboildebug.c' || echo '$(srcdir)/'`liboildebug.c liboil_@LIBOIL_MAJORMINOR@_la-liboilfault.lo: liboilfault.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboilfault.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilfault.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilfault.lo `test -f 'liboilfault.c' || echo '$(srcdir)/'`liboilfault.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilfault.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilfault.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboilfault.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboilfault.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilfault.lo `test -f 'liboilfault.c' || echo '$(srcdir)/'`liboilfault.c liboil_@LIBOIL_MAJORMINOR@_la-liboilfunction.lo: liboilfunction.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboilfunction.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilfunction.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilfunction.lo `test -f 'liboilfunction.c' || echo '$(srcdir)/'`liboilfunction.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilfunction.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilfunction.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboilfunction.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboilfunction.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilfunction.lo `test -f 'liboilfunction.c' || echo '$(srcdir)/'`liboilfunction.c liboil_@LIBOIL_MAJORMINOR@_la-liboilmarshal.lo: liboilmarshal.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboilmarshal.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilmarshal.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilmarshal.lo `test -f 'liboilmarshal.c' || echo '$(srcdir)/'`liboilmarshal.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilmarshal.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilmarshal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboilmarshal.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboilmarshal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilmarshal.lo `test -f 'liboilmarshal.c' || echo '$(srcdir)/'`liboilmarshal.c liboil_@LIBOIL_MAJORMINOR@_la-liboilprofile.lo: liboilprofile.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboilprofile.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilprofile.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilprofile.lo `test -f 'liboilprofile.c' || echo '$(srcdir)/'`liboilprofile.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilprofile.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilprofile.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboilprofile.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboilprofile.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilprofile.lo `test -f 'liboilprofile.c' || echo '$(srcdir)/'`liboilprofile.c liboil_@LIBOIL_MAJORMINOR@_la-liboilprototype.lo: liboilprototype.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboilprototype.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilprototype.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilprototype.lo `test -f 'liboilprototype.c' || echo '$(srcdir)/'`liboilprototype.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilprototype.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilprototype.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboilprototype.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboilprototype.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilprototype.lo `test -f 'liboilprototype.c' || echo '$(srcdir)/'`liboilprototype.c liboil_@LIBOIL_MAJORMINOR@_la-liboilrandom.lo: liboilrandom.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboilrandom.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilrandom.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilrandom.lo `test -f 'liboilrandom.c' || echo '$(srcdir)/'`liboilrandom.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilrandom.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilrandom.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboilrandom.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboilrandom.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilrandom.lo `test -f 'liboilrandom.c' || echo '$(srcdir)/'`liboilrandom.c liboil_@LIBOIL_MAJORMINOR@_la-liboiltest.lo: liboiltest.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboiltest.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboiltest.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboiltest.lo `test -f 'liboiltest.c' || echo '$(srcdir)/'`liboiltest.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboiltest.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboiltest.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboiltest.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboiltest.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboiltest.lo `test -f 'liboiltest.c' || echo '$(srcdir)/'`liboiltest.c liboil_@LIBOIL_MAJORMINOR@_la-liboilutils.lo: liboilutils.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboilutils.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilutils.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilutils.lo `test -f 'liboilutils.c' || echo '$(srcdir)/'`liboilutils.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilutils.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilutils.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboilutils.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboilutils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilutils.lo `test -f 'liboilutils.c' || echo '$(srcdir)/'`liboilutils.c liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-x86.lo: liboilcpu-x86.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-x86.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-x86.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-x86.lo `test -f 'liboilcpu-x86.c' || echo '$(srcdir)/'`liboilcpu-x86.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-x86.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-x86.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboilcpu-x86.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-x86.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-x86.lo `test -f 'liboilcpu-x86.c' || echo '$(srcdir)/'`liboilcpu-x86.c liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-powerpc.lo: liboilcpu-powerpc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-powerpc.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-powerpc.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-powerpc.lo `test -f 'liboilcpu-powerpc.c' || echo '$(srcdir)/'`liboilcpu-powerpc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-powerpc.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-powerpc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboilcpu-powerpc.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-powerpc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-powerpc.lo `test -f 'liboilcpu-powerpc.c' || echo '$(srcdir)/'`liboilcpu-powerpc.c liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-arm.lo: liboilcpu-arm.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-arm.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-arm.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-arm.lo `test -f 'liboilcpu-arm.c' || echo '$(srcdir)/'`liboilcpu-arm.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-arm.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-arm.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboilcpu-arm.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-arm.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-arm.lo `test -f 'liboilcpu-arm.c' || echo '$(srcdir)/'`liboilcpu-arm.c liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-misc.lo: liboilcpu-misc.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-misc.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-misc.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-misc.lo `test -f 'liboilcpu-misc.c' || echo '$(srcdir)/'`liboilcpu-misc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-misc.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-misc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboilcpu-misc.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-misc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilcpu-misc.lo `test -f 'liboilcpu-misc.c' || echo '$(srcdir)/'`liboilcpu-misc.c liboil_@LIBOIL_MAJORMINOR@_la-liboiltrampolines.lo: liboiltrampolines.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboiltrampolines.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboiltrampolines.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboiltrampolines.lo `test -f 'liboiltrampolines.c' || echo '$(srcdir)/'`liboiltrampolines.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboiltrampolines.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboiltrampolines.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboiltrampolines.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboiltrampolines.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboiltrampolines.lo `test -f 'liboiltrampolines.c' || echo '$(srcdir)/'`liboiltrampolines.c liboil_@LIBOIL_MAJORMINOR@_la-liboilarray.lo: liboilarray.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT liboil_@LIBOIL_MAJORMINOR@_la-liboilarray.lo -MD -MP -MF $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilarray.Tpo -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilarray.lo `test -f 'liboilarray.c' || echo '$(srcdir)/'`liboilarray.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilarray.Tpo $(DEPDIR)/liboil_@LIBOIL_MAJORMINOR@_la-liboilarray.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='liboilarray.c' object='liboil_@LIBOIL_MAJORMINOR@_la-liboilarray.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboil_@LIBOIL_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o liboil_@LIBOIL_MAJORMINOR@_la-liboilarray.lo `test -f 'liboilarray.c' || echo '$(srcdir)/'`liboilarray.c liboilfunctions_la-null.lo: null.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboilfunctions_la_CFLAGS) $(CFLAGS) -MT liboilfunctions_la-null.lo -MD -MP -MF $(DEPDIR)/liboilfunctions_la-null.Tpo -c -o liboilfunctions_la-null.lo `test -f 'null.c' || echo '$(srcdir)/'`null.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/liboilfunctions_la-null.Tpo $(DEPDIR)/liboilfunctions_la-null.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='null.c' object='liboilfunctions_la-null.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liboilfunctions_la_CFLAGS) $(CFLAGS) -c -o liboilfunctions_la-null.lo `test -f 'null.c' || echo '$(srcdir)/'`null.c build_class_decls-build_class_decls.o: build_class_decls.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_class_decls_CFLAGS) $(CFLAGS) -MT build_class_decls-build_class_decls.o -MD -MP -MF $(DEPDIR)/build_class_decls-build_class_decls.Tpo -c -o build_class_decls-build_class_decls.o `test -f 'build_class_decls.c' || echo '$(srcdir)/'`build_class_decls.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/build_class_decls-build_class_decls.Tpo $(DEPDIR)/build_class_decls-build_class_decls.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='build_class_decls.c' object='build_class_decls-build_class_decls.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_class_decls_CFLAGS) $(CFLAGS) -c -o build_class_decls-build_class_decls.o `test -f 'build_class_decls.c' || echo '$(srcdir)/'`build_class_decls.c build_class_decls-build_class_decls.obj: build_class_decls.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_class_decls_CFLAGS) $(CFLAGS) -MT build_class_decls-build_class_decls.obj -MD -MP -MF $(DEPDIR)/build_class_decls-build_class_decls.Tpo -c -o build_class_decls-build_class_decls.obj `if test -f 'build_class_decls.c'; then $(CYGPATH_W) 'build_class_decls.c'; else $(CYGPATH_W) '$(srcdir)/build_class_decls.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/build_class_decls-build_class_decls.Tpo $(DEPDIR)/build_class_decls-build_class_decls.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='build_class_decls.c' object='build_class_decls-build_class_decls.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_class_decls_CFLAGS) $(CFLAGS) -c -o build_class_decls-build_class_decls.obj `if test -f 'build_class_decls.c'; then $(CYGPATH_W) 'build_class_decls.c'; else $(CYGPATH_W) '$(srcdir)/build_class_decls.c'; fi` build_marshal-build_marshal.o: build_marshal.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_marshal_CFLAGS) $(CFLAGS) -MT build_marshal-build_marshal.o -MD -MP -MF $(DEPDIR)/build_marshal-build_marshal.Tpo -c -o build_marshal-build_marshal.o `test -f 'build_marshal.c' || echo '$(srcdir)/'`build_marshal.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/build_marshal-build_marshal.Tpo $(DEPDIR)/build_marshal-build_marshal.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='build_marshal.c' object='build_marshal-build_marshal.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_marshal_CFLAGS) $(CFLAGS) -c -o build_marshal-build_marshal.o `test -f 'build_marshal.c' || echo '$(srcdir)/'`build_marshal.c build_marshal-build_marshal.obj: build_marshal.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_marshal_CFLAGS) $(CFLAGS) -MT build_marshal-build_marshal.obj -MD -MP -MF $(DEPDIR)/build_marshal-build_marshal.Tpo -c -o build_marshal-build_marshal.obj `if test -f 'build_marshal.c'; then $(CYGPATH_W) 'build_marshal.c'; else $(CYGPATH_W) '$(srcdir)/build_marshal.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/build_marshal-build_marshal.Tpo $(DEPDIR)/build_marshal-build_marshal.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='build_marshal.c' object='build_marshal-build_marshal.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_marshal_CFLAGS) $(CFLAGS) -c -o build_marshal-build_marshal.obj `if test -f 'build_marshal.c'; then $(CYGPATH_W) 'build_marshal.c'; else $(CYGPATH_W) '$(srcdir)/build_marshal.c'; fi` build_prototypes-build_prototypes.o: build_prototypes.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_prototypes_CFLAGS) $(CFLAGS) -MT build_prototypes-build_prototypes.o -MD -MP -MF $(DEPDIR)/build_prototypes-build_prototypes.Tpo -c -o build_prototypes-build_prototypes.o `test -f 'build_prototypes.c' || echo '$(srcdir)/'`build_prototypes.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/build_prototypes-build_prototypes.Tpo $(DEPDIR)/build_prototypes-build_prototypes.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='build_prototypes.c' object='build_prototypes-build_prototypes.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_prototypes_CFLAGS) $(CFLAGS) -c -o build_prototypes-build_prototypes.o `test -f 'build_prototypes.c' || echo '$(srcdir)/'`build_prototypes.c build_prototypes-build_prototypes.obj: build_prototypes.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_prototypes_CFLAGS) $(CFLAGS) -MT build_prototypes-build_prototypes.obj -MD -MP -MF $(DEPDIR)/build_prototypes-build_prototypes.Tpo -c -o build_prototypes-build_prototypes.obj `if test -f 'build_prototypes.c'; then $(CYGPATH_W) 'build_prototypes.c'; else $(CYGPATH_W) '$(srcdir)/build_prototypes.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/build_prototypes-build_prototypes.Tpo $(DEPDIR)/build_prototypes-build_prototypes.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='build_prototypes.c' object='build_prototypes-build_prototypes.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_prototypes_CFLAGS) $(CFLAGS) -c -o build_prototypes-build_prototypes.obj `if test -f 'build_prototypes.c'; then $(CYGPATH_W) 'build_prototypes.c'; else $(CYGPATH_W) '$(srcdir)/build_prototypes.c'; fi` build_prototypes_04-build_prototypes_04.o: build_prototypes_04.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_prototypes_04_CFLAGS) $(CFLAGS) -MT build_prototypes_04-build_prototypes_04.o -MD -MP -MF $(DEPDIR)/build_prototypes_04-build_prototypes_04.Tpo -c -o build_prototypes_04-build_prototypes_04.o `test -f 'build_prototypes_04.c' || echo '$(srcdir)/'`build_prototypes_04.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/build_prototypes_04-build_prototypes_04.Tpo $(DEPDIR)/build_prototypes_04-build_prototypes_04.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='build_prototypes_04.c' object='build_prototypes_04-build_prototypes_04.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_prototypes_04_CFLAGS) $(CFLAGS) -c -o build_prototypes_04-build_prototypes_04.o `test -f 'build_prototypes_04.c' || echo '$(srcdir)/'`build_prototypes_04.c build_prototypes_04-build_prototypes_04.obj: build_prototypes_04.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_prototypes_04_CFLAGS) $(CFLAGS) -MT build_prototypes_04-build_prototypes_04.obj -MD -MP -MF $(DEPDIR)/build_prototypes_04-build_prototypes_04.Tpo -c -o build_prototypes_04-build_prototypes_04.obj `if test -f 'build_prototypes_04.c'; then $(CYGPATH_W) 'build_prototypes_04.c'; else $(CYGPATH_W) '$(srcdir)/build_prototypes_04.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/build_prototypes_04-build_prototypes_04.Tpo $(DEPDIR)/build_prototypes_04-build_prototypes_04.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='build_prototypes_04.c' object='build_prototypes_04-build_prototypes_04.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_prototypes_04_CFLAGS) $(CFLAGS) -c -o build_prototypes_04-build_prototypes_04.obj `if test -f 'build_prototypes_04.c'; then $(CYGPATH_W) 'build_prototypes_04.c'; else $(CYGPATH_W) '$(srcdir)/build_prototypes_04.c'; fi` build_prototypes_doc-build_prototypes_doc.o: build_prototypes_doc.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_prototypes_doc_CFLAGS) $(CFLAGS) -MT build_prototypes_doc-build_prototypes_doc.o -MD -MP -MF $(DEPDIR)/build_prototypes_doc-build_prototypes_doc.Tpo -c -o build_prototypes_doc-build_prototypes_doc.o `test -f 'build_prototypes_doc.c' || echo '$(srcdir)/'`build_prototypes_doc.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/build_prototypes_doc-build_prototypes_doc.Tpo $(DEPDIR)/build_prototypes_doc-build_prototypes_doc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='build_prototypes_doc.c' object='build_prototypes_doc-build_prototypes_doc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_prototypes_doc_CFLAGS) $(CFLAGS) -c -o build_prototypes_doc-build_prototypes_doc.o `test -f 'build_prototypes_doc.c' || echo '$(srcdir)/'`build_prototypes_doc.c build_prototypes_doc-build_prototypes_doc.obj: build_prototypes_doc.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_prototypes_doc_CFLAGS) $(CFLAGS) -MT build_prototypes_doc-build_prototypes_doc.obj -MD -MP -MF $(DEPDIR)/build_prototypes_doc-build_prototypes_doc.Tpo -c -o build_prototypes_doc-build_prototypes_doc.obj `if test -f 'build_prototypes_doc.c'; then $(CYGPATH_W) 'build_prototypes_doc.c'; else $(CYGPATH_W) '$(srcdir)/build_prototypes_doc.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/build_prototypes_doc-build_prototypes_doc.Tpo $(DEPDIR)/build_prototypes_doc-build_prototypes_doc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='build_prototypes_doc.c' object='build_prototypes_doc-build_prototypes_doc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_prototypes_doc_CFLAGS) $(CFLAGS) -c -o build_prototypes_doc-build_prototypes_doc.obj `if test -f 'build_prototypes_doc.c'; then $(CYGPATH_W) 'build_prototypes_doc.c'; else $(CYGPATH_W) '$(srcdir)/build_prototypes_doc.c'; fi` build_trampolines-build_trampolines.o: build_trampolines.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_trampolines_CFLAGS) $(CFLAGS) -MT build_trampolines-build_trampolines.o -MD -MP -MF $(DEPDIR)/build_trampolines-build_trampolines.Tpo -c -o build_trampolines-build_trampolines.o `test -f 'build_trampolines.c' || echo '$(srcdir)/'`build_trampolines.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/build_trampolines-build_trampolines.Tpo $(DEPDIR)/build_trampolines-build_trampolines.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='build_trampolines.c' object='build_trampolines-build_trampolines.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_trampolines_CFLAGS) $(CFLAGS) -c -o build_trampolines-build_trampolines.o `test -f 'build_trampolines.c' || echo '$(srcdir)/'`build_trampolines.c build_trampolines-build_trampolines.obj: build_trampolines.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_trampolines_CFLAGS) $(CFLAGS) -MT build_trampolines-build_trampolines.obj -MD -MP -MF $(DEPDIR)/build_trampolines-build_trampolines.Tpo -c -o build_trampolines-build_trampolines.obj `if test -f 'build_trampolines.c'; then $(CYGPATH_W) 'build_trampolines.c'; else $(CYGPATH_W) '$(srcdir)/build_trampolines.c'; fi` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/build_trampolines-build_trampolines.Tpo $(DEPDIR)/build_trampolines-build_trampolines.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='build_trampolines.c' object='build_trampolines-build_trampolines.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(build_trampolines_CFLAGS) $(CFLAGS) -c -o build_trampolines-build_trampolines.obj `if test -f 'build_trampolines.c'; then $(CYGPATH_W) 'build_trampolines.c'; else $(CYGPATH_W) '$(srcdir)/build_trampolines.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-nodist_pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(buildnoinstdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-buildnoinstLTLIBRARIES clean-generic \ clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-buildnoinstLTLIBRARIES \ install-nodist_pkgincludeHEADERS install-pkgincludeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-buildnoinstLTLIBRARIES \ uninstall-libLTLIBRARIES uninstall-nodist_pkgincludeHEADERS \ uninstall-pkgincludeHEADERS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-buildnoinstLTLIBRARIES \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags \ ctags-recursive distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am \ install-buildnoinstLTLIBRARIES install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man \ install-nodist_pkgincludeHEADERS install-pdf install-pdf-am \ install-pkgincludeHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-buildnoinstLTLIBRARIES \ uninstall-libLTLIBRARIES uninstall-nodist_pkgincludeHEADERS \ uninstall-pkgincludeHEADERS liboilarray.c: liboiltmp1.la Makefile echo '/* This file is autogenerated. Do not edit */' >liboilarray.c.tmp echo >>liboilarray.c.tmp echo '#include ' >>liboilarray.c.tmp echo >>liboilarray.c.tmp grep '^_oil_function_class_' .libs/liboiltmp1.exp | \ sed -e 's/ DATA$$//' -e 's/ .*//' -e 's/.*/extern OilFunctionClass &;/' >>liboilarray.c.tmp echo >>liboilarray.c.tmp echo 'OilFunctionClass *_oil_function_class_array[] = {' >>liboilarray.c.tmp grep '^_oil_function_class_' .libs/liboiltmp1.exp | \ sed -e 's/ .*//' -e 's/.*/ \&&,/' >>liboilarray.c.tmp echo ' NULL' >>liboilarray.c.tmp echo '};' >>liboilarray.c.tmp echo >>liboilarray.c.tmp grep '^_oil_function_impl_' .libs/liboiltmp1.exp | \ sed -e 's/ .*//' -e 's/.*/extern OilFunctionImpl &;/' >>liboilarray.c.tmp echo >>liboilarray.c.tmp echo 'OilFunctionImpl *_oil_function_impl_array[] = {' >>liboilarray.c.tmp grep '^_oil_function_impl_' .libs/liboiltmp1.exp | \ sed -e 's/ .*//' -e 's/.*/ \&&,/' >>liboilarray.c.tmp echo ' NULL' >>liboilarray.c.tmp echo '};' >>liboilarray.c.tmp echo >>liboilarray.c.tmp cmp liboilarray.c.tmp liboilarray.c || mv liboilarray.c.tmp liboilarray.c liboilfuncs-doc.h: build_prototypes_doc$(EXEEXT) ./build_prototypes_doc$(EXEEXT) >liboilfuncs-doc.h update: build_prototypes$(EXEEXT) build_marshal$(EXEEXT) build_prototypes_doc$(EXEEXT) build_class_decls$(EXEEXT) build_trampolines$(EXTEXT) build_prototypes_04$(EXTEXT) ./build_prototypes$(EXEEXT) >liboilfuncs.h ./build_marshal$(EXEEXT) >liboilmarshal.c ./build_prototypes_doc$(EXEEXT) >liboilfuncs-doc.h ./build_class_decls$(EXEEXT) >liboilclasses.h ./build_trampolines$(EXTEXT) >liboiltrampolines.c ./build_prototypes_04$(EXTEXT) >liboilfuncs-04.h install-buildnoinstLTLIBRARIES: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/arm/0000777000175000017500000000000011332637376012125 500000000000000liboil-0.3.17/liboil/arm/math_vfp_asm.S0000644000175000017500000004206311332623022014615 00000000000000/* * Copyright (c) 2007 * Josep Torra . All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if defined(__VFP_FP__) && !defined(__SOFTFP__) /* ** compile with -mcpu=arm1136j-s -mfpu=vfp -mfloat-abi=softfp ** ** void vfp_add_f32 (float *d, const float *s1, const float *s2, int n); ** void vfp_add_f64 (double *d, const double *s1, const double *s2, int n); ** void vfp_divide_f32 (float *d, const float *s1, const float *s2, int n); ** void vfp_divide_f64 (double *d, const double *s1, const double *s2, int n); ** void vfp_multiply_f32 (float *d, const float *s1, const float *s2, int n); ** void vfp_multiply_f64 (double *d, const double *s1, const double *s2, int n); ** void vfp_subtract_f32 (float *d, const float *s1, const float *s2, int n); ** void vfp_subtract_f64 (double *d, const double *s1, const double *s2, int n); ** ** d: $r0 | s1: $r1 | s2: $r2 | n: $r3 | ** */ #define UNROLL_F32_TEMPLATE(fname,finst) \ .global vfp_ ## fname ## ; \ vfp_ ## fname ## : \ stmdb sp!, {fp, lr}; /* save registers to stack */ \ ands ip, r3, #7; /* ip = n % 8 */ \ beq vfp_ ## fname ## _unroll; /* if ip == 0 goto prep_loop2 */ \ vfp_ ## fname ## _loop1: \ fldmias r1!, {s0}; \ fldmias r2!, {s1}; \ ## finst ##s s2, s0, s1; \ fstmias r0!, {s2}; \ subs ip, ip, #1; \ bne vfp_ ## fname ## _loop1; \ vfp_ ## fname ## _unroll: /* unroll by 8 */ \ movs ip, r3, lsr #3; /* ip = n / 8 */ \ beq vfp_ ## fname ## _end; /* if ip == 0 goto finish */ \ fmrx lr, fpscr; /* read fpscr register into arm */\ mov fp, #7; \ orr fp, lr, fp, lsl #16; /* set vector lenght to 8 */ \ fmxr fpscr, fp; \ vfp_ ## fname ## _loop2: \ fldmias r1!, {s8, s9, s10, s11, s12, s13, s14, s15}; \ fldmias r2!, {s16, s17, s18, s19, s20, s21, s22, s23}; \ ## finst ##s s24, s8, s16; \ fstmias r0!, {s24, s25, s26, s27, s28, s29, s30, s31}; \ subs ip, ip, #1; \ bne vfp_ ## fname ## _loop2; \ fmxr fpscr, lr; /* restore original fpscr */ \ vfp_ ## fname ## _end: \ ldmia sp!, {fp, pc}; /* recovering from stack and return */ #define UNROLL_F64_TEMPLATE(fname,finst) \ .global vfp_ ## fname ## ; \ vfp_ ## fname ## : \ stmdb sp!, {fp, lr}; /* save registers to stack */ \ ands ip, r3, #3; /* ip = n % 3 */ \ beq vfp_ ## fname ## _unroll; /* if ip == 0 goto prep_loop2 */ \ vfp_ ## fname ## _loop1: \ fldmiad r1!, {d0}; \ fldmiad r2!, {d1}; \ ## finst ##d d2, d0, d1; \ fstmiad r0!, {d2}; \ subs ip, ip, #1; \ bne vfp_ ## fname ## _loop1; \ vfp_ ## fname ## _unroll: /* unroll by 4 */ \ movs ip, r3, lsr #2; /* ip = n / 4 */ \ beq vfp_ ## fname ## _end; /* if ip == 0 goto finish */ \ fmrx lr, fpscr; /* read fpscr register into arm */\ mov fp, #3; \ orr fp, lr, fp, lsl #16; /* set vector lenght to 8 */ \ fmxr fpscr, fp; \ vfp_ ## fname ## _loop2: \ fldmiad r1!, {d4, d5, d6, d7}; \ fldmiad r2!, {d8, d9, d10, d11}; \ ## finst ##d d12, d4, d8; \ fstmiad r0!, {d12, d13, d14, d15}; \ subs ip, ip, #1; \ bne vfp_ ## fname ## _loop2; \ fmxr fpscr, lr; /* restore original fpscr */ \ vfp_ ## fname ## _end: \ ldmia sp!, {fp, pc}; /* recovering from stack and return */ .align 2 UNROLL_F32_TEMPLATE(add_f32,fadd); UNROLL_F64_TEMPLATE(add_f64,fadd); UNROLL_F32_TEMPLATE(divide_f32,fdiv); UNROLL_F64_TEMPLATE(divide_f64,fdiv); UNROLL_F32_TEMPLATE(multiply_f32,fmul); UNROLL_F64_TEMPLATE(multiply_f64,fmul); UNROLL_F32_TEMPLATE(subtract_f32,fsub); UNROLL_F64_TEMPLATE(subtract_f64,fsub); #undef UNROLL_F32_TEMPLATE #undef UNROLL_F64_TEMPLATE /* ** ** void vfp_scalaradd_f32_ns (float *d, const float *s1, const float *s2_1, int n); ** void vfp_scalaradd_f64_ns (double *d, const double *s1, const double *s2_1, int n); ** void vfp_scalarmultiply_f32_ns (float *d, const float *s1, const float *s2_1, int n); ** void vfp_scalarmultiply_f64_ns (double *d, const double *s1, const double *s2_1, int n); ** ** d: $r0 | s1: $r1 | s2_1: $r2 | n: $r3 | ** */ #define UNROLL_F32_TEMPLATE(fname,finst) \ .global vfp_ ## fname ## ; \ vfp_ ## fname ## : \ stmdb sp!, {fp, lr}; /* save registers to stack */ \ fldmias r2, {s1}; /* load scalar value */ \ ands ip, r3, #7; /* ip = n % 8 */ \ beq vfp_ ## fname ## _unroll; /* if ip == 0 goto prep_loop2 */ \ vfp_ ## fname ## _loop1: \ fldmias r1!, {s0}; \ ## finst ##s s2, s0, s1; \ fstmias r0!, {s2}; \ subs ip, ip, #1; \ bne vfp_ ## fname ## _loop1; \ vfp_ ## fname ## _unroll: /* unroll by 8 */ \ movs ip, r3, lsr #3; /* ip = n / 8 */ \ beq vfp_ ## fname ## _end; /* if ip == 0 goto finish */ \ fmrx lr, fpscr; /* read fpscr register into arm */\ mov fp, #7; \ orr fp, lr, fp, lsl #16; /* set vector lenght to 8 */ \ fmxr fpscr, fp; \ vfp_ ## fname ## _loop2: \ fldmias r1!, {s8, s9, s10, s11, s12, s13, s14, s15}; \ ## finst ##s s24, s8, s1; \ fstmias r0!, {s24, s25, s26, s27, s28, s29, s30, s31}; \ subs ip, ip, #1; \ bne vfp_ ## fname ## _loop2; \ fmxr fpscr, lr; /* restore original fpscr */ \ vfp_ ## fname ## _end: \ ldmia sp!, {fp, pc}; /* recovering from stack and return */ #define UNROLL_F64_TEMPLATE(fname,finst) \ .global vfp_ ## fname ## ; \ vfp_ ## fname ## : \ stmdb sp!, {fp, lr}; /* save registers to stack */ \ fldmiad r2, {d1}; /* load scalar value */ \ ands ip, r3, #3; /* ip = n % 3 */ \ beq vfp_ ## fname ## _unroll; /* if ip == 0 goto prep_loop2 */ \ vfp_ ## fname ## _loop1: \ fldmiad r1!, {d0}; \ ## finst ##d d2, d0, d1; \ fstmiad r0!, {d2}; \ subs ip, ip, #1; \ bne vfp_ ## fname ## _loop1; \ vfp_ ## fname ## _unroll: /* unroll by 4 */ \ movs ip, r3, lsr #2; /* ip = n / 4 */ \ beq vfp_ ## fname ## _end; /* if ip == 0 goto finish */ \ fmrx lr, fpscr; /* read fpscr register into arm */\ mov fp, #3; \ orr fp, lr, fp, lsl #16; /* set vector lenght to 4 */ \ fmxr fpscr, fp; \ vfp_ ## fname ## _loop2: \ fldmiad r1!, {d4, d5, d6, d7}; \ ## finst ##d d12, d4, d1; \ fstmiad r0!, {d12, d13, d14, d15}; \ subs ip, ip, #1; \ bne vfp_ ## fname ## _loop2; \ fmxr fpscr, lr; /* restore original fpscr */ \ vfp_ ## fname ## _end: \ ldmia sp!, {fp, pc}; /* recovering from stack and return */ UNROLL_F32_TEMPLATE(scalaradd_f32_ns,fadd); UNROLL_F64_TEMPLATE(scalaradd_f64_ns,fadd); UNROLL_F32_TEMPLATE(scalarmultiply_f32_ns,fmul); UNROLL_F64_TEMPLATE(scalarmultiply_f64_ns,fmul); #undef UNROLL_F32_TEMPLATE #undef UNROLL_F64_TEMPLATE /* ** ** void vfp_abs_f32_f32_ns(float *d, const float *s, int n); ** void vfp_abs_f64_f64_ns(double *d, const double *s, int n); ** void vfp_negative_f32(float *d, const float *s, int n); ** void vfp_negative_f64(double *d, const double *s, int n); ** ** d: $r0 | s: $r1 | n: $r2 | ** */ #define UNROLL_F32_TEMPLATE(fname,finst) \ .global vfp_ ## fname ## ; \ vfp_ ## fname ## : \ stmdb sp!, {fp, lr}; /* save registers to stack */ \ ands ip, r2, #7; /* ip = n % 8 */ \ beq vfp_ ## fname ## _unroll; /* if ip == 0 goto prep_loop2 */ \ vfp_ ## fname ## _loop1: \ fldmias r1!, {s0}; \ ## finst ##s s2, s0; \ fstmias r0!, {s2}; \ subs ip, ip, #1; \ bne vfp_ ## fname ## _loop1; \ vfp_ ## fname ## _unroll: /* unroll by 8 */ \ movs ip, r2, lsr #3; /* ip = n / 8 */ \ beq vfp_ ## fname ## _end; /* if ip == 0 goto finish */ \ fmrx lr, fpscr; /* read fpscr register into arm */\ mov fp, #7; \ orr fp, lr, fp, lsl #16; /* set vector lenght to 8 */ \ fmxr fpscr, fp; \ vfp_ ## fname ## _loop2: \ fldmias r1!, {s8, s9, s10, s11, s12, s13, s14, s15}; \ ## finst ##s s24, s8; \ fstmias r0!, {s24, s25, s26, s27, s28, s29, s30, s31}; \ subs ip, ip, #1; \ bne vfp_ ## fname ## _loop2; \ fmxr fpscr, lr; /* restore original fpscr */ \ vfp_ ## fname ## _end: \ ldmia sp!, {fp, pc}; /* recovering from stack and return */ #define UNROLL_F64_TEMPLATE(fname,finst) \ .global vfp_ ## fname ## ; \ vfp_ ## fname ## : \ stmdb sp!, {fp, lr}; /* save registers to stack */ \ ands ip, r2, #3; /* ip = n % 3 */ \ beq vfp_ ## fname ## _unroll; /* if ip == 0 goto prep_loop2 */ \ vfp_ ## fname ## _loop1: \ fldmiad r1!, {d0}; \ ## finst ##d d2, d0; \ fstmiad r0!, {d2}; \ subs ip, ip, #1; \ bne vfp_ ## fname ## _loop1; \ vfp_ ## fname ## _unroll: /* unroll by 4 */ \ movs ip, r2, lsr #2; /* ip = n / 4 */ \ beq vfp_ ## fname ## _end; /* if ip == 0 goto finish */ \ fmrx lr, fpscr; /* read fpscr register into arm */\ mov fp, #3; \ orr fp, lr, fp, lsl #16; /* set vector lenght to 4 */ \ fmxr fpscr, fp; \ vfp_ ## fname ## _loop2: \ fldmiad r1!, {d4, d5, d6, d7}; \ ## finst ##d d12, d4; \ fstmiad r0!, {d12, d13, d14, d15}; \ subs ip, ip, #1; \ bne vfp_ ## fname ## _loop2; \ fmxr fpscr, lr; /* restore original fpscr */ \ vfp_ ## fname ## _end: \ ldmia sp!, {fp, pc}; /* recovering from stack and return */ UNROLL_F32_TEMPLATE(abs_f32_f32_ns,fabs); UNROLL_F64_TEMPLATE(abs_f64_f64_ns,fabs); UNROLL_F32_TEMPLATE(negative_f32,fneg); UNROLL_F64_TEMPLATE(negative_f64,fneg); #undef UNROLL_F32_TEMPLATE #undef UNROLL_F64_TEMPLATE #endif liboil-0.3.17/liboil/arm/math_vfp.c0000644000175000017500000000765511332623022014005 00000000000000/* * Copyright (c) 2007 * Josep Torra. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #if defined(__VFP_FP__) && !defined(__SOFTFP__) extern void vfp_add_f32 (float *d, const float *s1, const float *s2, int n); extern void vfp_add_f64 (double *d, const double *s1, const double *s2, int n); extern void vfp_divide_f32 (float *d, const float *s1, const float *s2, int n); extern void vfp_divide_f64 (double *d, const double *s1, const double *s2, int n); extern void vfp_multiply_f32 (float *d, const float *s1, const float *s2, int n); extern void vfp_multiply_f64 (double *d, const double *s1, const double *s2, int n); extern void vfp_subtract_f32 (float *d, const float *s1, const float *s2, int n); extern void vfp_subtract_f64 (double *d, const double *s1, const double *s2, int n); extern void vfp_scalaradd_f32_ns (float *d, const float *s1, const float *s2_1, int n); extern void vfp_scalaradd_f64_ns (double *d, const double *s1, const double *s2_1, int n); extern void vfp_scalarmultiply_f32_ns (float *d, const float *s1, const float *s2_1, int n); extern void vfp_scalarmultiply_f64_ns (double *d, const double *s1, const double *s2_1, int n); extern void vfp_abs_f32_f32_ns(float *d, const float *s, int n); extern void vfp_abs_f64_f64_ns(double *d, const double *s, int n); extern void vfp_negative_f32(float *d, const float *s, int n); extern void vfp_negative_f64(double *d, const double *s, int n); OIL_DEFINE_IMPL_FULL (vfp_add_f32, add_f32, OIL_IMPL_FLAG_VFP); OIL_DEFINE_IMPL_FULL (vfp_add_f64, add_f64, OIL_IMPL_FLAG_VFP); OIL_DEFINE_IMPL_FULL (vfp_divide_f32, divide_f32, OIL_IMPL_FLAG_VFP); OIL_DEFINE_IMPL_FULL (vfp_divide_f64, divide_f64, OIL_IMPL_FLAG_VFP); OIL_DEFINE_IMPL_FULL (vfp_multiply_f32, multiply_f32, OIL_IMPL_FLAG_VFP); OIL_DEFINE_IMPL_FULL (vfp_multiply_f64, multiply_f64, OIL_IMPL_FLAG_VFP); OIL_DEFINE_IMPL_FULL (vfp_subtract_f32, subtract_f32, OIL_IMPL_FLAG_VFP); OIL_DEFINE_IMPL_FULL (vfp_subtract_f64, subtract_f64, OIL_IMPL_FLAG_VFP); OIL_DEFINE_IMPL_FULL (vfp_scalaradd_f32_ns, scalaradd_f32_ns, OIL_IMPL_FLAG_VFP); //OIL_DEFINE_IMPL_FULL (vfp_scalaradd_f64_ns, scalaradd_f64_ns, OIL_IMPL_FLAG_VFP); OIL_DEFINE_IMPL_FULL (vfp_scalarmultiply_f32_ns, scalarmultiply_f32_ns, OIL_IMPL_FLAG_VFP); OIL_DEFINE_IMPL_FULL (vfp_scalarmultiply_f64_ns, scalarmultiply_f64_ns, OIL_IMPL_FLAG_VFP); //OIL_DEFINE_IMPL_FULL (vfp_abs_f32_f32_ns, abs_f32_f32_ns, OIL_IMPL_FLAG_VFP); //OIL_DEFINE_IMPL_FULL (vfp_abs_f64_f64_ns, abs_f64_f64_ns, OIL_IMPL_FLAG_VFP); OIL_DEFINE_IMPL_FULL (vfp_negative_f32, negative_f32, OIL_IMPL_FLAG_VFP); //OIL_DEFINE_IMPL_FULL (vfp_negative_f64, negative_f64, OIL_IMPL_FLAG_VFP); #endif liboil-0.3.17/liboil/arm/Makefile.am0000644000175000017500000000021111067011142014045 00000000000000 noinst_LTLIBRARIES = libarm.la libarm_la_SOURCES = \ math_vfp.c \ math_vfp_asm.S libarm_la_CFLAGS = $(LIBOIL_CFLAGS) $(VFP_CFLAGS) liboil-0.3.17/liboil/arm/Makefile.in0000644000175000017500000004330511332627671014110 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = liboil/arm DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libarm_la_LIBADD = am_libarm_la_OBJECTS = libarm_la-math_vfp.lo math_vfp_asm.lo libarm_la_OBJECTS = $(am_libarm_la_OBJECTS) libarm_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libarm_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) LTCPPASCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libarm_la_SOURCES) DIST_SOURCES = $(libarm_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libarm.la libarm_la_SOURCES = \ math_vfp.c \ math_vfp_asm.S libarm_la_CFLAGS = $(LIBOIL_CFLAGS) $(VFP_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .S .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboil/arm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu liboil/arm/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libarm.la: $(libarm_la_OBJECTS) $(libarm_la_DEPENDENCIES) $(libarm_la_LINK) $(libarm_la_OBJECTS) $(libarm_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libarm_la-math_vfp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/math_vfp_asm.Plo@am__quote@ .S.o: @am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ $< .S.obj: @am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .S.lo: @am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCCAS_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(LTCPPASCOMPILE) -c -o $@ $< .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libarm_la-math_vfp.lo: math_vfp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libarm_la_CFLAGS) $(CFLAGS) -MT libarm_la-math_vfp.lo -MD -MP -MF $(DEPDIR)/libarm_la-math_vfp.Tpo -c -o libarm_la-math_vfp.lo `test -f 'math_vfp.c' || echo '$(srcdir)/'`math_vfp.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libarm_la-math_vfp.Tpo $(DEPDIR)/libarm_la-math_vfp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='math_vfp.c' object='libarm_la-math_vfp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libarm_la_CFLAGS) $(CFLAGS) -c -o libarm_la-math_vfp.lo `test -f 'math_vfp.c' || echo '$(srcdir)/'`math_vfp.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/liboil/build_prototypes_doc.c0000644000175000017500000000462710717203073015660 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2004 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include void print_header (void); void print_footer (void); int main (int argc, char *argv[]) { OilFunctionClass *klass; OilPrototype *proto; int i; int n; char *string; oil_init_no_optimize (); print_header (); n = oil_class_get_n_classes (); for (i=0;iprototype) { proto = oil_prototype_from_string (klass->prototype); if (proto) { string = oil_prototype_to_string (proto); printf ("void oil_%s (%s);\n", klass->name, string); oil_prototype_free (proto); free (string); } else { printf("/* ERROR: could not parse %s(%s) */\n", klass->name, klass->prototype); } } } print_footer (); return 0; } void print_header (void) { printf ("/* This file is automatically generated. Do not edit. */\n"); printf ("\n"); } void print_footer (void) { printf ("\n"); } liboil-0.3.17/liboil/liboilclasses.h0000644000175000017500000003721211151566776014274 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* This file is automatically generated. Do not edit. */ #ifndef _LIBOIL_CLASSES_H_ #define _LIBOIL_CLASSES_H_ #include #ifdef __cplusplus extern "C" { #endif OIL_DECLARE_CLASS(abs_f32_f32); OIL_DECLARE_CLASS(abs_f64_f64); OIL_DECLARE_CLASS(abs_u16_s16); OIL_DECLARE_CLASS(abs_u32_s32); OIL_DECLARE_CLASS(abs_u8_s8); OIL_DECLARE_CLASS(add2_rshift_add_s16); OIL_DECLARE_CLASS(add2_rshift_sub_s16); OIL_DECLARE_CLASS(add_const_rshift_s16); OIL_DECLARE_CLASS(add_f32); OIL_DECLARE_CLASS(add_f64); OIL_DECLARE_CLASS(add_s16); OIL_DECLARE_CLASS(add_s16_u8); OIL_DECLARE_CLASS(addc_rshift_s16); OIL_DECLARE_CLASS(addc_s16); OIL_DECLARE_CLASS(argb_paint_u8); OIL_DECLARE_CLASS(average2_u8); OIL_DECLARE_CLASS(avg2_12xn_u8); OIL_DECLARE_CLASS(avg2_16xn_u8); OIL_DECLARE_CLASS(avg2_32xn_u8); OIL_DECLARE_CLASS(avg2_8xn_u8); OIL_DECLARE_CLASS(ayuv2argb_u8); OIL_DECLARE_CLASS(ayuv2uyvy); OIL_DECLARE_CLASS(ayuv2yuyv); OIL_DECLARE_CLASS(ayuv2yvyu); OIL_DECLARE_CLASS(clamp_f32); OIL_DECLARE_CLASS(clamp_f64); OIL_DECLARE_CLASS(clamp_s16); OIL_DECLARE_CLASS(clamp_s32); OIL_DECLARE_CLASS(clamp_s8); OIL_DECLARE_CLASS(clamp_u16); OIL_DECLARE_CLASS(clamp_u32); OIL_DECLARE_CLASS(clamp_u8); OIL_DECLARE_CLASS(clamphigh_f32); OIL_DECLARE_CLASS(clamphigh_f64); OIL_DECLARE_CLASS(clamphigh_s16); OIL_DECLARE_CLASS(clamphigh_s32); OIL_DECLARE_CLASS(clamphigh_s8); OIL_DECLARE_CLASS(clamphigh_u16); OIL_DECLARE_CLASS(clamphigh_u32); OIL_DECLARE_CLASS(clamphigh_u8); OIL_DECLARE_CLASS(clamplow_f32); OIL_DECLARE_CLASS(clamplow_f64); OIL_DECLARE_CLASS(clamplow_s16); OIL_DECLARE_CLASS(clamplow_s32); OIL_DECLARE_CLASS(clamplow_s8); OIL_DECLARE_CLASS(clamplow_u16); OIL_DECLARE_CLASS(clamplow_u32); OIL_DECLARE_CLASS(clamplow_u8); OIL_DECLARE_CLASS(clip_f32); OIL_DECLARE_CLASS(clip_f64); OIL_DECLARE_CLASS(clip_s16); OIL_DECLARE_CLASS(clip_s32); OIL_DECLARE_CLASS(clip_s8); OIL_DECLARE_CLASS(clip_u16); OIL_DECLARE_CLASS(clip_u32); OIL_DECLARE_CLASS(clip_u8); OIL_DECLARE_CLASS(clipconv8x8_u8_s16); OIL_DECLARE_CLASS(clipconv_s16_f32); OIL_DECLARE_CLASS(clipconv_s16_f64); OIL_DECLARE_CLASS(clipconv_s16_s32); OIL_DECLARE_CLASS(clipconv_s16_u16); OIL_DECLARE_CLASS(clipconv_s16_u32); OIL_DECLARE_CLASS(clipconv_s32_f32); OIL_DECLARE_CLASS(clipconv_s32_f64); OIL_DECLARE_CLASS(clipconv_s32_u32); OIL_DECLARE_CLASS(clipconv_s8_f32); OIL_DECLARE_CLASS(clipconv_s8_f64); OIL_DECLARE_CLASS(clipconv_s8_s16); OIL_DECLARE_CLASS(clipconv_s8_s32); OIL_DECLARE_CLASS(clipconv_s8_u16); OIL_DECLARE_CLASS(clipconv_s8_u32); OIL_DECLARE_CLASS(clipconv_s8_u8); OIL_DECLARE_CLASS(clipconv_u16_f32); OIL_DECLARE_CLASS(clipconv_u16_f64); OIL_DECLARE_CLASS(clipconv_u16_s16); OIL_DECLARE_CLASS(clipconv_u16_s32); OIL_DECLARE_CLASS(clipconv_u16_u32); OIL_DECLARE_CLASS(clipconv_u32_f32); OIL_DECLARE_CLASS(clipconv_u32_f64); OIL_DECLARE_CLASS(clipconv_u32_s32); OIL_DECLARE_CLASS(clipconv_u8_f32); OIL_DECLARE_CLASS(clipconv_u8_f64); OIL_DECLARE_CLASS(clipconv_u8_s16); OIL_DECLARE_CLASS(clipconv_u8_s32); OIL_DECLARE_CLASS(clipconv_u8_s8); OIL_DECLARE_CLASS(clipconv_u8_u16); OIL_DECLARE_CLASS(clipconv_u8_u32); OIL_DECLARE_CLASS(colorspace_argb); OIL_DECLARE_CLASS(colsad8x8_u8); OIL_DECLARE_CLASS(combine2_12xn_u8); OIL_DECLARE_CLASS(combine2_16xn_u8); OIL_DECLARE_CLASS(combine2_8xn_u8); OIL_DECLARE_CLASS(combine4_12xn_u8); OIL_DECLARE_CLASS(combine4_16xn_u8); OIL_DECLARE_CLASS(combine4_32xn_u8); OIL_DECLARE_CLASS(combine4_8xn_u8); OIL_DECLARE_CLASS(compare_u8); OIL_DECLARE_CLASS(composite_add_argb); OIL_DECLARE_CLASS(composite_add_argb_const_src); OIL_DECLARE_CLASS(composite_add_u8); OIL_DECLARE_CLASS(composite_add_u8_const_src); OIL_DECLARE_CLASS(composite_in_argb); OIL_DECLARE_CLASS(composite_in_argb_const_mask); OIL_DECLARE_CLASS(composite_in_argb_const_src); OIL_DECLARE_CLASS(composite_in_over_argb); OIL_DECLARE_CLASS(composite_in_over_argb_const_mask); OIL_DECLARE_CLASS(composite_in_over_argb_const_src); OIL_DECLARE_CLASS(composite_over_argb); OIL_DECLARE_CLASS(composite_over_argb_const_src); OIL_DECLARE_CLASS(composite_over_u8); OIL_DECLARE_CLASS(conv8x8_f64_s16); OIL_DECLARE_CLASS(conv8x8_s16_f64); OIL_DECLARE_CLASS(conv_f32_f64); OIL_DECLARE_CLASS(conv_f32_s16); OIL_DECLARE_CLASS(conv_f32_s32); OIL_DECLARE_CLASS(conv_f32_s8); OIL_DECLARE_CLASS(conv_f32_u16); OIL_DECLARE_CLASS(conv_f32_u32); OIL_DECLARE_CLASS(conv_f32_u8); OIL_DECLARE_CLASS(conv_f64_f32); OIL_DECLARE_CLASS(conv_f64_s16); OIL_DECLARE_CLASS(conv_f64_s32); OIL_DECLARE_CLASS(conv_f64_s8); OIL_DECLARE_CLASS(conv_f64_u16); OIL_DECLARE_CLASS(conv_f64_u32); OIL_DECLARE_CLASS(conv_f64_u8); OIL_DECLARE_CLASS(conv_s16_f32); OIL_DECLARE_CLASS(conv_s16_f64); OIL_DECLARE_CLASS(conv_s16_s32); OIL_DECLARE_CLASS(conv_s16_s8); OIL_DECLARE_CLASS(conv_s16_u16); OIL_DECLARE_CLASS(conv_s16_u32); OIL_DECLARE_CLASS(conv_s16_u8); OIL_DECLARE_CLASS(conv_s32_f32); OIL_DECLARE_CLASS(conv_s32_f64); OIL_DECLARE_CLASS(conv_s32_s16); OIL_DECLARE_CLASS(conv_s32_s8); OIL_DECLARE_CLASS(conv_s32_u16); OIL_DECLARE_CLASS(conv_s32_u32); OIL_DECLARE_CLASS(conv_s32_u8); OIL_DECLARE_CLASS(conv_s8_f32); OIL_DECLARE_CLASS(conv_s8_f64); OIL_DECLARE_CLASS(conv_s8_s16); OIL_DECLARE_CLASS(conv_s8_s32); OIL_DECLARE_CLASS(conv_s8_u16); OIL_DECLARE_CLASS(conv_s8_u32); OIL_DECLARE_CLASS(conv_s8_u8); OIL_DECLARE_CLASS(conv_u16_f32); OIL_DECLARE_CLASS(conv_u16_f64); OIL_DECLARE_CLASS(conv_u16_s16); OIL_DECLARE_CLASS(conv_u16_s32); OIL_DECLARE_CLASS(conv_u16_s8); OIL_DECLARE_CLASS(conv_u16_u32); OIL_DECLARE_CLASS(conv_u16_u8); OIL_DECLARE_CLASS(conv_u32_f32); OIL_DECLARE_CLASS(conv_u32_f64); OIL_DECLARE_CLASS(conv_u32_s16); OIL_DECLARE_CLASS(conv_u32_s32); OIL_DECLARE_CLASS(conv_u32_s8); OIL_DECLARE_CLASS(conv_u32_u16); OIL_DECLARE_CLASS(conv_u32_u8); OIL_DECLARE_CLASS(conv_u8_f32); OIL_DECLARE_CLASS(conv_u8_f64); OIL_DECLARE_CLASS(conv_u8_s16); OIL_DECLARE_CLASS(conv_u8_s32); OIL_DECLARE_CLASS(conv_u8_s8); OIL_DECLARE_CLASS(conv_u8_u16); OIL_DECLARE_CLASS(conv_u8_u32); OIL_DECLARE_CLASS(convert_s16_f32); OIL_DECLARE_CLASS(convert_s16_f64); OIL_DECLARE_CLASS(convert_s16_s32); OIL_DECLARE_CLASS(convert_s16_s8); OIL_DECLARE_CLASS(convert_s16_u16); OIL_DECLARE_CLASS(convert_s16_u32); OIL_DECLARE_CLASS(convert_s16_u8); OIL_DECLARE_CLASS(convert_s32_f64); OIL_DECLARE_CLASS(convert_s32_s16); OIL_DECLARE_CLASS(convert_s32_s8); OIL_DECLARE_CLASS(convert_s32_u16); OIL_DECLARE_CLASS(convert_s32_u32); OIL_DECLARE_CLASS(convert_s32_u8); OIL_DECLARE_CLASS(convert_s8_f32); OIL_DECLARE_CLASS(convert_s8_f64); OIL_DECLARE_CLASS(convert_s8_s16); OIL_DECLARE_CLASS(convert_s8_s32); OIL_DECLARE_CLASS(convert_s8_u16); OIL_DECLARE_CLASS(convert_s8_u32); OIL_DECLARE_CLASS(convert_s8_u8); OIL_DECLARE_CLASS(convert_u16_f32); OIL_DECLARE_CLASS(convert_u16_f64); OIL_DECLARE_CLASS(convert_u16_s16); OIL_DECLARE_CLASS(convert_u16_s32); OIL_DECLARE_CLASS(convert_u16_u32); OIL_DECLARE_CLASS(convert_u16_u8); OIL_DECLARE_CLASS(convert_u32_f64); OIL_DECLARE_CLASS(convert_u32_s32); OIL_DECLARE_CLASS(convert_u32_u16); OIL_DECLARE_CLASS(convert_u32_u8); OIL_DECLARE_CLASS(convert_u8_f32); OIL_DECLARE_CLASS(convert_u8_f64); OIL_DECLARE_CLASS(convert_u8_s16); OIL_DECLARE_CLASS(convert_u8_s32); OIL_DECLARE_CLASS(convert_u8_s8); OIL_DECLARE_CLASS(convert_u8_u16); OIL_DECLARE_CLASS(convert_u8_u32); OIL_DECLARE_CLASS(copy8x8_u8); OIL_DECLARE_CLASS(copy_u8); OIL_DECLARE_CLASS(dct36_f32); OIL_DECLARE_CLASS(deinterleave); OIL_DECLARE_CLASS(deinterleave2_s16); OIL_DECLARE_CLASS(dequantize8x8_s16); OIL_DECLARE_CLASS(diff8x8_average_s16_u8); OIL_DECLARE_CLASS(diff8x8_const128_s16_u8); OIL_DECLARE_CLASS(diff8x8_s16_u8); OIL_DECLARE_CLASS(diffsquaresum_f32); OIL_DECLARE_CLASS(diffsquaresum_f64); OIL_DECLARE_CLASS(divide_f32); OIL_DECLARE_CLASS(divide_f64); OIL_DECLARE_CLASS(err_inter8x8_u8); OIL_DECLARE_CLASS(err_inter8x8_u8_avg); OIL_DECLARE_CLASS(err_intra8x8_u8); OIL_DECLARE_CLASS(fdct8_f64); OIL_DECLARE_CLASS(fdct8x8_f64); OIL_DECLARE_CLASS(fdct8x8s_s16); OIL_DECLARE_CLASS(fdct8x8theora); OIL_DECLARE_CLASS(floor_f32); OIL_DECLARE_CLASS(idct8_f64); OIL_DECLARE_CLASS(idct8theora_s16); OIL_DECLARE_CLASS(idct8x8_f64); OIL_DECLARE_CLASS(idct8x8_s16); OIL_DECLARE_CLASS(idct8x8lim10_f64); OIL_DECLARE_CLASS(idct8x8lim10_s16); OIL_DECLARE_CLASS(idct8x8theora_s16); OIL_DECLARE_CLASS(imdct12_f64); OIL_DECLARE_CLASS(imdct32_f32); OIL_DECLARE_CLASS(imdct36_f64); OIL_DECLARE_CLASS(interleave); OIL_DECLARE_CLASS(interleave2_s16); OIL_DECLARE_CLASS(inverse_f32); OIL_DECLARE_CLASS(lift_add_135); OIL_DECLARE_CLASS(lift_add_mult_shift12); OIL_DECLARE_CLASS(lift_add_shift1); OIL_DECLARE_CLASS(lift_add_shift2); OIL_DECLARE_CLASS(lift_sub_135); OIL_DECLARE_CLASS(lift_sub_mult_shift12); OIL_DECLARE_CLASS(lift_sub_shift1); OIL_DECLARE_CLASS(lift_sub_shift2); OIL_DECLARE_CLASS(lshift_s16); OIL_DECLARE_CLASS(mas10_u8); OIL_DECLARE_CLASS(mas10_u8_l15); OIL_DECLARE_CLASS(mas10_u8_sym_l15); OIL_DECLARE_CLASS(mas12_addc_rshift_decim2_u8); OIL_DECLARE_CLASS(mas2_across_add_s16); OIL_DECLARE_CLASS(mas2_add_s16); OIL_DECLARE_CLASS(mas4_across_add_s16); OIL_DECLARE_CLASS(mas4_add_s16); OIL_DECLARE_CLASS(mas8_across_add_s16); OIL_DECLARE_CLASS(mas8_across_u8); OIL_DECLARE_CLASS(mas8_add_s16); OIL_DECLARE_CLASS(mas8_addc_rshift_decim2_u8); OIL_DECLARE_CLASS(mas8_u8); OIL_DECLARE_CLASS(mas8_u8_l15); OIL_DECLARE_CLASS(mas8_u8_sym_l15); OIL_DECLARE_CLASS(maximum_f32); OIL_DECLARE_CLASS(maximum_f64); OIL_DECLARE_CLASS(md5); OIL_DECLARE_CLASS(mdct12_f64); OIL_DECLARE_CLASS(mdct36_f64); OIL_DECLARE_CLASS(merge_linear_argb); OIL_DECLARE_CLASS(merge_linear_u8); OIL_DECLARE_CLASS(minimum_f32); OIL_DECLARE_CLASS(minimum_f64); OIL_DECLARE_CLASS(mix_u8); OIL_DECLARE_CLASS(mt19937); OIL_DECLARE_CLASS(mult8x8_s16); OIL_DECLARE_CLASS(multiply_and_acc_12xn_s16_u8); OIL_DECLARE_CLASS(multiply_and_acc_16xn_s16_u8); OIL_DECLARE_CLASS(multiply_and_acc_24xn_s16_u8); OIL_DECLARE_CLASS(multiply_and_acc_6xn_s16_u8); OIL_DECLARE_CLASS(multiply_and_acc_8xn_s16_u8); OIL_DECLARE_CLASS(multiply_and_add_s16); OIL_DECLARE_CLASS(multiply_and_add_s16_u8); OIL_DECLARE_CLASS(multiply_f32); OIL_DECLARE_CLASS(multiply_f64); OIL_DECLARE_CLASS(multsum_f32); OIL_DECLARE_CLASS(multsum_f64); OIL_DECLARE_CLASS(negative_f32); OIL_DECLARE_CLASS(null); OIL_DECLARE_CLASS(packyuyv); OIL_DECLARE_CLASS(permute_f32); OIL_DECLARE_CLASS(permute_f64); OIL_DECLARE_CLASS(permute_s16); OIL_DECLARE_CLASS(permute_s32); OIL_DECLARE_CLASS(permute_s8); OIL_DECLARE_CLASS(permute_u16); OIL_DECLARE_CLASS(permute_u32); OIL_DECLARE_CLASS(permute_u8); OIL_DECLARE_CLASS(recon8x8_inter); OIL_DECLARE_CLASS(recon8x8_inter2); OIL_DECLARE_CLASS(recon8x8_intra); OIL_DECLARE_CLASS(resample_linear_argb); OIL_DECLARE_CLASS(resample_linear_u8); OIL_DECLARE_CLASS(rgb2bgr); OIL_DECLARE_CLASS(rgb2rgba); OIL_DECLARE_CLASS(rgb565_to_argb); OIL_DECLARE_CLASS(rowsad8x8_u8); OIL_DECLARE_CLASS(sad12x12_12xn_u8); OIL_DECLARE_CLASS(sad12x12_u8); OIL_DECLARE_CLASS(sad16x16_16xn_u8); OIL_DECLARE_CLASS(sad16x16_u8); OIL_DECLARE_CLASS(sad8x8_8xn_u8); OIL_DECLARE_CLASS(sad8x8_f64); OIL_DECLARE_CLASS(sad8x8_f64_2); OIL_DECLARE_CLASS(sad8x8_s16); OIL_DECLARE_CLASS(sad8x8_s16_2); OIL_DECLARE_CLASS(sad8x8_u8); OIL_DECLARE_CLASS(sad8x8_u8_avg); OIL_DECLARE_CLASS(scalaradd_f32); OIL_DECLARE_CLASS(scalaradd_f32_ns); OIL_DECLARE_CLASS(scalaradd_f64); OIL_DECLARE_CLASS(scalaradd_s16); OIL_DECLARE_CLASS(scalaradd_s32); OIL_DECLARE_CLASS(scalaradd_s8); OIL_DECLARE_CLASS(scalaradd_u16); OIL_DECLARE_CLASS(scalaradd_u32); OIL_DECLARE_CLASS(scalaradd_u8); OIL_DECLARE_CLASS(scalarmult_f32); OIL_DECLARE_CLASS(scalarmult_f64); OIL_DECLARE_CLASS(scalarmult_s16); OIL_DECLARE_CLASS(scalarmult_s32); OIL_DECLARE_CLASS(scalarmult_s8); OIL_DECLARE_CLASS(scalarmult_u16); OIL_DECLARE_CLASS(scalarmult_u32); OIL_DECLARE_CLASS(scalarmult_u8); OIL_DECLARE_CLASS(scalarmultiply_f32_ns); OIL_DECLARE_CLASS(scalarmultiply_f64_ns); OIL_DECLARE_CLASS(scaleconv_f32_s16); OIL_DECLARE_CLASS(scaleconv_f32_s32); OIL_DECLARE_CLASS(scaleconv_f32_s8); OIL_DECLARE_CLASS(scaleconv_f32_u16); OIL_DECLARE_CLASS(scaleconv_f32_u32); OIL_DECLARE_CLASS(scaleconv_f32_u8); OIL_DECLARE_CLASS(scaleconv_f64_s16); OIL_DECLARE_CLASS(scaleconv_f64_s32); OIL_DECLARE_CLASS(scaleconv_f64_s8); OIL_DECLARE_CLASS(scaleconv_f64_u16); OIL_DECLARE_CLASS(scaleconv_f64_u32); OIL_DECLARE_CLASS(scaleconv_f64_u8); OIL_DECLARE_CLASS(scaleconv_s16_f32); OIL_DECLARE_CLASS(scaleconv_s16_f64); OIL_DECLARE_CLASS(scaleconv_s32_f32); OIL_DECLARE_CLASS(scaleconv_s32_f64); OIL_DECLARE_CLASS(scaleconv_s8_f32); OIL_DECLARE_CLASS(scaleconv_s8_f64); OIL_DECLARE_CLASS(scaleconv_u16_f32); OIL_DECLARE_CLASS(scaleconv_u16_f64); OIL_DECLARE_CLASS(scaleconv_u32_f32); OIL_DECLARE_CLASS(scaleconv_u32_f64); OIL_DECLARE_CLASS(scaleconv_u8_f32); OIL_DECLARE_CLASS(scaleconv_u8_f64); OIL_DECLARE_CLASS(scanlinescale2_u8); OIL_DECLARE_CLASS(sign_f32); OIL_DECLARE_CLASS(sincos_f64); OIL_DECLARE_CLASS(splat_u16_ns); OIL_DECLARE_CLASS(splat_u32); OIL_DECLARE_CLASS(splat_u32_ns); OIL_DECLARE_CLASS(splat_u8); OIL_DECLARE_CLASS(splat_u8_ns); OIL_DECLARE_CLASS(split_135); OIL_DECLARE_CLASS(split_53); OIL_DECLARE_CLASS(split_approx97); OIL_DECLARE_CLASS(split_daub97); OIL_DECLARE_CLASS(squaresum_f32); OIL_DECLARE_CLASS(squaresum_f64); OIL_DECLARE_CLASS(squaresum_shifted_s16); OIL_DECLARE_CLASS(subtract_f32); OIL_DECLARE_CLASS(subtract_f64); OIL_DECLARE_CLASS(subtract_s16); OIL_DECLARE_CLASS(subtract_s16_u8); OIL_DECLARE_CLASS(sum_f64); OIL_DECLARE_CLASS(sum_s16); OIL_DECLARE_CLASS(swab_u16); OIL_DECLARE_CLASS(swab_u32); OIL_DECLARE_CLASS(synth_135); OIL_DECLARE_CLASS(synth_53); OIL_DECLARE_CLASS(synth_approx97); OIL_DECLARE_CLASS(synth_daub97); OIL_DECLARE_CLASS(tablelookup_u8); OIL_DECLARE_CLASS(testzero_u8); OIL_DECLARE_CLASS(trans8x8_f64); OIL_DECLARE_CLASS(trans8x8_u16); OIL_DECLARE_CLASS(trans8x8_u32); OIL_DECLARE_CLASS(trans8x8_u8); OIL_DECLARE_CLASS(unpackyuyv); OIL_DECLARE_CLASS(unzigzag8x8_s16); OIL_DECLARE_CLASS(utf8_validate); OIL_DECLARE_CLASS(uyvy2ayuv); OIL_DECLARE_CLASS(vectoradd_f32); OIL_DECLARE_CLASS(vectoradd_f64); OIL_DECLARE_CLASS(vectoradd_s16); OIL_DECLARE_CLASS(vectoradd_s32); OIL_DECLARE_CLASS(vectoradd_s8); OIL_DECLARE_CLASS(vectoradd_s_f32); OIL_DECLARE_CLASS(vectoradd_s_f64); OIL_DECLARE_CLASS(vectoradd_s_s16); OIL_DECLARE_CLASS(vectoradd_s_s8); OIL_DECLARE_CLASS(vectoradd_s_u16); OIL_DECLARE_CLASS(vectoradd_s_u8); OIL_DECLARE_CLASS(vectoradd_u16); OIL_DECLARE_CLASS(vectoradd_u32); OIL_DECLARE_CLASS(vectoradd_u8); OIL_DECLARE_CLASS(yuv2rgbx_sub2_u8); OIL_DECLARE_CLASS(yuv2rgbx_sub4_u8); OIL_DECLARE_CLASS(yuv2rgbx_u8); OIL_DECLARE_CLASS(yuyv2ayuv); OIL_DECLARE_CLASS(yvyu2ayuv); OIL_DECLARE_CLASS(zigzag8x8_s16); #ifdef __cplusplus } #endif #endif liboil-0.3.17/liboil/liboilrandom.c0000644000175000017500000001136010717203073014067 00000000000000/* * LIBOIL - Library of Optimized Inner Loops * Copyright (c) 2005 David A. Schleef * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include /** * SECTION:liboilrandom * @title: Random Number Generation * @short_description: Random number generation */ static void _oil_random_bits (void *dest, int n) { int i; uint8_t *d = dest; for(i=0;i>16); } } /** * oil_random_s32: * @dest: * @n: * * Writes random values in the range [-(1<<31), (1<<31)-1] to the * destination array. */ void oil_random_s32(oil_type_s32 *dest, int n) { _oil_random_bits (dest, n*4); } /** * oil_random_s64: * * Writes random values in the range [-(1<<63), (1<<63)-1] to the * destination array. */ void oil_random_s64 (oil_type_s64 *dest, int n) { _oil_random_bits (dest, n*8); } /** * oil_random_s16: * * Writes random values in the range [-(1<<15), (1<<15)-1] to the * destination array. */ void oil_random_s16 (oil_type_s16 *dest, int n) { _oil_random_bits (dest, n*2); } /** * oil_random_s8: * * Writes random values in the range [-(1<<7), (1<<7)-1] to the * destination array. */ void oil_random_s8 (oil_type_s8 *dest, int n) { _oil_random_bits (dest, n); } /** * oil_random_u32: * * Writes random values in the range [0, (1<<32)-1] to the * destination array. */ void oil_random_u32 (oil_type_u32 *dest, int n) { _oil_random_bits (dest, n*4); } /** * oil_random_u64: * * Writes random values in the range [0, (1<<64)-1] to the * destination array. */ void oil_random_u64 (oil_type_u64 *dest, int n) { _oil_random_bits (dest, n*8); } /** * oil_random_u16: * * Writes random values in the range [0, (1<<16)-1] to the * destination array. */ void oil_random_u16 (oil_type_u16 *dest, int n) { _oil_random_bits (dest, n*2); } /** * oil_random_u8: * * Writes random values in the range [0, (1<<8)-1] to the * destination array. */ void oil_random_u8 (oil_type_u8 *dest, int n) { _oil_random_bits (dest, n); } /** * oil_random_f64: * * Writes random double-precision floating point values in the * range [0, 1.0) to the destination array. */ void oil_random_f64 (oil_type_f64 *dest, int n) { int i; for(i=0;i>8) & 0x1ff) - 0x80; if (x<0) x = 0; if (x>255) x = 255; dest[i] = x; } } /** * oil_random_argb: * @dest: destination array. * @n: number of values to write. * * Creates valid random RGBA values and places them in the destination * array. */ void oil_random_argb(uint32_t *dest, int n) { int i; int x; for(i=0;i>8) & 0x1ff) - 0x80; if (x<0) x = 0; if (x>255) x = 255; dest[i] = oil_argb_noclamp(x, oil_muldiv_255(x,oil_rand_u8()), oil_muldiv_255(x,oil_rand_u8()), oil_muldiv_255(x,oil_rand_u8())); } } liboil-0.3.17/liboil-uninstalled.pc.in0000644000175000017500000000042711151567413014527 00000000000000prefix= exec_prefix= libdir=${pcfiledir}/liboil/ includedir=${pcfiledir}/ Name: liboil-@LIBOIL_MAJORMINOR@ uninstalled Description: Library of Optimized Inner Loops Version: @VERSION@ Libs: -L${libdir} -loil-@LIBOIL_MAJORMINOR@ @LIBM@ @LIBRT@ Cflags: -I${includedir} -I@srcdir@ liboil-0.3.17/config.h.in0000644000175000017500000001040111332627667012031 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Define if compiling broken implementations */ #undef ENABLE_BROKEN_IMPLS /* Define if compiling new ABI */ #undef ENABLE_NEW_ABI /* Defined if host is amd64 */ #undef HAVE_AMD64 /* Defined if host is arm */ #undef HAVE_ARM /* Defined if we have clock_gettime() */ #undef HAVE_CLOCK_GETTIME /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define if compiler supports gcc inline assembly */ #undef HAVE_GCC_ASM /* Define if compiler supports PowerPC FPU instructions */ #undef HAVE_GCC_ASM_POWERPC_FPU /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Defined if host is i386 */ #undef HAVE_I386 /* Define if ieee754.h exists */ #undef HAVE_IEEE754_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if lrint() is available */ #undef HAVE_LRINT /* Define if lrintf() is available */ #undef HAVE_LRINTF /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Defined if we have a monotonic clock */ #undef HAVE_MONOTONIC_CLOCK /* Defined if host OS is linux */ #undef HAVE_OS_LINUX /* Defined if host OS is MS Windows */ #undef HAVE_OS_WIN32 /* Defined if host is powerpc */ #undef HAVE_POWERPC /* Define if rint() is available */ #undef HAVE_RINT /* Define if rintf() is available */ #undef HAVE_RINTF /* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION /* Define to 1 if you have the `sigsetjmp' function. */ #undef HAVE_SIGSETJMP /* Define if sincos() is available */ #undef HAVE_SINCOS /* Defined if compiler/assembler can handle SSSE3 instructions */ #undef HAVE_SSSE3_ASM /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define if C symbols have leading underscore */ #undef HAVE_SYMBOL_UNDERSCORE /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* defined if unaligned memory access works correctly */ #undef HAVE_UNALIGNED_ACCESS /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Defined if prototype checking enabled */ #undef LIBOIL_STRICT_PROTOTYPES /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Defined for compiling internal code */ #undef OIL_EXPORTS /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* The size of `char', as computed by sizeof. */ #undef SIZEOF_CHAR /* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG /* The size of `short', as computed by sizeof. */ #undef SIZEOF_SHORT /* The size of `void*', as computed by sizeof. */ #undef SIZEOF_VOIDP /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif liboil-0.3.17/README0000644000175000017500000000566411332637272010676 00000000000000 ***** WARNING ***** Liboil is now in maintenence-only mode. No new features will be added, and bugs will be fixed according to their severity and availablility of patches. Users of liboil are recommended to switch to Orc (http://code.entropywave.com/projects/orc/). Please contact David Schleef about converting liboil functions to Orc code -- in many cases this work has already been done. ***** WARNING ***** Requirements ============ Liboil has no required dependecies (other than a decent C compiler and standard C library). A few extra tests and examples are enabled if you have glib-2.0 installed, but these extras are neither required nor installed. Using GCC is strongly recommended, since the most interesting bits of liboil are written in GCC-style inline assembly. GCC versions prior to 3.4 are not supported. Problems Compiling? =================== Function implementations in liboil are designed to be modular, so if your compiler is having difficulty compiling a particular function, simply disable it and the corresponding OIL_DEFINE_IMPL() line. ABI warning =========== Only a portion of the liboil API is ABI stable. This portion is guaranteed to be stable through the 0.3.x series, and by using a compatibility library, through the 0.4.x series as well. This policy is designed to provide almost all applications the necessary ABI stability for the symbols likely to be used in liboil. Any symbols declared by including follow this ABI policy. This includes all liboil function classes as well as a limited number of core functions, such as oil_init(). Functions defined in other header files should not be used. ABI Implementation ================== The liboil-0.3.x series create the shared library liboil-0.3.so. Applications that use liboil are linked against this library, and will load liboil-0.3.so at runtime. The liboil-0.4.x series will create two shared libraries, liboil-0.4.so and a compaitiblity library liboil-0.3.so that implements functionality removed in the 0.3->0.4 transition. The 0.3 shared library will be binary compatible with the liboil-0.3.x releases. Thus, applictions compiled with a liboil-0.3.x release will continue to function after the shared library is upgraded to a 0.4.x release. Applications compiled with 0.4.x will use liboil-0.4.so directly. Distributions can use this compatibility library in order to smooth transitions between liboil major releases. For example, consider the case where AppA depends on libB and libC, and both libraries use liboil. When liboil-0.4 is released, the distro can start using it immediately, and AppA will continue to work correctly. Then, at a convenient time, libB and libC can independently be recompiled using liboil-0.4.x, and the packages will no longer depend on liboil-0.3.so. The traditional way of dealing with these changes is to migrate all packages to the new library as quickly as possible. This is unduly cumbersome. liboil-0.3.17/AUTHORS0000644000175000017500000000003710717203073011045 00000000000000David Schleef liboil-0.3.17/Makefile.in0000644000175000017500000006435011332627674012065 00000000000000# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/liboil-uninstalled.pc.in $(srcdir)/liboil.pc.in \ $(top_srcdir)/configure AUTHORS COPYING NEWS compile \ config.guess config.sub depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_libtool_tags.m4 \ $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/as-gcc-inline-assembly.m4 \ $(top_srcdir)/m4/as-host-defines.m4 \ $(top_srcdir)/m4/as-intrinsics.m4 $(top_srcdir)/m4/as-nano.m4 \ $(top_srcdir)/m4/as-unaligned-access.m4 \ $(top_srcdir)/m4/ax_create_stdint_h.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = liboil-uninstalled.pc liboil.pc CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBOIL_CFLAGS = @LIBOIL_CFLAGS@ LIBOIL_LIBS = @LIBOIL_LIBS@ LIBOIL_LIBVERSION = @LIBOIL_LIBVERSION@ LIBOIL_MAJORMINOR = @LIBOIL_MAJORMINOR@ LIBOIL_OLD_MAJORMINOR = @LIBOIL_OLD_MAJORMINOR@ LIBOIL_OPT_CFLAGS = @LIBOIL_OPT_CFLAGS@ LIBRT = @LIBRT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MMX_CFLAGS = @MMX_CFLAGS@ NANO = @NANO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSE2_CFLAGS = @SSE2_CFLAGS@ SSE3_CFLAGS = @SSE3_CFLAGS@ SSE_CFLAGS = @SSE_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ VFP_CFLAGS = @VFP_CFLAGS@ _3DNOWEXT_CFLAGS = @_3DNOWEXT_CFLAGS@ _3DNOW_CFLAGS = @_3DNOW_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign SUBDIRS = liboil testsuite examples doc EXTRA_DIST = COPYING autogen.sh gtk-doc.make HACKING BUG-REPORTING DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc pkgconfig_DATA = liboil-$(LIBOIL_MAJORMINOR).pc BUILT_SOURCES = liboil-$(LIBOIL_MAJORMINOR)-uninstalled.pc CLEANFILES = liboil-$(LIBOIL_MAJORMINOR).pc liboil-$(LIBOIL_MAJORMINOR)-uninstalled.pc ACLOCAL_AMFLAGS = -I m4 all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 liboil-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/liboil-uninstalled.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ liboil.pc: $(top_builddir)/config.status $(srcdir)/liboil.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ ctags-recursive install install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-pkgconfigDATA liboil-$(LIBOIL_MAJORMINOR).pc: liboil.pc cp liboil.pc liboil-$(LIBOIL_MAJORMINOR).pc liboil-$(LIBOIL_MAJORMINOR)-uninstalled.pc: liboil-uninstalled.pc cp liboil-uninstalled.pc liboil-$(LIBOIL_MAJORMINOR)-uninstalled.pc # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: liboil-0.3.17/configure.ac0000644000175000017500000002250211332627563012274 00000000000000AC_PREREQ([2.58]) AC_INIT(liboil,0.3.17) AS_NANO(LIBOIL_CVS=no,LIBOIL_CVS=yes) AC_CANONICAL_HOST([]) AM_INIT_AUTOMAKE(1.6) AM_MAINTAINER_MODE #LIBOIL_MAJORMINOR=0.3 #AC_SUBST(LIBOIL_MAJORMINOR) AM_CONFIG_HEADER(config.h) dnl CURRENT, REVISION, AGE dnl - library source changed -> increment REVISION dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0 dnl - interfaces added -> increment AGE dnl - interfaces removed -> AGE = 0 LIBOIL_LIBVERSION="3:0:3" AC_SUBST(LIBOIL_LIBVERSION) AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_TAGS([]) AC_PROG_LIBTOOL AM_PROG_AS AC_CONFIG_SRCDIR([liboil/liboil.h]) AC_CONFIG_MACRO_DIR([m4]) PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes, HAVE_GLIB=no) AC_SUBST(GLIB_LIBS) AC_SUBST(GLIB_CFLAGS) AC_ARG_ENABLE(glib, AC_HELP_STRING([--disable-glib],[disable usage of glib]), [case "${enableval}" in yes) HAVE_GLIB=yes ;; no) HAVE_GLIB=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-glib) ;; esac]) AM_CONDITIONAL(HAVE_GLIB, test "x$HAVE_GLIB" = "xyes") AC_ARG_ENABLE(prototype-checking, AC_HELP_STRING([--enable-prototype-checking],[compile with strict prototype checking]), enable_proto_check=$enableval,enable_proto_check=no) if test "x$enable_proto_check" = xyes ; then AC_DEFINE(LIBOIL_STRICT_PROTOTYPES,1,[Defined if prototype checking enabled]) fi AC_ARG_WITH(alternate-optimization, AC_HELP_STRING([--with-alternate-optimization=CFLAGS],[compile with alternate optimization flags]), [enable_alt_opt=yes; LIBOIL_OPT_CFLAGS=$withval],enable_alt_opt=no) if test "x$enable_alt_opt" = xyes ; then LIBOIL_OPT_CFLAGS="$LIBOIL_OPT_CFLAGS -D'OIL_OPT_MANGLE(a)=a\#\#_alt' -D'OIL_OPT_SUFFIX=\"_alt\"'" fi AM_CONDITIONAL(USE_ALT_OPT, test "x$enable_alt_opt" = xyes) AC_SUBST(LIBOIL_OPT_CFLAGS) AC_ARG_ENABLE(broken-implementations, AC_HELP_STRING([--enable-broken-implementations],[compile with broken implementations]), enable_broken_implementations=$enableval,enable_broken_implementations=no) if test "x$enable_broken_implementations" = xyes ; then AC_DEFINE(ENABLE_BROKEN_IMPLS, 1, [Define if compiling broken implementations]) fi #AC_ARG_ENABLE(new-abi, # AC_HELP_STRING([--enable-new-abi],[enable experimental 0.4 ABI]), # enable_new_abi=$enableval,enable_new_abi=no) if test "x$enable_new_abi" = xyes ; then AC_DEFINE(ENABLE_NEW_ABI, 1, [Define if compiling new ABI]) fi AM_CONDITIONAL(USE_NEW_ABI, test "x$enable_new_abi" = xyes) if test "x$enable_new_abi" = xyes ; then LIBOIL_MAJORMINOR=0.4 LIBOIL_OLD_MAJORMINOR=0.3 else LIBOIL_MAJORMINOR=0.3 LIBOIL_OLD_MAJORMINOR=0.2 fi AC_SUBST(LIBOIL_MAJORMINOR) AC_SUBST(LIBOIL_OLD_MAJORMINOR) ################################################## # Check for gtk-doc. ################################################## if test "x$cross_compiling" = "xyes" ; then enable_gtk_doc=no fi GTK_DOC_CHECK([1.0]) AS_GCC_INLINE_ASSEMBLY([HAVE_GCC_ASM=yes], [HAVE_GCC_ASM=no]) if test x$HAVE_GCC_ASM = xyes ; then AC_DEFINE(HAVE_GCC_ASM, 1, [Define if compiler supports gcc inline assembly]) fi AM_CONDITIONAL(HAVE_GCC_ASM, test "x$HAVE_GCC_ASM" = "xyes") AS_HOST_DEFINES() AS_GCC_ASM_POWERPC_FPU([HAVE_GCC_ASM_POWERPC_FPU=yes], [HAVE_GCC_ASM_POWERPC_FPU=no]) if test x$HAVE_GCC_ASM_POWERPC_FPU = xyes ; then AC_DEFINE(HAVE_GCC_ASM_POWERPC_FPU, 1, [Define if compiler supports PowerPC FPU instructions]) fi AM_CONDITIONAL(HAVE_GCC_ASM_POWERPC_FPU, test "x$HAVE_GCC_ASM_POWERPC" = "xyes") AC_C_BIGENDIAN AS_UNALIGNED_ACCESS AC_LTDL_SYMBOL_USCORE if test x${lt_cv_sys_symbol_underscore} = xyes ; then AC_DEFINE(HAVE_SYMBOL_UNDERSCORE, 1, [Define if C symbols have leading underscore]) fi AX_CREATE_STDINT_H([liboil/liboil-stdint.h]) AC_FUNC_MMAP() AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT, 1, [Define if rint() is available])) AC_CHECK_LIB(m, rintf, AC_DEFINE(HAVE_RINTF, 1, [Define if rintf() is available])) AC_CHECK_LIB(m, lrint, AC_DEFINE(HAVE_LRINT, 1, [Define if lrint() is available])) AC_CHECK_LIB(m, lrintf, AC_DEFINE(HAVE_LRINTF, 1, [Define if lrintf() is available])) AC_CHECK_LIB(m, sincos, AC_DEFINE(HAVE_SINCOS, 1, [Define if sincos() is available])) AC_CHECK_HEADER(ieee754.h, AC_DEFINE(HAVE_IEEE754_H, 1, [Define if ieee754.h exists])) AC_CHECK_HEADERS([inttypes.h]) AC_CHECK_HEADERS([sys/time.h]) AC_CHECK_HEADERS([unistd.h]) AC_CHECK_FUNCS([gettimeofday]) AC_CHECK_FUNCS([sigaction]) AC_CHECK_FUNCS([sigsetjmp]) AC_CHECK_LIBM AC_SUBST(LIBM) AC_CHECK_LIB(rt, clock_gettime, AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Defined if we have clock_gettime()]) LIBRT=-lrt ) AC_SUBST(LIBRT) AC_CACHE_CHECK(for monotonic clocks, oil_cv_monotonic_clock,AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #include #include int main() { #if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC)) #error No monotonic clock #endif return 0; } ]])],oil_cv_monotonic_clock=yes,oil_cv_monotonic_clock=no)) if test "$oil_cv_monotonic_clock" = "yes"; then AC_DEFINE(HAVE_MONOTONIC_CLOCK,1,[Defined if we have a monotonic clock]) fi AS_COMPILER_FLAG(-Wall, LIBOIL_CFLAGS="$LIBOIL_CFLAGS -Wall") if test "x$LIBOIL_CVS" = "xyes" then AS_COMPILER_FLAG(-Werror, LIBOIL_CFLAGS="$LIBOIL_CFLAGS -Werror") fi if test x$HAVE_GCC_ASM = xyes -a x$HAVE_POWERPC = xyes ; then AS_COMPILER_FLAG(["-Wa,-maltivec"], [LIBOIL_CFLAGS="$LIBOIL_CFLAGS -Wa,-maltivec"], true) AS_COMPILER_FLAG(["-Wa,-mregnames"], [LIBOIL_CFLAGS="$LIBOIL_CFLAGS -Wa,-mregnames"], true) AS_COMPILER_FLAG(["-force_cpusubtype_ALL"], [LIBOIL_CFLAGS="$LIBOIL_CFLAGS -force_cpusubtype_ALL"], true) AS_COMPILER_FLAG(["-fno-tree-vectorize"], [LIBOIL_CFLAGS="$LIBOIL_CFLAGS -fno-tree-vectorize"], true) fi AC_ARG_ENABLE(vfp, AC_HELP_STRING([--enable-vfp],[compile with Vector Floating-point unit support]), enable_vfp=$enableval,enable_vfp=yes) if test "x$enable-vfp" = xyes -a x$HAVE_GCC_ASM = xyes -a x$HAVE_ARM = xyes; then AS_COMPILER_FLAG(["-Wa,-mfpu=vfp"], [VFP_CFLAGS="$VFP_CFLAGS -mfpu=vfp"], true) #AS_COMPILER_FLAG(["-Wa,-mfloat-abi=softfp"], # [VFP_CFLAGS="$VFP_CFLAGS -mfloat-abi=softfp"], # true) fi AC_SUBST(VFP_CFLAGS) #AS_COMPILER_FLAG(["-fasm-blocks"], HAVE_ASM_BLOCKS=yes, HAVE_ASM_BLOCKS=no) HAVE_ASM_BLOCKS=no if test "x$HAVE_ASM_BLOCKS" = "xyes" then LIBOIL_CFLAGS="$LIBOIL_CFLAGS -fasm-blocks" fi AM_CONDITIONAL(HAVE_ASM_BLOCKS, test "x$HAVE_ASM_BLOCKS" = "xyes") #if test "x$HAVE_I386" = "xyes" #then # # I'd write a test for this, but as of 4.1.2, gcc is still broken # AC_DEFINE(USE_SSE_WRAPPER, 1, [Defined if SSE functions need stack alignment wrappers]) #fi AS_MMX_INTRINSICS(MMX_CFLAGS, HAVE_MMX_INTRINSICS=yes, HAVE_MMX_INTRINSICS=no) AS_SSE_INTRINSICS(SSE_CFLAGS, HAVE_SSE_INTRINSICS=yes, HAVE_SSE_INTRINSICS=no) AS_SSE2_INTRINSICS(SSE2_CFLAGS, HAVE_SSE2_INTRINSICS=yes, HAVE_SSE2_INTRINSICS=no) AS_SSE3_INTRINSICS(SSE3_CFLAGS, HAVE_SSE3_INTRINSICS=yes, HAVE_SSE3_INTRINSICS=no) AS_3DNOW_INTRINSICS(_3DNOW_CFLAGS, HAVE_3DNOW_INTRINSICS=yes, HAVE_3DNOW_INTRINSICS=no) AS_3DNOWEXT_INTRINSICS(_3DNOWEXT_CFLAGS, HAVE_3DNOWEXT_INTRINSICS=yes, HAVE_3DNOWEXT_INTRINSICS=no) AS_ALTIVEC_INTRINSICS(ALTIVEC_CFLAGS, HAVE_ALTIVEC_INTRINSICS=yes, HAVE_ALTIVEC_INTRINSICS=no) AM_CONDITIONAL(HAVE_MMX_INTRINSICS, test "x$HAVE_MMX_INTRINSICS" = "xyes") AM_CONDITIONAL(HAVE_SSE_INTRINSICS, test "x$HAVE_SSE_INTRINSICS" = "xyes") AM_CONDITIONAL(HAVE_SSE2_INTRINSICS, test "x$HAVE_SSE2_INTRINSICS" = "xyes") AM_CONDITIONAL(HAVE_SSE3_INTRINSICS, test "x$HAVE_SSE3_INTRINSICS" = "xyes") AM_CONDITIONAL(HAVE_3DNOW_INTRINSICS, test "x$HAVE_3DNOW_INTRINSICS" = "xyes") AM_CONDITIONAL(HAVE_3DNOWEXT_INTRINSICS, test "x$HAVE_3DNOWEXT_INTRINSICS" = "xyes") AM_CONDITIONAL(HAVE_ALTIVEC_INTRINSICS, test "x$HAVE_ALTIVEC_INTRINSICS" = "xyes") AC_SUBST(MMX_CFLAGS) AC_SUBST(SSE_CFLAGS) AC_SUBST(SSE2_CFLAGS) AC_SUBST(SSE3_CFLAGS) AC_SUBST(_3DNOW_CFLAGS) AC_SUBST(_3DNOWEXT_CFLAGS) AC_SUBST(ALTIVEC_CFLAGS) dnl binutils-2.18 required for this, but is too new for FreeBSD/Solaris AS_GCC_INLINE_ASM_INSTRUCTION([pmaddubsw %%mm0, %%mm0], [HAVE_SSSE3_ASM=yes], [HAVE_SSSE3_ASM=no]) if test "x$HAVE_SSSE3_ASM" = xyes ; then AC_DEFINE(HAVE_SSSE3_ASM, 1, [Defined if compiler/assembler can handle SSSE3 instructions]) fi AC_DEFINE(OIL_EXPORTS, 1, [Defined for compiling internal code]) LIBOIL_CFLAGS="$LIBOIL_CFLAGS -D_BSD_SOURCE -D_GNU_SOURCE -I\$(top_srcdir) -DOIL_ENABLE_UNSTABLE_API" AC_SUBST(LIBOIL_CFLAGS) LIBOIL_LIBS="\$(top_builddir)/liboil/liboil-$LIBOIL_MAJORMINOR.la $LIBM $LIBRT" AC_SUBST(LIBOIL_LIBS) pkgconfigdir="\$(libdir)/pkgconfig" AC_SUBST(pkgconfigdir) AC_CONFIG_FILES([ Makefile doc/Makefile liboil/Makefile liboil/amd64/Makefile liboil/3dnow/Makefile liboil/c/Makefile liboil/colorspace/Makefile liboil/conv/Makefile liboil/copy/Makefile liboil/dct/Makefile liboil/deprecated/Makefile liboil/fb/Makefile liboil/i386/Makefile liboil/i386_amd64/Makefile liboil/jpeg/Makefile liboil/math/Makefile liboil/md5/Makefile liboil/mmx/Makefile liboil/motovec/Makefile liboil/powerpc/Makefile liboil/powerpc_asm_blocks/Makefile liboil/ref/Makefile liboil/simdpack/Makefile liboil/sse/Makefile liboil/utf8/Makefile liboil/arm/Makefile testsuite/Makefile testsuite/instruction/Makefile examples/Makefile examples/audioresample/Makefile examples/huffman/Makefile examples/jpeg/Makefile examples/md5/Makefile examples/taylor/Makefile examples/uberopt/Makefile examples/videoscale/Makefile examples/work/Makefile liboil-uninstalled.pc liboil.pc ]) AC_OUTPUT liboil-0.3.17/COPYING0000644000175000017500000001065110717203073011033 00000000000000 The majority of the source code and the collective work is subject to the following license: Copyright 2002,2003,2004,2005 David A. Schleef All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The source code in the liboil/motovec directory is subject to the following license: Copyright Motorola, Inc. 2003 ALL RIGHTS RESERVED You are hereby granted a copyright license to use, modify, and distribute the SOFTWARE so long as this entire notice is retained without alteration in any modified and/or redistributed versions, and that such modified versions are clearly identified as such. No licenses are granted by implication, estoppel or otherwise under any patents or trademarks of Motorola, Inc. The SOFTWARE is provided on an "AS IS" basis and without warranty. To the maximum extent permitted by applicable law, MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH REGARD TO THE SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF) AND ANY ACCOMPANYING WRITTEN MATERIALS. To the maximum extent permitted by applicable law, IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE. Motorola assumes no responsibility for the maintenance and support of the SOFTWARE. The source code implementing the Mersenne Twister algorithm is subject to the following license: Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. liboil-0.3.17/HACKING0000644000175000017500000000757011067011142010766 00000000000000 Hacking on liboil ================= New Implementations ------------------- New implementations using GCC inline assembly code should go in liboil/${arch}, or liboil/i386_amd64 if they compile on both i386 and amd64 architectures. New implementations that are written in POSIX C should go in liboil/c. New implementations written with MMX/SSE/Altivec instrinsics should go in liboil/mmx, liboil/sse, or liboil/altivec. Implementations copied from other projects should generally be given a separate directory under liboil/, similar to liboil/motovec. Things to check for when writing new implementations: - handle the n==0 case correctly - handle various array alignments correctly if the vectorized code has trouble loading misaligned data. Sometimes this is only a problem on certain CPUs. - unrolled loops and vectorized code needs to handle any extra array elements at the end of array. - if a class has strides, they must be followed. Things implementations can assume: - n will never be negative - alignment of individual array members. For example, if the type is "u32", you can assume that pointers and strides are multiples of 4. In general, if your implementation is enabled on the current CPU and 'make check' passes, it's probably a clean implementation. Broken implementations (i.e., code that is a work-in-progress) are still allowed, as long as the broken code is wrapped in #ifdef ENABLE_BROKEN_IMPLS/#endif. New Classes ----------- Reference implementations for new classes should go in liboil/ref. The naming of new classes is a tricky business. The goal is to make the name short, easy to remember and type, but descriptive enough to differentiate it from alternatives. This policy has not always been followed in the past, so don't follow that lead. Try to: - Use full names instead of abbreviations. Some abbreviations however are common and acceptable, such as "diff", "avg", or "abs". - Use a name that makes sense independent of the application that you may be copying it from. - Use nouns instead of verbs (thus, "difference" instead of "subtract", or "sum" instead of "add"). Class names are made up of a base part that describes what the function does, appended with modifiers. Common modifiers are for the type ("_f64", "_u8"), or to indicate inaccuracies or limitations in implementations ("_i10", "_l10"). _i10 stands for "inaccurate by a factor of 10", where the baseline accuracy is 2^-52 for doubles and 2^-24 (I think). It's a decilog scale, so _i20 is a factor of 100, etc. The baseline accuracy comes from the least expressible number greater than 1.0. _l10 stands for "something is limited to 10". Sometimes this means input range, e.g., _l15 is (was?) used for some function class that could only handle input values in the range [-1<<14, 1<<14-1]. Another class uses this to mean that only 10 of the input values can be non-zero (oil_idct8x8theora_l10). These modifiers are obviously not well-thought-out. In order to be useful, applications need to be able to make predictions about accuracy based on value of n, input values, etc. I also don't think that simply defining new classes is a maintainable solution. Use of underscores in the base part of the class name is arbitrary. This may change in the future. New classes should not use the modifier "_ns", since non-strided arrays are the default. Parameters should generally follow the order: i1, is1, i2, is2, ..., d1, ds1, ..., s1, ss1, ..., n, m After you add a new class, it's necessary to run 'make update' in the liboil/ directory to regenerate some built headers. Test Machines ------------- Machines that ds has access to: power5.infradead.org - powerpc POWER5 bombadil.infradead.org - powerpc PPC970MP (G5) liboil-0.3.17/config.guess0000755000175000017500000013226411332627667012342 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2009-04-27' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd | genuineintel) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: